From 2f10a26b888b3afbc76022739b1d3a583ed906c9 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 11 Mar 2021 13:31:05 -0300 Subject: [PATCH 01/95] move files --- .gitignore | 3 ++- GameManager.cpp => src/GameManager.cpp | 0 GameManager.h => src/GameManager.h | 0 PauseLayer.cpp => src/PauseLayer.cpp | 0 PauseLayer.h => src/PauseLayer.h | 0 PlayLayer.cpp => src/PlayLayer.cpp | 0 PlayLayer.h => src/PlayLayer.h | 0 PlayerObject.cpp => src/PlayerObject.cpp | 0 PlayerObject.h => src/PlayerObject.h | 0 PracticeFixes.cpp => src/PracticeFixes.cpp | 0 PracticeFixes.h => src/PracticeFixes.h | 0 Replay.cpp => src/Replay.cpp | 0 Replay.h => src/Replay.h | 0 ReplaySystem.cpp => src/ReplaySystem.cpp | 0 ReplaySystem.h => src/ReplaySystem.h | 0 dllmain.cpp => src/dllmain.cpp | 0 framework.h => src/framework.h | 0 pch.cpp => src/pch.cpp | 0 pch.h => src/pch.h | 0 utils.hpp => src/utils.hpp | 0 20 files changed, 2 insertions(+), 1 deletion(-) rename GameManager.cpp => src/GameManager.cpp (100%) rename GameManager.h => src/GameManager.h (100%) rename PauseLayer.cpp => src/PauseLayer.cpp (100%) rename PauseLayer.h => src/PauseLayer.h (100%) rename PlayLayer.cpp => src/PlayLayer.cpp (100%) rename PlayLayer.h => src/PlayLayer.h (100%) rename PlayerObject.cpp => src/PlayerObject.cpp (100%) rename PlayerObject.h => src/PlayerObject.h (100%) rename PracticeFixes.cpp => src/PracticeFixes.cpp (100%) rename PracticeFixes.h => src/PracticeFixes.h (100%) rename Replay.cpp => src/Replay.cpp (100%) rename Replay.h => src/Replay.h (100%) rename ReplaySystem.cpp => src/ReplaySystem.cpp (100%) rename ReplaySystem.h => src/ReplaySystem.h (100%) rename dllmain.cpp => src/dllmain.cpp (100%) rename framework.h => src/framework.h (100%) rename pch.cpp => src/pch.cpp (100%) rename pch.h => src/pch.h (100%) rename utils.hpp => src/utils.hpp (100%) diff --git a/.gitignore b/.gitignore index a816690..b80582d 100644 --- a/.gitignore +++ b/.gitignore @@ -361,4 +361,5 @@ MigrationBackup/ # Fody - auto-generated XML schema FodyWeavers.xsd -ffmpeg/ \ No newline at end of file +ffmpeg/ +inject.py \ No newline at end of file diff --git a/GameManager.cpp b/src/GameManager.cpp similarity index 100% rename from GameManager.cpp rename to src/GameManager.cpp diff --git a/GameManager.h b/src/GameManager.h similarity index 100% rename from GameManager.h rename to src/GameManager.h diff --git a/PauseLayer.cpp b/src/PauseLayer.cpp similarity index 100% rename from PauseLayer.cpp rename to src/PauseLayer.cpp diff --git a/PauseLayer.h b/src/PauseLayer.h similarity index 100% rename from PauseLayer.h rename to src/PauseLayer.h diff --git a/PlayLayer.cpp b/src/PlayLayer.cpp similarity index 100% rename from PlayLayer.cpp rename to src/PlayLayer.cpp diff --git a/PlayLayer.h b/src/PlayLayer.h similarity index 100% rename from PlayLayer.h rename to src/PlayLayer.h diff --git a/PlayerObject.cpp b/src/PlayerObject.cpp similarity index 100% rename from PlayerObject.cpp rename to src/PlayerObject.cpp diff --git a/PlayerObject.h b/src/PlayerObject.h similarity index 100% rename from PlayerObject.h rename to src/PlayerObject.h diff --git a/PracticeFixes.cpp b/src/PracticeFixes.cpp similarity index 100% rename from PracticeFixes.cpp rename to src/PracticeFixes.cpp diff --git a/PracticeFixes.h b/src/PracticeFixes.h similarity index 100% rename from PracticeFixes.h rename to src/PracticeFixes.h diff --git a/Replay.cpp b/src/Replay.cpp similarity index 100% rename from Replay.cpp rename to src/Replay.cpp diff --git a/Replay.h b/src/Replay.h similarity index 100% rename from Replay.h rename to src/Replay.h diff --git a/ReplaySystem.cpp b/src/ReplaySystem.cpp similarity index 100% rename from ReplaySystem.cpp rename to src/ReplaySystem.cpp diff --git a/ReplaySystem.h b/src/ReplaySystem.h similarity index 100% rename from ReplaySystem.h rename to src/ReplaySystem.h diff --git a/dllmain.cpp b/src/dllmain.cpp similarity index 100% rename from dllmain.cpp rename to src/dllmain.cpp diff --git a/framework.h b/src/framework.h similarity index 100% rename from framework.h rename to src/framework.h diff --git a/pch.cpp b/src/pch.cpp similarity index 100% rename from pch.cpp rename to src/pch.cpp diff --git a/pch.h b/src/pch.h similarity index 100% rename from pch.h rename to src/pch.h diff --git a/utils.hpp b/src/utils.hpp similarity index 100% rename from utils.hpp rename to src/utils.hpp From b7c55433e02dfc52e8eed1018e54ddc161e829dc Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 11 Mar 2021 13:37:51 -0300 Subject: [PATCH 02/95] move to cmake + submodules --- .gitignore | 370 +-- .gitmodules | 6 + CMakeLists.txt | 39 + ReplayBot.sln | 31 - ReplayBot.vcxproj | 576 ---- ReplayBot.vcxproj.filters | 1254 -------- cappuccino-sdk/LICENSE | 21 - cappuccino-sdk/incl/cocos2dx/Android.mk | 178 -- cappuccino-sdk/incl/cocos2dx/CCCamera.h | 145 - .../incl/cocos2dx/CCConfiguration.h | 164 -- cappuccino-sdk/incl/cocos2dx/CCDirector.h | 579 ---- cappuccino-sdk/incl/cocos2dx/CCScheduler.h | 319 --- .../incl/cocos2dx/actions/CCAction.h | 295 -- .../incl/cocos2dx/actions/CCActionCamera.h | 147 - .../cocos2dx/actions/CCActionCatmullRom.h | 275 -- .../incl/cocos2dx/actions/CCActionEase.h | 567 ---- .../incl/cocos2dx/actions/CCActionGrid.h | 241 -- .../incl/cocos2dx/actions/CCActionGrid3D.h | 296 -- .../incl/cocos2dx/actions/CCActionInstant.h | 526 ---- .../incl/cocos2dx/actions/CCActionInterval.h | 962 ------- .../incl/cocos2dx/actions/CCActionManager.h | 142 - .../cocos2dx/actions/CCActionPageTurn3D.h | 62 - .../cocos2dx/actions/CCActionProgressTimer.h | 94 - .../incl/cocos2dx/actions/CCActionTiledGrid.h | 330 --- .../incl/cocos2dx/actions/CCActionTween.h | 90 - .../incl/cocos2dx/base_nodes/CCAtlasNode.h | 139 - .../cocos2dx/base_nodes/CCGLBufferedNode.h | 48 - .../incl/cocos2dx/base_nodes/CCNode.h | 1546 ---------- cappuccino-sdk/incl/cocos2dx/ccFPSImages.c | 613 ---- cappuccino-sdk/incl/cocos2dx/ccFPSImages.h | 34 - .../incl/cocos2dx/cocoa/CCAffineTransform.h | 61 - cappuccino-sdk/incl/cocos2dx/cocoa/CCArray.h | 254 -- .../incl/cocos2dx/cocoa/CCAutoreleasePool.h | 83 - cappuccino-sdk/incl/cocos2dx/cocoa/CCBool.h | 68 - .../incl/cocos2dx/cocoa/CCDataVisitor.h | 115 - .../incl/cocos2dx/cocoa/CCDictionary.h | 436 --- cappuccino-sdk/incl/cocos2dx/cocoa/CCDouble.h | 68 - cappuccino-sdk/incl/cocos2dx/cocoa/CCFloat.h | 68 - .../incl/cocos2dx/cocoa/CCGeometry.h | 347 --- .../incl/cocos2dx/cocoa/CCInteger.h | 42 - cappuccino-sdk/incl/cocos2dx/cocoa/CCNS.h | 80 - cappuccino-sdk/incl/cocos2dx/cocoa/CCObject.h | 126 - cappuccino-sdk/incl/cocos2dx/cocoa/CCSet.h | 125 - cappuccino-sdk/incl/cocos2dx/cocoa/CCString.h | 164 -- cappuccino-sdk/incl/cocos2dx/cocoa/CCZone.h | 58 - .../custom/Delegates/CCKeyboardDelegate.h | 15 - .../custom/Delegates/CCMouseDelegate.h | 15 - .../CCMenuItemSpriteExtra.cpp | 38 - .../CCMenuItemSpriteExtra.h | 15 - .../Sprites/CCSpriteExtra/CCSpriteExtra.h | 14 - .../incl/cocos2dx/draw_nodes/CCDrawNode.h | 107 - .../cocos2dx/draw_nodes/CCDrawingPrimitives.h | 160 -- .../incl/cocos2dx/effects/CCGrabber.h | 66 - cappuccino-sdk/incl/cocos2dx/effects/CCGrid.h | 244 -- .../incl/cocos2dx/include/CCEventType.h | 19 - .../incl/cocos2dx/include/CCProtocols.h | 225 -- .../incl/cocos2dx/include/ccConfig.h | 269 -- .../incl/cocos2dx/include/ccMacros.h | 259 -- .../incl/cocos2dx/include/ccTypeInfo.h | 57 - .../incl/cocos2dx/include/ccTypes.h | 441 --- .../incl/cocos2dx/include/cocos2d.h | 311 -- .../kazmath/include/kazmath/GL/mat4stack.h | 51 - .../kazmath/include/kazmath/GL/matrix.h | 60 - .../cocos2dx/kazmath/include/kazmath/aabb.h | 54 - .../kazmath/include/kazmath/kazmath.h | 39 - .../cocos2dx/kazmath/include/kazmath/mat3.h | 76 - .../cocos2dx/kazmath/include/kazmath/mat4.h | 94 - .../include/kazmath/neon_matrix_impl.h | 45 - .../cocos2dx/kazmath/include/kazmath/plane.h | 71 - .../kazmath/include/kazmath/quaternion.h | 114 - .../cocos2dx/kazmath/include/kazmath/ray2.h | 51 - .../kazmath/include/kazmath/utility.h | 75 - .../cocos2dx/kazmath/include/kazmath/vec2.h | 66 - .../cocos2dx/kazmath/include/kazmath/vec3.h | 69 - .../cocos2dx/kazmath/include/kazmath/vec4.h | 69 - .../incl/cocos2dx/kazmath/src/CMakeLists.txt | 14 - .../incl/cocos2dx/kazmath/src/ChangeLog | 738 ----- .../incl/cocos2dx/kazmath/src/GL/mat4stack.c | 74 - .../incl/cocos2dx/kazmath/src/GL/matrix.c | 191 -- .../incl/cocos2dx/kazmath/src/aabb.c | 63 - .../incl/cocos2dx/kazmath/src/mat3.c | 372 --- .../incl/cocos2dx/kazmath/src/mat4.c | 790 ----- .../cocos2dx/kazmath/src/neon_matrix_impl.c | 97 - .../incl/cocos2dx/kazmath/src/plane.c | 175 -- .../incl/cocos2dx/kazmath/src/quaternion.c | 586 ---- .../incl/cocos2dx/kazmath/src/ray2.c | 186 -- .../incl/cocos2dx/kazmath/src/utility.c | 59 - .../incl/cocos2dx/kazmath/src/vec2.c | 118 - .../incl/cocos2dx/kazmath/src/vec3.c | 310 -- .../incl/cocos2dx/kazmath/src/vec4.c | 154 - .../keypad_dispatcher/CCKeypadDelegate.h | 82 - .../keypad_dispatcher/CCKeypadDispatcher.h | 98 - .../incl/cocos2dx/label_nodes/CCLabelAtlas.h | 113 - .../incl/cocos2dx/label_nodes/CCLabelBMFont.h | 344 --- .../incl/cocos2dx/label_nodes/CCLabelTTF.h | 212 -- .../layers_scenes_transitions_nodes/CCLayer.h | 457 --- .../layers_scenes_transitions_nodes/CCScene.h | 74 - .../CCTransition.h | 845 ------ .../CCTransitionPageTurn.h | 96 - .../CCTransitionProgress.h | 145 - .../incl/cocos2dx/menu_nodes/CCMenu.h | 200 -- .../incl/cocos2dx/menu_nodes/CCMenuItem.h | 433 --- .../incl/cocos2dx/misc_nodes/CCClippingNode.h | 121 - .../incl/cocos2dx/misc_nodes/CCMotionStreak.h | 140 - .../cocos2dx/misc_nodes/CCProgressTimer.h | 156 - .../cocos2dx/misc_nodes/CCRenderTexture.h | 192 -- .../particle_nodes/CCParticleBatchNode.h | 142 - .../particle_nodes/CCParticleExamples.h | 263 -- .../particle_nodes/CCParticleSystem.h | 457 --- .../particle_nodes/CCParticleSystemQuad.h | 151 - .../cocos2dx/particle_nodes/firePngData.h | 48 - .../platform/CCAccelerometerDelegate.h | 59 - .../cocos2dx/platform/CCApplicationProtocol.h | 101 - .../incl/cocos2dx/platform/CCCommon.h | 80 - .../incl/cocos2dx/platform/CCDevice.h | 26 - .../cocos2dx/platform/CCEGLViewProtocol.h | 202 -- .../incl/cocos2dx/platform/CCFileUtils.h | 445 --- .../incl/cocos2dx/platform/CCImage.h | 211 -- .../cocos2dx/platform/CCImageCommon_cpp.h | 986 ------- .../incl/cocos2dx/platform/CCPlatformConfig.h | 148 - .../incl/cocos2dx/platform/CCPlatformMacros.h | 327 --- .../incl/cocos2dx/platform/CCSAXParser.h | 78 - .../incl/cocos2dx/platform/CCThread.h | 60 - .../incl/cocos2dx/platform/platform.h | 60 - .../incl/cocos2dx/proj.win32/cocos2d.vcxproj | 441 --- .../proj.win32/cocos2d.vcxproj.filters | 956 ------- .../cocos2dx/script_support/CCScriptSupport.h | 298 -- .../incl/cocos2dx/shaders/CCGLProgram.h | 298 -- .../incl/cocos2dx/shaders/CCShaderCache.h | 94 - .../incl/cocos2dx/shaders/ccGLStateCache.h | 161 -- .../shaders/ccShaderEx_SwitchMask_frag.h | 18 - ...ccShader_PositionColorLengthTexture_frag.h | 41 - ...ccShader_PositionColorLengthTexture_vert.h | 47 - .../shaders/ccShader_PositionColor_frag.h | 37 - .../shaders/ccShader_PositionColor_vert.h | 40 - .../ccShader_PositionTextureA8Color_frag.h | 41 - .../ccShader_PositionTextureA8Color_vert.h | 45 - ...hader_PositionTextureColorAlphaTest_frag.h | 47 - .../ccShader_PositionTextureColor_frag.h | 39 - .../ccShader_PositionTextureColor_vert.h | 45 - .../shaders/ccShader_PositionTexture_frag.h | 38 - .../ccShader_PositionTexture_uColor_frag.h | 41 - .../ccShader_PositionTexture_uColor_vert.h | 41 - .../shaders/ccShader_PositionTexture_vert.h | 41 - .../shaders/ccShader_Position_uColor_frag.h | 37 - .../shaders/ccShader_Position_uColor_vert.h | 43 - .../incl/cocos2dx/shaders/ccShaders.h | 68 - .../winrt/precompiledshaders.h.REMOVED.git-id | 1 - .../wp8/precompiledshaders.h.REMOVED.git-id | 1 - .../incl/cocos2dx/sprite_nodes/CCAnimation.h | 203 -- .../cocos2dx/sprite_nodes/CCAnimationCache.h | 116 - .../incl/cocos2dx/sprite_nodes/CCSprite.h | 595 ---- .../cocos2dx/sprite_nodes/CCSpriteBatchNode.h | 202 -- .../cocos2dx/sprite_nodes/CCSpriteFrame.h | 167 -- .../sprite_nodes/CCSpriteFrameCache.h | 170 -- .../cocos2dx/support/CCNotificationCenter.h | 149 - .../incl/cocos2dx/support/CCPointExtension.h | 343 --- .../incl/cocos2dx/support/CCProfiling.h | 113 - .../incl/cocos2dx/support/CCVertex.h | 54 - .../incl/cocos2dx/support/TransformUtils.h | 41 - cappuccino-sdk/incl/cocos2dx/support/base64.h | 54 - cappuccino-sdk/incl/cocos2dx/support/ccUTF8.h | 97 - .../incl/cocos2dx/support/ccUtils.h | 50 - .../cocos2dx/support/component/CCComponent.h | 74 - .../support/component/CCComponentContainer.h | 66 - .../cocos2dx/support/data_support/ccCArray.h | 209 -- .../cocos2dx/support/data_support/uthash.h | 940 ------ .../cocos2dx/support/data_support/utlist.h | 728 ----- .../cocos2dx/support/image_support/TGAlib.h | 72 - .../incl/cocos2dx/support/tinyxml2/tinyxml2.h | 1914 ------------- .../support/user_default/CCUserDefault.h | 130 - .../support/user_default/CCUserDefault.mm | 486 ---- .../cocos2dx/support/zip_support/ZipUtils.h | 233 -- .../incl/cocos2dx/support/zip_support/ioapi.h | 197 -- .../incl/cocos2dx/support/zip_support/unzip.h | 455 --- .../cocos2dx/text_input_node/CCIMEDelegate.h | 113 - .../text_input_node/CCIMEDispatcher.h | 113 - .../cocos2dx/text_input_node/CCTextFieldTTF.h | 187 -- .../incl/cocos2dx/textures/CCTexture2D.h | 311 -- .../incl/cocos2dx/textures/CCTextureAtlas.h | 237 -- .../incl/cocos2dx/textures/CCTextureCache.h | 265 -- .../incl/cocos2dx/textures/CCTextureETC.h | 60 - .../incl/cocos2dx/textures/CCTexturePVR.h | 152 - .../tilemap_parallax_nodes/CCParallaxNode.h | 84 - .../tilemap_parallax_nodes/CCTMXLayer.h | 229 -- .../tilemap_parallax_nodes/CCTMXObjectGroup.h | 84 - .../tilemap_parallax_nodes/CCTMXTiledMap.h | 179 -- .../tilemap_parallax_nodes/CCTMXXMLParser.h | 241 -- .../tilemap_parallax_nodes/CCTileMapAtlas.h | 111 - .../incl/cocos2dx/touch_dispatcher/CCTouch.h | 101 - .../CCTouchDelegateProtocol.h | 121 - .../touch_dispatcher/CCTouchDispatcher.h | 227 -- .../touch_dispatcher/CCTouchHandler.h | 129 - .../extensions/AssetsManager/AssetsManager.h | 221 -- .../CCBReader/CCBAnimationManager.h | 251 -- .../incl/extensions/CCBReader/CCBFileLoader.h | 28 - .../incl/extensions/CCBReader/CCBKeyframe.h | 39 - .../CCBReader/CCBMemberVariableAssigner.h | 58 - .../incl/extensions/CCBReader/CCBReader.h | 440 --- .../CCBReader/CCBSelectorResolver.h | 46 - .../incl/extensions/CCBReader/CCBSequence.h | 50 - .../CCBReader/CCBSequenceProperty.h | 37 - .../incl/extensions/CCBReader/CCBValue.h | 74 - .../CCBReader/CCControlButtonLoader.h | 32 - .../extensions/CCBReader/CCControlLoader.h | 28 - .../incl/extensions/CCBReader/CCData.h | 30 - .../CCBReader/CCLabelBMFontLoader.h | 31 - .../extensions/CCBReader/CCLabelTTFLoader.h | 34 - .../extensions/CCBReader/CCLayerColorLoader.h | 29 - .../CCBReader/CCLayerGradientLoader.h | 30 - .../incl/extensions/CCBReader/CCLayerLoader.h | 27 - .../CCBReader/CCMenuItemImageLoader.h | 27 - .../extensions/CCBReader/CCMenuItemLoader.h | 27 - .../incl/extensions/CCBReader/CCMenuLoader.h | 25 - .../CCBReader/CCNode+CCBRelativePositioning.h | 15 - .../incl/extensions/CCBReader/CCNodeLoader.h | 128 - .../CCBReader/CCNodeLoaderLibrary.h | 45 - .../CCBReader/CCNodeLoaderListener.h | 20 - .../CCBReader/CCParticleSystemQuadLoader.h | 34 - .../CCBReader/CCScale9SpriteLoader.h | 34 - .../extensions/CCBReader/CCScrollViewLoader.h | 31 - .../extensions/CCBReader/CCSpriteLoader.h | 31 - .../CocoStudio/Action/CCActionEaseEx.h | 363 --- .../CocoStudio/Action/CCActionFrame.h | 453 --- .../CocoStudio/Action/CCActionFrameEasing.h | 76 - .../CocoStudio/Action/CCActionManager.h | 108 - .../CocoStudio/Action/CCActionNode.h | 182 -- .../CocoStudio/Action/CCActionObject.h | 181 -- .../CocoStudio/Armature/CCArmature.h | 216 -- .../extensions/CocoStudio/Armature/CCBone.h | 242 -- .../Armature/animation/CCArmatureAnimation.h | 324 --- .../Armature/animation/CCProcessBase.h | 168 -- .../CocoStudio/Armature/animation/CCTween.h | 147 - .../CocoStudio/Armature/datas/CCDatas.h | 473 --- .../CocoStudio/Armature/display/CCBatchNode.h | 69 - .../Armature/display/CCDecorativeDisplay.h | 64 - .../Armature/display/CCDisplayFactory.h | 65 - .../Armature/display/CCDisplayManager.h | 156 - .../CocoStudio/Armature/display/CCSkin.h | 67 - .../Armature/external_tool/sigslot.h | 2540 ----------------- .../Armature/physics/CCColliderDetector.h | 160 -- .../Armature/utils/CCArmatureDataManager.h | 203 -- .../Armature/utils/CCArmatureDefine.h | 71 - .../Armature/utils/CCDataReaderHelper.h | 133 - .../Armature/utils/CCSpriteFrameCacheHelper.h | 60 - .../Armature/utils/CCTransformHelp.h | 64 - .../Armature/utils/CCTweenFunction.h | 141 - .../CocoStudio/Armature/utils/CCUtilMath.h | 55 - .../CocoStudio/Components/CCComAttribute.h | 70 - .../CocoStudio/Components/CCComAudio.h | 90 - .../CocoStudio/Components/CCComBase.h | 51 - .../CocoStudio/Components/CCComController.h | 59 - .../CocoStudio/Components/CCComRender.h | 66 - .../CocoStudio/Components/CCInputDelegate.h | 83 - .../CocoStudio/GUI/BaseClasses/UIWidget.h | 730 ----- .../CocoStudio/GUI/Layouts/UILayout.h | 316 -- .../CocoStudio/GUI/Layouts/UILayoutDefine.h | 96 - .../GUI/Layouts/UILayoutParameter.h | 226 -- .../CocoStudio/GUI/System/CocosGUI.h | 55 - .../CocoStudio/GUI/System/GUIDefine.h | 75 - .../CocoStudio/GUI/System/UIHelper.h | 81 - .../CocoStudio/GUI/System/UITouchGroup.h | 132 - .../UIWidgets/Compatible/CompatibleClasses.h | 58 - .../GUI/UIWidgets/ScrollWidget/UIListView.h | 215 -- .../GUI/UIWidgets/ScrollWidget/UIPageView.h | 221 -- .../ScrollWidget/UIScrollInterface.h | 49 - .../GUI/UIWidgets/ScrollWidget/UIScrollView.h | 442 --- .../CocoStudio/GUI/UIWidgets/UIButton.h | 225 -- .../CocoStudio/GUI/UIWidgets/UICheckBox.h | 210 -- .../CocoStudio/GUI/UIWidgets/UIImageView.h | 129 - .../CocoStudio/GUI/UIWidgets/UILabel.h | 164 -- .../CocoStudio/GUI/UIWidgets/UILabelAtlas.h | 128 - .../CocoStudio/GUI/UIWidgets/UILabelBMFont.h | 92 - .../CocoStudio/GUI/UIWidgets/UILoadingBar.h | 161 -- .../CocoStudio/GUI/UIWidgets/UIRichText.h | 133 - .../CocoStudio/GUI/UIWidgets/UISlider.h | 249 -- .../CocoStudio/GUI/UIWidgets/UITextField.h | 195 -- .../CocoStudio/Json/DictionaryHelper.h | 81 - .../CocoStudio/Json/rapidjson/document.h | 821 ------ .../CocoStudio/Json/rapidjson/filestream.h | 46 - .../Json/rapidjson/internal/pow10.h | 54 - .../Json/rapidjson/internal/stack.h | 82 - .../Json/rapidjson/internal/strfunc.h | 24 - .../CocoStudio/Json/rapidjson/prettywriter.h | 156 - .../CocoStudio/Json/rapidjson/rapidjson.h | 525 ---- .../CocoStudio/Json/rapidjson/reader.h | 683 ----- .../CocoStudio/Json/rapidjson/stringbuffer.h | 49 - .../CocoStudio/Json/rapidjson/writer.h | 241 -- .../extensions/CocoStudio/Reader/GUIReader.h | 185 -- .../CocoStudio/Reader/SceneReader.h | 70 - .../WidgetReader/ButtonReader/ButtonReader.h | 48 - .../CheckBoxReader/CheckBoxReader.h | 48 - .../ImageViewReader/ImageViewReader.h | 48 - .../LabelAtlasReader/LabelAtlasReader.h | 47 - .../LabelBMFontReader/LabelBMFontReader.h | 48 - .../WidgetReader/LabelReader/LabelReader.h | 48 - .../WidgetReader/LayoutReader/LayoutReader.h | 48 - .../ListViewReader/ListViewReader.h | 48 - .../LoadingBarReader/LoadingBarReader.h | 48 - .../PageViewReader/PageViewReader.h | 48 - .../ScrollViewReader/ScrollViewReader.h | 48 - .../WidgetReader/SliderReader/SliderReader.h | 48 - .../TextFieldReader/TextFieldReader.h | 48 - .../Reader/WidgetReader/WidgetReader.h | 52 - .../WidgetReader/WidgetReaderProtocol.h | 48 - .../CocoStudio/Trigger/ObjectFactory.h | 81 - .../CocoStudio/Trigger/TriggerBase.h | 54 - .../CocoStudio/Trigger/TriggerMng.h | 86 - .../CocoStudio/Trigger/TriggerObj.h | 89 - .../incl/extensions/ExtensionMacros.h | 34 - .../GUI/CCControlExtension/CCControl.h | 292 -- .../GUI/CCControlExtension/CCControlButton.h | 253 -- .../CCControlColourPicker.h | 85 - .../CCControlExtension/CCControlExtensions.h | 37 - .../CCControlExtension/CCControlHuePicker.h | 83 - .../CCControlPotentiometer.h | 110 - .../CCControlSaturationBrightnessPicker.h | 91 - .../GUI/CCControlExtension/CCControlSlider.h | 119 - .../GUI/CCControlExtension/CCControlStepper.h | 114 - .../GUI/CCControlExtension/CCControlSwitch.h | 106 - .../GUI/CCControlExtension/CCControlUtils.h | 90 - .../GUI/CCControlExtension/CCInvocation.h | 74 - .../GUI/CCControlExtension/CCScale9Sprite.h | 332 --- .../incl/extensions/GUI/CCEditBox/CCEditBox.h | 429 --- .../extensions/GUI/CCEditBox/CCEditBoxImpl.h | 90 - .../GUI/CCEditBox/CCEditBoxImplAndroid.h | 97 - .../GUI/CCEditBox/CCEditBoxImplIOS.h | 130 - .../GUI/CCEditBox/CCEditBoxImplIOS.mm | 622 ---- .../GUI/CCEditBox/CCEditBoxImplMac.h | 120 - .../GUI/CCEditBox/CCEditBoxImplMac.mm | 419 --- .../GUI/CCEditBox/CCEditBoxImplTizen.h | 98 - .../GUI/CCEditBox/CCEditBoxImplWin.h | 103 - .../GUI/CCEditBox/CCEditBoxImplWp8.h | 87 - .../GUI/CCScrollView/CCScrollView.h | 356 --- .../extensions/GUI/CCScrollView/CCSorting.h | 116 - .../extensions/GUI/CCScrollView/CCTableView.h | 305 -- .../GUI/CCScrollView/CCTableViewCell.h | 60 - .../extensions/LocalStorage/LocalStorage.h | 51 - cappuccino-sdk/incl/extensions/cocos-ext.h | 83 - .../incl/extensions/network/HttpClient.h | 120 - .../incl/extensions/network/HttpRequest.h | 235 -- .../incl/extensions/network/HttpResponse.h | 185 -- .../incl/extensions/network/WebSocket.h | 166 -- .../physics_nodes/CCPhysicsDebugNode.h | 70 - .../physics_nodes/CCPhysicsSprite.h | 134 - .../incl/extensions/spine/Animation.h | 132 - .../incl/extensions/spine/AnimationState.h | 66 - .../extensions/spine/AnimationStateData.h | 49 - cappuccino-sdk/incl/extensions/spine/Atlas.h | 106 - .../extensions/spine/AtlasAttachmentLoader.h | 43 - .../incl/extensions/spine/Attachment.h | 49 - .../incl/extensions/spine/AttachmentLoader.h | 52 - cappuccino-sdk/incl/extensions/spine/Bone.h | 59 - .../incl/extensions/spine/BoneData.h | 46 - .../incl/extensions/spine/CCSkeleton.h | 100 - .../extensions/spine/CCSkeletonAnimation.h | 73 - cappuccino-sdk/incl/extensions/spine/Json.h | 77 - .../incl/extensions/spine/RegionAttachment.h | 60 - .../incl/extensions/spine/Skeleton.h | 92 - .../incl/extensions/spine/SkeletonData.h | 66 - .../incl/extensions/spine/SkeletonJson.h | 52 - cappuccino-sdk/incl/extensions/spine/Skin.h | 55 - cappuccino-sdk/incl/extensions/spine/Slot.h | 58 - .../incl/extensions/spine/SlotData.h | 48 - .../incl/extensions/spine/extension.h | 145 - .../incl/extensions/spine/spine-cocos2dx.h | 40 - cappuccino-sdk/incl/extensions/spine/spine.h | 46 - cappuccino-sdk/lib/cappuccino.lib | Bin 2029696 -> 0 bytes cappuccino-sdk/lib/libExtensions.lib | Bin 357688 -> 0 bytes libraries/cappuccino-sdk | 1 + libraries/minhook | 1 + minhook/LICENSE.txt | 81 - minhook/include/MinHook.h | 186 -- minhook/lib/libMinHook-x86-v141-mtd.lib | Bin 26514 -> 0 bytes minhook/readme.txt | 12 - 375 files changed, 53 insertions(+), 65785 deletions(-) create mode 100644 .gitmodules create mode 100644 CMakeLists.txt delete mode 100644 ReplayBot.sln delete mode 100644 ReplayBot.vcxproj delete mode 100644 ReplayBot.vcxproj.filters delete mode 100644 cappuccino-sdk/LICENSE delete mode 100644 cappuccino-sdk/incl/cocos2dx/Android.mk delete mode 100644 cappuccino-sdk/incl/cocos2dx/CCCamera.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/CCConfiguration.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/CCDirector.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/CCScheduler.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/actions/CCAction.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/actions/CCActionCamera.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/actions/CCActionCatmullRom.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/actions/CCActionEase.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/actions/CCActionGrid.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/actions/CCActionGrid3D.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/actions/CCActionInstant.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/actions/CCActionInterval.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/actions/CCActionManager.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/actions/CCActionPageTurn3D.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/actions/CCActionProgressTimer.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/actions/CCActionTiledGrid.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/actions/CCActionTween.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/base_nodes/CCAtlasNode.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/base_nodes/CCGLBufferedNode.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/base_nodes/CCNode.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/ccFPSImages.c delete mode 100644 cappuccino-sdk/incl/cocos2dx/ccFPSImages.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/cocoa/CCAffineTransform.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/cocoa/CCArray.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/cocoa/CCAutoreleasePool.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/cocoa/CCBool.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/cocoa/CCDataVisitor.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/cocoa/CCDictionary.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/cocoa/CCDouble.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/cocoa/CCFloat.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/cocoa/CCGeometry.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/cocoa/CCInteger.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/cocoa/CCNS.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/cocoa/CCObject.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/cocoa/CCSet.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/cocoa/CCString.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/cocoa/CCZone.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/custom/Delegates/CCKeyboardDelegate.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/custom/Delegates/CCMouseDelegate.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/custom/Sprites/CCMenuItemSpriteExtra/CCMenuItemSpriteExtra.cpp delete mode 100644 cappuccino-sdk/incl/cocos2dx/custom/Sprites/CCMenuItemSpriteExtra/CCMenuItemSpriteExtra.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/custom/Sprites/CCSpriteExtra/CCSpriteExtra.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/draw_nodes/CCDrawNode.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/draw_nodes/CCDrawingPrimitives.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/effects/CCGrabber.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/effects/CCGrid.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/include/CCEventType.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/include/CCProtocols.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/include/ccConfig.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/include/ccMacros.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/include/ccTypeInfo.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/include/ccTypes.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/include/cocos2d.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/GL/mat4stack.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/GL/matrix.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/aabb.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/kazmath.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/mat3.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/mat4.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/neon_matrix_impl.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/plane.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/quaternion.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/ray2.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/utility.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/vec2.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/vec3.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/vec4.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/src/CMakeLists.txt delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/src/ChangeLog delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/src/GL/mat4stack.c delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/src/GL/matrix.c delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/src/aabb.c delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/src/mat3.c delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/src/mat4.c delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/src/neon_matrix_impl.c delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/src/plane.c delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/src/quaternion.c delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/src/ray2.c delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/src/utility.c delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/src/vec2.c delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/src/vec3.c delete mode 100644 cappuccino-sdk/incl/cocos2dx/kazmath/src/vec4.c delete mode 100644 cappuccino-sdk/incl/cocos2dx/keypad_dispatcher/CCKeypadDelegate.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/keypad_dispatcher/CCKeypadDispatcher.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/label_nodes/CCLabelAtlas.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/label_nodes/CCLabelBMFont.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/label_nodes/CCLabelTTF.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCScene.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCTransition.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCTransitionPageTurn.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCTransitionProgress.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/menu_nodes/CCMenu.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/menu_nodes/CCMenuItem.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/misc_nodes/CCClippingNode.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/misc_nodes/CCMotionStreak.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/misc_nodes/CCProgressTimer.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/misc_nodes/CCRenderTexture.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/particle_nodes/CCParticleBatchNode.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/particle_nodes/CCParticleExamples.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/particle_nodes/CCParticleSystem.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/particle_nodes/CCParticleSystemQuad.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/particle_nodes/firePngData.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/platform/CCAccelerometerDelegate.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/platform/CCApplicationProtocol.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/platform/CCCommon.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/platform/CCDevice.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/platform/CCEGLViewProtocol.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/platform/CCFileUtils.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/platform/CCImage.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/platform/CCImageCommon_cpp.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/platform/CCPlatformConfig.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/platform/CCPlatformMacros.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/platform/CCSAXParser.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/platform/CCThread.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/platform/platform.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/proj.win32/cocos2d.vcxproj delete mode 100644 cappuccino-sdk/incl/cocos2dx/proj.win32/cocos2d.vcxproj.filters delete mode 100644 cappuccino-sdk/incl/cocos2dx/script_support/CCScriptSupport.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/CCGLProgram.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/CCShaderCache.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/ccGLStateCache.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/ccShaderEx_SwitchMask_frag.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionColorLengthTexture_frag.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionColorLengthTexture_vert.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionColor_frag.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionColor_vert.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureA8Color_frag.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureA8Color_vert.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureColorAlphaTest_frag.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureColor_frag.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureColor_vert.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTexture_frag.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTexture_uColor_frag.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTexture_uColor_vert.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTexture_vert.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/ccShader_Position_uColor_frag.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/ccShader_Position_uColor_vert.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/ccShaders.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/precompiled/winrt/precompiledshaders.h.REMOVED.git-id delete mode 100644 cappuccino-sdk/incl/cocos2dx/shaders/precompiled/wp8/precompiledshaders.h.REMOVED.git-id delete mode 100644 cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCAnimation.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCAnimationCache.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCSprite.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCSpriteBatchNode.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCSpriteFrame.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCSpriteFrameCache.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/CCNotificationCenter.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/CCPointExtension.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/CCProfiling.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/CCVertex.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/TransformUtils.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/base64.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/ccUTF8.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/ccUtils.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/component/CCComponent.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/component/CCComponentContainer.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/data_support/ccCArray.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/data_support/uthash.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/data_support/utlist.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/image_support/TGAlib.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/tinyxml2/tinyxml2.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/user_default/CCUserDefault.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/user_default/CCUserDefault.mm delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/zip_support/ZipUtils.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/zip_support/ioapi.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/support/zip_support/unzip.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/text_input_node/CCIMEDelegate.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/text_input_node/CCIMEDispatcher.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/text_input_node/CCTextFieldTTF.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/textures/CCTexture2D.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/textures/CCTextureAtlas.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/textures/CCTextureCache.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/textures/CCTextureETC.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/textures/CCTexturePVR.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCParallaxNode.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTMXLayer.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTMXObjectGroup.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTMXTiledMap.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTMXXMLParser.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTileMapAtlas.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/touch_dispatcher/CCTouch.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/touch_dispatcher/CCTouchDelegateProtocol.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/touch_dispatcher/CCTouchDispatcher.h delete mode 100644 cappuccino-sdk/incl/cocos2dx/touch_dispatcher/CCTouchHandler.h delete mode 100644 cappuccino-sdk/incl/extensions/AssetsManager/AssetsManager.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCBAnimationManager.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCBFileLoader.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCBKeyframe.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCBMemberVariableAssigner.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCBReader.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCBSelectorResolver.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCBSequence.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCBSequenceProperty.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCBValue.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCControlButtonLoader.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCControlLoader.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCData.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCLabelBMFontLoader.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCLabelTTFLoader.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCLayerColorLoader.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCLayerGradientLoader.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCLayerLoader.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCMenuItemImageLoader.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCMenuItemLoader.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCMenuLoader.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCNode+CCBRelativePositioning.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCNodeLoader.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCNodeLoaderLibrary.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCNodeLoaderListener.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCParticleSystemQuadLoader.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCScale9SpriteLoader.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCScrollViewLoader.h delete mode 100644 cappuccino-sdk/incl/extensions/CCBReader/CCSpriteLoader.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionEaseEx.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionFrame.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionFrameEasing.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionManager.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionNode.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionObject.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/CCArmature.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/CCBone.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/animation/CCArmatureAnimation.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/animation/CCProcessBase.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/animation/CCTween.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/datas/CCDatas.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCBatchNode.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCDecorativeDisplay.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCDisplayFactory.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCDisplayManager.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCSkin.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/external_tool/sigslot.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/physics/CCColliderDetector.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCArmatureDataManager.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCArmatureDefine.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCDataReaderHelper.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCSpriteFrameCacheHelper.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCTransformHelp.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCTweenFunction.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCUtilMath.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComAttribute.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComAudio.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComBase.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComController.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComRender.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Components/CCInputDelegate.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/BaseClasses/UIWidget.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/Layouts/UILayout.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/Layouts/UILayoutDefine.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/Layouts/UILayoutParameter.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/System/CocosGUI.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/System/GUIDefine.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/System/UIHelper.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/System/UITouchGroup.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/Compatible/CompatibleClasses.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIListView.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIPageView.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIScrollInterface.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIScrollView.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UIButton.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UICheckBox.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UIImageView.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UILabel.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UILabelAtlas.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UILabelBMFont.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UILoadingBar.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UIRichText.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UISlider.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UITextField.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Json/DictionaryHelper.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/document.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/filestream.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/internal/pow10.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/internal/stack.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/internal/strfunc.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/prettywriter.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/rapidjson.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/reader.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/stringbuffer.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/writer.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Reader/GUIReader.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Reader/SceneReader.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/ButtonReader/ButtonReader.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/CheckBoxReader/CheckBoxReader.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/ImageViewReader/ImageViewReader.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LabelAtlasReader/LabelAtlasReader.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LabelBMFontReader/LabelBMFontReader.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LabelReader/LabelReader.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LayoutReader/LayoutReader.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/ListViewReader/ListViewReader.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LoadingBarReader/LoadingBarReader.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/PageViewReader/PageViewReader.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/ScrollViewReader/ScrollViewReader.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/SliderReader/SliderReader.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/TextFieldReader/TextFieldReader.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/WidgetReader.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/WidgetReaderProtocol.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Trigger/ObjectFactory.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Trigger/TriggerBase.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Trigger/TriggerMng.h delete mode 100644 cappuccino-sdk/incl/extensions/CocoStudio/Trigger/TriggerObj.h delete mode 100644 cappuccino-sdk/incl/extensions/ExtensionMacros.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControl.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlButton.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlColourPicker.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlExtensions.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlHuePicker.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlPotentiometer.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlSaturationBrightnessPicker.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlSlider.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlStepper.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlSwitch.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlUtils.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCInvocation.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCScale9Sprite.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBox.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImpl.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplAndroid.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplIOS.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplMac.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplTizen.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplWin.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplWp8.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCScrollView/CCScrollView.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCScrollView/CCSorting.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCScrollView/CCTableView.h delete mode 100644 cappuccino-sdk/incl/extensions/GUI/CCScrollView/CCTableViewCell.h delete mode 100644 cappuccino-sdk/incl/extensions/LocalStorage/LocalStorage.h delete mode 100644 cappuccino-sdk/incl/extensions/cocos-ext.h delete mode 100644 cappuccino-sdk/incl/extensions/network/HttpClient.h delete mode 100644 cappuccino-sdk/incl/extensions/network/HttpRequest.h delete mode 100644 cappuccino-sdk/incl/extensions/network/HttpResponse.h delete mode 100644 cappuccino-sdk/incl/extensions/network/WebSocket.h delete mode 100644 cappuccino-sdk/incl/extensions/physics_nodes/CCPhysicsDebugNode.h delete mode 100644 cappuccino-sdk/incl/extensions/physics_nodes/CCPhysicsSprite.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/Animation.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/AnimationState.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/AnimationStateData.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/Atlas.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/AtlasAttachmentLoader.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/Attachment.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/AttachmentLoader.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/Bone.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/BoneData.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/CCSkeleton.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/CCSkeletonAnimation.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/Json.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/RegionAttachment.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/Skeleton.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/SkeletonData.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/SkeletonJson.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/Skin.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/Slot.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/SlotData.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/extension.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/spine-cocos2dx.h delete mode 100644 cappuccino-sdk/incl/extensions/spine/spine.h delete mode 100644 cappuccino-sdk/lib/cappuccino.lib delete mode 100644 cappuccino-sdk/lib/libExtensions.lib create mode 160000 libraries/cappuccino-sdk create mode 160000 libraries/minhook delete mode 100644 minhook/LICENSE.txt delete mode 100644 minhook/include/MinHook.h delete mode 100644 minhook/lib/libMinHook-x86-v141-mtd.lib delete mode 100644 minhook/readme.txt diff --git a/.gitignore b/.gitignore index b80582d..f9098dc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,365 +1,7 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - +build/ ffmpeg/ -inject.py \ No newline at end of file +inject.py +Debug/ +Release/ +.vs/ +.vscode/ \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..8c24773 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "libraries/cappuccino-sdk"] + path = libraries/cappuccino-sdk + url = https://github.com/AndreNIH/CappuccinoSDK.git +[submodule "libraries/minhook"] + path = libraries/minhook + url = https://github.com/TsudaKageyu/minhook.git diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..d535c8b --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,39 @@ +cmake_minimum_required(VERSION 3.0.0) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_CXX_EXTENSIONS OFF) + +project(replay-bot VERSION 1.0.0) + +find_file(WINDOWS_HEADER windows.h) +if(NOT WINDOWS_HEADER) + message(FATAL_ERROR "Can't find windows.h!") +endif() + +file( + GLOB_RECURSE SOURCE_FILES + src/*.cpp + # nice + libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/custom/Sprites/CCMenuItemSpriteExtra/CCMenuItemSpriteExtra.cpp +) +add_library(replay-bot SHARED ${SOURCE_FILES}) + +target_include_directories(replay-bot PRIVATE + libraries/minhook/include + libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/ + libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/include + libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/kazmath/include + libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/platform/win32 + libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/platform/third_party/win32 + libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/platform/third_party/win32/OGLES +) + +add_subdirectory(libraries/minhook) +# TODO: make it not build minhook every time +target_link_libraries(replay-bot minhook) + +target_link_libraries(replay-bot ${CMAKE_SOURCE_DIR}/libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/lib/cappuccino.lib) + +set_target_properties(replay-bot PROPERTIES PREFIX "") +set(CPACK_PROJECT_NAME ${PROJECT_NAME}) +set(CPACK_PROJECT_VERSION ${PROJECT_VERSION}) \ No newline at end of file diff --git a/ReplayBot.sln b/ReplayBot.sln deleted file mode 100644 index 4833d07..0000000 --- a/ReplayBot.sln +++ /dev/null @@ -1,31 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.30804.86 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ReplayBot", "ReplayBot.vcxproj", "{D2F6430A-3721-410E-80BA-D6BC6DD95A61}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x64 = Debug|x64 - Debug|x86 = Debug|x86 - Release|x64 = Release|x64 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {D2F6430A-3721-410E-80BA-D6BC6DD95A61}.Debug|x64.ActiveCfg = Debug|x64 - {D2F6430A-3721-410E-80BA-D6BC6DD95A61}.Debug|x64.Build.0 = Debug|x64 - {D2F6430A-3721-410E-80BA-D6BC6DD95A61}.Debug|x86.ActiveCfg = Debug|Win32 - {D2F6430A-3721-410E-80BA-D6BC6DD95A61}.Debug|x86.Build.0 = Debug|Win32 - {D2F6430A-3721-410E-80BA-D6BC6DD95A61}.Release|x64.ActiveCfg = Release|x64 - {D2F6430A-3721-410E-80BA-D6BC6DD95A61}.Release|x64.Build.0 = Release|x64 - {D2F6430A-3721-410E-80BA-D6BC6DD95A61}.Release|x86.ActiveCfg = Release|Win32 - {D2F6430A-3721-410E-80BA-D6BC6DD95A61}.Release|x86.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {F31C5776-6146-4D80-B31F-2F95AF57270A} - EndGlobalSection -EndGlobal diff --git a/ReplayBot.vcxproj b/ReplayBot.vcxproj deleted file mode 100644 index 7dca5aa..0000000 --- a/ReplayBot.vcxproj +++ /dev/null @@ -1,576 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 16.0 - Win32Proj - {d2f6430a-3721-410e-80ba-d6bc6dd95a61} - ReplayBot - 10.0 - - - - DynamicLibrary - true - v142 - Unicode - - - DynamicLibrary - false - v142 - true - Unicode - - - DynamicLibrary - true - v142 - Unicode - - - DynamicLibrary - false - v142 - true - Unicode - - - - - - - - - - - - - - - - - - - - - true - - - false - - - true - - - false - - - - Level3 - true - WIN32;_DEBUG;CAPPUCCINOTEMPLATE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - NotUsing - pch.h - $(SolutionDir)minhook\include;$(SolutionDir)cappuccino-sdk\incl\cocos2dx;$(SolutionDir)cappuccino-sdk\incl\cocos2dx\include;$(SolutionDir)cappuccino-sdk\incl\cocos2dx\kazmath\include;$(SolutionDir)cappuccino-sdk\incl\cocos2dx\platform\win32;$(SolutionDir)cappuccino-sdk\incl\cocos2dx\platform\third_party\win32;$(SolutionDir)cappuccino-sdk\incl\cocos2dx\platform\third_party\win32\OGLES;$(SolutionDir)cappuccino-sdk\incl\extensions;%(AdditionalIncludeDirectories) - stdcpp17 - - - Windows - true - false - $(SolutionDir)cappuccino-sdk\lib\cappuccino.lib;$(SolutionDir)cappuccino-sdk\lib\libExtensions.lib;$(SolutionDir)minhook\lib\libMinHook-x86-v141-mtd.lib;%(AdditionalDependencies) - - - - - Level3 - true - true - true - WIN32;NDEBUG;CAPPUCCINOTEMPLATE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - NotUsing - pch.h - $(SolutionDir)minhook\include;$(SolutionDir)cappuccino-sdk\incl\cocos2dx;$(SolutionDir)cappuccino-sdk\incl\cocos2dx\include;$(SolutionDir)cappuccino-sdk\incl\cocos2dx\kazmath\include;$(SolutionDir)cappuccino-sdk\incl\cocos2dx\platform\win32;$(SolutionDir)cappuccino-sdk\incl\cocos2dx\platform\third_party\win32;$(SolutionDir)cappuccino-sdk\incl\cocos2dx\platform\third_party\win32\OGLES;$(SolutionDir)cappuccino-sdk\incl\extensions;%(AdditionalIncludeDirectories) - stdcpp17 - - - Windows - true - true - false - false - $(SolutionDir)cappuccino-sdk\lib\cappuccino.lib;$(SolutionDir)cappuccino-sdk\lib\libExtensions.lib;$(SolutionDir)minhook\lib\libMinHook-x86-v141-mtd.lib;%(AdditionalDependencies) - - - - - Level3 - true - _DEBUG;CAPPUCCINOTEMPLATE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - - - Windows - true - false - - - - - Level3 - true - true - true - NDEBUG;CAPPUCCINOTEMPLATE_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) - true - Use - pch.h - - - Windows - true - true - true - false - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/ReplayBot.vcxproj.filters b/ReplayBot.vcxproj.filters deleted file mode 100644 index 94c6421..0000000 --- a/ReplayBot.vcxproj.filters +++ /dev/null @@ -1,1254 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - {53fe1fca-e9f6-4c20-933a-86b685a26920} - - - - - Header Files - - - Header Files - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Header Files\cocos2d - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/cappuccino-sdk/LICENSE b/cappuccino-sdk/LICENSE deleted file mode 100644 index 22136e2..0000000 --- a/cappuccino-sdk/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2021 AndreNIH - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/cappuccino-sdk/incl/cocos2dx/Android.mk b/cappuccino-sdk/incl/cocos2dx/Android.mk deleted file mode 100644 index cf308a6..0000000 --- a/cappuccino-sdk/incl/cocos2dx/Android.mk +++ /dev/null @@ -1,178 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := cocos2dx_static - -LOCAL_MODULE_FILENAME := libcocos2d - -LOCAL_SRC_FILES := \ -CCConfiguration.cpp \ -CCScheduler.cpp \ -CCCamera.cpp \ -ccFPSImages.c \ -actions/CCAction.cpp \ -actions/CCActionCamera.cpp \ -actions/CCActionCatmullRom.cpp \ -actions/CCActionEase.cpp \ -actions/CCActionGrid.cpp \ -actions/CCActionGrid3D.cpp \ -actions/CCActionInstant.cpp \ -actions/CCActionInterval.cpp \ -actions/CCActionManager.cpp \ -actions/CCActionPageTurn3D.cpp \ -actions/CCActionProgressTimer.cpp \ -actions/CCActionTiledGrid.cpp \ -actions/CCActionTween.cpp \ -base_nodes/CCAtlasNode.cpp \ -base_nodes/CCNode.cpp \ -cocoa/CCAffineTransform.cpp \ -cocoa/CCGeometry.cpp \ -cocoa/CCAutoreleasePool.cpp \ -cocoa/CCDictionary.cpp \ -cocoa/CCNS.cpp \ -cocoa/CCObject.cpp \ -cocoa/CCSet.cpp \ -cocoa/CCString.cpp \ -cocoa/CCZone.cpp \ -cocoa/CCArray.cpp \ -cocoa/CCDataVisitor.cpp \ -cocos2d.cpp \ -CCDirector.cpp \ -draw_nodes/CCDrawingPrimitives.cpp \ -draw_nodes/CCDrawNode.cpp \ -effects/CCGrabber.cpp \ -effects/CCGrid.cpp \ -kazmath/src/aabb.c \ -kazmath/src/mat3.c \ -kazmath/src/mat4.c \ -kazmath/src/neon_matrix_impl.c \ -kazmath/src/plane.c \ -kazmath/src/quaternion.c \ -kazmath/src/ray2.c \ -kazmath/src/utility.c \ -kazmath/src/vec2.c \ -kazmath/src/vec3.c \ -kazmath/src/vec4.c \ -kazmath/src/GL/mat4stack.c \ -kazmath/src/GL/matrix.c \ -keypad_dispatcher/CCKeypadDelegate.cpp \ -keypad_dispatcher/CCKeypadDispatcher.cpp \ -label_nodes/CCLabelAtlas.cpp \ -label_nodes/CCLabelBMFont.cpp \ -label_nodes/CCLabelTTF.cpp \ -layers_scenes_transitions_nodes/CCLayer.cpp \ -layers_scenes_transitions_nodes/CCScene.cpp \ -layers_scenes_transitions_nodes/CCTransitionPageTurn.cpp \ -layers_scenes_transitions_nodes/CCTransition.cpp \ -layers_scenes_transitions_nodes/CCTransitionProgress.cpp \ -menu_nodes/CCMenu.cpp \ -menu_nodes/CCMenuItem.cpp \ -misc_nodes/CCClippingNode.cpp \ -misc_nodes/CCMotionStreak.cpp \ -misc_nodes/CCProgressTimer.cpp \ -misc_nodes/CCRenderTexture.cpp \ -particle_nodes/CCParticleExamples.cpp \ -particle_nodes/CCParticleSystem.cpp \ -particle_nodes/CCParticleBatchNode.cpp \ -particle_nodes/CCParticleSystemQuad.cpp \ -platform/CCImageCommonWebp.cpp \ -platform/CCSAXParser.cpp \ -platform/CCThread.cpp \ -platform/CCFileUtils.cpp \ -platform/platform.cpp \ -platform/CCEGLViewProtocol.cpp \ -platform/android/CCDevice.cpp \ -platform/android/CCEGLView.cpp \ -platform/android/CCAccelerometer.cpp \ -platform/android/CCApplication.cpp \ -platform/android/CCCommon.cpp \ -platform/android/CCFileUtilsAndroid.cpp \ -platform/android/CCImage.cpp \ -platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxBitmap.cpp \ -platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxHelper.cpp \ -platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxRenderer.cpp \ -platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxAccelerometer.cpp \ -platform/android/jni/JniHelper.cpp \ -platform/android/jni/IMEJni.cpp \ -platform/android/jni/TouchesJni.cpp \ -platform/android/jni/DPIJni.cpp \ -script_support/CCScriptSupport.cpp \ -shaders/ccShaders.cpp \ -shaders/CCGLProgram.cpp \ -shaders/ccGLStateCache.cpp \ -shaders/CCShaderCache.cpp \ -sprite_nodes/CCAnimation.cpp \ -sprite_nodes/CCAnimationCache.cpp \ -sprite_nodes/CCSprite.cpp \ -sprite_nodes/CCSpriteBatchNode.cpp \ -sprite_nodes/CCSpriteFrame.cpp \ -sprite_nodes/CCSpriteFrameCache.cpp \ -support/ccUTF8.cpp \ -support/CCNotificationCenter.cpp \ -support/CCProfiling.cpp \ -support/CCPointExtension.cpp \ -support/TransformUtils.cpp \ -support/user_default/CCUserDefaultAndroid.cpp \ -support/base64.cpp \ -support/ccUtils.cpp \ -support/CCVertex.cpp \ -support/data_support/ccCArray.cpp \ -support/image_support/TGAlib.cpp \ -support/tinyxml2/tinyxml2.cpp \ -support/zip_support/ZipUtils.cpp \ -support/zip_support/ioapi.cpp \ -support/zip_support/unzip.cpp \ -support/component/CCComponent.cpp \ -support/component/CCComponentContainer.cpp \ -text_input_node/CCIMEDispatcher.cpp \ -text_input_node/CCTextFieldTTF.cpp \ -textures/CCTexture2D.cpp \ -textures/CCTextureAtlas.cpp \ -textures/CCTextureCache.cpp \ -textures/CCTextureETC.cpp \ -textures/CCTexturePVR.cpp \ -tilemap_parallax_nodes/CCParallaxNode.cpp \ -tilemap_parallax_nodes/CCTMXLayer.cpp \ -tilemap_parallax_nodes/CCTMXObjectGroup.cpp \ -tilemap_parallax_nodes/CCTMXTiledMap.cpp \ -tilemap_parallax_nodes/CCTMXXMLParser.cpp \ -tilemap_parallax_nodes/CCTileMapAtlas.cpp \ -touch_dispatcher/CCTouchDispatcher.cpp \ -touch_dispatcher/CCTouchHandler.cpp \ -touch_dispatcher/CCTouch.cpp - -LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) \ - $(LOCAL_PATH)/include \ - $(LOCAL_PATH)/kazmath/include \ - $(LOCAL_PATH)/platform/android - -LOCAL_C_INCLUDES := $(LOCAL_PATH) \ - $(LOCAL_PATH)/include \ - $(LOCAL_PATH)/kazmath/include \ - $(LOCAL_PATH)/platform/android - -LOCAL_LDLIBS := -lGLESv2 \ - -llog \ - -lz - -LOCAL_EXPORT_LDLIBS := -lGLESv2 \ - -llog \ - -lz - -LOCAL_WHOLE_STATIC_LIBRARIES := cocos_libpng_static -LOCAL_WHOLE_STATIC_LIBRARIES += cocos_jpeg_static -LOCAL_WHOLE_STATIC_LIBRARIES += cocos_libxml2_static -LOCAL_WHOLE_STATIC_LIBRARIES += cocos_libtiff_static -LOCAL_WHOLE_STATIC_LIBRARIES += cocos_libwebp_static - -# define the macro to compile through support/zip_support/ioapi.c -LOCAL_CFLAGS := -Wno-psabi -DUSE_FILE32API -LOCAL_EXPORT_CFLAGS := -Wno-psabi -DUSE_FILE32API - -include $(BUILD_STATIC_LIBRARY) - -$(call import-module,libjpeg) -$(call import-module,libpng) -$(call import-module,libtiff) -$(call import-module,libwebp) diff --git a/cappuccino-sdk/incl/cocos2dx/CCCamera.h b/cappuccino-sdk/incl/cocos2dx/CCCamera.h deleted file mode 100644 index b3df361..0000000 --- a/cappuccino-sdk/incl/cocos2dx/CCCamera.h +++ /dev/null @@ -1,145 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCCAMERA_H__ -#define __CCCAMERA_H__ - -#include "cocoa/CCObject.h" -#include "ccMacros.h" -#include "kazmath/mat4.h" -#include - -NS_CC_BEGIN - -/** - * @addtogroup base_nodes - * @{ - */ - -/** -A CCCamera is used in every CCNode. -Useful to look at the object from different views. -The OpenGL gluLookAt() function is used to locate the -camera. - -If the object is transformed by any of the scale, rotation or -position attributes, then they will override the camera. - -IMPORTANT: Either your use the camera or the rotation/scale/position properties. You can't use both. -World coordinates won't work if you use the camera. - -Limitations: - -- Some nodes, like CCParallaxNode, CCParticle uses world node coordinates, and they won't work properly if you move them (or any of their ancestors) -using the camera. - -- It doesn't work on batched nodes like CCSprite objects when they are parented to a CCSpriteBatchNode object. - -- It is recommended to use it ONLY if you are going to create 3D effects. For 2D effects, use the action CCFollow or position/scale/rotate. - -*/ -class CC_DLL CCCamera : public CCObject -{ -protected: - float m_fEyeX; - float m_fEyeY; - float m_fEyeZ; - - float m_fCenterX; - float m_fCenterY; - float m_fCenterZ; - - float m_fUpX; - float m_fUpY; - float m_fUpZ; - - bool m_bDirty; - kmMat4 m_lookupMatrix; -public: - /** - * @js ctor - */ - CCCamera(void); - /** - * @js NA - * @lua NA - */ - ~CCCamera(void); - - void init(void); - /** - * @js NA - */ - const char* description(void); - - /** sets the dirty value */ - inline void setDirty(bool bValue) { m_bDirty = bValue; } - /** get the dirty value */ - inline bool isDirty(void) { return m_bDirty; } - - /** sets the camera in the default position */ - void restore(void); - /** Sets the camera using gluLookAt using its eye, center and up_vector */ - void locate(void); - /** sets the eye values in points - * @js setEye - */ - void setEyeXYZ(float fEyeX, float fEyeY, float fEyeZ); - /** sets the center values in points - * @js setCenter - */ - void setCenterXYZ(float fCenterX, float fCenterY, float fCenterZ); - /** sets the up values - * @js setUp - */ - void setUpXYZ(float fUpX, float fUpY, float fUpZ); - - /** get the eye vector values in points - * @js NA - */ - void getEyeXYZ(float *pEyeX, float *pEyeY, float *pEyeZ); - /** get the center vector values int points - * @js NA - */ - void getCenterXYZ(float *pCenterX, float *pCenterY, float *pCenterZ); - /** get the up vector values - * @js NA - */ - void getUpXYZ(float *pUpX, float *pUpY, float *pUpZ); -public: - /** returns the Z eye */ - static float getZEye(); - -private: - DISALLOW_COPY_AND_ASSIGN(CCCamera); -}; - -// end of base_node group -/// @} - -NS_CC_END - -#endif // __CCCAMERA_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/CCConfiguration.h b/cappuccino-sdk/incl/cocos2dx/CCConfiguration.h deleted file mode 100644 index c6f506d..0000000 --- a/cappuccino-sdk/incl/cocos2dx/CCConfiguration.h +++ /dev/null @@ -1,164 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2010 Ricardo Quesada - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCCONFIGURATION_H__ -#define __CCCONFIGURATION_H__ - -#include "cocoa/CCObject.h" -#include "CCGL.h" -#include "cocoa/CCString.h" -#include - - - -NS_CC_BEGIN - -typedef enum _ccConfigurationType { - ConfigurationError, - ConfigurationString, - ConfigurationInt, - ConfigurationDouble, - ConfigurationBoolean -} ccConfigurationType; - - -/** - * @addtogroup global - * @{ - */ -/** - @brief CCConfiguration contains some openGL variables - @since v0.99.0 - */ -class CC_DLL CCConfiguration : public CCObject -{ -public: - /** returns a shared instance of CCConfiguration */ - static CCConfiguration *sharedConfiguration(void); - - /** purge the shared instance of CCConfiguration */ - static void purgeConfiguration(void); - -public: - /** - * @js NA - * @lua NA - */ - virtual ~CCConfiguration(void); - - /** OpenGL Max texture size. */ - int getMaxTextureSize(void) const; - - /** OpenGL Max Modelview Stack Depth. */ - int getMaxModelviewStackDepth(void) const; - - /** returns the maximum texture units - @since v2.0.0 - */ - int getMaxTextureUnits(void) const; - - /** Whether or not the GPU supports NPOT (Non Power Of Two) textures. - OpenGL ES 2.0 already supports NPOT (iOS). - - @since v0.99.2 - */ - bool supportsNPOT(void) const; - - /** Whether or not PVR Texture Compressed is supported */ - bool supportsPVRTC(void) const; - - /** Whether or not BGRA8888 textures are supported. - @since v0.99.2 - */ - bool supportsBGRA8888(void) const; - - /** Whether or not glDiscardFramebufferEXT is supported - @since v0.99.2 - */ - bool supportsDiscardFramebuffer(void) const; - - /** Whether or not shareable VAOs are supported. - @since v2.0.0 - */ - bool supportsShareableVAO(void) const; - - /** returns whether or not an OpenGL is supported */ - bool checkForGLExtension(const std::string &searchName) const; - - bool init(void); - - /** returns the value of a given key as a string. - If the key is not found, it will return the default value */ - const char* getCString( const char *key, const char *default_value=NULL ) const; - - /** returns the value of a given key as a boolean. - If the key is not found, it will return the default value */ - bool getBool( const char *key, bool default_value=false ) const; - - /** returns the value of a given key as a double. - If the key is not found, it will return the default value */ - double getNumber( const char *key, double default_value=0.0 ) const; - - /** returns the value of a given key as a double */ - CCObject * getObject( const char *key ) const; - - /** sets a new key/value pair in the configuration dictionary */ - void setObject( const char *key, CCObject *value ); - - /** dumps the current configuration on the console */ - void dumpInfo(void) const; - - /** gathers OpenGL / GPU information */ - void gatherGPUInfo( void ); - - /** Loads a config file. If the keys are already present, then they are going to be replaced. Otherwise the new keys are added. */ - void loadConfigFile( const char *filename ); - -private: - CCConfiguration(void); - static CCConfiguration *s_gSharedConfiguration; - static std::string s_sConfigfile; - -protected: - GLint m_nMaxTextureSize; - GLint m_nMaxModelviewStackDepth; - bool m_bSupportsPVRTC; - bool m_bSupportsNPOT; - bool m_bSupportsBGRA8888; - bool m_bSupportsDiscardFramebuffer; - bool m_bSupportsShareableVAO; - GLint m_nMaxSamplesAllowed; - GLint m_nMaxTextureUnits; - char * m_pGlExtensions; - - CCDictionary *m_pValueDict; -}; - -// end of global group -/// @} - -NS_CC_END - -#endif // __CCCONFIGURATION_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/CCDirector.h b/cappuccino-sdk/incl/cocos2dx/CCDirector.h deleted file mode 100644 index 2c7655c..0000000 --- a/cappuccino-sdk/incl/cocos2dx/CCDirector.h +++ /dev/null @@ -1,579 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCDIRECTOR_H__ -#define __CCDIRECTOR_H__ - -#include "platform/CCPlatformMacros.h" -#include "cocoa/CCObject.h" -#include "ccTypes.h" -#include "cocoa/CCGeometry.h" -#include "cocoa/CCArray.h" -#include "CCGL.h" -#include "kazmath/mat4.h" -#include "label_nodes/CCLabelAtlas.h" -#include "ccTypeInfo.h" - - -NS_CC_BEGIN - -/** - * @addtogroup base_nodes - * @{ - */ - - /** @typedef ccDirectorProjection - Possible OpenGL projections used by director - */ - typedef enum { - /// sets a 2D projection (orthogonal projection) - kCCDirectorProjection2D, - - /// sets a 3D projection with a fovy=60, znear=0.5f and zfar=1500. - kCCDirectorProjection3D, - - /// it calls "updateProjection" on the projection delegate. - kCCDirectorProjectionCustom, - - /// Default projection is 3D projection - kCCDirectorProjectionDefault = kCCDirectorProjection3D, -} ccDirectorProjection; - - typedef enum { - LOW=1, - MEDIUM, - HIGH - }TextureQuality; - - typedef enum{ - FadeTransition, - MoveInTransition - }PopTransition; - -/* Forward declarations. */ - -//Robtop Modification : New Classes - -class CCLabelAtlas; -class CCScene; -class CCEGLView; -class CCDirectorDelegate; -class CCNode; -class CCScheduler; -class CCActionManager; -class CCTouchDispatcher; -class CCKeypadDispatcher; -class CCKeyboardDispatcher; -class CCMouseDispatcher; -class CCSceneDelegate; -class CCAccelerometer; - - -/** -@brief Class that creates and handle the main Window and manages how -and when to execute the Scenes. - - The CCDirector is also responsible for: - - initializing the OpenGL context - - setting the OpenGL pixel format (default on is RGB565) - - setting the OpenGL buffer depth (default one is 0-bit) - - setting the projection (default one is 3D) - - setting the orientation (default one is Portrait) - - Since the CCDirector is a singleton, the standard way to use it is by calling: - _ CCDirector::sharedDirector()->methodName(); - - The CCDirector also sets the default OpenGL context: - - GL_TEXTURE_2D is enabled - - GL_VERTEX_ARRAY is enabled - - GL_COLOR_ARRAY is enabled - - GL_TEXTURE_COORD_ARRAY is enabled -*/ -class CC_DLL CCDirector : public CCObject, public TypeInfo -{ -public: - /** - * @js ctor - */ - CCDirector(void); - /** - * @js NA - * @lua NA - */ - virtual ~CCDirector(void); - virtual bool init(void); - /** - * @js NA - * @lua NA - */ - virtual long getClassTypeInfo() { - static const long id = cocos2d::getHashCodeByString(typeid(cocos2d::CCDirector).name()); - return id; - } - - // attribute - - /** Get current running Scene. Director can only run one Scene at the time */ - inline CCScene* getRunningScene(void) { return m_pRunningScene; } - - /** Get the FPS value */ - inline double getAnimationInterval(void) { return m_dAnimationInterval; } - /** Set the FPS value. */ - virtual void setAnimationInterval(double dValue) = 0; - - /** Whether or not to display the FPS on the bottom-left corner */ - inline bool isDisplayStats(void) { return m_bDisplayStats; } - /** Display the FPS on the bottom-left corner */ - inline void setDisplayStats(bool bDisplayStats) { m_bDisplayStats = bDisplayStats; } - - /** seconds per frame */ - inline float getSecondsPerFrame() { return m_fSecondsPerFrame; } - - /** Get the CCEGLView, where everything is rendered - * @js NA - */ - inline CCEGLView* getOpenGLView(void) { return m_pobOpenGLView; } - void setOpenGLView(CCEGLView* pobOpenGLView); - - inline bool isNextDeltaTimeZero(void) { return m_bNextDeltaTimeZero; } - void setNextDeltaTimeZero(bool bNextDeltaTimeZero); - - /** Whether or not the Director is paused */ - inline bool isPaused(void) { return m_bPaused; } - - /** How many frames were called since the director started */ - inline unsigned int getTotalFrames(void) { return m_uTotalFrames; } - - /** Sets an OpenGL projection - @since v0.8.2 - @js NA - */ - inline ccDirectorProjection getProjection(void) { return m_eProjection; } - void setProjection(ccDirectorProjection kProjection); - /** reshape projection matrix when canvas has been change"*/ - void reshapeProjection(const CCSize& newWindowSize); - - /** Sets the glViewport*/ - void setViewport(); - - /** How many frames were called since the director started */ - - - /** Whether or not the replaced scene will receive the cleanup message. - If the new scene is pushed, then the old scene won't receive the "cleanup" message. - If the new scene replaces the old one, the it will receive the "cleanup" message. - @since v0.99.0 - */ - inline bool isSendCleanupToScene(void) { return m_bSendCleanupToScene; } - - /** This object will be visited after the main scene is visited. - This object MUST implement the "visit" selector. - Useful to hook a notification object, like CCNotifications (http://github.com/manucorporat/CCNotifications) - @since v0.99.5 - */ - CCNode* getNotificationNode(); - void setNotificationNode(CCNode* node); - - /** CCDirector delegate. It shall implemente the CCDirectorDelegate protocol - @since v0.99.5 - */ - CCDirectorDelegate* getDelegate() const; - void setDelegate(CCDirectorDelegate* pDelegate); - - // window size - - /** returns the size of the OpenGL view in points. - */ - CCSize getWinSize(void); - - /** returns the size of the OpenGL view in pixels. - */ - CCSize getWinSizeInPixels(void); - - /** returns visible size of the OpenGL view in points. - * the value is equal to getWinSize if don't invoke - * CCEGLView::setDesignResolutionSize() - */ - CCSize getVisibleSize(); - - /** returns visible origin of the OpenGL view in points. - */ - CCPoint getVisibleOrigin(); - - /** converts a UIKit coordinate to an OpenGL coordinate - Useful to convert (multi) touch coordinates to the current layout (portrait or landscape) - */ - CCPoint convertToGL(const CCPoint& obPoint); - - /** converts an OpenGL coordinate to a UIKit coordinate - Useful to convert node points to window points for calls such as glScissor - */ - CCPoint convertToUI(const CCPoint& obPoint); - - /// XXX: missing description - float getZEye(void); - - // Scene Management - - /** Enters the Director's main loop with the given Scene. - * Call it to run only your FIRST scene. - * Don't call it if there is already a running scene. - * - * It will call pushScene: and then it will call startAnimation - */ - void runWithScene(CCScene* pScene); - - /** Suspends the execution of the running scene, pushing it on the stack of suspended scenes. - * The new scene will be executed. - * Try to avoid big stacks of pushed scenes to reduce memory allocation. - * ONLY call it if there is a running scene. - */ - - //Robtop Modification: changed return type to BOOL - bool pushScene(CCScene* pScene); - - /** Pops out a scene from the queue. - * This scene will replace the running one. - * The running scene will be deleted. If there are no more scenes in the stack the execution is terminated. - * ONLY call it if there is a running scene. - */ - void popScene(void); - - /** Pops out all scenes from the queue until the root scene in the queue. - * This scene will replace the running one. - * Internally it will call `popToSceneStackLevel(1)` - */ - void popToRootScene(void); - - /** Pops out all scenes from the queue until it reaches `level`. - If level is 0, it will end the director. - If level is 1, it will pop all scenes until it reaches to root scene. - If level is <= than the current stack level, it won't do anything. - */ - void popToSceneStackLevel(int level); - - /** Replaces the running scene with a new one. The running scene is terminated. - * ONLY call it if there is a running scene. - */ - //Robtop Modification: changed return type to BOOL - bool replaceScene(CCScene* pScene); - - /** Ends the execution, releases the running scene. - It doesn't remove the OpenGL view from its parent. You have to do it manually. - */ - void end(void); - - /** Pauses the running scene. - The running scene will be _drawed_ but all scheduled timers will be paused - While paused, the draw rate will be 4 FPS to reduce CPU consumption - */ - void pause(void); - - /** Resumes the paused scene - The scheduled timers will be activated again. - The "delta time" will be 0 (as if the game wasn't paused) - */ - void resume(void); - - /** Stops the animation. Nothing will be drawn. The main loop won't be triggered anymore. - If you don't want to pause your animation call [pause] instead. - */ - virtual void stopAnimation(void) = 0; - - /** The main loop is triggered again. - Call this function only if [stopAnimation] was called earlier - @warning Don't call this function to start the main loop. To run the main loop call runWithScene - */ - virtual void startAnimation(void) = 0; - - /** Draw the scene. - This method is called every frame. Don't call it manually. - */ - void drawScene(void); - - // Memory Helper - - /** Removes cached all cocos2d cached data. - It will purge the CCTextureCache, CCSpriteFrameCache, CCLabelBMFont cache - @since v0.99.3 - */ - void purgeCachedData(void); - - /** sets the default values based on the CCConfiguration info */ - void setDefaultValues(void); - - // OpenGL Helper - - /** sets the OpenGL default values */ - void setGLDefaultValues(void); - - /** enables/disables OpenGL alpha blending */ - void setAlphaBlending(bool bOn); - - /** enables/disables OpenGL depth test */ - void setDepthTest(bool bOn); - - virtual void mainLoop(void) = 0; - - /** The size in pixels of the surface. It could be different than the screen size. - High-res devices might have a higher surface size than the screen size. - Only available when compiled using SDK >= 4.0. - @since v0.99.4 - */ - void setContentScaleFactor(float scaleFactor); - float getContentScaleFactor(void); -private: - float m_fScreenScaleFactor; //0x24 - float m_fScreenScaleFactorMax; //0x28 - float m_fScreenScaleFactorW; //0x2C - float m_fScreenScaleFactorH; //0x30 - float m_fScreenTop; //0x34 - float m_fScreenBottom; //0x38 - float m_fScreenLeft; //0x3C - float m_fScreenRight; //0x40 - uint32_t m_uSceneReference; //0x44 - -public: - /** CCScheduler associated with this director - @since v2.0 - */ - CC_PROPERTY(CCScheduler*, m_pScheduler, Scheduler); //0x48 - - /** CCActionManager associated with this director - @since v2.0 - */ - CC_PROPERTY(CCActionManager*, m_pActionManager, ActionManager); //0x4C - - /** CCTouchDispatcher associated with this director - @since v2.0 - */ - CC_PROPERTY(CCTouchDispatcher*, m_pTouchDispatcher, TouchDispatcher); //0x50 - - /** CCKeypadDispatcher associated with this director - @since v2.0 - */ - CC_PROPERTY(CCKeypadDispatcher*, m_pKeypadDispatcher, KeypadDispatcher); //0x54 - - //Robtop Modification: add getter/setter macros for CCKeyboardDispatcher - CC_PROPERTY(CCKeyboardDispatcher*, m_pKeyboardDispatcher, KeyboardDispatcher); //0x58 - - //Robtop Modification: add getter/setter macros for CCMouseDispatcher - CC_PROPERTY(CCMouseDispatcher*, m_pMouseDispatcher, MouseDispatcher); //0x5C - - - /** CCAccelerometer associated with this director - @since v2.0 - @js NA - @lua NA - */ - CC_PROPERTY(CCAccelerometer*, m_pAccelerometer, Accelerometer); //0x60 -protected: - float m_fDeltaTime; //0x64 -public: - /* delta time since last tick to main loop */ - virtual float getDeltaTime(void); - void setDeltaTime(float); - - //CC_PROPERTY(float, m_fDeltaTime, DeltaTime); //0x64 - - CC_PROPERTY_NOVIRTUAL(float, m_fActualDeltaTime, ActualDeltaTime); //0x68; - - CC_SYNTHESIZE_READONLY(bool, m_bIsTransitioning, IsTransitioning) //0x6C; - - -public: - /** returns a shared instance of the director - * @js getInstance - */ - static CCDirector* sharedDirector(void); - -protected: - - void purgeDirector(); - bool m_bPurgeDirecotorInNextLoop; // this flag will be set to true in end() //0x70 - - void setNextScene(void); - - void showStats(); - void createStatsLabel(); - void calculateMPF(); - void getFPSImageData(unsigned char** datapointer, unsigned int* length); - - /** calculates delta time since last time it was called */ - void calculateDeltaTime(); -protected: - uint32_t m_uPadding00[2]; //0x74 - /* The CCEGLView, where everything is rendered */ - CCEGLView* m_pobOpenGLView; //0x78 - - uint32_t m_uPadding01; //0x7C - - double m_dAnimationInterval; //0x80 - double m_dOldAnimationInterval; //0x88 - - /* landscape mode ? */ - bool m_bLandscape; //0x89, struct alignment takes care of the rest - //uint32_t m_uPadding02; //0x8D - - bool m_bDisplayStats; //0x91 - float m_fAccumDt; //0x94, struct alignment - float m_fFrameRate; //0x98 - - CCLabelAtlas* m_pFPSLabel; //0x9C - CCLabelAtlas* m_pSPFLabel; //0xA0 - CCLabelAtlas* m_pDrawsLabel; //0xA4 - - /** Whether or not the Director is paused */ - bool m_bPaused; //0xA8 - - /* How many frames were called since the director started */ - unsigned int m_uTotalFrames; //0xAC - unsigned int m_uFrames; //0xB0 - float m_fSecondsPerFrame; //0xB4 - - /* The running scene */ - CCScene* m_pRunningScene; //0xB8 - - /* will be the next 'runningScene' in the next frame - nextScene is a weak reference. */ - CCScene* m_pNextScene; //0xBC - - /* If YES, then "old" scene will receive the cleanup message */ - bool m_bSendCleanupToScene; //0xC0 - - /* scheduled scenes */ - CCArray* m_pobScenesStack; //0xC4 - - /* last time the main loop was updated */ - struct cc_timeval* m_pLastUpdate; //0xC8 - - /* whether or not the next delta time will be zero */ - bool m_bNextDeltaTimeZero; //0xCC - - /* projection used */ - ccDirectorProjection m_eProjection; //0xD0 - - /* window size in points */ - CCSize m_obWinSizeInPoints; //0xD4 - - /* content scale factor */ - float m_fContentScaleFactor; //0xDC - - /* store the fps string */ - char* m_pszFPS; //0xE0 - - /* This object will be visited after the scene. Useful to hook a notification node */ - CCNode* m_pNotificationNode; //0xE4 - - /* Projection protocol delegate */ - CCDirectorDelegate* m_pProjectionDelegate; //0xE8 - - //I'm opting to replace this with a cocos macro - //CCSceneDelegate* m_pSceneDelegate; //0xEC - CC_PROPERTY_CONST(CCSceneDelegate*, m_pSceneDelegate, SceneDelegate); -protected: - CCSize m_sUnknown04; //0xF0 //These are referenced in CCDirector::updateScreenScale, no idea what they do - CCSize m_sUnknown05; //0xF8 - - TextureQuality m_eTextureQuality; //0x100 - bool m_bWillSwitchToScene; - - - // CCEGLViewProtocol will recreate stats labels to fit visible rect - friend class CCEGLViewProtocol; -public: - //Robtop Functions - bool getDontCallWillSwitch(void) const; - //bool getForceSmoothFix(void) const; - //bool getIsTransitioning(void) const; - //CCKeyboardDispatcher* getKeyboardDispatcher(void); //Already taken care of - TextureQuality getLoadedTextureQuality(void) const; - //getMouseDispatcher(void); //Already taken care of - CCScene* getNextScene(void); - //getSceneDelegate(void); //Already taken care of - CCScene* getSceneReference(void) const; - float getScreenBottom(void); - float getScreenLeft(void); - float getScreenRight(void); - float getScreenScaleFactor(void); - float getScreenScaleFactorH(void); - float getScreenScaleFactorMax(void); - float getScreenScaleFactorW(void); - float getScreenTop(void); - bool getSmoothFix(void) const; - bool getSmoothFixCheck(void) const; - int getSmoothFixCounter(void) const; - int levelForSceneInStack(CCScene*); - void popSceneWithTransition(float, PopTransition); - int sceneCount(void); - //void setActualDeltaTime(float); //Already taken care of - //void setDeltaTime(float); //Already taken care of - void setForceSmoothFix(bool); - //setKeyboardDispatcher(CCKeyboardDispatcher*) //Already taken care of - //setMouseDispatcher(CCMouseDispatcher*) //Already taken care of - //setSceneDelegate(CCSceneDelegate*) //Already taken care of - void setSceneReference(CCScene*); - void setSmoothFix(bool); - void setSmoothFixCheck(bool); - void setupScreenScale(CCSize, CCSize, TextureQuality); - void updateContentScale(TextureQuality); - void updateScreenScale(CCSize); - void willSwitchToScene(CCScene*); -}; - -/** - @brief DisplayLinkDirector is a Director that synchronizes timers with the refresh rate of the display. - - Features and Limitations: - - Scheduled timers & drawing are synchronizes with the refresh rate of the display - - Only supports animation intervals of 1/60 1/30 & 1/15 - - @since v0.8.2 - @js NA - @lua NA - */ -class CCDisplayLinkDirector : public CCDirector -{ -public: - CCDisplayLinkDirector(void) - : m_bInvalid(false) - {} - - virtual void mainLoop(void); - virtual void setAnimationInterval(double dValue); - virtual void startAnimation(void); - virtual void stopAnimation(); - -protected: - bool m_bInvalid; -}; - -// end of base_node group -/// @} - -NS_CC_END - -#endif // __CCDIRECTOR_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/CCScheduler.h b/cappuccino-sdk/incl/cocos2dx/CCScheduler.h deleted file mode 100644 index 8c12e2d..0000000 --- a/cappuccino-sdk/incl/cocos2dx/CCScheduler.h +++ /dev/null @@ -1,319 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCSCHEDULER_H__ -#define __CCSCHEDULER_H__ - -#include "cocoa/CCObject.h" -#include "support/data_support/uthash.h" - -NS_CC_BEGIN - -/** - * @addtogroup global - * @{ - */ - -// Priority level reserved for system services. -#define kCCPrioritySystem INT_MIN - -// Minimum priority level for user scheduling. -#define kCCPriorityNonSystemMin (kCCPrioritySystem+1) - -class CCSet; -// -// CCTimer -// -/** @brief Light-weight timer */ -// -class CC_DLL CCTimer : public CCObject -{ -public: - /** - * @js ctor - * @lua NA - */ - CCTimer(void); - - /** get interval in seconds */ - float getInterval(void) const; - /** set interval in seconds */ - void setInterval(float fInterval); - /** - * @lua NA - */ - SEL_SCHEDULE getSelector() const; - - /** Initializes a timer with a target and a selector. - * @lua NA - */ - bool initWithTarget(CCObject *pTarget, SEL_SCHEDULE pfnSelector); - - /** Initializes a timer with a target, a selector and an interval in seconds, repeat in number of times to repeat, delay in seconds. - * @lua NA - */ - bool initWithTarget(CCObject *pTarget, SEL_SCHEDULE pfnSelector, float fSeconds, unsigned int nRepeat, float fDelay); - - /** Initializes a timer with a script callback function and an interval in seconds. */ - bool initWithScriptHandler(int nHandler, float fSeconds); - - /** triggers the timer */ - void update(float dt); - -public: - /** Allocates a timer with a target and a selector. - * @lua NA - */ - static CCTimer* timerWithTarget(CCObject *pTarget, SEL_SCHEDULE pfnSelector); - - /** Allocates a timer with a target, a selector and an interval in seconds. - * @lua NA - */ - static CCTimer* timerWithTarget(CCObject *pTarget, SEL_SCHEDULE pfnSelector, float fSeconds); - - /** Allocates a timer with a script callback function and an interval in seconds. */ - static CCTimer* timerWithScriptHandler(int nHandler, float fSeconds); - /** - * @lua NA - */ - inline int getScriptHandler() { return m_nScriptHandler; }; - -protected: - CCObject *m_pTarget; - float m_fElapsed; - bool m_bRunForever; - bool m_bUseDelay; - unsigned int m_uTimesExecuted; - unsigned int m_uRepeat; //0 = once, 1 is 2 x executed - float m_fDelay; - float m_fInterval; - SEL_SCHEDULE m_pfnSelector; - - int m_nScriptHandler; -}; - -// -// CCScheduler -// -struct _listEntry; -struct _hashSelectorEntry; -struct _hashUpdateEntry; - -class CCArray; - -/** @brief Scheduler is responsible for triggering the scheduled callbacks. -You should not use NSTimer. Instead use this class. - -There are 2 different types of callbacks (selectors): - -- update selector: the 'update' selector will be called every frame. You can customize the priority. -- custom selector: A custom selector will be called every frame, or with a custom interval of time - -The 'custom selectors' should be avoided when possible. It is faster, and consumes less memory to use the 'update selector'. - -*/ -class CC_DLL CCScheduler : public CCObject -{ -public: - CCScheduler(); - /** - * @js NA - * @lua NA - */ - ~CCScheduler(void); - - inline float getTimeScale(void) { return m_fTimeScale; } - /** Modifies the time of all scheduled callbacks. - You can use this property to create a 'slow motion' or 'fast forward' effect. - Default is 1.0. To create a 'slow motion' effect, use values below 1.0. - To create a 'fast forward' effect, use values higher than 1.0. - @since v0.8 - @warning It will affect EVERY scheduled selector / action. - */ - inline void setTimeScale(float fTimeScale) { m_fTimeScale = fTimeScale; } - - /** 'update' the scheduler. - * You should NEVER call this method, unless you know what you are doing. - * @js NA - * @lua NA - */ - void update(float dt); - - /** The scheduled method will be called every 'interval' seconds. - If paused is YES, then it won't be called until it is resumed. - If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdateForTarget:' instead. - If the selector is already scheduled, then only the interval parameter will be updated without re-scheduling it again. - repeat let the action be repeated repeat + 1 times, use kCCRepeatForever to let the action run continuously - delay is the amount of time the action will wait before it'll start - - @since v0.99.3, repeat and delay added in v1.1 - @js NA - @lua NA - */ - void scheduleSelector(SEL_SCHEDULE pfnSelector, CCObject *pTarget, float fInterval, unsigned int repeat, float delay, bool bPaused); - - /** calls scheduleSelector with kCCRepeatForever and a 0 delay - * @js NA - * @lua NA - */ - void scheduleSelector(SEL_SCHEDULE pfnSelector, CCObject *pTarget, float fInterval, bool bPaused); - /** Schedules the 'update' selector for a given target with a given priority. - The 'update' selector will be called every frame. - The lower the priority, the earlier it is called. - @since v0.99.3 - @lua NA - */ - void scheduleUpdateForTarget(CCObject *pTarget, int nPriority, bool bPaused); - - /** Unschedule a selector for a given target. - If you want to unschedule the "update", use unscheudleUpdateForTarget. - @since v0.99.3 - @lua NA - */ - void unscheduleSelector(SEL_SCHEDULE pfnSelector, CCObject *pTarget); - - /** Unschedules the update selector for a given target - @since v0.99.3 - @lua NA - */ - void unscheduleUpdateForTarget(const CCObject *pTarget); - - /** Unschedules all selectors for a given target. - This also includes the "update" selector. - @since v0.99.3 - @js unscheduleCallbackForTarget - @lua NA - */ - void unscheduleAllForTarget(CCObject *pTarget); - - /** Unschedules all selectors from all targets. - You should NEVER call this method, unless you know what you are doing. - - @since v0.99.3 - @js unscheduleAllCallbacks - @lua NA - */ - void unscheduleAll(void); - - /** Unschedules all selectors from all targets with a minimum priority. - You should only call this with kCCPriorityNonSystemMin or higher. - @since v2.0.0 - @js unscheduleAllCallbacksWithMinPriority - @lua NA - */ - void unscheduleAllWithMinPriority(int nMinPriority); - - /** The scheduled script callback will be called every 'interval' seconds. - If paused is YES, then it won't be called until it is resumed. - If 'interval' is 0, it will be called every frame. - return schedule script entry ID, used for unscheduleScriptFunc(). - @js NA - */ - unsigned int scheduleScriptFunc(unsigned int nHandler, float fInterval, bool bPaused); - - /** Unschedule a script entry. - * @js NA - */ - void unscheduleScriptEntry(unsigned int uScheduleScriptEntryID); - - /** Pauses the target. - All scheduled selectors/update for a given target won't be 'ticked' until the target is resumed. - If the target is not present, nothing happens. - @since v0.99.3 - @lua NA - */ - void pauseTarget(CCObject *pTarget); - - /** Resumes the target. - The 'target' will be unpaused, so all schedule selectors/update will be 'ticked' again. - If the target is not present, nothing happens. - @since v0.99.3 - @lua NA - */ - void resumeTarget(CCObject *pTarget); - - /** Returns whether or not the target is paused - @since v1.0.0 - @lua NA - */ - bool isTargetPaused(CCObject *pTarget); - - /** Pause all selectors from all targets. - You should NEVER call this method, unless you know what you are doing. - @since v2.0.0 - @lua NA - */ - CCSet* pauseAllTargets(); - - /** Pause all selectors from all targets with a minimum priority. - You should only call this with kCCPriorityNonSystemMin or higher. - @since v2.0.0 - @lua NA - */ - CCSet* pauseAllTargetsWithMinPriority(int nMinPriority); - - /** Resume selectors on a set of targets. - This can be useful for undoing a call to pauseAllSelectors. - @since v2.0.0 - @lua NA - */ - void resumeTargets(CCSet* targetsToResume); - -private: - void removeHashElement(struct _hashSelectorEntry *pElement); - void removeUpdateFromHash(struct _listEntry *entry); - - // update specific - - void priorityIn(struct _listEntry **ppList, CCObject *pTarget, int nPriority, bool bPaused); - void appendIn(struct _listEntry **ppList, CCObject *pTarget, bool bPaused); - -protected: - float m_fTimeScale; - - // - // "updates with priority" stuff - // - struct _listEntry *m_pUpdatesNegList; // list of priority < 0 - struct _listEntry *m_pUpdates0List; // list priority == 0 - struct _listEntry *m_pUpdatesPosList; // list priority > 0 - struct _hashUpdateEntry *m_pHashForUpdates; // hash used to fetch quickly the list entries for pause,delete,etc - - // Used for "selectors with interval" - struct _hashSelectorEntry *m_pHashForTimers; - struct _hashSelectorEntry *m_pCurrentTarget; - bool m_bCurrentTargetSalvaged; - // If true unschedule will not remove anything from a hash. Elements will only be marked for deletion. - bool m_bUpdateHashLocked; - CCArray* m_pScriptHandlerEntries; -}; - -// end of global group -/// @} - -NS_CC_END - -#endif // __CCSCHEDULER_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/actions/CCAction.h b/cappuccino-sdk/incl/cocos2dx/actions/CCAction.h deleted file mode 100644 index 08a25a2..0000000 --- a/cappuccino-sdk/incl/cocos2dx/actions/CCAction.h +++ /dev/null @@ -1,295 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __ACTIONS_CCACTION_H__ -#define __ACTIONS_CCACTION_H__ - -#include "cocoa/CCObject.h" -#include "cocoa/CCGeometry.h" -#include "platform/CCPlatformMacros.h" - -NS_CC_BEGIN - -enum { - //! Default tag - kCCActionTagInvalid = -1, -}; - -/** - * @addtogroup actions - * @{ - */ - -/** -@brief Base class for CCAction objects. - */ -class CC_DLL CCAction : public CCObject -{ -public: - /** - * @js ctor - */ - CCAction(void); - /** - * @js NA - * @lua NA - */ - virtual ~CCAction(void); - /** - * @js NA - * @lua NA - */ - const char* description(); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone *pZone); - - //! return true if the action has finished - virtual bool isDone(void); - - //! called before the action start. It will also set the target. - virtual void startWithTarget(CCNode *pTarget); - - /** - called after the action has finished. It will set the 'target' to nil. - IMPORTANT: You should never call "[action stop]" manually. Instead, use: "target->stopAction(action);" - */ - virtual void stop(void); - - //! called every frame with it's delta time. DON'T override unless you know what you are doing. - virtual void step(float dt); - - /** - called once per frame. time a value between 0 and 1 - - For example: - - 0 means that the action just started - - 0.5 means that the action is in the middle - - 1 means that the action is over - */ - virtual void update(float time); - - inline CCNode* getTarget(void) { return m_pTarget; } - /** The action will modify the target properties. */ - inline void setTarget(CCNode *pTarget) { m_pTarget = pTarget; } - - inline CCNode* getOriginalTarget(void) { return m_pOriginalTarget; } - /** Set the original target, since target can be nil. - Is the target that were used to run the action. Unless you are doing something complex, like CCActionManager, you should NOT call this method. - The target is 'assigned', it is not 'retained'. - @since v0.8.2 - */ - inline void setOriginalTarget(CCNode *pOriginalTarget) { m_pOriginalTarget = pOriginalTarget; } - - inline int getTag(void) { return m_nTag; } - inline void setTag(int nTag) { m_nTag = nTag; } - -public: - /** Create an action */ - static CCAction* create(); -protected: - CCNode *m_pOriginalTarget; - /** The "target". - The target will be set with the 'startWithTarget' method. - When the 'stop' method is called, target will be set to nil. - The target is 'assigned', it is not 'retained'. - */ - CCNode *m_pTarget; - /** The action tag. An identifier of the action */ - int m_nTag; -}; - -/** -@brief - Base class actions that do have a finite time duration. - Possible actions: - - An action with a duration of 0 seconds - - An action with a duration of 35.5 seconds - - Infinite time actions are valid - */ -class CC_DLL CCFiniteTimeAction : public CCAction -{ -public: - /** - * @js ctor - */ - CCFiniteTimeAction() - : m_fDuration(0) - {} - /** - * @js NA - * @lua NA - */ - virtual ~CCFiniteTimeAction(){} - //! get duration in seconds of the action - inline float getDuration(void) { return m_fDuration; } - //! set duration in seconds of the action - inline void setDuration(float duration) { m_fDuration = duration; } - - /** returns a reversed action */ - virtual CCFiniteTimeAction* reverse(void); -protected: - //! duration in seconds - float m_fDuration; -}; - -class CCActionInterval; -class CCRepeatForever; - -/** - @brief Changes the speed of an action, making it take longer (speed>1) - or less (speed<1) time. - Useful to simulate 'slow motion' or 'fast forward' effect. - @warning This action can't be Sequenceable because it is not an CCIntervalAction - */ -class CC_DLL CCSpeed : public CCAction -{ -public: - /** - * @js ctor - */ - CCSpeed() - : m_fSpeed(0.0) - , m_pInnerAction(NULL) - {} - /** - * @js NA - * @lua NA - */ - virtual ~CCSpeed(void); - - inline float getSpeed(void) { return m_fSpeed; } - /** alter the speed of the inner function in runtime */ - inline void setSpeed(float fSpeed) { m_fSpeed = fSpeed; } - - /** initializes the action */ - bool initWithAction(CCActionInterval *pAction, float fSpeed); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone *pZone); - virtual void startWithTarget(CCNode* pTarget); - virtual void stop(); - virtual void step(float dt); - virtual bool isDone(void); - virtual CCActionInterval* reverse(void); - - void setInnerAction(CCActionInterval *pAction); - - inline CCActionInterval* getInnerAction() - { - return m_pInnerAction; - } - -public: - /** create the action */ - static CCSpeed* create(CCActionInterval* pAction, float fSpeed); -protected: - float m_fSpeed; - CCActionInterval *m_pInnerAction; -}; - -/** -@brief CCFollow is an action that "follows" a node. - -Eg: -layer->runAction(CCFollow::actionWithTarget(hero)); - -Instead of using CCCamera as a "follower", use this action instead. -@since v0.99.2 -*/ -class CC_DLL CCFollow : public CCAction -{ -public: - /** - * @js ctor - */ - CCFollow() - : m_pobFollowedNode(NULL) - , m_bBoundarySet(false) - , m_bBoundaryFullyCovered(false) - , m_fLeftBoundary(0.0) - , m_fRightBoundary(0.0) - , m_fTopBoundary(0.0) - , m_fBottomBoundary(0.0) - {} - /** - * @js NA - * @lua NA - */ - virtual ~CCFollow(void); - - inline bool isBoundarySet(void) { return m_bBoundarySet; } - /** alter behavior - turn on/off boundary */ - inline void setBoudarySet(bool bValue) { m_bBoundarySet = bValue; } - - /** initializes the action with a set boundary */ - bool initWithTarget(CCNode *pFollowedNode, const CCRect& rect = CCRectZero); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone *pZone); - virtual void step(float dt); - virtual bool isDone(void); - virtual void stop(void); - -public: - /** creates the action with a set boundary, - It will work with no boundary if @param rect is equal to CCRectZero. - */ - static CCFollow* create(CCNode *pFollowedNode, const CCRect& rect = CCRectZero); -protected: - // node to follow - CCNode *m_pobFollowedNode; - - // whether camera should be limited to certain area - bool m_bBoundarySet; - - // if screen size is bigger than the boundary - update not needed - bool m_bBoundaryFullyCovered; - - // fast access to the screen dimensions - CCPoint m_obHalfScreenSize; - CCPoint m_obFullScreenSize; - - // world boundaries - float m_fLeftBoundary; - float m_fRightBoundary; - float m_fTopBoundary; - float m_fBottomBoundary; -}; - -// end of actions group -/// @} - -NS_CC_END - -#endif // __ACTIONS_CCACTION_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/actions/CCActionCamera.h b/cappuccino-sdk/incl/cocos2dx/actions/CCActionCamera.h deleted file mode 100644 index 62c3449..0000000 --- a/cappuccino-sdk/incl/cocos2dx/actions/CCActionCamera.h +++ /dev/null @@ -1,147 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCCAMERA_ACTION_H__ -#define __CCCAMERA_ACTION_H__ - -#include "CCActionInterval.h" - -NS_CC_BEGIN - -class CCCamera; - -/** - * @addtogroup actions - * @{ - */ - -/** -@brief Base class for CCCamera actions -@ingroup Actions -*/ -class CC_DLL CCActionCamera : public CCActionInterval // -{ -public: - /** - * @js ctor - */ - CCActionCamera() - :m_fCenterXOrig(0) - ,m_fCenterYOrig(0) - ,m_fCenterZOrig(0) - ,m_fEyeXOrig(0) - ,m_fEyeYOrig(0) - ,m_fEyeZOrig(0) - ,m_fUpXOrig(0) - ,m_fUpYOrig(0) - ,m_fUpZOrig(0) - {} - /** - * @js NA - * @lua NA - */ - virtual ~CCActionCamera(){} - // super methods - virtual void startWithTarget(CCNode *pTarget); - virtual CCActionInterval * reverse(); -protected: - float m_fCenterXOrig; - float m_fCenterYOrig; - float m_fCenterZOrig; - - float m_fEyeXOrig; - float m_fEyeYOrig; - float m_fEyeZOrig; - - float m_fUpXOrig; - float m_fUpYOrig; - float m_fUpZOrig; -}; - -/** -@brief CCOrbitCamera action -Orbits the camera around the center of the screen using spherical coordinates -@ingroup Actions -*/ -class CC_DLL CCOrbitCamera : public CCActionCamera // -{ -public: - /** - * @js ctor - */ - CCOrbitCamera() - : m_fRadius(0.0) - , m_fDeltaRadius(0.0) - , m_fAngleZ(0.0) - , m_fDeltaAngleZ(0.0) - , m_fAngleX(0.0) - , m_fDeltaAngleX(0.0) - , m_fRadZ(0.0) - , m_fRadDeltaZ(0.0) - , m_fRadX(0.0) - , m_fRadDeltaX(0.0) - {} - /** - * @js NA - * @lua NA - */ - ~CCOrbitCamera(){} - - /** creates a CCOrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX */ - static CCOrbitCamera* create(float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX); - - /** initializes a CCOrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX */ - bool initWithDuration(float t, float radius, float deltaRadius, float angleZ, float deltaAngleZ, float angleX, float deltaAngleX); - /** positions the camera according to spherical coordinates */ - void sphericalRadius(float *r, float *zenith, float *azimuth); - // super methods - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void startWithTarget(CCNode *pTarget); - virtual void update(float time); - -protected: - float m_fRadius; - float m_fDeltaRadius; - float m_fAngleZ; - float m_fDeltaAngleZ; - float m_fAngleX; - float m_fDeltaAngleX; - - float m_fRadZ; - float m_fRadDeltaZ; - float m_fRadX; - float m_fRadDeltaX; -}; - -// end of actions group -/// @} - -NS_CC_END - -#endif //__CCCAMERA_ACTION_H__ \ No newline at end of file diff --git a/cappuccino-sdk/incl/cocos2dx/actions/CCActionCatmullRom.h b/cappuccino-sdk/incl/cocos2dx/actions/CCActionCatmullRom.h deleted file mode 100644 index 85b5ca8..0000000 --- a/cappuccino-sdk/incl/cocos2dx/actions/CCActionCatmullRom.h +++ /dev/null @@ -1,275 +0,0 @@ -/* - * Copyright (c) 2012 cocos2d-x.org - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008 Radu Gruian - * - * Copyright (c) 2011 Vit Valentin - * - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - * - * Original code by Radu Gruian: http://www.codeproject.com/Articles/30838/Overhauser-Catmull-Rom-Splines-for-Camera-Animatio.So - * - * Adapted to cocos2d-x by Vit Valentin - * - * Adapted from cocos2d-x to cocos2d-iphone by Ricardo Quesada - */ - - -#ifndef __CCACTION_CATMULLROM_H__ -#define __CCACTION_CATMULLROM_H__ - -#include - -#include "CCActionInterval.h" -#include "base_nodes/CCNode.h" -#include "cocoa/CCGeometry.h" - -NS_CC_BEGIN; - -/** - * @addtogroup actions - * @{ - */ - -/** An Array that contain control points. - * Used by CCCardinalSplineTo and (By) and CCCatmullRomTo (and By) actions. - * @ingroup Actions - * @js NA - */ -class CC_DLL CCPointArray : public CCObject -{ -public: - - /** creates and initializes a Points array with capacity - * @lua NA - */ - static CCPointArray* create(unsigned int capacity); - /** - * @lua NA - */ - virtual ~CCPointArray(); - /** - * @lua NA - */ - CCPointArray(); - - /** initializes a Catmull Rom config with a capacity hint */ - bool initWithCapacity(unsigned int capacity); - - /** appends a control point */ - void addControlPoint(CCPoint controlPoint); - - /** inserts a controlPoint at index */ - void insertControlPoint(CCPoint &controlPoint, unsigned int index); - - /** replaces an existing controlPoint at index */ - void replaceControlPoint(CCPoint &controlPoint, unsigned int index); - - /** get the value of a controlPoint at a given index */ - CCPoint getControlPointAtIndex(unsigned int index); - - /** deletes a control point at a given index */ - void removeControlPointAtIndex(unsigned int index); - - /** returns the number of objects of the control point array */ - unsigned int count(); - - /** returns a new copy of the array reversed. User is responsible for releasing this copy */ - CCPointArray* reverse(); - - /** reverse the current control point array inline, without generating a new one */ - void reverseInline(); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone *zone); - - const std::vector* getControlPoints(); - - void setControlPoints(std::vector *controlPoints); -private: - /** Array that contains the control points */ - std::vector *m_pControlPoints; -}; - -/** Cardinal Spline path. - http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Cardinal_spline -@ingroup Actions - */ -class CC_DLL CCCardinalSplineTo : public CCActionInterval -{ -public: - - /** creates an action with a Cardinal Spline array of points and tension - * @code - * when thie function bound to js,the input params are changed - * js:var create(var duration,var pointTable,var tension) - * @endcode - */ - static CCCardinalSplineTo* create(float duration, CCPointArray* points, float tension); - /** - * @js NA - * @lua NA - */ - virtual ~CCCardinalSplineTo(); - /** - * @js ctor - * @lua NA - */ - CCCardinalSplineTo(); - - /** initializes the action with a duration and an array of points - * @lua NA - */ - bool initWithDuration(float duration, CCPointArray* points, float tension); - - // super virtual functions - /** - * @js NA - * @lua NA - */ - virtual CCCardinalSplineTo* copyWithZone(CCZone* pZone); - /** - * @lua NA - */ - virtual void startWithTarget(CCNode *pTarget); - /** - * @lua NA - */ - virtual void update(float time); - virtual CCActionInterval* reverse(); - /** - * @lua NA - */ - virtual void updatePosition(CCPoint &newPos); - - inline CCPointArray* getPoints() { return m_pPoints; } - /** - * @js NA - */ - inline void setPoints(CCPointArray* points) - { - CC_SAFE_RETAIN(points); - CC_SAFE_RELEASE(m_pPoints); - m_pPoints = points; - } - -protected: - /** Array of control points */ - CCPointArray *m_pPoints; - float m_fDeltaT; - float m_fTension; - CCPoint m_previousPosition; - CCPoint m_accumulatedDiff; -}; - -/** Cardinal Spline path. - http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Cardinal_spline - @ingroup Actions - */ -class CC_DLL CCCardinalSplineBy : public CCCardinalSplineTo -{ -public: - - /** creates an action with a Cardinal Spline array of points and tension - * @code - * when thie function bound to js,the input params are changed - * js:var create(var duration,var pointTable,var tension) - * @endcode - */ - static CCCardinalSplineBy* create(float duration, CCPointArray* points, float tension); - /** - * @js NA - * @lua NA - */ - CCCardinalSplineBy(); - /** - * @lua NA - */ - virtual void startWithTarget(CCNode *pTarget); - virtual CCActionInterval* reverse(); - /** - * @lua NA - */ - virtual void updatePosition(CCPoint &newPos); -protected: - CCPoint m_startPosition; -}; - -/** An action that moves the target with a CatmullRom curve to a destination point. - A Catmull Rom is a Cardinal Spline with a tension of 0.5. - http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Catmull.E2.80.93Rom_spline - @ingroup Actions - */ -class CC_DLL CCCatmullRomTo : public CCCardinalSplineTo -{ -public: - - /** creates an action with a Cardinal Spline array of points and tension - * @code - * when this function bound to js,the input params are changed - * js:var create(var dt,var pointTable) - * @endcode - */ - static CCCatmullRomTo* create(float dt, CCPointArray* points); - - /** initializes the action with a duration and an array of points - * @js NA - * @lua NA - */ - bool initWithDuration(float dt, CCPointArray* points); -}; - -/** An action that moves the target with a CatmullRom curve by a certain distance. - A Catmull Rom is a Cardinal Spline with a tension of 0.5. - http://en.wikipedia.org/wiki/Cubic_Hermite_spline#Catmull.E2.80.93Rom_spline - @ingroup Actions - */ -class CC_DLL CCCatmullRomBy : public CCCardinalSplineBy -{ -public: - - /** creates an action with a Cardinal Spline array of points and tension - * @code - * when this function bound to js,the input params are changed - * js:var create(var dt,var pointTable) - * @endcode - */ - static CCCatmullRomBy* create(float dt, CCPointArray* points); - - /** initializes the action with a duration and an array of points - * @js NA - * @lua NA - */ - bool initWithDuration(float dt, CCPointArray* points); -}; - -/** Returns the Cardinal Spline position for a given set of control points, tension and time */ -extern CC_DLL CCPoint ccCardinalSplineAt(CCPoint &p0, CCPoint &p1, CCPoint &p2, CCPoint &p3, float tension, float t); - -// end of actions group -/// @} - -NS_CC_END; - -#endif // __CCACTION_CATMULLROM_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/actions/CCActionEase.h b/cappuccino-sdk/incl/cocos2dx/actions/CCActionEase.h deleted file mode 100644 index b913e91..0000000 --- a/cappuccino-sdk/incl/cocos2dx/actions/CCActionEase.h +++ /dev/null @@ -1,567 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2009 Jason Booth - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __ACTION_CCEASE_ACTION_H__ -#define __ACTION_CCEASE_ACTION_H__ - -#include "CCActionInterval.h" - -NS_CC_BEGIN - -class CCObject; -class CCZone; - -/** - * @addtogroup actions - * @{ - */ - -/** - @brief Base class for Easing actions - @ingroup Actions - */ -class CC_DLL CCActionEase : public CCActionInterval -{ -public: - /** - * @js NA - * @lua NA - */ - virtual ~CCActionEase(void); - - /** initializes the action */ - bool initWithAction(CCActionInterval *pAction); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void startWithTarget(CCNode *pTarget); - virtual void stop(void); - virtual void update(float time); - virtual CCActionInterval* reverse(void); - virtual CCActionInterval* getInnerAction(); - -public: - - /** creates the action */ - static CCActionEase* create(CCActionInterval *pAction); - -protected: - /** The inner action */ - CCActionInterval *m_pInner; -}; - -/** - @brief Base class for Easing actions with rate parameters - @ingroup Actions - */ -class CC_DLL CCEaseRateAction : public CCActionEase -{ -public: - /** - * @js NA - * @lua NA - */ - virtual ~CCEaseRateAction(void); - - /** set rate value for the actions */ - inline void setRate(float rate) { m_fRate = rate; } - /** get rate value for the actions */ - inline float getRate(void) { return m_fRate; } - - /** Initializes the action with the inner action and the rate parameter */ - bool initWithAction(CCActionInterval *pAction, float fRate); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual CCActionInterval* reverse(void); - -public: - - /** Creates the action with the inner action and the rate parameter */ - static CCEaseRateAction* create(CCActionInterval* pAction, float fRate); - -protected: - float m_fRate; -}; - -/** - @brief CCEaseIn action with a rate - @ingroup Actions - */ -class CC_DLL CCEaseIn : public CCEaseRateAction -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); -public: - - /** Creates the action with the inner action and the rate parameter */ - static CCEaseIn* create(CCActionInterval* pAction, float fRate); -}; - -/** - @brief CCEaseOut action with a rate - @ingroup Actions - */ -class CC_DLL CCEaseOut : public CCEaseRateAction -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - - /** Creates the action with the inner action and the rate parameter */ - static CCEaseOut* create(CCActionInterval* pAction, float fRate); -}; - -/** - @brief CCEaseInOut action with a rate - @ingroup Actions - */ -class CC_DLL CCEaseInOut : public CCEaseRateAction -{ -public: - virtual void update(float time); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual CCActionInterval* reverse(void); - -public: - - /** Creates the action with the inner action and the rate parameter */ - static CCEaseInOut* create(CCActionInterval* pAction, float fRate); -}; - -/** - @brief CCEase Exponential In - @ingroup Actions - */ -class CC_DLL CCEaseExponentialIn : public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCEaseExponentialIn* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Exponential Out - @ingroup Actions - */ -class CC_DLL CCEaseExponentialOut : public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCEaseExponentialOut* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Exponential InOut - @ingroup Actions - */ -class CC_DLL CCEaseExponentialInOut : public CCActionEase -{ -public: - virtual void update(float time); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual CCActionInterval* reverse(); - -public: - - /** creates the action */ - static CCEaseExponentialInOut* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Sine In - @ingroup Actions - */ -class CC_DLL CCEaseSineIn : public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCEaseSineIn* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Sine Out - @ingroup Actions - */ -class CC_DLL CCEaseSineOut : public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - - /** creates the action */ - static CCEaseSineOut* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Sine InOut - @ingroup Actions - */ -class CC_DLL CCEaseSineInOut : public CCActionEase -{ -public: - virtual void update(float time); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual CCActionInterval* reverse(); - -public: - - /** creates the action */ - static CCEaseSineInOut* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Elastic abstract class - @since v0.8.2 - @ingroup Actions - */ -class CC_DLL CCEaseElastic : public CCActionEase -{ -public: - /** get period of the wave in radians. default is 0.3 */ - inline float getPeriod(void) { return m_fPeriod; } - /** set period of the wave in radians. */ - inline void setPeriod(float fPeriod) { m_fPeriod = fPeriod; } - - /** Initializes the action with the inner action and the period in radians (default is 0.3) */ - bool initWithAction(CCActionInterval *pAction, float fPeriod = 0.3f); - - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - - /** Creates the action with the inner action and the period in radians (default is 0.3) */ - static CCEaseElastic* create(CCActionInterval *pAction, float fPeriod); - static CCEaseElastic* create(CCActionInterval *pAction); -protected: - float m_fPeriod; -}; - -/** - @brief Ease Elastic In action. - @warning This action doesn't use a bijective function. Actions like Sequence might have an unexpected result when used with this action. - @since v0.8.2 - @ingroup Actions - */ -class CC_DLL CCEaseElasticIn : public CCEaseElastic -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - - /** Creates the action with the inner action and the period in radians (default is 0.3) */ - static CCEaseElasticIn* create(CCActionInterval *pAction, float fPeriod); - static CCEaseElasticIn* create(CCActionInterval *pAction); -}; - -/** - @brief Ease Elastic Out action. - @warning This action doesn't use a bijective function. Actions like Sequence might have an unexpected result when used with this action. - @since v0.8.2 - @ingroup Actions - */ -class CC_DLL CCEaseElasticOut : public CCEaseElastic -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - - /** Creates the action with the inner action and the period in radians (default is 0.3) */ - static CCEaseElasticOut* create(CCActionInterval *pAction, float fPeriod); - static CCEaseElasticOut* create(CCActionInterval *pAction); -}; - -/** - @brief Ease Elastic InOut action. - @warning This action doesn't use a bijective function. Actions like Sequence might have an unexpected result when used with this action. - @since v0.8.2 - @ingroup Actions - */ -class CC_DLL CCEaseElasticInOut : public CCEaseElastic -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - - /** Creates the action with the inner action and the period in radians (default is 0.3) */ - static CCEaseElasticInOut* create(CCActionInterval *pAction, float fPeriod); - static CCEaseElasticInOut* create(CCActionInterval *pAction); -}; - -/** - @brief CCEaseBounce abstract class. - @since v0.8.2 - @ingroup Actions -*/ -class CC_DLL CCEaseBounce : public CCActionEase -{ -public: - float bounceTime(float time); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual CCActionInterval* reverse(); - -public: - - /** creates the action */ - static CCEaseBounce* create(CCActionInterval* pAction); -}; - -/** - @brief CCEaseBounceIn action. - @warning This action doesn't use a bijective function. Actions like Sequence might have an unexpected result when used with this action. - @since v0.8.2 - @ingroup Actions -*/ -class CC_DLL CCEaseBounceIn : public CCEaseBounce -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - - /** creates the action */ - static CCEaseBounceIn* create(CCActionInterval* pAction); -}; - -/** - @brief EaseBounceOut action. - @warning This action doesn't use a bijective function. Actions like Sequence might have an unexpected result when used with this action. - @since v0.8.2 - @ingroup Actions - */ -class CC_DLL CCEaseBounceOut : public CCEaseBounce -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - - /** creates the action */ - static CCEaseBounceOut* create(CCActionInterval* pAction); -}; - -/** - @brief CCEaseBounceInOut action. - @warning This action doesn't use a bijective function. Actions like Sequence might have an unexpected result when used with this action. - @since v0.8.2 - @ingroup Actions - */ -class CC_DLL CCEaseBounceInOut : public CCEaseBounce -{ -public: - virtual void update(float time); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual CCActionInterval* reverse(); - -public: - - /** creates the action */ - static CCEaseBounceInOut* create(CCActionInterval* pAction); -}; - -/** - @brief CCEaseBackIn action. - @warning This action doesn't use a bijective function. Actions like Sequence might have an unexpected result when used with this action. - @since v0.8.2 - @ingroup Actions - */ -class CC_DLL CCEaseBackIn : public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - - /** creates the action */ - static CCEaseBackIn* create(CCActionInterval* pAction); -}; - -/** - @brief CCEaseBackOut action. - @warning This action doesn't use a bijective function. Actions like Sequence might have an unexpected result when used with this action. - @since v0.8.2 - @ingroup Actions - */ -class CC_DLL CCEaseBackOut : public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - - /** creates the action */ - static CCEaseBackOut* create(CCActionInterval* pAction); -}; - -/** - @brief CCEaseBackInOut action. - @warning This action doesn't use a bijective function. Actions like Sequence might have an unexpected result when used with this action. - @since v0.8.2 - @ingroup Actions - */ -class CC_DLL CCEaseBackInOut : public CCActionEase -{ -public: - virtual void update(float time); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual CCActionInterval* reverse(); - -public: - - /** creates the action */ - static CCEaseBackInOut* create(CCActionInterval* pAction); -}; - -// end of actions group -/// @} - -NS_CC_END - -#endif // __ACTION_CCEASE_ACTION_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/actions/CCActionGrid.h b/cappuccino-sdk/incl/cocos2dx/actions/CCActionGrid.h deleted file mode 100644 index 16fe732..0000000 --- a/cappuccino-sdk/incl/cocos2dx/actions/CCActionGrid.h +++ /dev/null @@ -1,241 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2009 On-Core - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __ACTION_CCGRID_ACTION_H__ -#define __ACTION_CCGRID_ACTION_H__ - -#include "CCActionInterval.h" -#include "CCActionInstant.h" - -NS_CC_BEGIN - -class CCGridBase; - -/** - * @addtogroup actions - * @{ - */ - -/** @brief Base class for Grid actions */ -class CC_DLL CCGridAction : public CCActionInterval -{ -public: - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void startWithTarget(CCNode *pTarget); - virtual CCActionInterval* reverse(void); - - /** initializes the action with size and duration */ - virtual bool initWithDuration(float duration, const CCSize& gridSize); - - /** returns the grid */ - virtual CCGridBase* getGrid(void); - -public: - /** creates the action with size and duration */ - // We can't make this create function compatible with previous version, bindings-generator will be confused since they - // have the same function name and the same number of arguments. So sorry about that. - //CC_DEPRECATED_ATTRIBUTE static CCGridAction* create(const CCSize& gridSize, float duration); - - /** creates the action with size and duration */ - static CCGridAction* create(float duration, const CCSize& gridSize); -protected: - CCSize m_sGridSize; -}; - -/** - @brief Base class for CCGrid3D actions. - Grid3D actions can modify a non-tiled grid. - */ -class CC_DLL CCGrid3DAction : public CCGridAction -{ -public: - /** returns the grid */ - virtual CCGridBase* getGrid(void); - /** returns the vertex than belongs to certain position in the grid */ - ccVertex3F vertex(const CCPoint& position); - /** returns the non-transformed vertex than belongs to certain position in the grid */ - ccVertex3F originalVertex(const CCPoint& position); - /** sets a new vertex to a certain position of the grid */ - void setVertex(const CCPoint& position, const ccVertex3F& vertex); - -public: - /** creates the action with size and duration - * @js NA - * @lua NA - */ - static CCGrid3DAction* create(float duration, const CCSize& gridSize); -}; - -/** @brief Base class for CCTiledGrid3D actions */ -class CC_DLL CCTiledGrid3DAction : public CCGridAction -{ -public: - /** returns the tile that belongs to a certain position of the grid */ - ccQuad3 tile(const CCPoint& position); - /** returns the non-transformed tile that belongs to a certain position of the grid */ - ccQuad3 originalTile(const CCPoint& position); - /** sets a new tile to a certain position of the grid */ - void setTile(const CCPoint& position, const ccQuad3& coords); - - /** returns the grid */ - virtual CCGridBase* getGrid(void); - -public: - /** creates the action with size and duration - * @js NA - * @lua NA - */ - static CCTiledGrid3DAction* create(float duration, const CCSize& gridSize); -}; - -/** @brief CCAccelDeccelAmplitude action */ -class CC_DLL CCAccelDeccelAmplitude : public CCActionInterval -{ -public: - /** - * @js NA - * @lua NA - */ - virtual ~CCAccelDeccelAmplitude(void); - /** initializes the action with an inner action that has the amplitude property, and a duration time */ - bool initWithAction(CCAction *pAction, float duration); - - virtual void startWithTarget(CCNode *pTarget); - virtual void update(float time); - virtual CCActionInterval* reverse(void); - - /** get amplitude rate */ - inline float getRate(void) { return m_fRate; } - /** set amplitude rate */ - inline void setRate(float fRate) { m_fRate = fRate; } - -public: - /** creates the action with an inner action that has the amplitude property, and a duration time */ - static CCAccelDeccelAmplitude* create(CCAction *pAction, float duration); - -protected: - float m_fRate; - CCActionInterval *m_pOther; -}; - -/** @brief CCAccelAmplitude action */ -class CC_DLL CCAccelAmplitude : public CCActionInterval -{ -public: - /** - * @js NA - * @lua NA - */ - ~CCAccelAmplitude(void); - /** initializes the action with an inner action that has the amplitude property, and a duration time */ - bool initWithAction(CCAction *pAction, float duration); - - /** get amplitude rate */ - inline float getRate(void) { return m_fRate; } - /** set amplitude rate */ - inline void setRate(float fRate) { m_fRate = fRate; } - - virtual void startWithTarget(CCNode *pTarget); - virtual void update(float time); - virtual CCActionInterval* reverse(void); - -public: - /** creates the action with an inner action that has the amplitude property, and a duration time */ - static CCAccelAmplitude* create(CCAction *pAction, float duration); -protected: - float m_fRate; - CCActionInterval *m_pOther; -}; - -/** @brief CCDeccelAmplitude action */ -class CC_DLL CCDeccelAmplitude : public CCActionInterval -{ -public: - /** - * @js NA - * @lua NA - */ - ~CCDeccelAmplitude(void); - /** initializes the action with an inner action that has the amplitude property, and a duration time */ - bool initWithAction(CCAction *pAction, float duration); - - /** get amplitude rate */ - inline float getRate(void) { return m_fRate; } - /** set amplitude rate */ - inline void setRate(float fRate) { m_fRate = fRate; } - - virtual void startWithTarget(CCNode *pTarget); - virtual void update(float time); - virtual CCActionInterval* reverse(void); - -public: - /** creates the action with an inner action that has the amplitude property, and a duration time */ - static CCDeccelAmplitude* create(CCAction *pAction, float duration); - -protected: - float m_fRate; - CCActionInterval *m_pOther; -}; - -/** @brief CCStopGrid action. - @warning Don't call this action if another grid action is active. - Call if you want to remove the the grid effect. Example: - CCSequence::actions(Lens::action(...), CCStopGrid::action(...), NULL); - */ -class CC_DLL CCStopGrid : public CCActionInstant -{ -public: - virtual void startWithTarget(CCNode *pTarget); - -public: - /** Allocates and initializes the action */ - static CCStopGrid* create(void); -}; - -/** @brief CCReuseGrid action */ -class CC_DLL CCReuseGrid : public CCActionInstant -{ -public: - /** initializes an action with the number of times that the current grid will be reused */ - bool initWithTimes(int times); - - virtual void startWithTarget(CCNode *pTarget); - -public: - /** creates an action with the number of times that the current grid will be reused */ - static CCReuseGrid* create(int times); -protected: - int m_nTimes; -}; - -// end of actions group -/// @} - -NS_CC_END - -#endif // __ACTION_CCGRID_ACTION_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/actions/CCActionGrid3D.h b/cappuccino-sdk/incl/cocos2dx/actions/CCActionGrid3D.h deleted file mode 100644 index 3e52850..0000000 --- a/cappuccino-sdk/incl/cocos2dx/actions/CCActionGrid3D.h +++ /dev/null @@ -1,296 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2009 On-Core - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __ACTION_CCGRID3D_ACTION_H__ -#define __ACTION_CCGRID3D_ACTION_H__ - -#include "CCActionGrid.h" - -NS_CC_BEGIN - -/** - * @addtogroup actions - * @{ - */ - -/** -@brief CCWaves3D action -*/ -class CC_DLL CCWaves3D : public CCGrid3DAction -{ -public: - inline float getAmplitude(void) { return m_fAmplitude; } - inline void setAmplitude(float fAmplitude) { m_fAmplitude = fAmplitude; } - - inline float getAmplitudeRate(void) { return m_fAmplitudeRate; } - inline void setAmplitudeRate(float fAmplitudeRate) { m_fAmplitudeRate = fAmplitudeRate; } - - /** initializes an action with duration, grid size, waves and amplitude */ - bool initWithDuration(float duration, const CCSize& gridSize, unsigned int waves, float amplitude); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void update(float time); - -public: - /** creates an action with duration, grid size, waves and amplitude */ - static CCWaves3D* create(float duration, const CCSize& gridSize, unsigned int waves, float amplitude); -protected: - unsigned int m_nWaves; - float m_fAmplitude; - float m_fAmplitudeRate; -}; - -/** @brief CCFlipX3D action */ -class CC_DLL CCFlipX3D : public CCGrid3DAction -{ -public: - /** initializes the action with duration */ - virtual bool initWithDuration(float duration); - virtual bool initWithSize(const CCSize& gridSize, float duration); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void update(float time); - -public: - /** creates the action with duration */ - static CCFlipX3D* create(float duration); -}; - -/** @brief CCFlipY3D action */ -class CC_DLL CCFlipY3D : public CCFlipX3D -{ -public: - virtual void update(float time); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action with duration */ - static CCFlipY3D* create(float duration); -}; - -/** @brief CCLens3D action */ -class CC_DLL CCLens3D : public CCGrid3DAction -{ -public: - /** Get lens center position */ - inline float getLensEffect(void) { return m_fLensEffect; } - /** Set lens center position */ - inline void setLensEffect(float fLensEffect) { m_fLensEffect = fLensEffect; } - /** Set whether lens is concave */ - inline void setConcave(bool bConcave) { m_bConcave = bConcave; } - - inline const CCPoint& getPosition(void) { return m_position; } - void setPosition(const CCPoint& position); - - /** initializes the action with center position, radius, a grid size and duration */ - bool initWithDuration(float duration, const CCSize& gridSize, const CCPoint& position, float radius); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void update(float time); - -public: - /** creates the action with center position, radius, a grid size and duration */ - static CCLens3D* create(float duration, const CCSize& gridSize, const CCPoint& position, float radius); -protected: - /* lens center position */ - CCPoint m_position; - float m_fRadius; - /** lens effect. Defaults to 0.7 - 0 means no effect, 1 is very strong effect */ - float m_fLensEffect; - /** lens is concave. (true = concave, false = convex) default is convex i.e. false */ - bool m_bConcave; - - bool m_bDirty; -}; - -/** @brief CCRipple3D action */ -class CC_DLL CCRipple3D : public CCGrid3DAction -{ -public: - /** get center position */ - inline const CCPoint& getPosition(void) { return m_position; } - /** set center position */ - void setPosition(const CCPoint& position); - - inline float getAmplitude(void) { return m_fAmplitude; } - inline void setAmplitude(float fAmplitude) { m_fAmplitude = fAmplitude; } - - inline float getAmplitudeRate(void) { return m_fAmplitudeRate; } - inline void setAmplitudeRate(float fAmplitudeRate) { m_fAmplitudeRate = fAmplitudeRate; } - - /** initializes the action with radius, number of waves, amplitude, a grid size and duration */ - bool initWithDuration(float duration, const CCSize& gridSize, const CCPoint& position, float radius, unsigned int waves, float amplitude); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void update(float time); - -public: - /** creates the action with radius, number of waves, amplitude, a grid size and duration */ - static CCRipple3D* create(float duration, const CCSize& gridSize, const CCPoint& position, float radius, unsigned int waves, float amplitude); -protected: - /* center position */ - CCPoint m_position; - float m_fRadius; - unsigned int m_nWaves; - float m_fAmplitude; - float m_fAmplitudeRate; -}; - -/** @brief CCShaky3D action */ -class CC_DLL CCShaky3D : public CCGrid3DAction -{ -public: - /** initializes the action with a range, shake Z vertices, a grid and duration */ - bool initWithDuration(float duration, const CCSize& gridSize, int range, bool shakeZ); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void update(float time); - -public: - /** creates the action with a range, shake Z vertices, a grid and duration */ - static CCShaky3D* create(float duration, const CCSize& gridSize, int range, bool shakeZ); -protected: - int m_nRandrange; - bool m_bShakeZ; -}; - -/** @brief CCLiquid action */ -class CC_DLL CCLiquid : public CCGrid3DAction -{ -public: - inline float getAmplitude(void) { return m_fAmplitude; } - inline void setAmplitude(float fAmplitude) { m_fAmplitude = fAmplitude; } - - inline float getAmplitudeRate(void) { return m_fAmplitudeRate; } - inline void setAmplitudeRate(float fAmplitudeRate) { m_fAmplitudeRate = fAmplitudeRate; } - - /** initializes the action with amplitude, a grid and duration */ - bool initWithDuration(float duration, const CCSize& gridSize, unsigned int waves, float amplitude); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void update(float time); - -public: - /** creates the action with amplitude, a grid and duration */ - static CCLiquid* create(float duration, const CCSize& gridSize, unsigned int waves, float amplitude); -protected: - unsigned int m_nWaves; - float m_fAmplitude; - float m_fAmplitudeRate; -}; - -/** @brief CCWaves action */ -class CC_DLL CCWaves : public CCGrid3DAction -{ -public: - inline float getAmplitude(void) { return m_fAmplitude; } - inline void setAmplitude(float fAmplitude) { m_fAmplitude = fAmplitude; } - - inline float getAmplitudeRate(void) { return m_fAmplitudeRate; } - inline void setAmplitudeRate(float fAmplitudeRate) { m_fAmplitudeRate = fAmplitudeRate; } - - /** initializes the action with amplitude, horizontal sin, vertical sin, a grid and duration */ - bool initWithDuration(float duration, const CCSize& gridSize, unsigned int waves, float amplitude, bool horizontal, bool vertical); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void update(float time); - -public: - - /** initializes the action with amplitude, horizontal sin, vertical sin, a grid and duration */ - static CCWaves* create(float duration, const CCSize& gridSize, unsigned int waves, float amplitude, bool horizontal, bool vertical); -protected: - unsigned int m_nWaves; - float m_fAmplitude; - float m_fAmplitudeRate; - bool m_bVertical; - bool m_bHorizontal; -}; - -/** @brief CCTwirl action */ -class CC_DLL CCTwirl : public CCGrid3DAction -{ -public: - /** get twirl center */ - inline const CCPoint& getPosition(void) { return m_position; } - /** set twirl center */ - void setPosition(const CCPoint& position); - - inline float getAmplitude(void) { return m_fAmplitude; } - inline void setAmplitude(float fAmplitude) { m_fAmplitude = fAmplitude; } - - inline float getAmplitudeRate(void) { return m_fAmplitudeRate; } - inline void setAmplitudeRate(float fAmplitudeRate) { m_fAmplitudeRate = fAmplitudeRate; } - - /** initializes the action with center position, number of twirls, amplitude, a grid size and duration */ - bool initWithDuration(float duration, const CCSize& gridSize, CCPoint position, unsigned int twirls, float amplitude); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void update(float time); - -public: - /** creates the action with center position, number of twirls, amplitude, a grid size and duration */ - static CCTwirl* create(float duration, const CCSize& gridSize, CCPoint position, unsigned int twirls, float amplitude); -protected: - /* twirl center */ - CCPoint m_position; - unsigned int m_nTwirls; - float m_fAmplitude; - float m_fAmplitudeRate; -}; - -// end of actions group -/// @} - -NS_CC_END - -#endif // __ACTION_CCGRID3D_ACTION_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/actions/CCActionInstant.h b/cappuccino-sdk/incl/cocos2dx/actions/CCActionInstant.h deleted file mode 100644 index 4556e94..0000000 --- a/cappuccino-sdk/incl/cocos2dx/actions/CCActionInstant.h +++ /dev/null @@ -1,526 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCINSTANT_ACTION_H__ -#define __CCINSTANT_ACTION_H__ - -#include -#include "ccTypeInfo.h" -#include "CCAction.h" - -NS_CC_BEGIN - -/** - * @addtogroup actions - * @{ - */ - -/** -@brief Instant actions are immediate actions. They don't have a duration like -the CCIntervalAction actions. -*/ -class CC_DLL CCActionInstant : public CCFiniteTimeAction // -{ -public: - /** - * @js ctor - */ - CCActionInstant(); - /** - * @js NA - * @lua NA - */ - virtual ~CCActionInstant(){} - // CCAction methods - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone *pZone); - virtual bool isDone(void); - virtual void step(float dt); - virtual void update(float time); - //CCFiniteTimeAction method - virtual CCFiniteTimeAction * reverse(void); -}; - -/** @brief Show the node -*/ -class CC_DLL CCShow : public CCActionInstant -{ -public: - /** - * @js ctor - * @lua NA - */ - CCShow(){} - /** - * @js NA - * @lua NA - */ - virtual ~CCShow(){} - //super methods - virtual void update(float time); - virtual CCFiniteTimeAction * reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone *pZone); -public: - - /** Allocates and initializes the action */ - static CCShow * create(); -}; - - - -/** -@brief Hide the node -*/ -class CC_DLL CCHide : public CCActionInstant -{ -public: - /** - * @js ctor - * @lua NA - */ - CCHide(){} - /** - * @js NA - * @lua NA - */ - virtual ~CCHide(){} - //super methods - /** - * @lua NA - */ - virtual void update(float time); - virtual CCFiniteTimeAction * reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone *pZone); -public: - - /** Allocates and initializes the action */ - static CCHide * create(); -}; - -/** @brief Toggles the visibility of a node -*/ -class CC_DLL CCToggleVisibility : public CCActionInstant -{ -public: - /** - * @js ctor - */ - CCToggleVisibility(){} - /** - * @js NA - * @lua NA - */ - virtual ~CCToggleVisibility(){} - //super method - virtual void update(float time); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone *pZone); -public: - - /** Allocates and initializes the action */ - static CCToggleVisibility * create(); -}; - -/** - @brief Remove the node - @js NA - @lua NA - */ -class CC_DLL CCRemoveSelf : public CCActionInstant -{ -public: - CCRemoveSelf(){} - virtual ~CCRemoveSelf(){} - //super methods - virtual void update(float time); - virtual CCFiniteTimeAction * reverse(void); - virtual CCObject* copyWithZone(CCZone *pZone); -public: - /** create the action */ - static CCRemoveSelf * create(bool isNeedCleanUp = true); - /** init the action */ - bool init(bool isNeedCleanUp); -protected: - bool m_bIsNeedCleanUp; -}; - -/** -@brief Flips the sprite horizontally -@since v0.99.0 -@js NA -*/ -class CC_DLL CCFlipX : public CCActionInstant -{ -public: - /** - * @js ctor - */ - CCFlipX() - :m_bFlipX(false) - {} - /** - * @js NA - * @lua NA - */ - virtual ~CCFlipX(){} - - /** create the action */ - static CCFlipX * create(bool x); - - /** init the action */ - bool initWithFlipX(bool x); - //super methods - virtual void update(float time); - virtual CCFiniteTimeAction * reverse(void); - /** - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone *pZone); - -protected: - bool m_bFlipX; -}; - -/** -@brief Flips the sprite vertically -@since v0.99.0 -@js NA -*/ -class CC_DLL CCFlipY : public CCActionInstant -{ -public: - /** - * @js ctor - */ - CCFlipY() - :m_bFlipY(false) - {} - /** - * @js NA - * @lua NA - */ - virtual ~CCFlipY(){} - - /** create the action */ - static CCFlipY * create(bool y); - - /** init the action */ - bool initWithFlipY(bool y); - //super methods - virtual void update(float time); - virtual CCFiniteTimeAction * reverse(void); - /** - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone *pZone); - -protected: - bool m_bFlipY; -}; - -/** @brief Places the node in a certain position -*/ -class CC_DLL CCPlace : public CCActionInstant // -{ -public: - /** - * @js ctor - */ - CCPlace(){} - /** - * @js NA - * @lua NA - */ - virtual ~CCPlace(){} - - /** creates a Place action with a position */ - static CCPlace * create(const CCPoint& pos); - /** Initializes a Place action with a position */ - bool initWithPosition(const CCPoint& pos); - //super methods - virtual void update(float time); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone *pZone); -protected: - CCPoint m_tPosition; -}; - -/** @brief Calls a 'callback' -*/ -class CC_DLL CCCallFunc : public CCActionInstant // -{ -public: - /** - * @js ctor - */ - CCCallFunc() - : m_pSelectorTarget(NULL) - , m_nScriptHandler(0) - , m_pCallFunc(NULL) - { - } - /** - * @js NA - * @lua NA - */ - virtual ~CCCallFunc(); - - /** creates the action with the callback - - * typedef void (CCObject::*SEL_CallFunc)(); - * @lua NA - */ - static CCCallFunc * create(CCObject* pSelectorTarget, SEL_CallFunc selector); - - /** creates the action with the handler script function - * @js NA - */ - static CCCallFunc * create(int nHandler); - - /** initializes the action with the callback - - * typedef void (CCObject::*SEL_CallFunc)(); - * @lua NA - */ - virtual bool initWithTarget(CCObject* pSelectorTarget); - /** executes the callback - * @lua NA - */ - virtual void execute(); - /** super methods - * @lua NA - */ - virtual void update(float time); - /** - * @js NA - * @lua NA - */ - CCObject * copyWithZone(CCZone *pZone); - /** - * @lua NA - */ - inline CCObject* getTargetCallback() - { - return m_pSelectorTarget; - } - /** - * @lua NA - */ - inline void setTargetCallback(CCObject* pSel) - { - if (pSel != m_pSelectorTarget) - { - CC_SAFE_RETAIN(pSel); - CC_SAFE_RELEASE(m_pSelectorTarget); - m_pSelectorTarget = pSel; - } - } - /** - * @lua NA - */ - inline int getScriptHandler() { return m_nScriptHandler; }; -protected: - /** Target that will be called */ - CCObject* m_pSelectorTarget; - - int m_nScriptHandler; - - union - { - SEL_CallFunc m_pCallFunc; - SEL_CallFuncN m_pCallFuncN; - SEL_CallFuncND m_pCallFuncND; - SEL_CallFuncO m_pCallFuncO; - }; -}; - -/** -@brief Calls a 'callback' with the node as the first argument -N means Node -* @js NA -*/ -class CC_DLL CCCallFuncN : public CCCallFunc, public TypeInfo -{ -public: - /** - * @js ctor - * @lua NA - */ - CCCallFuncN(){} - /** - * @js NA - * @lua NA - */ - virtual ~CCCallFuncN(){} - /** - * @lua NA - */ - virtual long getClassTypeInfo() { - static const long id = cocos2d::getHashCodeByString(typeid(cocos2d::CCCallFunc).name()); - return id; - } - - /** creates the action with the callback - - * typedef void (CCObject::*SEL_CallFuncN)(CCNode*); - * @lua NA - */ - static CCCallFuncN * create(CCObject* pSelectorTarget, SEL_CallFuncN selector); - - /** creates the action with the handler script function*/ - static CCCallFuncN * create(int nHandler); - - /** initializes the action with the callback - - * typedef void (CCObject::*SEL_CallFuncN)(CCNode*); - * @lua NA - */ - virtual bool initWithTarget(CCObject* pSelectorTarget, SEL_CallFuncN selector); - /** super methods - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone *pZone); - /** - * @lua NA - */ - virtual void execute(); -}; - - -/** -* @brief Calls a 'callback' with the node as the first argument and the 2nd argument is data -* ND means: Node and Data. Data is void *, so it could be anything. -* @js NA -* @lua NA -*/ -class CC_DLL CCCallFuncND : public CCCallFuncN -{ -public: - virtual long getClassTypeInfo() { - static const long id = cocos2d::getHashCodeByString(typeid(cocos2d::CCCallFunc).name()); - return id; - } - - /** creates the action with the callback and the data to pass as an argument */ - static CCCallFuncND * create(CCObject* pSelectorTarget, SEL_CallFuncND selector, void* d); - - /** initializes the action with the callback and the data to pass as an argument */ - virtual bool initWithTarget(CCObject* pSelectorTarget, SEL_CallFuncND selector, void* d); - // super methods - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone *pZone); - virtual void execute(); - -protected: - void *m_pData; -}; - - -/** -@brief Calls a 'callback' with an object as the first argument. -O means Object. -@since v0.99.5 -@js NA -@lua NA -*/ - -class CC_DLL CCCallFuncO : public CCCallFunc, public TypeInfo -{ -public: - CCCallFuncO(); - virtual ~CCCallFuncO(); - - virtual long getClassTypeInfo() { - static const long id = cocos2d::getHashCodeByString(typeid(cocos2d::CCCallFunc).name()); - return id; - } - - /** creates the action with the callback - - typedef void (CCObject::*SEL_CallFuncO)(CCObject*); - */ - static CCCallFuncO * create(CCObject* pSelectorTarget, SEL_CallFuncO selector, CCObject* pObject); - - /** initializes the action with the callback - - typedef void (CCObject::*SEL_CallFuncO)(CCObject*); - */ - virtual bool initWithTarget(CCObject* pSelectorTarget, SEL_CallFuncO selector, CCObject* pObject); - // super methods - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone *pZone); - virtual void execute(); - - inline CCObject* getObject() - { - return m_pObject; - } - - inline void setObject(CCObject* pObj) - { - if (pObj != m_pObject) - { - CC_SAFE_RELEASE(m_pObject); - m_pObject = pObj; - CC_SAFE_RETAIN(m_pObject); - } - } - -protected: - /** object to be passed as argument */ - CCObject* m_pObject; -}; - -// end of actions group -/// @} - -NS_CC_END - -#endif //__CCINSTANT_ACTION_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/actions/CCActionInterval.h b/cappuccino-sdk/incl/cocos2dx/actions/CCActionInterval.h deleted file mode 100644 index 4fae4db..0000000 --- a/cappuccino-sdk/incl/cocos2dx/actions/CCActionInterval.h +++ /dev/null @@ -1,962 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2011 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __ACTION_CCINTERVAL_ACTION_H__ -#define __ACTION_CCINTERVAL_ACTION_H__ - -#include "base_nodes/CCNode.h" -#include "CCAction.h" -#include "CCProtocols.h" -#include "sprite_nodes/CCSpriteFrame.h" -#include "sprite_nodes/CCAnimation.h" -#include - -NS_CC_BEGIN - -/** - * @addtogroup actions - * @{ - */ - -/** -@brief An interval action is an action that takes place within a certain period of time. -It has an start time, and a finish time. The finish time is the parameter -duration plus the start time. - -These CCActionInterval actions have some interesting properties, like: -- They can run normally (default) -- They can run reversed with the reverse method -- They can run with the time altered with the Accelerate, AccelDeccel and Speed actions. - -For example, you can simulate a Ping Pong effect running the action normally and -then running it again in Reverse mode. - -Example: - -CCAction *pingPongAction = CCSequence::actions(action, action->reverse(), NULL); -*/ -class CC_DLL CCActionInterval : public CCFiniteTimeAction -{ -public: - /** how many seconds had elapsed since the actions started to run. */ - inline float getElapsed(void) { return m_elapsed; } - - /** initializes the action */ - bool initWithDuration(float d); - - /** returns true if the action has finished */ - virtual bool isDone(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void step(float dt); - virtual void startWithTarget(CCNode *pTarget); - /** returns a reversed action */ - virtual CCActionInterval* reverse(void); - -public: - - /** creates the action */ - static CCActionInterval* create(float d); - -public: - //extension in CCGridAction - void setAmplitudeRate(float amp); - float getAmplitudeRate(void); - -protected: - float m_elapsed; - bool m_bFirstTick; -}; - -/** @brief Runs actions sequentially, one after another - */ -class CC_DLL CCSequence : public CCActionInterval -{ -public: - /** - * @js NA - * @lua NA - */ - ~CCSequence(void); - - /** initializes the action - * @lua NA - */ - bool initWithTwoActions(CCFiniteTimeAction *pActionOne, CCFiniteTimeAction *pActionTwo); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - /** - * @lua NA - */ - virtual void startWithTarget(CCNode *pTarget); - /** - * @lua NA - */ - virtual void stop(void); - /** - * @lua NA - */ - virtual void update(float t); - virtual CCActionInterval* reverse(void); - -public: - - /** helper constructor to create an array of sequenceable actions - * @lua NA - */ - static CCSequence* create(CCFiniteTimeAction *pAction1, ...); - /** helper constructor to create an array of sequenceable actions given an array - * @js NA - */ - static CCSequence* create(CCArray *arrayOfActions); - /** helper constructor to create an array of sequence-able actions - * @js NA - * @lua NA - */ - static CCSequence* createWithVariableList(CCFiniteTimeAction *pAction1, va_list args); - /** creates the action - * @js NA - */ - static CCSequence* createWithTwoActions(CCFiniteTimeAction *pActionOne, CCFiniteTimeAction *pActionTwo); - -protected: - CCFiniteTimeAction *m_pActions[2]; - float m_split; - int m_last; -}; - -/** @brief Repeats an action a number of times. - * To repeat an action forever use the CCRepeatForever action. - */ -class CC_DLL CCRepeat : public CCActionInterval -{ -public: - /** - * @js NA - * @lua NA - */ - ~CCRepeat(void); - - /** initializes a CCRepeat action. Times is an unsigned integer between 1 and pow(2,30) */ - bool initWithAction(CCFiniteTimeAction *pAction, unsigned int times); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void startWithTarget(CCNode *pTarget); - virtual void stop(void); - virtual void update(float dt); - virtual bool isDone(void); - virtual CCActionInterval* reverse(void); - - inline void setInnerAction(CCFiniteTimeAction *pAction) - { - if (m_pInnerAction != pAction) - { - CC_SAFE_RETAIN(pAction); - CC_SAFE_RELEASE(m_pInnerAction); - m_pInnerAction = pAction; - } - } - - inline CCFiniteTimeAction* getInnerAction() - { - return m_pInnerAction; - } - -public: - - /** creates a CCRepeat action. Times is an unsigned integer between 1 and pow(2,30) */ - static CCRepeat* create(CCFiniteTimeAction *pAction, unsigned int times); -protected: - unsigned int m_uTimes; - unsigned int m_uTotal; - float m_fNextDt; - bool m_bActionInstant; - /** Inner action */ - CCFiniteTimeAction *m_pInnerAction; -}; - -/** @brief Repeats an action for ever. -To repeat the an action for a limited number of times use the Repeat action. -@warning This action can't be Sequenceable because it is not an IntervalAction -*/ -class CC_DLL CCRepeatForever : public CCActionInterval -{ -public: - /** - * @js ctor - */ - CCRepeatForever() - : m_pInnerAction(NULL) - {} - /** - * @js NA - * @lua NA - */ - virtual ~CCRepeatForever(); - - /** initializes the action */ - bool initWithAction(CCActionInterval *pAction); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone *pZone); - virtual void startWithTarget(CCNode* pTarget); - virtual void step(float dt); - virtual bool isDone(void); - virtual CCActionInterval* reverse(void); - - inline void setInnerAction(CCActionInterval *pAction) - { - if (m_pInnerAction != pAction) - { - CC_SAFE_RELEASE(m_pInnerAction); - m_pInnerAction = pAction; - CC_SAFE_RETAIN(m_pInnerAction); - } - } - - inline CCActionInterval* getInnerAction() - { - return m_pInnerAction; - } - -public: - - /** creates the action */ - static CCRepeatForever* create(CCActionInterval *pAction); -protected: - /** Inner action */ - CCActionInterval *m_pInnerAction; -}; - -/** @brief Spawn a new action immediately - */ -class CC_DLL CCSpawn : public CCActionInterval -{ -public: - /** - * @js NA - * @lua NA - */ - ~CCSpawn(void); - - /** initializes the Spawn action with the 2 actions to spawn - * @lua NA - */ - bool initWithTwoActions(CCFiniteTimeAction *pAction1, CCFiniteTimeAction *pAction2); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - /** - * @lua NA - */ - virtual void startWithTarget(CCNode *pTarget); - /** - * @lua NA - */ - virtual void stop(void); - /** - * @lua NA - */ - virtual void update(float time); - virtual CCActionInterval* reverse(void); - -public: - - /** helper constructor to create an array of spawned actions - * @lua NA - */ - static CCSpawn* create(CCFiniteTimeAction *pAction1, ...); - - /** helper constructor to create an array of spawned actions - * @js NA - * @lua NA - */ - static CCSpawn* createWithVariableList(CCFiniteTimeAction *pAction1, va_list args); - - /** helper constructor to create an array of spawned actions given an array - * @js NA - */ - static CCSpawn* create(CCArray *arrayOfActions); - - /** creates the Spawn action - * @js NA - */ - static CCSpawn* createWithTwoActions(CCFiniteTimeAction *pAction1, CCFiniteTimeAction *pAction2); - -protected: - CCFiniteTimeAction *m_pOne; - CCFiniteTimeAction *m_pTwo; -}; - -/** @brief Rotates a CCNode object to a certain angle by modifying it's - rotation attribute. - The direction will be decided by the shortest angle. -*/ -class CC_DLL CCRotateTo : public CCActionInterval -{ -public: - /** creates the action */ - static CCRotateTo* create(float fDuration, float fDeltaAngle); - /** initializes the action */ - bool initWithDuration(float fDuration, float fDeltaAngle); - - /** creates the action with separate rotation angles */ - static CCRotateTo* create(float fDuration, float fDeltaAngleX, float fDeltaAngleY); - virtual bool initWithDuration(float fDuration, float fDeltaAngleX, float fDeltaAngleY); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void startWithTarget(CCNode *pTarget); - virtual void update(float time); - -protected: - float m_fDstAngleX; - float m_fStartAngleX; - float m_fDiffAngleX; - - float m_fDstAngleY; - float m_fStartAngleY; - float m_fDiffAngleY; -}; - -/** @brief Rotates a CCNode object clockwise a number of degrees by modifying it's rotation attribute. -*/ -class CC_DLL CCRotateBy : public CCActionInterval -{ -public: - /** creates the action */ - static CCRotateBy* create(float fDuration, float fDeltaAngle); - /** initializes the action */ - bool initWithDuration(float fDuration, float fDeltaAngle); - - static CCRotateBy* create(float fDuration, float fDeltaAngleX, float fDeltaAngleY); - bool initWithDuration(float fDuration, float fDeltaAngleX, float fDeltaAngleY); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void startWithTarget(CCNode *pTarget); - virtual void update(float time); - virtual CCActionInterval* reverse(void); - -protected: - float m_fAngleX; - float m_fStartAngleX; - float m_fAngleY; - float m_fStartAngleY; -}; - -/** Moves a CCNode object x,y pixels by modifying it's position attribute. - x and y are relative to the position of the object. - Several CCMoveBy actions can be concurrently called, and the resulting - movement will be the sum of individual movements. - @since v2.1beta2-custom - */ -class CC_DLL CCMoveBy : public CCActionInterval -{ -public: - /** initializes the action */ - bool initWithDuration(float duration, const CCPoint& deltaPosition); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void startWithTarget(CCNode *pTarget); - virtual CCActionInterval* reverse(void); - virtual void update(float time); - -public: - /** creates the action */ - static CCMoveBy* create(float duration, const CCPoint& deltaPosition); -protected: - CCPoint m_positionDelta; - CCPoint m_startPosition; - CCPoint m_previousPosition; -}; - -/** Moves a CCNode object to the position x,y. x and y are absolute coordinates by modifying it's position attribute. - Several CCMoveTo actions can be concurrently called, and the resulting - movement will be the sum of individual movements. - @since v2.1beta2-custom - */ -class CC_DLL CCMoveTo : public CCMoveBy -{ -public: - /** initializes the action */ - bool initWithDuration(float duration, const CCPoint& position); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void startWithTarget(CCNode *pTarget); - -public: - /** creates the action */ - static CCMoveTo* create(float duration, const CCPoint& position); -protected: - CCPoint m_endPosition; -}; - -/** Skews a CCNode object to given angles by modifying it's skewX and skewY attributes -@since v1.0 -*/ -class CC_DLL CCSkewTo : public CCActionInterval -{ -public: - /** - * @js ctor - */ - CCSkewTo(); - virtual bool initWithDuration(float t, float sx, float sy); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void startWithTarget(CCNode *pTarget); - virtual void update(float time); - -public: - - /** creates the action */ - static CCSkewTo* create(float t, float sx, float sy); -protected: - float m_fSkewX; - float m_fSkewY; - float m_fStartSkewX; - float m_fStartSkewY; - float m_fEndSkewX; - float m_fEndSkewY; - float m_fDeltaX; - float m_fDeltaY; -}; - -/** Skews a CCNode object by skewX and skewY degrees -@since v1.0 -*/ -class CC_DLL CCSkewBy : public CCSkewTo -{ -public: - virtual bool initWithDuration(float t, float sx, float sy); - virtual void startWithTarget(CCNode *pTarget); - virtual CCActionInterval* reverse(void); - -public: - - /** creates the action */ - static CCSkewBy* create(float t, float deltaSkewX, float deltaSkewY); -}; - -/** @brief Moves a CCNode object simulating a parabolic jump movement by modifying it's position attribute. -*/ -class CC_DLL CCJumpBy : public CCActionInterval -{ -public: - /** initializes the action */ - bool initWithDuration(float duration, const CCPoint& position, float height, unsigned int jumps); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void startWithTarget(CCNode *pTarget); - virtual void update(float time); - virtual CCActionInterval* reverse(void); - -public: - /** creates the action */ - static CCJumpBy* create(float duration, const CCPoint& position, float height, unsigned int jumps); -protected: - CCPoint m_startPosition; - CCPoint m_delta; - float m_height; - unsigned int m_nJumps; - CCPoint m_previousPos; -}; - -/** @brief Moves a CCNode object to a parabolic position simulating a jump movement by modifying it's position attribute. -*/ -class CC_DLL CCJumpTo : public CCJumpBy -{ -public: - virtual void startWithTarget(CCNode *pTarget); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCJumpTo* create(float duration, const CCPoint& position, float height, int jumps); -}; - -/** @typedef bezier configuration structure - */ -typedef struct _ccBezierConfig { - //! end position of the bezier - CCPoint endPosition; - //! Bezier control point 1 - CCPoint controlPoint_1; - //! Bezier control point 2 - CCPoint controlPoint_2; -} ccBezierConfig; - -/** @brief An action that moves the target with a cubic Bezier curve by a certain distance. - */ -class CC_DLL CCBezierBy : public CCActionInterval -{ -public: - /** initializes the action with a duration and a bezier configuration - * @lua NA - */ - bool initWithDuration(float t, const ccBezierConfig& c); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - /** - * @lua NA - */ - virtual void startWithTarget(CCNode *pTarget); - /** - * @lua NA - */ - virtual void update(float time); - virtual CCActionInterval* reverse(void); - -public: - /** creates the action with a duration and a bezier configuration - * @code - * when this function bound to js,the input params are changed - * js: var create(var t, var pointTable) - * @endcode - */ - static CCBezierBy* create(float t, const ccBezierConfig& c); -protected: - ccBezierConfig m_sConfig; - CCPoint m_startPosition; - CCPoint m_previousPosition; -}; - -/** @brief An action that moves the target with a cubic Bezier curve to a destination point. - @since v0.8.2 - */ -class CC_DLL CCBezierTo : public CCBezierBy -{ -public: - /** - * @lua NA - */ - virtual void startWithTarget(CCNode *pTarget); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - - /** creates the action with a duration and a bezier configuration - * @code - * when this function bound to js,the input params are changed - * js: var create(var t, var pointTable) - * @endcode - */ - static CCBezierTo* create(float t, const ccBezierConfig& c); - /** - * @lua NA - */ - bool initWithDuration(float t, const ccBezierConfig &c); - -protected: - ccBezierConfig m_sToConfig; -}; - -/** @brief Scales a CCNode object to a zoom factor by modifying it's scale attribute. - @warning This action doesn't support "reverse" - */ -class CC_DLL CCScaleTo : public CCActionInterval -{ -public: - /** initializes the action with the same scale factor for X and Y */ - bool initWithDuration(float duration, float s); - - /** initializes the action with and X factor and a Y factor */ - bool initWithDuration(float duration, float sx, float sy); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void startWithTarget(CCNode *pTarget); - virtual void update(float time); - -public: - - /** creates the action with the same scale factor for X and Y */ - static CCScaleTo* create(float duration, float s); - - /** creates the action with and X factor and a Y factor */ - static CCScaleTo* create(float duration, float sx, float sy); -protected: - float m_fScaleX; - float m_fScaleY; - float m_fStartScaleX; - float m_fStartScaleY; - float m_fEndScaleX; - float m_fEndScaleY; - float m_fDeltaX; - float m_fDeltaY; -}; - -/** @brief Scales a CCNode object a zoom factor by modifying it's scale attribute. -*/ -class CC_DLL CCScaleBy : public CCScaleTo -{ -public: - virtual void startWithTarget(CCNode *pTarget); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - - /** creates the action with the same scale factor for X and Y */ - static CCScaleBy* create(float duration, float s); - - /** creates the action with and X factor and a Y factor */ - static CCScaleBy* create(float duration, float sx, float sy); -}; - -/** @brief Blinks a CCNode object by modifying it's visible attribute -*/ -class CC_DLL CCBlink : public CCActionInterval -{ -public: - /** initializes the action */ - bool initWithDuration(float duration, unsigned int uBlinks); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void update(float time); - virtual CCActionInterval* reverse(void); - -public: - - /** creates the action */ - static CCBlink* create(float duration, unsigned int uBlinks); - - virtual void startWithTarget(CCNode *pTarget); - virtual void stop(); - -protected: - unsigned int m_nTimes; - bool m_bOriginalState; -}; - -/** @brief Fades In an object that implements the CCRGBAProtocol protocol. It modifies the opacity from 0 to 255. - The "reverse" of this action is FadeOut - */ -class CC_DLL CCFadeIn : public CCActionInterval -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCFadeIn* create(float d); -}; - -/** @brief Fades Out an object that implements the CCRGBAProtocol protocol. It modifies the opacity from 255 to 0. - The "reverse" of this action is FadeIn -*/ -class CC_DLL CCFadeOut : public CCActionInterval -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - - /** creates the action */ - static CCFadeOut* create(float d); -}; - -/** @brief Fades an object that implements the CCRGBAProtocol protocol. It modifies the opacity from the current value to a custom one. - @warning This action doesn't support "reverse" - */ -class CC_DLL CCFadeTo : public CCActionInterval -{ -public: - /** initializes the action with duration and opacity */ - bool initWithDuration(float duration, GLubyte opacity); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void startWithTarget(CCNode *pTarget); - virtual void update(float time); - -public: - /** creates an action with duration and opacity */ - static CCFadeTo* create(float duration, GLubyte opacity); -protected: - GLubyte m_toOpacity; - GLubyte m_fromOpacity; -}; - -/** @brief Tints a CCNode that implements the CCNodeRGB protocol from current tint to a custom one. - @warning This action doesn't support "reverse" - @since v0.7.2 -*/ -class CC_DLL CCTintTo : public CCActionInterval -{ -public: - /** initializes the action with duration and color */ - bool initWithDuration(float duration, GLubyte red, GLubyte green, GLubyte blue); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void startWithTarget(CCNode *pTarget); - virtual void update(float time); - -public: - /** creates an action with duration and color */ - static CCTintTo* create(float duration, GLubyte red, GLubyte green, GLubyte blue); -protected: - ccColor3B m_to; - ccColor3B m_from; -}; - -/** @brief Tints a CCNode that implements the CCNodeRGB protocol from current tint to a custom one. - @since v0.7.2 - */ -class CC_DLL CCTintBy : public CCActionInterval -{ -public: - /** initializes the action with duration and color */ - bool initWithDuration(float duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void startWithTarget(CCNode *pTarget); - virtual void update(float time); - virtual CCActionInterval* reverse(void); - -public: - /** creates an action with duration and color */ - static CCTintBy* create(float duration, GLshort deltaRed, GLshort deltaGreen, GLshort deltaBlue); -protected: - GLshort m_deltaR; - GLshort m_deltaG; - GLshort m_deltaB; - - GLshort m_fromR; - GLshort m_fromG; - GLshort m_fromB; -}; - -/** @brief Delays the action a certain amount of seconds -*/ -class CC_DLL CCDelayTime : public CCActionInterval -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - - /** creates the action */ - static CCDelayTime* create(float d); -}; - -/** @brief Executes an action in reverse order, from time=duration to time=0 - - @warning Use this action carefully. This action is not - sequenceable. Use it as the default "reversed" method - of your own actions, but using it outside the "reversed" - scope is not recommended. -*/ -class CC_DLL CCReverseTime : public CCActionInterval -{ -public: - /** - * @js ctor - */ - ~CCReverseTime(void); - /** - * @js NA - * @lua NA - */ - CCReverseTime(); - - /** initializes the action */ - bool initWithAction(CCFiniteTimeAction *pAction); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void startWithTarget(CCNode *pTarget); - virtual void stop(void); - virtual void update(float time); - virtual CCActionInterval* reverse(void); - -public: - /** creates the action */ - static CCReverseTime* create(CCFiniteTimeAction *pAction); -protected: - CCFiniteTimeAction *m_pOther; -}; - -class CCTexture2D; -/** @brief Animates a sprite given the name of an Animation */ -class CC_DLL CCAnimate : public CCActionInterval -{ -public: - /** - * @js ctor - */ - CCAnimate(); - /** - * @js NA - * @lua NA - */ - ~CCAnimate(); - - /** initializes the action with an Animation and will restore the original frame when the animation is over */ - bool initWithAnimation(CCAnimation *pAnimation); - - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void startWithTarget(CCNode *pTarget); - virtual void stop(void); - virtual void update(float t); - virtual CCActionInterval* reverse(void); - -public: - /** creates the action with an Animation and will restore the original frame when the animation is over */ - static CCAnimate* create(CCAnimation *pAnimation); - CC_SYNTHESIZE_RETAIN(CCAnimation*, m_pAnimation, Animation) -protected: - std::vector* m_pSplitTimes; - int m_nNextFrame; - CCSpriteFrame* m_pOrigFrame; - unsigned int m_uExecutedLoops; -}; - -/** Overrides the target of an action so that it always runs on the target - * specified at action creation rather than the one specified by runAction. - */ -class CC_DLL CCTargetedAction : public CCActionInterval -{ -public: - /** - * @js ctor - */ - CCTargetedAction(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTargetedAction(); - - /** Create an action with the specified action and forced target */ - static CCTargetedAction* create(CCNode* pTarget, CCFiniteTimeAction* pAction); - - /** Init an action with the specified action and forced target */ - bool initWithTarget(CCNode* pTarget, CCFiniteTimeAction* pAction); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void startWithTarget(CCNode *pTarget); - virtual void stop(void); - virtual void update(float time); - - /** This is the target that the action will be forced to run with */ - //Robtob Modification; - ROB_CC_SYNTHESIZE_RETAIN(CCNode*, m_pForcedTarget, ForcedTarget); -private: - CCFiniteTimeAction* m_pAction; -}; - -// end of actions group -/// @} - -NS_CC_END - -#endif //__ACTION_CCINTERVAL_ACTION_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/actions/CCActionManager.h b/cappuccino-sdk/incl/cocos2dx/actions/CCActionManager.h deleted file mode 100644 index 93999be..0000000 --- a/cappuccino-sdk/incl/cocos2dx/actions/CCActionManager.h +++ /dev/null @@ -1,142 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2009 Valentin Milea -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __ACTION_CCACTION_MANAGER_H__ -#define __ACTION_CCACTION_MANAGER_H__ - -#include "CCAction.h" -#include "cocoa/CCArray.h" -#include "cocoa/CCObject.h" - -NS_CC_BEGIN - -class CCSet; - -struct _hashElement; - -/** - * @addtogroup actions - * @{ - */ - -/** - @brief CCActionManager is a singleton that manages all the actions. - Normally you won't need to use this singleton directly. 99% of the cases you will use the CCNode interface, - which uses this singleton. - But there are some cases where you might need to use this singleton. - Examples: - - When you want to run an action where the target is different from a CCNode. - - When you want to pause / resume the actions - - @since v0.8 - */ -class CC_DLL CCActionManager : public CCObject -{ -public: - /** - * @js ctor - */ - CCActionManager(void); - /** - * @js NA - * @lua NA - */ - ~CCActionManager(void); - - // actions - - /** Adds an action with a target. - If the target is already present, then the action will be added to the existing target. - If the target is not present, a new instance of this target will be created either paused or not, and the action will be added to the newly created target. - When the target is paused, the queued actions won't be 'ticked'. - */ - void addAction(CCAction *pAction, CCNode *pTarget, bool paused); - - /** Removes all actions from all the targets. - */ - void removeAllActions(void); - - /** Removes all actions from a certain target. - All the actions that belongs to the target will be removed. - */ - void removeAllActionsFromTarget(CCObject *pTarget); - - /** Removes an action given an action reference. - */ - void removeAction(CCAction *pAction); - - /** Removes an action given its tag and the target */ - void removeActionByTag(unsigned int tag, CCObject *pTarget); - - /** Gets an action given its tag an a target - @return the Action the with the given tag - */ - CCAction* getActionByTag(unsigned int tag, CCObject *pTarget); - - /** Returns the numbers of actions that are running in a certain target. - * Composable actions are counted as 1 action. Example: - * - If you are running 1 Sequence of 7 actions, it will return 1. - * - If you are running 7 Sequences of 2 actions, it will return 7. - */ - unsigned int numberOfRunningActionsInTarget(CCObject *pTarget); - - /** Pauses the target: all running actions and newly added actions will be paused. - */ - void pauseTarget(CCObject *pTarget); - - /** Resumes the target. All queued actions will be resumed. - */ - void resumeTarget(CCObject *pTarget); - - /** Pauses all running actions, returning a list of targets whose actions were paused. - */ - CCSet* pauseAllRunningActions(); - - /** Resume a set of targets (convenience function to reverse a pauseAllRunningActions call) - */ - void resumeTargets(CCSet *targetsToResume); - -protected: - // declared in CCActionManager.m - - void removeActionAtIndex(unsigned int uIndex, struct _hashElement *pElement); - void deleteHashElement(struct _hashElement *pElement); - void actionAllocWithHashElement(struct _hashElement *pElement); - void update(float dt); - -protected: - struct _hashElement *m_pTargets; - struct _hashElement *m_pCurrentTarget; - bool m_bCurrentTargetSalvaged; -}; - -// end of actions group -/// @} - -NS_CC_END - -#endif // __ACTION_CCACTION_MANAGER_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/actions/CCActionPageTurn3D.h b/cappuccino-sdk/incl/cocos2dx/actions/CCActionPageTurn3D.h deleted file mode 100644 index 92962fd..0000000 --- a/cappuccino-sdk/incl/cocos2dx/actions/CCActionPageTurn3D.h +++ /dev/null @@ -1,62 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2009 Sindesso Pty Ltd http://www.sindesso.com/ - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __ACTION_CCPAGETURN3D_ACTION_H__ -#define __ACTION_CCPAGETURN3D_ACTION_H__ - -#include "CCActionGrid3D.h" - -NS_CC_BEGIN - -/** - * @addtogroup actions - * @{ - */ - -/** - @brief This action simulates a page turn from the bottom right hand corner of the screen. - It's not much use by itself but is used by the PageTurnTransition. - - Based on an original paper by L Hong et al. - http://www.parc.com/publication/1638/turning-pages-of-3d-electronic-books.html - - @since v0.8.2 - */ -class CC_DLL CCPageTurn3D : public CCGrid3DAction -{ -public: - virtual void update(float time); - -public: - - /** create the action */ - static CCPageTurn3D* create(float duration, const CCSize& gridSize); -}; - -// end of actions group -/// @} - -NS_CC_END - -#endif // __ACTION_CCPAGETURN3D_ACTION_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/actions/CCActionProgressTimer.h b/cappuccino-sdk/incl/cocos2dx/actions/CCActionProgressTimer.h deleted file mode 100644 index 9cac31a..0000000 --- a/cappuccino-sdk/incl/cocos2dx/actions/CCActionProgressTimer.h +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (C) 2010 Lam Pham - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __ACTION_CCPROGRESS_TIMER_H__ -#define __ACTION_CCPROGRESS_TIMER_H__ - -#include "CCActionInterval.h" - -NS_CC_BEGIN - -/** - * @addtogroup actions - * @{ - */ - -/** -@brief Progress to percentage -@since v0.99.1 -*/ -class CC_DLL CCProgressTo : public CCActionInterval -{ -public: - /** Initializes with a duration and a percent */ - bool initWithDuration(float duration, float fPercent); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone *pZone); - virtual void startWithTarget(CCNode *pTarget); - virtual void update(float time); - -public: - /** Creates and initializes with a duration and a percent */ - static CCProgressTo* create(float duration, float fPercent); -protected: - float m_fTo; - float m_fFrom; -}; - -/** -@brief Progress from a percentage to another percentage -@since v0.99.1 -*/ -class CC_DLL CCProgressFromTo : public CCActionInterval -{ -public: - /** Initializes the action with a duration, a "from" percentage and a "to" percentage */ - bool initWithDuration(float duration, float fFromPercentage, float fToPercentage); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone *pZone); - virtual CCActionInterval* reverse(void); - virtual void startWithTarget(CCNode *pTarget); - virtual void update(float time); - -public: - - /** Creates and initializes the action with a duration, a "from" percentage and a "to" percentage */ - static CCProgressFromTo* create(float duration, float fFromPercentage, float fToPercentage); -protected: - float m_fTo; - float m_fFrom; -}; - -// end of actions group -/// @} - -NS_CC_END - -#endif // __ACTION_CCPROGRESS_TIMER_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/actions/CCActionTiledGrid.h b/cappuccino-sdk/incl/cocos2dx/actions/CCActionTiledGrid.h deleted file mode 100644 index ee6fe54..0000000 --- a/cappuccino-sdk/incl/cocos2dx/actions/CCActionTiledGrid.h +++ /dev/null @@ -1,330 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2009 On-Core - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __ACTION_CCTILEDGRID_ACTION_H__ -#define __ACTION_CCTILEDGRID_ACTION_H__ - -#include "CCActionGrid.h" - -NS_CC_BEGIN - -/** - * @addtogroup actions - * @{ - */ - -/** @brief CCShakyTiles3D action */ -class CC_DLL CCShakyTiles3D : public CCTiledGrid3DAction -{ -public: - /** initializes the action with a range, whether or not to shake Z vertices, a grid size, and duration */ - virtual bool initWithDuration(float duration, const CCSize& gridSize, int nRange, bool bShakeZ); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void update(float time); - -public: - - /** creates the action with a range, whether or not to shake Z vertices, a grid size, and duration */ - static CCShakyTiles3D* create(float duration, const CCSize& gridSize, int nRange, bool bShakeZ); - -protected: - int m_nRandrange; - bool m_bShakeZ; -}; - -/** @brief CCShatteredTiles3D action */ -class CC_DLL CCShatteredTiles3D : public CCTiledGrid3DAction -{ -public: - /** initializes the action with a range, whether or not to shatter Z vertices, a grid size and duration */ - virtual bool initWithDuration(float duration, const CCSize& gridSize, int nRange, bool bShatterZ); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void update(float time); - -public: - - /** creates the action with a range, whether of not to shatter Z vertices, a grid size and duration */ - static CCShatteredTiles3D* create(float duration, const CCSize& gridSize, int nRange, bool bShatterZ); -protected: - int m_nRandrange; - bool m_bOnce; - bool m_bShatterZ; -}; - -struct Tile; -/** @brief CCShuffleTiles action - Shuffle the tiles in random order - */ -class CC_DLL CCShuffleTiles : public CCTiledGrid3DAction -{ -public: - /** - * @js NA - * @lua NA - */ - ~CCShuffleTiles(void); - /** initializes the action with a random seed, the grid size and the duration */ - virtual bool initWithDuration(float duration, const CCSize& gridSize, unsigned int seed); - void shuffle(unsigned int *pArray, unsigned int nLen); - CCSize getDelta(const CCSize& pos); - void placeTile(const CCPoint& pos, Tile *t); - - virtual void startWithTarget(CCNode *pTarget); - virtual void update(float time); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action with a random seed, the grid size and the duration */ - static CCShuffleTiles* create(float duration, const CCSize& gridSize, unsigned int seed); -protected: - unsigned int m_nSeed; - unsigned int m_nTilesCount; - unsigned int* m_pTilesOrder; - Tile* m_pTiles; -}; - -/** @brief CCFadeOutTRTiles action - Fades out the tiles in a Top-Right direction - */ -class CC_DLL CCFadeOutTRTiles : public CCTiledGrid3DAction -{ -public: - virtual float testFunc(const CCSize& pos, float time); - void turnOnTile(const CCPoint& pos); - void turnOffTile(const CCPoint& pos); - virtual void transformTile(const CCPoint& pos, float distance); - virtual void update(float time); - -public: - - /** creates the action with the grid size and the duration */ - static CCFadeOutTRTiles* create(float duration, const CCSize& gridSize); -}; - -/** @brief CCFadeOutBLTiles action. - Fades out the tiles in a Bottom-Left direction - */ -class CC_DLL CCFadeOutBLTiles : public CCFadeOutTRTiles -{ -public: - virtual float testFunc(const CCSize& pos, float time); - -public: - - /** creates the action with the grid size and the duration */ - static CCFadeOutBLTiles* create(float duration, const CCSize& gridSize); -}; - -/** @brief CCFadeOutUpTiles action. - Fades out the tiles in upwards direction - */ -class CC_DLL CCFadeOutUpTiles : public CCFadeOutTRTiles -{ -public: - virtual float testFunc(const CCSize& pos, float time); - virtual void transformTile(const CCPoint& pos, float distance); - -public: - /** creates the action with the grid size and the duration */ - static CCFadeOutUpTiles* create(float duration, const CCSize& gridSize); - -}; - -/** @brief CCFadeOutDownTiles action. - Fades out the tiles in downwards direction - */ -class CC_DLL CCFadeOutDownTiles : public CCFadeOutUpTiles -{ -public: - virtual float testFunc(const CCSize& pos, float time); - -public: - - /** creates the action with the grid size and the duration */ - static CCFadeOutDownTiles* create(float duration, const CCSize& gridSize); -}; - -/** @brief CCTurnOffTiles action. - Turn off the files in random order - */ -class CC_DLL CCTurnOffTiles : public CCTiledGrid3DAction -{ -public: - /** - * @js NA - * @lua NA - */ - ~CCTurnOffTiles(void); - /** initializes the action with a random seed, the grid size and the duration */ - virtual bool initWithDuration(float duration, const CCSize& gridSize, unsigned int seed); - void shuffle(unsigned int *pArray, unsigned int nLen); - void turnOnTile(const CCPoint& pos); - void turnOffTile(const CCPoint& pos); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void startWithTarget(CCNode *pTarget); - virtual void update(float time); - -public: - - /** creates the action with the grid size and the duration */ - static CCTurnOffTiles* create(float duration, const CCSize& gridSize); - /** creates the action with a random seed, the grid size and the duration */ - static CCTurnOffTiles* create(float duration, const CCSize& gridSize, unsigned int seed); - -protected: - unsigned int m_nSeed; - unsigned int m_nTilesCount; - unsigned int* m_pTilesOrder; -}; - -/** @brief CCWavesTiles3D action. */ -class CC_DLL CCWavesTiles3D : public CCTiledGrid3DAction -{ -public: - /** waves amplitude */ - inline float getAmplitude(void) { return m_fAmplitude; } - inline void setAmplitude(float fAmplitude) { m_fAmplitude = fAmplitude; } - - /** waves amplitude rate */ - inline float getAmplitudeRate(void) { return m_fAmplitudeRate; } - inline void setAmplitudeRate(float fAmplitudeRate) { m_fAmplitudeRate = fAmplitudeRate; } - - /** initializes the action with a number of waves, the waves amplitude, the grid size and the duration */ - virtual bool initWithDuration(float duration, const CCSize& gridSize, unsigned int waves, float amplitude); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void update(float time); - -public: - /** creates the action with a number of waves, the waves amplitude, the grid size and the duration */ - static CCWavesTiles3D* create(float duration, const CCSize& gridSize, unsigned int waves, float amplitude); -protected: - unsigned int m_nWaves; - float m_fAmplitude; - float m_fAmplitudeRate; -}; - -/** @brief CCJumpTiles3D action. - A sin function is executed to move the tiles across the Z axis - */ -class CC_DLL CCJumpTiles3D : public CCTiledGrid3DAction -{ -public: - /** amplitude of the sin*/ - inline float getAmplitude(void) { return m_fAmplitude; } - inline void setAmplitude(float fAmplitude) { m_fAmplitude = fAmplitude; } - - /** amplitude rate */ - inline float getAmplitudeRate(void) { return m_fAmplitudeRate; } - inline void setAmplitudeRate(float fAmplitudeRate) { m_fAmplitudeRate = fAmplitudeRate; } - - /** initializes the action with the number of jumps, the sin amplitude, the grid size and the duration */ - bool initWithDuration(float duration, const CCSize& gridSize, unsigned int numberOfJumps, float amplitude); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void update(float time); - -public: - - /** creates the action with the number of jumps, the sin amplitude, the grid size and the duration */ - static CCJumpTiles3D* create(float duration, const CCSize& gridSize, unsigned int numberOfJumps, float amplitude); -protected: - unsigned int m_nJumps; - float m_fAmplitude; - float m_fAmplitudeRate; -}; - -/** @brief CCSplitRows action */ -class CC_DLL CCSplitRows : public CCTiledGrid3DAction -{ -public : - /** initializes the action with the number of rows to split and the duration */ - virtual bool initWithDuration(float duration, unsigned int nRows); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void update(float time); - virtual void startWithTarget(CCNode *pTarget); - -public: - - /** creates the action with the number of rows to split and the duration */ - static CCSplitRows* create(float duration, unsigned int nRows); -protected: - unsigned int m_nRows; - CCSize m_winSize; -}; - -/** @brief CCSplitCols action */ -class CC_DLL CCSplitCols : public CCTiledGrid3DAction -{ -public: - /** initializes the action with the number of columns to split and the duration */ - virtual bool initWithDuration(float duration, unsigned int nCols); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual void update(float time); - virtual void startWithTarget(CCNode *pTarget); - -public: - /** creates the action with the number of columns to split and the duration */ - static CCSplitCols* create(float duration, unsigned int nCols); -protected: - unsigned int m_nCols; - CCSize m_winSize; -}; - -// end of actions group -/// @} - -NS_CC_END - -#endif // __ACTION_CCTILEDGRID_ACTION_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/actions/CCActionTween.h b/cappuccino-sdk/incl/cocos2dx/actions/CCActionTween.h deleted file mode 100644 index e47845d..0000000 --- a/cappuccino-sdk/incl/cocos2dx/actions/CCActionTween.h +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright 2009 lhunath (Maarten Billemont) - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCACTIONTWEEN_H__ -#define __CCACTIONTWEEN_H__ - -#include "CCActionInterval.h" - -NS_CC_BEGIN - -/** - * @addtogroup actions - * @{ - */ - -class CC_DLL CCActionTweenDelegate -{ -public: - /** - * @js NA - * @lua NA - */ - virtual ~CCActionTweenDelegate() {} - virtual void updateTweenAction(float value, const char* key) = 0; -}; - -/** CCActionTween - - CCActionTween is an action that lets you update any property of an object. - For example, if you want to modify the "width" property of a target from 200 to 300 in 2 seconds, then: - - id modifyWidth = [CCActionTween actionWithDuration:2 key:@"width" from:200 to:300]; - [target runAction:modifyWidth]; - - - Another example: CCScaleTo action could be rewritten using CCPropertyAction: - - // scaleA and scaleB are equivalents - id scaleA = [CCScaleTo actionWithDuration:2 scale:3]; - id scaleB = [CCActionTween actionWithDuration:2 key:@"scale" from:1 to:3]; - - - @since v0.99.2 - */ -class CC_DLL CCActionTween : public CCActionInterval -{ -public: - /** creates an initializes the action with the property name (key), and the from and to parameters. */ - static CCActionTween* create(float aDuration, const char* key, float from, float to); - /** initializes the action with the property name (key), and the from and to parameters. */ - bool initWithDuration(float aDuration, const char* key, float from, float to); - - void startWithTarget(CCNode *pTarget); - void update(float dt); - CCActionInterval* reverse(); - - std::string m_strKey; - float m_fFrom, m_fTo; - float m_fDelta; -}; - -// end of actions group -/// @} - -NS_CC_END - -#endif /* __CCACTIONTWEEN_H__ */ - - diff --git a/cappuccino-sdk/incl/cocos2dx/base_nodes/CCAtlasNode.h b/cappuccino-sdk/incl/cocos2dx/base_nodes/CCAtlasNode.h deleted file mode 100644 index 2d3aa5e..0000000 --- a/cappuccino-sdk/incl/cocos2dx/base_nodes/CCAtlasNode.h +++ /dev/null @@ -1,139 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCATLAS_NODE_H__ -#define __CCATLAS_NODE_H__ - -#include "CCNode.h" -#include "CCProtocols.h" -#include "ccTypes.h" - -NS_CC_BEGIN - -/** - * @addtogroup base_nodes - * @{ - */ - -class CCTextureAtlas; - -/** @brief CCAtlasNode is a subclass of CCNode that implements the CCRGBAProtocol and CCTextureProtocol protocol - -It knows how to render a TextureAtlas object. -If you are going to render a TextureAtlas consider subclassing CCAtlasNode (or a subclass of CCAtlasNode) - -All features from CCNode are valid, plus the following features: -- opacity and RGB colors -*/ -class CC_DLL CCAtlasNode : public CCNodeRGBA, public CCTextureProtocol -{ -protected: - - //! chars per row - unsigned int m_uItemsPerRow; - //! chars per column - unsigned int m_uItemsPerColumn; - - //! width of each char - unsigned int m_uItemWidth; - //! height of each char - unsigned int m_uItemHeight; - - ccColor3B m_tColorUnmodified; - - CC_PROPERTY(CCTextureAtlas*, m_pTextureAtlas, TextureAtlas); - - // protocol variables - bool m_bIsOpacityModifyRGB; - - CC_PROPERTY(ccBlendFunc, m_tBlendFunc, BlendFunc); - - // quads to draw - CC_PROPERTY(unsigned int, m_uQuadsToDraw, QuadsToDraw); - // color uniform - GLint m_nUniformColor; - // This varible is only used for CCLabelAtlas FPS display. So plz don't modify its value. - bool m_bIgnoreContentScaleFactor; - -public: - /** - * @js ctor - */ - CCAtlasNode(); - /** - * @js NA - * @lua NA - */ - virtual ~CCAtlasNode(); - - /** creates a CCAtlasNode with an Atlas file the width and height of each item and the quantity of items to render*/ - static CCAtlasNode * create(const char* tile,unsigned int tileWidth, unsigned int tileHeight, - unsigned int itemsToRender); - - /** initializes an CCAtlasNode with an Atlas file the width and height of each item and the quantity of items to render*/ - bool initWithTileFile(const char* tile, unsigned int tileWidth, unsigned int tileHeight, unsigned int itemsToRender); - - /** initializes an CCAtlasNode with a texture the width and height of each item measured in points and the quantity of items to render*/ - bool initWithTexture(CCTexture2D* texture, unsigned int tileWidth, unsigned int tileHeight, unsigned int itemsToRender); - - /** updates the Atlas (indexed vertex array). - * Shall be overridden in subclasses - */ - virtual void updateAtlasValues(); - - virtual void draw(void); - - // CC Texture protocol - - /** returns the used texture*/ - virtual CCTexture2D* getTexture(void); - - /** sets a new texture. it will be retained*/ - virtual void setTexture(CCTexture2D *texture); - - virtual bool isOpacityModifyRGB(); - virtual void setOpacityModifyRGB(bool isOpacityModifyRGB); - virtual const ccColor3B& getColor(void); - virtual void setColor(const ccColor3B& color); - virtual void setOpacity(GLubyte opacity); - -private : - void calculateMaxItems(); - void updateBlendFunc(); - void updateOpacityModifyRGB(); - - friend class CCDirector; - void setIgnoreContentScaleFactor(bool bIgnoreContentScaleFactor); -}; - -// end of base_node group -/// @} - -NS_CC_END - -#endif // __CCATLAS_NODE_H__ - - diff --git a/cappuccino-sdk/incl/cocos2dx/base_nodes/CCGLBufferedNode.h b/cappuccino-sdk/incl/cocos2dx/base_nodes/CCGLBufferedNode.h deleted file mode 100644 index 0892639..0000000 --- a/cappuccino-sdk/incl/cocos2dx/base_nodes/CCGLBufferedNode.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CC_GL_BUFFERED_NODE__ -#define __CC_GL_BUFFERED_NODE__ - -#include - -class CCGLBufferedNode -{ -public: - CCGLBufferedNode(void); - - /** - * Load the given data into this CCNode's GL Buffer. Needed for WebGL, as it does not support client-side arrays. - */ - void setGLBufferData(void *buf, GLuint bufSize, int slot); - void setGLIndexData(void *buf, GLuint bufSize, int slot); - - // We allocate 4 buffer objs per node, and index into them as slots. -#define BUFFER_SLOTS 4 - GLuint m_bufferObject[BUFFER_SLOTS]; - GLuint m_bufferSize[BUFFER_SLOTS]; - - GLuint m_indexBufferObject[BUFFER_SLOTS]; - GLuint m_indexBufferSize[BUFFER_SLOTS]; -}; -#endif // __CC_GL_BUFFERED_NODE__ diff --git a/cappuccino-sdk/incl/cocos2dx/base_nodes/CCNode.h b/cappuccino-sdk/incl/cocos2dx/base_nodes/CCNode.h deleted file mode 100644 index ce44425..0000000 --- a/cappuccino-sdk/incl/cocos2dx/base_nodes/CCNode.h +++ /dev/null @@ -1,1546 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2008-2010 Ricardo Quesada - Copyright (c) 2009 Valentin Milea - Copyright (c) 2011 Zynga Inc. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __PLATFORM_CCNODE_H__ -#define __PLATFORM_CCNODE_H__ - -#include "ccMacros.h" -#include "cocoa/CCAffineTransform.h" -#include "cocoa/CCArray.h" -#include "CCGL.h" -#include "shaders/ccGLStateCache.h" -#include "shaders/CCGLProgram.h" -#include "kazmath/kazmath.h" -#include "script_support/CCScriptSupport.h" -#include "CCProtocols.h" - -NS_CC_BEGIN - -class CCCamera; -class CCGridBase; -class CCPoint; -class CCTouch; -class CCAction; -class CCRGBAProtocol; -class CCLabelProtocol; -class CCScheduler; -class CCActionManager; -class CCComponent; -class CCDictionary; -class CCComponentContainer; - -/** - * @addtogroup base_nodes - * @{ - */ - -enum { - kCCNodeTagInvalid = -1, -}; - -enum { - kCCNodeOnEnter, - kCCNodeOnExit, - kCCNodeOnEnterTransitionDidFinish, - kCCNodeOnExitTransitionDidStart, - kCCNodeOnCleanup -}; - -/** @brief CCNode is the main element. Anything that gets drawn or contains things that get drawn is a CCNode. - The most popular CCNodes are: CCScene, CCLayer, CCSprite, CCMenu. - - The main features of a CCNode are: - - They can contain other CCNode nodes (addChild, getChildByTag, removeChild, etc) - - They can schedule periodic callback (schedule, unschedule, etc) - - They can execute actions (runAction, stopAction, etc) - - Some CCNode nodes provide extra functionality for them or their children. - - Subclassing a CCNode usually means (one/all) of: - - overriding init to initialize resources and schedule callbacks - - create callbacks to handle the advancement of time - - overriding draw to render the node - - Features of CCNode: - - position - - scale (x, y) - - rotation (in degrees, clockwise) - - CCCamera (an interface to gluLookAt ) - - CCGridBase (to do mesh transformations) - - anchor point - - size - - visible - - z-order - - openGL z position - - Default values: - - rotation: 0 - - position: (x=0,y=0) - - scale: (x=1,y=1) - - contentSize: (x=0,y=0) - - anchorPoint: (x=0,y=0) - - Limitations: - - A CCNode is a "void" object. It doesn't have a texture - - Order in transformations with grid disabled - -# The node will be translated (position) - -# The node will be rotated (rotation) - -# The node will be scaled (scale) - -# The node will be moved according to the camera values (camera) - - Order in transformations with grid enabled - -# The node will be translated (position) - -# The node will be rotated (rotation) - -# The node will be scaled (scale) - -# The grid will capture the screen - -# The node will be moved according to the camera values (camera) - -# The grid will render the captured screen - - Camera: - - Each node has a camera. By default it points to the center of the CCNode. - */ - -class CC_DLL CCNode : public CCObject -{ -public: - /// @{ - /// @name Constructor, Distructor and Initializers - - /** - * Default constructor - * @js ctor - */ - CCNode(void); - - /** - * Default destructor - * @js NA - * @lua NA - */ - virtual ~CCNode(void); - - /** - * Initializes the instance of CCNode - * @return Whether the initialization was successful. - */ - virtual bool init(); - /** - * Allocates and initializes a node. - * @return A initialized node which is marked as "autorelease". - */ - static CCNode * create(void); - - /** - * Gets the description string. It makes debugging easier. - * @return A string terminated with '\0' - * @js NA - */ - const char* description(void); - - /// @} end of initializers - - - - /// @{ - /// @name Setters & Getters for Graphic Peroperties - - /** - * Sets the Z order which stands for the drawing order, and reorder this node in its parent's children array. - * - * The Z order of node is relative to its "brothers": children of the same parent. - * It's nothing to do with OpenGL's z vertex. This one only affects the draw order of nodes in cocos2d. - * The larger number it is, the later this node will be drawn in each message loop. - * Please refer to setVertexZ(float) for the difference. - * - * @param nZOrder Z order of this node. - */ - virtual void setZOrder(int zOrder); - /** - * Sets the z order which stands for the drawing order - * - * This is an internal method. Don't call it outside the framework. - * The difference between setZOrder(int) and _setOrder(int) is: - * - _setZOrder(int) is a pure setter for m_nZOrder memeber variable - * - setZOrder(int) firstly changes m_nZOrder, then recorder this node in its parent's chilren array. - */ - virtual void _setZOrder(int z); - /** - * Gets the Z order of this node. - * - * @see setZOrder(int) - * - * @return The Z order. - */ - virtual int getZOrder(); - - - /** - * Sets the real OpenGL Z vertex. - * - * Differences between openGL Z vertex and cocos2d Z order: - * - OpenGL Z modifies the Z vertex, and not the Z order in the relation between parent-children - * - OpenGL Z might require to set 2D projection - * - cocos2d Z order works OK if all the nodes uses the same openGL Z vertex. eg: vertexZ = 0 - * - * @warning Use it at your own risk since it might break the cocos2d parent-children z order - * - * @param fVertexZ OpenGL Z vertex of this node. - */ - virtual void setVertexZ(float vertexZ); - /** - * Gets OpenGL Z vertex of this node. - * - * @see setVertexZ(float) - * - * @return OpenGL Z vertex of this node - */ - virtual float getVertexZ(); - - - /** - * Changes the scale factor on X axis of this node - * - * The deafult value is 1.0 if you haven't changed it before - * - * @param fScaleX The scale factor on X axis. - */ - virtual void setScaleX(float fScaleX); - /** - * Returns the scale factor on X axis of this node - * - * @see setScaleX(float) - * - * @return The scale factor on X axis. - */ - virtual float getScaleX(); - - - /** - * Changes the scale factor on Y axis of this node - * - * The Default value is 1.0 if you haven't changed it before. - * - * @param fScaleY The scale factor on Y axis. - */ - virtual void setScaleY(float fScaleY); - /** - * Returns the scale factor on Y axis of this node - * - * @see setScaleY(float) - * - * @return The scale factor on Y axis. - */ - virtual float getScaleY(); - - - /** - * Changes both X and Y scale factor of the node. - * - * 1.0 is the default scale factor. It modifies the X and Y scale at the same time. - * - * @param scale The scale factor for both X and Y axis. - */ - virtual void setScale(float scale); - /** - * Gets the scale factor of the node, when X and Y have the same scale factor. - * - * @warning Assert when m_fScaleX != m_fScaleY. - * @see setScale(float) - * - * @return The scale factor of the node. - */ - virtual float getScale(); - - - /** - * Changes both X and Y scale factor of the node. - * - * 1.0 is the default scale factor. It modifies the X and Y scale at the same time. - * - * @param fScaleX The scale factor on X axis. - * @param fScaleY The scale factor on Y axis. - */ - virtual void setScale(float fScaleX,float fScaleY); - - - /** - * Changes the position (x,y) of the node in OpenGL coordinates - * - * Usually we use ccp(x,y) to compose CCPoint object. - * The original point (0,0) is at the left-bottom corner of screen. - * For example, this codesnip sets the node in the center of screen. - * @code - * CCSize size = CCDirector::sharedDirector()->getWinSize(); - * node->setPosition( ccp(size.width/2, size.height/2) ) - * @endcode - * - * @param position The position (x,y) of the node in OpenGL coordinates - * @js NA - */ - virtual void setPosition(const CCPoint &position); - /** - * Gets the position (x,y) of the node in OpenGL coordinates - * - * @see setPosition(const CCPoint&) - * - * @return The position (x,y) of the node in OpenGL coordinates - */ - virtual const CCPoint& getPosition(); - /** - * Sets position in a more efficient way. - * - * Passing two numbers (x,y) is much efficient than passing CCPoint object. - * This method is binded to lua and javascript. - * Passing a number is 10 times faster than passing a object from lua to c++ - * - * @code - * // sample code in lua - * local pos = node::getPosition() -- returns CCPoint object from C++ - * node:setPosition(x, y) -- pass x, y coordinate to C++ - * @endcode - * - * @param x X coordinate for position - * @param y Y coordinate for position - * @js NA - */ - virtual void setPosition(float x, float y); - /** - * Gets position in a more efficient way, returns two number instead of a CCPoint object - * - * @see setPosition(float, float) - */ - virtual void getPosition(float* x, float* y); - /** - * Gets/Sets x or y coordinate individually for position. - * These methods are used in Lua and Javascript Bindings - */ - virtual void setPositionX(float x); - virtual float getPositionX(void); - virtual void setPositionY(float y); - virtual float getPositionY(void); - - - /** - * Changes the X skew angle of the node in degrees. - * - * This angle describes the shear distortion in the X direction. - * Thus, it is the angle between the Y axis and the left edge of the shape - * The default skewX angle is 0. Positive values distort the node in a CW direction. - * - * @param fSkewX The X skew angle of the node in degrees. - */ - virtual void setSkewX(float fSkewX); - /** - * Returns the X skew angle of the node in degrees. - * - * @see setSkewX(float) - * - * @return The X skew angle of the node in degrees. - */ - virtual float getSkewX(); - - - /** - * Changes the Y skew angle of the node in degrees. - * - * This angle describes the shear distortion in the Y direction. - * Thus, it is the angle between the X axis and the bottom edge of the shape - * The default skewY angle is 0. Positive values distort the node in a CCW direction. - * - * @param fSkewY The Y skew angle of the node in degrees. - */ - virtual void setSkewY(float fSkewY); - /** - * Returns the Y skew angle of the node in degrees. - * - * @see setSkewY(float) - * - * @return The Y skew angle of the node in degrees. - */ - virtual float getSkewY(); - - - /** - * Sets the anchor point in percent. - * - * anchorPoint is the point around which all transformations and positioning manipulations take place. - * It's like a pin in the node where it is "attached" to its parent. - * The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner. - * But you can use values higher than (1,1) and lower than (0,0) too. - * The default anchorPoint is (0.5,0.5), so it starts in the center of the node. - * - * @param anchorPoint The anchor point of node. - */ - virtual void setAnchorPoint(const CCPoint& anchorPoint); - /** - * Returns the anchor point in percent. - * - * @see setAnchorPoint(const CCPoint&) - * - * @return The anchor point of node. - */ - virtual const CCPoint& getAnchorPoint(); - /** - * Returns the anchorPoint in absolute pixels. - * - * @warning You can only read it. If you wish to modify it, use anchorPoint instead. - * @see getAnchorPoint() - * - * @return The anchor point in absolute pixels. - */ - virtual const CCPoint& getAnchorPointInPoints(); - - - /** - * Sets the untransformed size of the node. - * - * The contentSize remains the same no matter the node is scaled or rotated. - * All nodes has a size. Layer and Scene has the same size of the screen. - * - * @param contentSize The untransformed size of the node. - */ - virtual void setContentSize(const CCSize& contentSize); - /** - * Returns the untransformed size of the node. - * - * @see setContentSize(const CCSize&) - * - * @return The untransformed size of the node. - */ - virtual const CCSize& getContentSize() const; - - //Robtop Modification: - virtual CCSize getScaledContentSize(); - - /** - * Sets whether the node is visible - * - * The default value is true, a node is default to visible - * - * @param visible true if the node is visible, false if the node is hidden. - */ - virtual void setVisible(bool visible); - /** - * Determines if the node is visible - * - * @see setVisible(bool) - * - * @return true if the node is visible, false if the node is hidden. - */ - virtual bool isVisible(); - - - /** - * Sets the rotation (angle) of the node in degrees. - * - * 0 is the default rotation angle. - * Positive values rotate node clockwise, and negative values for anti-clockwise. - * - * @param fRotation The roration of the node in degrees. - */ - virtual void setRotation(float fRotation); - /** - * Returns the rotation of the node in degrees. - * - * @see setRotation(float) - * - * @return The rotation of the node in degrees. - */ - virtual float getRotation(); - - - /** - * Sets the X rotation (angle) of the node in degrees which performs a horizontal rotational skew. - * - * 0 is the default rotation angle. - * Positive values rotate node clockwise, and negative values for anti-clockwise. - * - * @param fRotationX The X rotation in degrees which performs a horizontal rotational skew. - */ - virtual void setRotationX(float fRotaionX); - /** - * Gets the X rotation (angle) of the node in degrees which performs a horizontal rotation skew. - * - * @see setRotationX(float) - * - * @return The X rotation in degrees. - */ - virtual float getRotationX(); - - - /** - * Sets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew. - * - * 0 is the default rotation angle. - * Positive values rotate node clockwise, and negative values for anti-clockwise. - * - * @param fRotationY The Y rotation in degrees. - */ - virtual void setRotationY(float fRotationY); - /** - * Gets the Y rotation (angle) of the node in degrees which performs a vertical rotational skew. - * - * @see setRotationY(float) - * - * @return The Y rotation in degrees. - */ - virtual float getRotationY(); - - - /** - * Sets the arrival order when this node has a same ZOrder with other children. - * - * A node which called addChild subsequently will take a larger arrival order, - * If two children have the same Z order, the child with larger arrival order will be drawn later. - * - * @warning This method is used internally for zOrder sorting, don't change this manually - * - * @param uOrderOfArrival The arrival order. - */ - virtual void setOrderOfArrival(unsigned int uOrderOfArrival); - /** - * Returns the arrival order, indecates which children is added previously. - * - * @see setOrderOfArrival(unsigned int) - * - * @return The arrival order. - */ - virtual unsigned int getOrderOfArrival(); - - - /** - * Sets the state of OpenGL server side. - * - * @param glServerState The state of OpenGL server side. - * @js NA - */ - virtual void setGLServerState(ccGLServerState glServerState); - /** - * Returns the state of OpenGL server side. - * - * @return The state of OpenGL server side. - * @js NA - */ - virtual ccGLServerState getGLServerState(); - - - /** - * Sets whether the anchor point will be (0,0) when you position this node. - * - * This is an internal method, only used by CCLayer and CCScene. Don't call it outside framework. - * The default value is false, while in CCLayer and CCScene are true - * - * @param ignore true if anchor point will be (0,0) when you position this node - * @todo This method shoud be renamed as setIgnoreAnchorPointForPosition(bool) or something with "set" - */ - virtual void ignoreAnchorPointForPosition(bool ignore); - /** - * Gets whether the anchor point will be (0,0) when you position this node. - * - * @see ignoreAnchorPointForPosition(bool) - * - * @return true if the anchor point will be (0,0) when you position this node. - */ - virtual bool isIgnoreAnchorPointForPosition(); - - /// @} end of Setters & Getters for Graphic Peroperties - - - /// @{ - /// @name Children and Parent - - /** - * Adds a child to the container with z-order as 0. - * - * If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. - * - * @param child A child node - */ - virtual void addChild(CCNode * child); - /** - * Adds a child to the container with a z-order - * - * If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. - * - * @param child A child node - * @param zOrder Z order for drawing priority. Please refer to setZOrder(int) - */ - virtual void addChild(CCNode * child, int zOrder); - /** - * Adds a child to the container with z order and tag - * - * If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. - * - * @param child A child node - * @param zOrder Z order for drawing priority. Please refer to setZOrder(int) - * @param tag A interger to identify the node easily. Please refer to setTag(int) - */ - virtual void addChild(CCNode* child, int zOrder, int tag); - /** - * Gets a child from the container with its tag - * - * @param tag An identifier to find the child node. - * - * @return a CCNode object whose tag equals to the input parameter - */ - virtual CCNode * getChildByTag(int tag); - /** - * Return an array of children - * - * Composing a "tree" structure is a very important feature of CCNode - * Here's a sample code of traversing children array: - * @code - * CCNode* node = NULL; - * CCARRAY_FOREACH(parent->getChildren(), node) - * { - * node->setPosition(0,0); - * } - * @endcode - * This sample code traverses all children nodes, and set theie position to (0,0) - * - * @return An array of children - */ - virtual CCArray* getChildren(); - - /** - * Get the amount of children. - * - * @return The amount of children. - */ - virtual unsigned int getChildrenCount(void) const; - - /** - * Sets the parent node - * - * @param parent A pointer to the parnet node - */ - virtual void setParent(CCNode* parent); - /** - * Returns a pointer to the parent node - * - * @see setParent(CCNode*) - * - * @returns A pointer to the parnet node - */ - virtual CCNode* getParent(); - - - ////// REMOVES ////// - - /** - * Removes this node itself from its parent node with a cleanup. - * If the node orphan, then nothing happens. - * @see removeFromParentAndCleanup(bool) - */ - virtual void removeFromParent(); - /** - * Removes this node itself from its parent node. - * If the node orphan, then nothing happens. - * @param cleanup true if all actions and callbacks on this node should be removed, false otherwise. - * @js removeFromParent - */ - virtual void removeFromParentAndCleanup(bool cleanup); - - //Robtop Modification - virtual void removeMeAndCleanup(); - /** - * Removes a child from the container with a cleanup - * - * @see removeChild(CCNode, bool) - * - * @param child The child node which will be removed. - */ - virtual void removeChild(CCNode* child); - /** - * Removes a child from the container. It will also cleanup all running actions depending on the cleanup parameter. - * - * @param child The child node which will be removed. - * @param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. - */ - virtual void removeChild(CCNode* child, bool cleanup); - /** - * Removes a child from the container by tag value with a cleanup. - * - * @see removeChildByTag(int, bool) - * - * @param tag An interger number that identifies a child node - */ - virtual void removeChildByTag(int tag); - /** - * Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter - * - * @param tag An interger number that identifies a child node - * @param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. - */ - virtual void removeChildByTag(int tag, bool cleanup); - /** - * Removes all children from the container with a cleanup. - * - * @see removeAllChildrenWithCleanup(bool) - */ - virtual void removeAllChildren(); - /** - * Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter. - * - * @param cleanup true if all running actions on all children nodes should be cleanup, false oterwise. - * @js removeAllChildren - */ - virtual void removeAllChildrenWithCleanup(bool cleanup); - - /** - * Reorders a child according to a new z value. - * - * @param child An already added child node. It MUST be already added. - * @param zOrder Z order for drawing priority. Please refer to setZOrder(int) - */ - virtual void reorderChild(CCNode * child, int zOrder); - - /** - * Sorts the children array once before drawing, instead of every time when a child is added or reordered. - * This appraoch can improves the performance massively. - * @note Don't call this manually unless a child added needs to be removed in the same frame - */ - virtual void sortAllChildren(); - - /// @} end of Children and Parent - - - - /// @{ - /// @name Grid object for effects - - /** - * Returns a grid object that is used when applying effects - * - * @return A CCGrid object that is used when applying effects - * @js NA - */ - virtual CCGridBase* getGrid(); - /** - * Changes a grid object that is used when applying effects - * - * @param A CCGrid object that is used when applying effects - */ - virtual void setGrid(CCGridBase *pGrid); - - /// @} end of Grid - - - /// @{ - /// @name Tag & User data - - /** - * Returns a tag that is used to identify the node easily. - * - * You can set tags to node then identify them easily. - * @code - * #define TAG_PLAYER 1 - * #define TAG_MONSTER 2 - * #define TAG_BOSS 3 - * // set tags - * node1->setTag(TAG_PLAYER); - * node2->setTag(TAG_MONSTER); - * node3->setTag(TAG_BOSS); - * parent->addChild(node1); - * parent->addChild(node2); - * parent->addChild(node3); - * // identify by tags - * CCNode* node = NULL; - * CCARRAY_FOREACH(parent->getChildren(), node) - * { - * switch(node->getTag()) - * { - * case TAG_PLAYER: - * break; - * case TAG_MONSTER: - * break; - * case TAG_BOSS: - * break; - * } - * } - * @endcode - * - * @return A interger that identifies the node. - */ - //Robtop Modification - //virtual int getTag() const; - /** - * Changes the tag that is used to identify the node easily. - * - * Please refer to getTag for the sample code. - * - * @param A interger that indentifies the node. - */ - - //Robtop Modification - //virtual void setTag(int nTag); - - /** - * Returns a custom user data pointer - * - * You can set everything in UserData pointer, a data block, a structure or an object. - * - * @return A custom user data pointer - * @js NA - */ - virtual void* getUserData(); - /** - * Sets a custom user data pointer - * - * You can set everything in UserData pointer, a data block, a structure or an object, etc. - * @warning Don't forget to release the memroy manually, - * especially before you change this data pointer, and before this node is autoreleased. - * - * @return A custom user data pointer - * @js NA - */ - virtual void setUserData(void *pUserData); - - /** - * Returns a user assigned CCObject - * - * Similar to userData, but instead of holding a void* it holds an object - * - * @return A user assigned CCObject - * @js NA - */ - virtual CCObject* getUserObject(); - /** - * Returns a user assigned CCObject - * - * Similar to UserData, but instead of holding a void* it holds an object. - * The UserObject will be retained once in this method, - * and the previous UserObject (if existed) will be relese. - * The UserObject will be released in CCNode's destructure. - * - * @param A user assigned CCObject - */ - virtual void setUserObject(CCObject *pUserObject); - - /// @} end of Tag & User Data - - - /// @{ - /// @name Shader Program - /** - * Return the shader program currently used for this node - * - * @return The shader program currelty used for this node - */ - virtual CCGLProgram* getShaderProgram(); - /** - * Sets the shader program for this node - * - * Since v2.0, each rendering node must set its shader program. - * It should be set in initialize phase. - * @code - * node->setShaderProgram(CCShaderCache::sharedShaderCache()->programForKey(kCCShader_PositionTextureColor)); - * @endcode - * - * @param The shader program which fetchs from CCShaderCache. - */ - virtual void setShaderProgram(CCGLProgram *pShaderProgram); - /// @} end of Shader Program - - - /** - * Returns a camera object that lets you move the node using a gluLookAt - * - * @code - * CCCamera* camera = node->getCamera(); - * camera->setEyeXYZ(0, 0, 415/2); - * camera->setCenterXYZ(0, 0, 0); - * @endcode - * - * @return A CCCamera object that lets you move the node using a gluLookAt - */ - virtual CCCamera* getCamera(); - - /** - * Returns whether or not the node accepts event callbacks. - * - * Running means the node accept event callbacks like onEnter(), onExit(), update() - * - * @return Whether or not the node is running. - */ - virtual bool isRunning(); - - - /// @{ - /// @name Script Bindings for lua - - /** - * Registers a script function that will be called in onEnter() & onExit() seires functions. - * - * This handler will be removed automatically after onExit() called. - * @code - * -- lua sample - * local function sceneEventHandler(eventType) - * if eventType == kCCNodeOnEnter then - * -- do something - * elseif evetType == kCCNodeOnExit then - * -- do something - * end - * end - * scene::registerScriptHandler(sceneEventHandler) - * @endcode - * - * @warning This method is for internal usage, don't call it manually. - * @todo Perhaps we should rename it to get/set/removeScriptHandler acoording to the function name style. - * - * @param handler A number that indicates a lua function. - */ - virtual void registerScriptHandler(int handler); - /** - * Unregisters a script function that will be called in onEnter() & onExit() series functions. - * - * @see registerScriptHandler(int) - */ - virtual void unregisterScriptHandler(void); - /** - * Gets script handler for onEnter/onExit event. - * This is an internal method. g - * @see registerScriptHandler(int) - * - * @return A number that indicates a lua function. - */ - inline int getScriptHandler() { return m_nScriptHandler; }; - - /** - * Schedules for lua script. - * @js NA - */ - void scheduleUpdateWithPriorityLua(int nHandler, int priority); - - /// @} end Script Bindings - - - /// @{ - /// @name Event Callbacks - - /** - * Event callback that is invoked every time when CCNode enters the 'stage'. - * If the CCNode enters the 'stage' with a transition, this event is called when the transition starts. - * During onEnter you can't access a "sister/brother" node. - * If you override onEnter, you shall call its parent's one, e.g., CCNode::onEnter(). - * @js NA - * @lua NA - */ - virtual void onEnter(); - - /** Event callback that is invoked when the CCNode enters in the 'stage'. - * If the CCNode enters the 'stage' with a transition, this event is called when the transition finishes. - * If you override onEnterTransitionDidFinish, you shall call its parent's one, e.g. CCNode::onEnterTransitionDidFinish() - * @js NA - * @lua NA - */ - virtual void onEnterTransitionDidFinish(); - - /** - * Event callback that is invoked every time the CCNode leaves the 'stage'. - * If the CCNode leaves the 'stage' with a transition, this event is called when the transition finishes. - * During onExit you can't access a sibling node. - * If you override onExit, you shall call its parent's one, e.g., CCNode::onExit(). - * @js NA - * @lua NA - */ - virtual void onExit(); - - /** - * Event callback that is called every time the CCNode leaves the 'stage'. - * If the CCNode leaves the 'stage' with a transition, this callback is called when the transition starts. - * @js NA - * @lua NA - */ - virtual void onExitTransitionDidStart(); - - /// @} end of event callbacks. - - - /** - * Stops all running actions and schedulers - */ - virtual void cleanup(void); - - /** - * Override this method to draw your own node. - * The following GL states will be enabled by default: - * - glEnableClientState(GL_VERTEX_ARRAY); - * - glEnableClientState(GL_COLOR_ARRAY); - * - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - * - glEnable(GL_TEXTURE_2D); - * AND YOU SHOULD NOT DISABLE THEM AFTER DRAWING YOUR NODE - * But if you enable any other GL state, you should disable it after drawing your node. - */ - virtual void draw(void); - - /** - * Visits this node's children and draw them recursively. - */ - virtual void visit(void); - - - /** - * Returns a "local" axis aligned bounding box of the node. - * The returned box is relative only to its parent. - * - * @note This method returns a temporaty variable, so it can't returns const CCRect& - * @todo Rename to getBoundingBox() in the future versions. - * - * @return A "local" axis aligned boudning box of the node. - * @js getBoundingBox - */ - CCRect boundingBox(void); - - /// @{ - /// @name Actions - - /** - * Sets the CCActionManager object that is used by all actions. - * - * @warning If you set a new CCActionManager, then previously created actions will be removed. - * - * @param actionManager A CCActionManager object that is used by all actions. - */ - virtual void setActionManager(CCActionManager* actionManager); - /** - * Gets the CCActionManager object that is used by all actions. - * @see setActionManager(CCActionManager*) - * @return A CCActionManager object. - */ - virtual CCActionManager* getActionManager(); - - /** - * Executes an action, and returns the action that is executed. - * - * This node becomes the action's target. Refer to CCAction::getTarget() - * @warning Actions don't retain their target. - * - * @return An Action pointer - */ - CCAction* runAction(CCAction* action); - - /** - * Stops and removes all actions from the running action list . - */ - void stopAllActions(void); - - /** - * Stops and removes an action from the running action list. - * - * @param An action object to be removed. - */ - void stopAction(CCAction* action); - - /** - * Removes an action from the running action list by its tag. - * - * @param A tag that indicates the action to be removed. - */ - void stopActionByTag(int tag); - - /** - * Gets an action from the running action list by its tag. - * - * @see setTag(int), getTag(). - * - * @return The action object with the given tag. - */ - CCAction* getActionByTag(int tag); - - /** - * Returns the numbers of actions that are running plus the ones that are schedule to run (actions in actionsToAdd and actions arrays). - * - * Composable actions are counted as 1 action. Example: - * If you are running 1 Sequence of 7 actions, it will return 1. - * If you are running 7 Sequences of 2 actions, it will return 7. - * @todo Rename to getNumberOfRunningActions() - * - * @return The number of actions that are running plus the ones that are schedule to run - */ - unsigned int numberOfRunningActions(void); - - /// @} end of Actions - - - /// @{ - /// @name Scheduler and Timer - - /** - * Sets a CCScheduler object that is used to schedule all "updates" and timers. - * - * @warning If you set a new CCScheduler, then previously created timers/update are going to be removed. - * @param scheduler A CCShdeduler object that is used to schedule all "update" and timers. - * @js NA - */ - virtual void setScheduler(CCScheduler* scheduler); - /** - * Gets a CCSheduler object. - * - * @see setScheduler(CCScheduler*) - * @return A CCScheduler object. - * @js NA - */ - virtual CCScheduler* getScheduler(); - - /** - * Checks whether a selector is scheduled. - * - * @param selector A function selector - * @return Whether the funcion selector is scheduled. - * @js NA - * @lua NA - */ - bool isScheduled(SEL_SCHEDULE selector); - - /** - * Schedules the "update" method. - * - * It will use the order number 0. This method will be called every frame. - * Scheduled methods with a lower order value will be called before the ones that have a higher order value. - * Only one "update" method could be scheduled per node. - * @lua NA - */ - void scheduleUpdate(void); - - /** - * Schedules the "update" method with a custom priority. - * - * This selector will be called every frame. - * Scheduled methods with a lower priority will be called before the ones that have a higher value. - * Only one "update" selector could be scheduled per node (You can't have 2 'update' selectors). - * @lua NA - */ - void scheduleUpdateWithPriority(int priority); - - /* - * Unschedules the "update" method. - * @see scheduleUpdate(); - */ - void unscheduleUpdate(void); - - /** - * Schedules a custom selector. - * - * If the selector is already scheduled, then the interval parameter will be updated without scheduling it again. - * @code - * // firstly, implement a schedule function - * void MyNode::TickMe(float dt); - * // wrap this function into a selector via schedule_selector marco. - * this->schedule(schedule_selector(MyNode::TickMe), 0, 0, 0); - * @endcode - * - * @param interval Tick interval in seconds. 0 means tick every frame. If interval = 0, it's recommended to use scheduleUpdate() instead. - * @param repeat The selector will be excuted (repeat + 1) times, you can use kCCRepeatForever for tick infinitely. - * @param delay The amount of time that the first tick will wait before execution. - * @lua NA - */ - void schedule(SEL_SCHEDULE selector, float interval, unsigned int repeat, float delay); - - /** - * Schedules a custom selector with an interval time in seconds. - * @see schedule(SEL_SCHEDULE, float, unsigned int, float) - * - * @param selector A function wrapped as a selector - * @param interval Callback interval time in seconds. 0 means tick every frame, - * @lua NA - */ - void schedule(SEL_SCHEDULE selector, float interval); - - /** - * Schedules a selector that runs only once, with a delay of 0 or larger - * @see schedule(SEL_SCHEDULE, float, unsigned int, float) - * - * @param selector A function wrapped as a selector - * @param delay The amount of time that the first tick will wait before execution. - * @lua NA - */ - void scheduleOnce(SEL_SCHEDULE selector, float delay); - - /** - * Schedules a custom selector, the scheduled selector will be ticked every frame - * @see schedule(SEL_SCHEDULE, float, unsigned int, float) - * - * @param selector A function wrapped as a selector - * @lua NA - */ - void schedule(SEL_SCHEDULE selector); - - /** - * Unschedules a custom selector. - * @see schedule(SEL_SCHEDULE, float, unsigned int, float) - * - * @param selector A function wrapped as a selector - * @lua NA - */ - void unschedule(SEL_SCHEDULE selector); - - /** - * Unschedule all scheduled selectors: custom selectors, and the 'update' selector. - * Actions are not affected by this method. - */ - void unscheduleAllSelectors(void); - - /** - * Resumes all scheduled selectors and actions. - * This method is called internally by onEnter - * @js NA - * @lua NA - */ - void resumeSchedulerAndActions(void); - /** - * Pauses all scheduled selectors and actions. - * This method is called internally by onExit - * @js NA - * @lua NA - */ - void pauseSchedulerAndActions(void); - - /* - * Update method will be called automatically every frame if "scheduleUpdate" is called, and the node is "live" - */ - virtual void update(float delta); - - /// @} end of Scheduler and Timer - - /// @{ - /// @name Transformations - - /** - * Performs OpenGL view-matrix transformation based on position, scale, rotation and other attributes. - */ - void transform(void); - /** - * Performs OpenGL view-matrix transformation of it's ancestors. - * Generally the ancestors are already transformed, but in certain cases (eg: attaching a FBO) - * It's necessary to transform the ancestors again. - */ - void transformAncestors(void); - /** - * Calls children's updateTransform() method recursively. - * - * This method is moved from CCSprite, so it's no longer specific to CCSprite. - * As the result, you apply CCSpriteBatchNode's optimization on your customed CCNode. - * e.g., batchNode->addChild(myCustomNode), while you can only addChild(sprite) before. - */ - virtual void updateTransform(void); - - /** - * Returns the matrix that transform the node's (local) space coordinates into the parent's space coordinates. - * The matrix is in Pixels. - */ - - //Robtop Modification - virtual const CCAffineTransform nodeToParentTransform(void); - - /** - * Returns the matrix that transform parent's space coordinates to the node's (local) space coordinates. - * The matrix is in Pixels. - */ - virtual const CCAffineTransform parentToNodeTransform(void); - - /** - * Returns the world affine transform matrix. The matrix is in Pixels. - */ - virtual CCAffineTransform nodeToWorldTransform(void); - - /** - * Returns the inverse world affine transform matrix. The matrix is in Pixels. - */ - virtual CCAffineTransform worldToNodeTransform(void); - - /// @} end of Transformations - - - /// @{ - /// @name Coordinate Converters - - /** - * Converts a Point to node (local) space coordinates. The result is in Points. - */ - CCPoint convertToNodeSpace(const CCPoint& worldPoint); - - /** - * Converts a Point to world space coordinates. The result is in Points. - */ - CCPoint convertToWorldSpace(const CCPoint& nodePoint); - - /** - * Converts a Point to node (local) space coordinates. The result is in Points. - * treating the returned/received node point as anchor relative. - */ - CCPoint convertToNodeSpaceAR(const CCPoint& worldPoint); - - /** - * Converts a local Point to world space coordinates.The result is in Points. - * treating the returned/received node point as anchor relative. - */ - CCPoint convertToWorldSpaceAR(const CCPoint& nodePoint); - - /** - * convenience methods which take a CCTouch instead of CCPoint - */ - CCPoint convertTouchToNodeSpace(CCTouch * touch); - - /** - * converts a CCTouch (world coordinates) into a local coordinate. This method is AR (Anchor Relative). - */ - CCPoint convertTouchToNodeSpaceAR(CCTouch * touch); - - /** - * Sets the additional transform. - * - * @note The additional transform will be concatenated at the end of nodeToParentTransform. - * It could be used to simulate `parent-child` relationship between two nodes (e.g. one is in BatchNode, another isn't). - * @code - // create a batchNode - CCSpriteBatchNode* batch= CCSpriteBatchNode::create("Icon-114.png"); - this->addChild(batch); - - // create two sprites, spriteA will be added to batchNode, they are using different textures. - CCSprite* spriteA = CCSprite::createWithTexture(batch->getTexture()); - CCSprite* spriteB = CCSprite::create("Icon-72.png"); - - batch->addChild(spriteA); - - // We can't make spriteB as spriteA's child since they use different textures. So just add it to layer. - // But we want to simulate `parent-child` relationship for these two node. - this->addChild(spriteB); - - //position - spriteA->setPosition(ccp(200, 200)); - - // Gets the spriteA's transform. - CCAffineTransform t = spriteA->nodeToParentTransform(); - - // Sets the additional transform to spriteB, spriteB's postion will based on its pseudo parent i.e. spriteA. - spriteB->setAdditionalTransform(t); - - //scale - spriteA->setScale(2); - - // Gets the spriteA's transform. - t = spriteA->nodeToParentTransform(); - - // Sets the additional transform to spriteB, spriteB's scale will based on its pseudo parent i.e. spriteA. - spriteB->setAdditionalTransform(t); - - //rotation - spriteA->setRotation(20); - - // Gets the spriteA's transform. - t = spriteA->nodeToParentTransform(); - - // Sets the additional transform to spriteB, spriteB's rotation will based on its pseudo parent i.e. spriteA. - spriteB->setAdditionalTransform(t); - * @endcode - */ - void setAdditionalTransform(const CCAffineTransform& additionalTransform); - - /// @} end of Coordinate Converters - - /// @{ - /// @name component functions - /** - * gets a component by its name - */ - CCComponent* getComponent(const char *pName) const; - - /** - * adds a component - */ - virtual bool addComponent(CCComponent *pComponent); - - /** - * removes a component by its name - */ - virtual bool removeComponent(const char *pName); - - /** - * removes a component by its pointer - */ - virtual bool removeComponent(CCComponent *pComponent); - - /** - * removes all components - */ - virtual void removeAllComponents(); - /// @} end of component functions - - //Robtop Modification - virtual void updateTweenAction(float, char const*); -private: - /// lazy allocs - void childrenAlloc(void); - - /// helper that reorder a child - void insertChild(CCNode* child, int z); - - /// Removes a child, call child->onExit(), do cleanup, remove it from children array. - void detachChild(CCNode *child, bool doCleanup); - - /** Convert cocos2d coordinates to UI windows coordinate. - * @js NA - * @lua NA - */ - CCPoint convertToWindowSpace(const CCPoint& nodePoint); - -protected: - float m_fRotationX; ///< rotation angle on x-axis - float m_fRotationY; ///< rotation angle on y-axis - - float m_fScaleX; ///< scaling factor on x-axis - float m_fScaleY; ///< scaling factor on y-axis - - float m_fVertexZ; ///< OpenGL real Z vertex - - CCPoint m_obPosition; ///< position of the node - - float m_fSkewX; ///< skew angle on x-axis - float m_fSkewY; ///< skew angle on y-axis - - CCPoint m_obAnchorPointInPoints; ///< anchor point in points - CCPoint m_obAnchorPoint; ///< anchor point normalized (NOT in points) - - CCSize m_obContentSize; ///< untransformed size of the node - - - CCAffineTransform m_sAdditionalTransform; ///< transform - CCAffineTransform m_sTransform; ///< transform - CCAffineTransform m_sInverse; ///< transform - - CCCamera *m_pCamera; ///< a camera - - CCGridBase *m_pGrid; ///< a grid - - int m_nZOrder; ///< z-order value that affects the draw order - - CCArray *m_pChildren; ///< array of children nodes - CCNode *m_pParent; ///< weak reference to parent node - - //int m_nTag; ///< a tag. Can be any number you assigned just to identify this node - - void *m_pUserData; ///< A user assingned void pointer, Can be point to any cpp object - CCObject *m_pUserObject; ///< A user assigned CCObject - - CCGLProgram *m_pShaderProgram; ///< OpenGL shader - - ccGLServerState m_eGLServerState; ///< OpenGL servier side state - - unsigned int m_uOrderOfArrival; ///< used to preserve sequence while sorting children with the same zOrder - - CCScheduler *m_pScheduler; ///< scheduler used to schedule timers and updates - - CCActionManager *m_pActionManager; ///< a pointer to ActionManager singleton, which is used to handle all the actions - - bool m_bRunning; ///< is running - - bool m_bTransformDirty; ///< transform dirty flag - bool m_bInverseDirty; ///< transform dirty flag - bool m_bAdditionalTransformDirty; ///< The flag to check whether the additional transform is dirty - bool m_bVisible; ///< is this node visible - - bool m_bIgnoreAnchorPointForPosition; ///< true if the Anchor Point will be (0,0) when you position the CCNode, false otherwise. - ///< Used by CCLayer and CCScene. - - bool m_bReorderChildDirty; ///< children order dirty flag - - int m_nScriptHandler; ///< script handler for onEnter() & onExit(), used in Javascript binding and Lua binding. - int m_nUpdateScriptHandler; ///< script handler for update() callback per frame, which is invoked from lua & javascript. - ccScriptType m_eScriptType; ///< type of script binding, lua or javascript - - CCComponentContainer *m_pComponentContainer; ///< Dictionary of components - -}; - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) -//#pragma mark - CCNodeRGBA -#endif - -/** CCNodeRGBA is a subclass of CCNode that implements the CCRGBAProtocol protocol. - - All features from CCNode are valid, plus the following new features: - - opacity - - RGB colors - - Opacity/Color propagates into children that conform to the CCRGBAProtocol if cascadeOpacity/cascadeColor is enabled. - @since v2.1 - */ -class CC_DLL CCNodeRGBA : public CCNode, public CCRGBAProtocol -{ -public: - /** - * @js ctor - */ - CCNodeRGBA(); - /** - * @js NA - * @lua NA - */ - virtual ~CCNodeRGBA(); - - virtual bool init(); - - /** - * Allocates and initializes a nodergba. - * @return A initialized node which is marked as "autorelease". - */ - static CCNodeRGBA * create(void); - - virtual GLubyte getOpacity(); - virtual GLubyte getDisplayedOpacity(); - virtual void setOpacity(GLubyte opacity); - virtual void updateDisplayedOpacity(GLubyte parentOpacity); - virtual bool isCascadeOpacityEnabled(); - virtual void setCascadeOpacityEnabled(bool cascadeOpacityEnabled); - - virtual const ccColor3B& getColor(void); - virtual const ccColor3B& getDisplayedColor(); - virtual void setColor(const ccColor3B& color); - virtual void updateDisplayedColor(const ccColor3B& parentColor); - virtual bool isCascadeColorEnabled(); - virtual void setCascadeColorEnabled(bool cascadeColorEnabled); - - virtual void setOpacityModifyRGB(bool bValue) {CC_UNUSED_PARAM(bValue);}; - virtual bool isOpacityModifyRGB() { return false; }; - -protected: - GLubyte _displayedOpacity; - GLubyte _realOpacity; - ccColor3B _displayedColor; - ccColor3B _realColor; - bool _cascadeColorEnabled; - bool _cascadeOpacityEnabled; -}; - -// end of base_node group -/// @} - -NS_CC_END - -#endif // __PLATFORM_CCNODE_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/ccFPSImages.c b/cappuccino-sdk/incl/cocos2dx/ccFPSImages.c deleted file mode 100644 index 045980e..0000000 --- a/cappuccino-sdk/incl/cocos2dx/ccFPSImages.c +++ /dev/null @@ -1,613 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2012 Zynga Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#include "ccFPSImages.h" - -unsigned char cc_fps_images_png[] = { - 0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, - 0x49, 0x48, 0x44, 0x52, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x20, - 0x08, 0x06, 0x00, 0x00, 0x00, 0xfd, 0xa9, 0xa6, 0xe4, 0x00, 0x00, 0x0a, - 0x43, 0x69, 0x43, 0x43, 0x50, 0x49, 0x43, 0x43, 0x20, 0x70, 0x72, 0x6f, - 0x66, 0x69, 0x6c, 0x65, 0x00, 0x00, 0x78, 0xda, 0x9d, 0x53, 0x77, 0x58, - 0x93, 0xf7, 0x16, 0x3e, 0xdf, 0xf7, 0x65, 0x0f, 0x56, 0x42, 0xd8, 0xf0, - 0xb1, 0x97, 0x6c, 0x81, 0x00, 0x22, 0x23, 0xac, 0x08, 0xc8, 0x10, 0x59, - 0xa2, 0x10, 0x92, 0x00, 0x61, 0x84, 0x10, 0x12, 0x40, 0xc5, 0x85, 0x88, - 0x0a, 0x56, 0x14, 0x15, 0x11, 0x9c, 0x48, 0x55, 0xc4, 0x82, 0xd5, 0x0a, - 0x48, 0x9d, 0x88, 0xe2, 0xa0, 0x28, 0xb8, 0x67, 0x41, 0x8a, 0x88, 0x5a, - 0x8b, 0x55, 0x5c, 0x38, 0xee, 0x1f, 0xdc, 0xa7, 0xb5, 0x7d, 0x7a, 0xef, - 0xed, 0xed, 0xfb, 0xd7, 0xfb, 0xbc, 0xe7, 0x9c, 0xe7, 0xfc, 0xce, 0x79, - 0xcf, 0x0f, 0x80, 0x11, 0x12, 0x26, 0x91, 0xe6, 0xa2, 0x6a, 0x00, 0x39, - 0x52, 0x85, 0x3c, 0x3a, 0xd8, 0x1f, 0x8f, 0x4f, 0x48, 0xc4, 0xc9, 0xbd, - 0x80, 0x02, 0x15, 0x48, 0xe0, 0x04, 0x20, 0x10, 0xe6, 0xcb, 0xc2, 0x67, - 0x05, 0xc5, 0x00, 0x00, 0xf0, 0x03, 0x79, 0x78, 0x7e, 0x74, 0xb0, 0x3f, - 0xfc, 0x01, 0xaf, 0x6f, 0x00, 0x02, 0x00, 0x70, 0xd5, 0x2e, 0x24, 0x12, - 0xc7, 0xe1, 0xff, 0x83, 0xba, 0x50, 0x26, 0x57, 0x00, 0x20, 0x91, 0x00, - 0xe0, 0x22, 0x12, 0xe7, 0x0b, 0x01, 0x90, 0x52, 0x00, 0xc8, 0x2e, 0x54, - 0xc8, 0x14, 0x00, 0xc8, 0x18, 0x00, 0xb0, 0x53, 0xb3, 0x64, 0x0a, 0x00, - 0x94, 0x00, 0x00, 0x6c, 0x79, 0x7c, 0x42, 0x22, 0x00, 0xaa, 0x0d, 0x00, - 0xec, 0xf4, 0x49, 0x3e, 0x05, 0x00, 0xd8, 0xa9, 0x93, 0xdc, 0x17, 0x00, - 0xd8, 0xa2, 0x1c, 0xa9, 0x08, 0x00, 0x8d, 0x01, 0x00, 0x99, 0x28, 0x47, - 0x24, 0x02, 0x40, 0xbb, 0x00, 0x60, 0x55, 0x81, 0x52, 0x2c, 0x02, 0xc0, - 0xc2, 0x00, 0xa0, 0xac, 0x40, 0x22, 0x2e, 0x04, 0xc0, 0xae, 0x01, 0x80, - 0x59, 0xb6, 0x32, 0x47, 0x02, 0x80, 0xbd, 0x05, 0x00, 0x76, 0x8e, 0x58, - 0x90, 0x0f, 0x40, 0x60, 0x00, 0x80, 0x99, 0x42, 0x2c, 0xcc, 0x00, 0x20, - 0x38, 0x02, 0x00, 0x43, 0x1e, 0x13, 0xcd, 0x03, 0x20, 0x4c, 0x03, 0xa0, - 0x30, 0xd2, 0xbf, 0xe0, 0xa9, 0x5f, 0x70, 0x85, 0xb8, 0x48, 0x01, 0x00, - 0xc0, 0xcb, 0x95, 0xcd, 0x97, 0x4b, 0xd2, 0x33, 0x14, 0xb8, 0x95, 0xd0, - 0x1a, 0x77, 0xf2, 0xf0, 0xe0, 0xe2, 0x21, 0xe2, 0xc2, 0x6c, 0xb1, 0x42, - 0x61, 0x17, 0x29, 0x10, 0x66, 0x09, 0xe4, 0x22, 0x9c, 0x97, 0x9b, 0x23, - 0x13, 0x48, 0xe7, 0x03, 0x4c, 0xce, 0x0c, 0x00, 0x00, 0x1a, 0xf9, 0xd1, - 0xc1, 0xfe, 0x38, 0x3f, 0x90, 0xe7, 0xe6, 0xe4, 0xe1, 0xe6, 0x66, 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 0xee, - 0x01, 0x02, 0x8b, 0x0e, 0x58, 0xd2, 0x76, 0x00, 0x40, 0x7e, 0xf3, 0x2d, - 0x8c, 0x1a, 0x0b, 0x91, 0x00, 0x10, 0x67, 0x34, 0x32, 0x79, 0xf7, 0x00, - 0x00, 0x93, 0xbf, 0xf9, 0x8f, 0x40, 0x2b, 0x01, 0x00, 0xcd, 0x97, 0xa4, - 0xe3, 0x00, 0x00, 0xbc, 0xe8, 0x18, 0x5c, 0xa8, 0x94, 0x17, 0x4c, 0xc6, - 0x08, 0x00, 0x00, 0x44, 0xa0, 0x81, 0x2a, 0xb0, 0x41, 0x07, 0x0c, 0xc1, - 0x14, 0xac, 0xc0, 0x0e, 0x9c, 0xc1, 0x1d, 0xbc, 0xc0, 0x17, 0x02, 0x61, - 0x06, 0x44, 0x40, 0x0c, 0x24, 0xc0, 0x3c, 0x10, 0x42, 0x06, 0xe4, 0x80, - 0x1c, 0x0a, 0xa1, 0x18, 0x96, 0x41, 0x19, 0x54, 0xc0, 0x3a, 0xd8, 0x04, - 0xb5, 0xb0, 0x03, 0x1a, 0xa0, 0x11, 0x9a, 0xe1, 0x10, 0xb4, 0xc1, 0x31, - 0x38, 0x0d, 0xe7, 0xe0, 0x12, 0x5c, 0x81, 0xeb, 0x70, 0x17, 0x06, 0x60, - 0x18, 0x9e, 0xc2, 0x18, 0xbc, 0x86, 0x09, 0x04, 0x41, 0xc8, 0x08, 0x13, - 0x61, 0x21, 0x3a, 0x88, 0x11, 0x62, 0x8e, 0xd8, 0x22, 0xce, 0x08, 0x17, - 0x99, 0x8e, 0x04, 0x22, 0x61, 0x48, 0x34, 0x92, 0x80, 0xa4, 0x20, 0xe9, - 0x88, 0x14, 0x51, 0x22, 0xc5, 0xc8, 0x72, 0xa4, 0x02, 0xa9, 0x42, 0x6a, - 0x91, 0x5d, 0x48, 0x23, 0xf2, 0x2d, 0x72, 0x14, 0x39, 0x8d, 0x5c, 0x40, - 0xfa, 0x90, 0xdb, 0xc8, 0x20, 0x32, 0x8a, 0xfc, 0x8a, 0xbc, 0x47, 0x31, - 0x94, 0x81, 0xb2, 0x51, 0x03, 0xd4, 0x02, 0x75, 0x40, 0xb9, 0xa8, 0x1f, - 0x1a, 0x8a, 0xc6, 0xa0, 0x73, 0xd1, 0x74, 0x34, 0x0f, 0x5d, 0x80, 0x96, - 0xa2, 0x6b, 0xd1, 0x1a, 0xb4, 0x1e, 0x3d, 0x80, 0xb6, 0xa2, 0xa7, 0xd1, - 0x4b, 0xe8, 0x75, 0x74, 0x00, 0x7d, 0x8a, 0x8e, 0x63, 0x80, 0xd1, 0x31, - 0x0e, 0x66, 0x8c, 0xd9, 0x61, 0x5c, 0x8c, 0x87, 0x45, 0x60, 0x89, 0x58, - 0x1a, 0x26, 0xc7, 0x16, 0x63, 0xe5, 0x58, 0x35, 0x56, 0x8f, 0x35, 0x63, - 0x1d, 0x58, 0x37, 0x76, 0x15, 0x1b, 0xc0, 0x9e, 0x61, 0xef, 0x08, 0x24, - 0x02, 0x8b, 0x80, 0x13, 0xec, 0x08, 0x5e, 0x84, 0x10, 0xc2, 0x6c, 0x82, - 0x90, 0x90, 0x47, 0x58, 0x4c, 0x58, 0x43, 0xa8, 0x25, 0xec, 0x23, 0xb4, - 0x12, 0xba, 0x08, 0x57, 0x09, 0x83, 0x84, 0x31, 0xc2, 0x27, 0x22, 0x93, - 0xa8, 0x4f, 0xb4, 0x25, 0x7a, 0x12, 0xf9, 0xc4, 0x78, 0x62, 0x3a, 0xb1, - 0x90, 0x58, 0x46, 0xac, 0x26, 0xee, 0x21, 0x1e, 0x21, 0x9e, 0x25, 0x5e, - 0x27, 0x0e, 0x13, 0x5f, 0x93, 0x48, 0x24, 0x0e, 0xc9, 0x92, 0xe4, 0x4e, - 0x0a, 0x21, 0x25, 0x90, 0x32, 0x49, 0x0b, 0x49, 0x6b, 0x48, 0xdb, 0x48, - 0x2d, 0xa4, 0x53, 0xa4, 0x3e, 0xd2, 0x10, 0x69, 0x9c, 0x4c, 0x26, 0xeb, - 0x90, 0x6d, 0xc9, 0xde, 0xe4, 0x08, 0xb2, 0x80, 0xac, 0x20, 0x97, 0x91, - 0xb7, 0x90, 0x0f, 0x90, 0x4f, 0x92, 0xfb, 0xc9, 0xc3, 0xe4, 0xb7, 0x14, - 0x3a, 0xc5, 0x88, 0xe2, 0x4c, 0x09, 0xa2, 0x24, 0x52, 0xa4, 0x94, 0x12, - 0x4a, 0x35, 0x65, 0x3f, 0xe5, 0x04, 0xa5, 0x9f, 0x32, 0x42, 0x99, 0xa0, - 0xaa, 0x51, 0xcd, 0xa9, 0x9e, 0xd4, 0x08, 0xaa, 0x88, 0x3a, 0x9f, 0x5a, - 0x49, 0x6d, 0xa0, 0x76, 0x50, 0x2f, 0x53, 0x87, 0xa9, 0x13, 0x34, 0x75, - 0x9a, 0x25, 0xcd, 0x9b, 0x16, 0x43, 0xcb, 0xa4, 0x2d, 0xa3, 0xd5, 0xd0, - 0x9a, 0x69, 0x67, 0x69, 0xf7, 0x68, 0x2f, 0xe9, 0x74, 0xba, 0x09, 0xdd, - 0x83, 0x1e, 0x45, 0x97, 0xd0, 0x97, 0xd2, 0x6b, 0xe8, 0x07, 0xe9, 0xe7, - 0xe9, 0x83, 0xf4, 0x77, 0x0c, 0x0d, 0x86, 0x0d, 0x83, 0xc7, 0x48, 0x62, - 0x28, 0x19, 0x6b, 0x19, 0x7b, 0x19, 0xa7, 0x18, 0xb7, 0x19, 0x2f, 0x99, - 0x4c, 0xa6, 0x05, 0xd3, 0x97, 0x99, 0xc8, 0x54, 0x30, 0xd7, 0x32, 0x1b, - 0x99, 0x67, 0x98, 0x0f, 0x98, 0x6f, 0x55, 0x58, 0x2a, 0xf6, 0x2a, 0x7c, - 0x15, 0x91, 0xca, 0x12, 0x95, 0x3a, 0x95, 0x56, 0x95, 0x7e, 0x95, 0xe7, - 0xaa, 0x54, 0x55, 0x73, 0x55, 0x3f, 0xd5, 0x79, 0xaa, 0x0b, 0x54, 0xab, - 0x55, 0x0f, 0xab, 0x5e, 0x56, 0x7d, 0xa6, 0x46, 0x55, 0xb3, 0x50, 0xe3, - 0xa9, 0x09, 0xd4, 0x16, 0xab, 0xd5, 0xa9, 0x1d, 0x55, 0xbb, 0xa9, 0x36, - 0xae, 0xce, 0x52, 0x77, 0x52, 0x8f, 0x50, 0xcf, 0x51, 0x5f, 0xa3, 0xbe, - 0x5f, 0xfd, 0x82, 0xfa, 0x63, 0x0d, 0xb2, 0x86, 0x85, 0x46, 0xa0, 0x86, - 0x48, 0xa3, 0x54, 0x63, 0xb7, 0xc6, 0x19, 0x8d, 0x21, 0x16, 0xc6, 0x32, - 0x65, 0xf1, 0x58, 0x42, 0xd6, 0x72, 0x56, 0x03, 0xeb, 0x2c, 0x6b, 0x98, - 0x4d, 0x62, 0x5b, 0xb2, 0xf9, 0xec, 0x4c, 0x76, 0x05, 0xfb, 0x1b, 0x76, - 0x2f, 0x7b, 0x4c, 0x53, 0x43, 0x73, 0xaa, 0x66, 0xac, 0x66, 0x91, 0x66, - 0x9d, 0xe6, 0x71, 0xcd, 0x01, 0x0e, 0xc6, 0xb1, 0xe0, 0xf0, 0x39, 0xd9, - 0x9c, 0x4a, 0xce, 0x21, 0xce, 0x0d, 0xce, 0x7b, 0x2d, 0x03, 0x2d, 0x3f, - 0x2d, 0xb1, 0xd6, 0x6a, 0xad, 0x66, 0xad, 0x7e, 0xad, 0x37, 0xda, 0x7a, - 0xda, 0xbe, 0xda, 0x62, 0xed, 0x72, 0xed, 0x16, 0xed, 0xeb, 0xda, 0xef, - 0x75, 0x70, 0x9d, 0x40, 0x9d, 0x2c, 0x9d, 0xf5, 0x3a, 0x6d, 0x3a, 0xf7, - 0x75, 0x09, 0xba, 0x36, 0xba, 0x51, 0xba, 0x85, 0xba, 0xdb, 0x75, 0xcf, - 0xea, 0x3e, 0xd3, 0x63, 0xeb, 0x79, 0xe9, 0x09, 0xf5, 0xca, 0xf5, 0x0e, - 0xe9, 0xdd, 0xd1, 0x47, 0xf5,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, 0xcf, 0xca, 0x7e, 0x56, 0xff, 0x79, 0xeb, - 0x73, 0xab, 0xe7, 0xdf, 0xfd, 0xe2, 0xfb, 0x4b, 0xcf, 0x58, 0xfc, 0xd8, - 0xf0, 0x0b, 0xf9, 0x8b, 0xcf, 0xbf, 0xae, 0x79, 0xa9, 0xf3, 0x72, 0xef, - 0xab, 0xa9, 0xaf, 0x3a, 0xc7, 0x23, 0xc7, 0x1f, 0xbc, 0xce, 0x79, 0x3d, - 0xf1, 0xa6, 0xfc, 0xad, 0xce, 0xdb, 0x7d, 0xef, 0xb8, 0xef, 0xba, 0xdf, - 0xc7, 0xbd, 0x1f, 0x99, 0x28, 0xfc, 0x40, 0xfe, 0x50, 0xf3, 0xd1, 0xfa, - 0x63, 0xc7, 0xa7, 0xd0, 0x4f, 0xf7, 0x3e, 0xe7, 0x7c, 0xfe, 0xfc, 0x2f, - 0xf7, 0x84, 0xf3, 0xfb, 0x80, 0x39, 0x25, 0x11, 0x00, 0x00, 0x00, 0x06, - 0x62, 0x4b, 0x47, 0x44, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0xa0, 0xbd, - 0xa7, 0x93, 0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, - 0x0b, 0x13, 0x00, 0x00, 0x0b, 0x13, 0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, - 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, 0x45, 0x07, 0xdc, 0x02, 0x07, 0x10, - 0x2f, 0x1c, 0x54, 0x04, 0xda, 0x7f, 0x00, 0x00, 0x10, 0x67, 0x49, 0x44, - 0x41, 0x54, 0x78, 0xda, 0xed, 0x9b, 0x7b, 0x74, 0x15, 0x55, 0x96, 0xc6, - 0xbf, 0x53, 0x75, 0xef, 0xcd, 0xbd, 0x79, 0x12, 0xf2, 0x20, 0xa0, 0x04, - 0x3a, 0x22, 0x12, 0x12, 0xd3, 0xe1, 0x25, 0x32, 0x40, 0x62, 0xec, 0x81, - 0x0e, 0x68, 0x56, 0x8c, 0x01, 0x31, 0xe2, 0x20, 0x06, 0x06, 0x1c, 0x40, - 0xe3, 0x00, 0x01, 0x6d, 0x50, 0x0c, 0x59, 0x40, 0x1e, 0xca, 0x43, 0x02, - 0x33, 0xe1, 0xd1, 0x4d, 0xc0, 0x51, 0x5a, 0x43, 0x47, 0xda, 0x5e, 0x66, - 0xa1, 0x2d, 0x0b, 0x08, 0x2a, 0xd0, 0x4e, 0x46, 0x1e, 0x41, 0x60, 0x50, - 0x48, 0x20, 0x08, 0x81, 0x84, 0x57, 0x12, 0x92, 0x9b, 0x5b, 0xf5, 0xcd, - 0x1f, 0x9c, 0xd2, 0xe2, 0x7a, 0x11, 0xed, 0xf6, 0x8f, 0x11, 0xeb, 0xb7, - 0xd6, 0x5d, 0x21, 0xe1, 0xd4, 0xa9, 0xbd, 0xcf, 0xad, 0xfd, 0x9d, 0x7d, - 0xf6, 0x39, 0x05, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, - 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, - 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, - 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, - 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, - 0x58, 0x58, 0x58, 0x58, 0x58, 0x58, 0xfc, 0x7f, 0x43, 0xfc, 0xc4, 0x7d, - 0xa9, 0xf2, 0xa7, 0x2e, 0x3f, 0xf4, 0xd1, 0x4e, 0xf5, 0x6a, 0xa7, 0xc9, - 0x9f, 0xdf, 0x87, 0x0a, 0x40, 0x91, 0xfd, 0x69, 0x37, 0xe9, 0xd7, 0x6c, - 0x83, 0x22, 0x7f, 0xd7, 0x01, 0x78, 0x7e, 0x40, 0xdf, 0xaa, 0xa9, 0xbd, - 0xfe, 0x03, 0xec, 0x51, 0xe4, 0xe7, 0x56, 0xbe, 0x9a, 0xdb, 0x19, 0x50, - 0x7e, 0x7c, 0x5d, 0x23, 0xbc, 0xec, 0xd1, 0x6e, 0xe2, 0xaf, 0x30, 0xf5, - 0xed, 0x8b, 0x5b, 0xd9, 0x64, 0xfb, 0x11, 0xe3, 0x6f, 0xfe, 0xbe, 0x28, - 0xc7, 0x53, 0xb7, 0x42, 0xe7, 0xf6, 0x40, 0xfd, 0xa9, 0x82, 0xdf, 0x6e, - 0xb7, 0x07, 0xe8, 0xba, 0xde, 0x05, 0x40, 0x4f, 0x00, 0x54, 0x14, 0xa5, - 0x9d, 0xa4, 0x66, 0x7e, 0xf0, 0x14, 0x45, 0x09, 0x20, 0xd9, 0x19, 0x40, - 0x6f, 0x00, 0x7d, 0x01, 0x38, 0x65, 0x5b, 0x92, 0xf4, 0x19, 0xa8, 0x8a, - 0xa2, 0x38, 0x49, 0x86, 0x03, 0x88, 0x06, 0xa0, 0xda, 0xed, 0x76, 0x8f, - 0xae, 0xeb, 0x1d, 0x3e, 0xda, 0xf9, 0x91, 0x0c, 0x05, 0xd0, 0x15, 0x40, - 0x02, 0x80, 0x48, 0x00, 0x14, 0x42, 0x28, 0x37, 0x79, 0x68, 0x55, 0x21, - 0x44, 0x30, 0x00, 0xc3, 0x9e, 0xde, 0x00, 0xec, 0x00, 0x84, 0xa2, 0x28, - 0xba, 0x97, 0xed, 0xdf, 0x3a, 0x2a, 0x84, 0x1d, 0x40, 0xa8, 0xbc, 0x2e, - 0x1c, 0x80, 0x6e, 0xb7, 0xdb, 0x85, 0xb7, 0x4d, 0xaa, 0xaa, 0xfa, 0x91, - 0x0c, 0x94, 0x76, 0x74, 0x01, 0x10, 0x26, 0x3f, 0xc1, 0x00, 0xe8, 0xe7, - 0xe7, 0xa7, 0x6a, 0x9a, 0x66, 0xbe, 0xc6, 0x26, 0x84, 0x08, 0x01, 0x10, - 0x01, 0x60, 0x20, 0x80, 0xbb, 0x01, 0xe8, 0x0e, 0x87, 0x43, 0x68, 0x9a, - 0x66, 0x08, 0x01, 0x84, 0x10, 0x2a, 0x80, 0x40, 0x00, 0x9d, 0x00, 0x74, - 0x93, 0x36, 0x84, 0x99, 0x3e, 0x21, 0x00, 0x84, 0xd3, 0xe9, 0x54, 0x3c, - 0x1e, 0x8f, 0xc7, 0x24, 0x02, 0x8a, 0x10, 0x22, 0x50, 0xb6, 0xbf, 0x0b, - 0xc0, 0x3d, 0x72, 0xfc, 0x0d, 0x7f, 0xbd, 0xc7, 0x5f, 0x11, 0x42, 0x04, - 0xc9, 0xf6, 0x7d, 0x01, 0xc4, 0x1b, 0x62, 0xf6, 0x7d, 0xe3, 0x63, 0xf1, - 0xf3, 0xc2, 0xf6, 0x53, 0x09, 0x49, 0x47, 0x47, 0x47, 0xd0, 0x43, 0x0f, - 0x3d, 0xb4, 0x63, 0xe6, 0xcc, 0x99, 0x3d, 0x47, 0x8d, 0x1a, 0xb5, 0xd1, - 0xed, 0x76, 0xff, 0xeb, 0x8d, 0x71, 0x23, 0x02, 0x75, 0x5d, 0x8f, 0x4d, - 0x49, 0x49, 0x59, 0x9b, 0x9d, 0x9d, 0x7d, 0x6f, 0x97, 0x2e, 0x5d, 0x70, - 0xf2, 0xe4, 0x49, 0xcc, 0x9f, 0x3f, 0xff, 0xe3, 0x86, 0x86, 0x86, 0x09, - 0xaa, 0xaa, 0x9e, 0xd5, 0x34, 0xad, 0xd5, 0x6b, 0x26, 0xf4, 0xd3, 0x75, - 0x3d, 0x22, 0x2a, 0x2a, 0x6a, 0xf5, 0xda, 0xb5, 0x6b, 0x47, 0x95, 0x94, - 0x94, 0x7c, 0xb5, 0x6d, 0xdb, 0xb6, 0x01, 0x00, 0xae, 0x99, 0x67, 0x37, - 0x21, 0x84, 0x43, 0xd7, 0xf5, 0x30, 0x55, 0x55, 0xe7, 0x15, 0x14, 0x14, - 0x4c, 0x8b, 0x8d, 0x8d, 0x45, 0x73, 0x73, 0x33, 0x76, 0xef, 0xde, 0xdd, - 0x58, 0x52, 0x52, 0x92, 0xaf, 0x28, 0xca, 0x66, 0x5d, 0xd7, 0x9b, 0x00, - 0x18, 0x01, 0x27, 0x14, 0x45, 0x09, 0xd6, 0x75, 0xfd, 0x9f, 0x32, 0x33, - 0x33, 0x57, 0x67, 0x66, 0x66, 0x46, 0x87, 0x84, 0x84, 0xe0, 0xe4, 0xc9, - 0x93, 0x98, 0x39, 0x73, 0xe6, 0x5f, 0xdb, 0xdb, 0xdb, 0xa7, 0xda, 0x6c, - 0xb6, 0xb3, 0x1e, 0x8f, 0xa7, 0xd5, 0x3b, 0x28, 0x48, 0x86, 0x00, 0x18, - 0x53, 0x58, 0x58, 0xf8, 0x1f, 0xa1, 0xa1, 0xa1, 0xa8, 0xa8, 0xa8, 0x38, - 0x5d, 0x59, 0x59, 0x79, 0xaf, 0x97, 0x4d, 0x42, 0xd3, 0x34, 0x57, 0x42, - 0x42, 0xc2, 0xc6, 0x89, 0x13, 0x27, 0x3e, 0xe4, 0x76, 0xbb, 0x75, 0x21, - 0x04, 0xe5, 0x7d, 0x79, 0xe0, 0xc0, 0x01, 0x65, 0xd3, 0xa6, 0x4d, 0x3d, - 0xe4, 0x35, 0x1e, 0xe9, 0x6b, 0x28, 0xc9, 0x11, 0x39, 0x39, 0x39, 0x6b, - 0xd2, 0xd2, 0xd2, 0x02, 0xec, 0x76, 0x3b, 0xf6, 0xec, 0xd9, 0xc3, 0xb9, - 0x73, 0xe7, 0xbe, 0xa6, 0x28, 0xca, 0x52, 0x92, 0x17, 0x48, 0x76, 0x90, - 0x54, 0x01, 0xa4, 0xbc, 0xf2, 0xca, 0x2b, 0xef, 0xba, 0x5c, 0xae, 0x0e, - 0x92, 0xc2, 0x4b, 0x08, 0x59, 0x57, 0x57, 0x67, 0x2f, 0x29, 0x29, 0x49, - 0x04, 0x50, 0x23, 0x85, 0x4f, 0xb1, 0xd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0x87, - 0x86, 0x86, 0xbe, 0x19, 0x19, 0x19, 0xf9, 0x76, 0x64, 0x64, 0xe4, 0x96, - 0x88, 0x88, 0x88, 0xbf, 0x38, 0x1c, 0x8e, 0x4f, 0x66, 0xce, 0x9c, 0xa9, - 0x91, 0x64, 0x66, 0x66, 0xe6, 0x69, 0x99, 0xb6, 0x1b, 0x19, 0x5e, 0x00, - 0x80, 0xf9, 0xcd, 0xcd, 0xcd, 0x6c, 0x6b, 0x6b, 0x23, 0x80, 0xdd, 0x00, - 0xe6, 0x24, 0x26, 0x26, 0xd6, 0x92, 0x64, 0x79, 0x79, 0x39, 0x01, 0xdc, - 0x6f, 0xf2, 0xb7, 0xb3, 0xcd, 0x66, 0x5b, 0x4b, 0x92, 0x4d, 0x4d, 0x4d, - 0x04, 0x50, 0x05, 0x60, 0x56, 0xdf, 0xbe, 0x7d, 0x4f, 0x93, 0xe4, 0xdb, - 0x6f, 0xbf, 0x4d, 0x00, 0x0f, 0x08, 0x21, 0x5c, 0xd6, 0xe3, 0x6f, 0xe1, - 0x07, 0x20, 0x3e, 0x3f, 0x3f, 0xdf, 0x2d, 0x1f, 0xf6, 0x65, 0x72, 0x1d, - 0x6b, 0x4e, 0x4d, 0x23, 0xfc, 0xfd, 0xfd, 0x37, 0x91, 0xe4, 0x9e, 0x3d, - 0x7b, 0x08, 0x60, 0xaa, 0x5c, 0x53, 0xae, 0xd2, 0x34, 0x8d, 0x8d, 0x8d, - 0x8d, 0x04, 0x30, 0xdf, 0x34, 0xcb, 0xb9, 0x62, 0x62, 0x62, 0x36, 0x94, - 0x94, 0x94, 0xe8, 0x4b, 0x96, 0x2c, 0xe9, 0xf8, 0xe4, 0x93, 0x4f, 0x34, - 0x93, 0x00, 0xc4, 0x78, 0x09, 0x80, 0x0d, 0xc0, 0x3d, 0x1b, 0x36, 0x6c, - 0x20, 0x49, 0x46, 0x45, 0x45, 0xbd, 0x0b, 0x20, 0x16, 0xc0, 0xb0, 0x29, - 0x53, 0xa6, 0x34, 0x90, 0xe4, 0x8a, 0x15, 0x2b, 0x28, 0x83, 0xd4, 0x08, - 0x08, 0x67, 0x44, 0x44, 0xc4, 0xc6, 0xb2, 0xb2, 0x32, 0x66, 0x65, 0x65, - 0x11, 0xc0, 0xbd, 0x00, 0x1e, 0x08, 0x0f, 0x0f, 0xdf, 0x4e, 0x92, 0xdb, - 0xb6, 0x6d, 0x23, 0x80, 0xdf, 0x78, 0x09, 0x40, 0x27, 0x00, 0x99, 0x95, - 0x95, 0x95, 0x5c, 0xb3, 0x66, 0x8d, 0x67, 0xf2, 0xe4, 0xc9, 0x17, 0x49, - 0x72, 0xf6, 0xec, 0xd9, 0xbe, 0x04, 0xc0, 0x09, 0x20, 0x65, 0xf3, 0xe6, - 0xcd, 0x3c, 0x70, 0xe0, 0x00, 0x01, 0x14, 0x03, 0x78, 0x06, 0x40, 0xba, - 0xbc, 0x57, 0x94, 0x49, 0xec, 0x1c, 0x00, 0xee, 0x5d, 0xb9, 0x72, 0x25, - 0x49, 0x32, 0x21, 0x21, 0xa1, 0x1a, 0xc0, 0x63, 0x00, 0xc6, 0x02, 0x98, - 0x02, 0x60, 0x06, 0x80, 0x24, 0xbb, 0xdd, 0xee, 0x6f, 0xac, 0xa5, 0x64, - 0xff, 0x21, 0xb2, 0xb6, 0x10, 0x0d, 0x60, 0x48, 0x42, 0x42, 0xc2, 0x21, - 0x92, 0x5c, 0xbe, 0x7c, 0x39, 0x01, 0xa4, 0xaa, 0xaa, 0x1a, 0x62, 0xfa, - 0x0e, 0x02, 0x00, 0x2c, 0x32, 0x8d, 0xff, 0x7c, 0x99, 0xa5, 0x55, 0x90, - 0x64, 0x65, 0x65, 0x25, 0x01, 0x3c, 0x68, 0xf2, 0x37, 0x2a, 0x23, 0x23, - 0xa3, 0x9a, 0x24, 0x57, 0xad, 0x5a, 0x45, 0x00, 0x23, 0x00, 0xf4, 0x01, - 0x30, 0xf7, 0xc8, 0x91, 0x23, 0x74, 0xbb, 0xdd, 0x04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0x85, - 0xfa, 0xd2, 0xd2, 0x52, 0xbd, 0xbc, 0xbc, 0x9c, 0x05, 0x05, 0x05, 0xed, - 0x32, 0x9b, 0xe9, 0x61, 0x12, 0x0c, 0xef, 0xec, 0x2b, 0x02, 0x40, 0xde, - 0xa9, 0x53, 0xa7, 0x78, 0xf6, 0xec, 0x59, 0x02, 0x28, 0x34, 0xa7, 0xf3, - 0xa6, 0x25, 0xcf, 0x83, 0xcb, 0x97, 0x2f, 0x27, 0x49, 0x26, 0x27, 0x27, - 0x37, 0x01, 0x78, 0x7f, 0xe9, 0xd2, 0xa5, 0x6e, 0x92, 0x4c, 0x4b, 0x4b, - 0xab, 0x97, 0xe3, 0x63, 0x08, 0x64, 0xd7, 0x09, 0x13, 0x26, 0xd4, 0x90, - 0xe4, 0xeb, 0xaf, 0xbf, 0x4e, 0x00, 0xa9, 0x32, 0xa3, 0xf8, 0xdd, 0xb1, - 0x63, 0xc7, 0x48, 0x92, 0x01, 0x01, 0x01, 0x6f, 0xc8, 0x7b, 0x5b, 0xfc, - 0xc2, 0x77, 0x11, 0x7a, 0x0c, 0x19, 0x32, 0x64, 0x2f, 0x49, 0xf6, 0xeb, - 0xd7, 0x6f, 0xb7, 0x51, 0xad, 0xf7, 0x5a, 0xa3, 0xdf, 0x39, 0x66, 0xcc, - 0x98, 0xfd, 0x24, 0x59, 0x5a, 0x5a, 0x4a, 0x00, 0x83, 0x64, 0x0a, 0x9c, - 0x7d, 0xe8, 0xd0, 0x21, 0x63, 0x59, 0xb0, 0x41, 0x8a, 0x82, 0xf9, 0xe1, - 0xf6, 0x07, 0xd0, 0x6f, 0xd9, 0xb2, 0x65, 0xdf, 0x27, 0x00, 0x42, 0x55, - 0x55, 0x9b, 0x4c, 0x91, 0x43, 0x64, 0xf0, 0x27, 0x0d, 0x1d, 0x3a, 0xb4, - 0x96, 0x24, 0x75, 0x5d, 0x67, 0x58, 0x58, 0xd8, 0x66, 0x1f, 0x59, 0x89, - 0x22, 0x67, 0xb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, 0x96, 0x16, 0x00, 0x68, - 0xf3, 0x21, 0x8e, 0x43, 0xc7, 0x8d, 0x1b, 0x17, 0x00, 0x00, 0xeb, 0xd7, - 0xaf, 0xff, 0x10, 0xc0, 0x15, 0x1f, 0x63, 0x28, 0x00, 0x28, 0xbd, 0x7a, - 0xf5, 0xea, 0x02, 0x00, 0x17, 0x2e, 0x5c, 0x00, 0x80, 0x5a, 0xd9, 0xf6, - 0x84, 0xe1, 0xaf, 0xd3, 0xe9, 0x0c, 0x34, 0xed, 0x4a, 0x88, 0xf0, 0xf0, - 0xf0, 0x5e, 0x00, 0xe2, 0xb6, 0x6f, 0xdf, 0xfe, 0xd1, 0xd4, 0xa9, 0x53, - 0x47, 0x4f, 0x9b, 0x36, 0xed, 0x61, 0xb7, 0xdb, 0xbd, 0xaf, 0x5f, 0xbf, - 0x7e, 0xa8, 0xad, 0xad, 0x05, 0xc9, 0x83, 0x00, 0xda, 0xad, 0x10, 0xba, - 0xfd, 0x08, 0xcf, 0xce, 0xce, 0x3e, 0x40, 0x92, 0x1f, 0x7c, 0xf0, 0x81, - 0xf7, 0xf6, 0x90, 0x99, 0x20, 0x00, 0xe3, 0x77, 0xed, 0xda, 0x65, 0xb4, - 0x7b, 0x54, 0x06, 0xa2, 0x2f, 0x02, 0x00, 0xfc, 0x8b, 0xb1, 0x97, 0x1c, - 0x13, 0x13, 0x53, 0x0b, 0x60, 0x65, 0x46, 0x46, 0xc6, 0x45, 0xd3, 0xb2, - 0x60, 0x90, 0x8f, 0xd9, 0xcb, 0x01, 0x20, 0xde, 0x94, 0x01, 0x9c, 0xc2, - 0x77, 0xb7, 0x01, 0x6d, 0x00, 0xa2, 0x8d, 0x8a, 0x7f, 0x75, 0x75, 0x35, - 0x13, 0x13, 0x13, 0xcf, 0xa4, 0xa6, 0xa6, 0xd6, 0x8c, 0x1e, 0x3d, 0xfa, - 0x7f, 0xd2, 0xd2, 0xd2, 0xf6, 0x25, 0x24, 0x24, 0x6c, 0x97, 0xa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 0x2e, 0x45, 0xdc, 0x61, 0x85, 0xcb, 0xed, 0x47, 0xa7, 0x94, 0x94, - 0x94, 0x9a, 0xba, 0xba, 0x3a, 0x16, 0x17, 0x17, 0x53, 0xa6, 0xc6, 0x76, - 0x1f, 0xed, 0x22, 0x23, 0x23, 0x23, 0xff, 0x48, 0x92, 0x59, 0x59, 0x59, - 0x5f, 0x99, 0xab, 0xe6, 0x37, 0xc9, 0x16, 0xba, 0x0f, 0x1b, 0x36, 0xac, - 0xc6, 0x58, 0x53, 0x9e, 0x3a, 0x75, 0x8a, 0x24, 0xd9, 0xdc, 0xdc, 0x4c, - 0x97, 0xcb, 0x65, 0xac, 0x27, 0x7d, 0xa5, 0xf6, 0xbd, 0x4a, 0x4a, 0x4a, - 0x48, 0x92, 0x39, 0x39, 0x39, 0xa7, 0x64, 0xe6, 0xa0, 0x78, 0xb5, 0x19, - 0x66, 0xac, 0x6f, 0x7d, 0x51, 0x56, 0x56, 0x46, 0x5c, 0x3f, 0x07, 0x60, - 0x37, 0x09, 0xd2, 0x08, 0xa3, 0xea, 0x6f, 0x5e, 0xe3, 0x92, 0x64, 0x7c, - 0x7c, 0xfc, 0xdf, 0x64, 0xc0, 0xd9, 0xe4, 0x24, 0x6c, 0x14, 0x19, 0x8d, - 0x23, 0xb8, 0x7d, 0xe6, 0xcd, 0x9b, 0xd7, 0x28, 0x53, 0xef, 0xf3, 0x00, - 0x62, 0x64, 0xad, 0xc0, 0x2c, 0x78, 0xbf, 0x2d, 0x2e, 0x2e, 0xa6, 0xb7, - 0xbf, 0x9a, 0xa6, 0x11, 0xc0, 0x9f, 0xbd, 0x2a, 0xf5, 0x41, 0x00, 0x1e, - 0x5d, 0xbd, 0x7a, 0x35, 0x8d, 0xc2, 0x9b, 0x71, 0xd0, 0xe7, 0x9d, 0x77, - 0xde, 0x21, 0x80, 0xa7, 0xe4, 0xb1, 0x65, 0x33, 0x61, 0x29, 0x29, 0x29, - 0x7f, 0x35, 0x1d, 0x76, 0x4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x9f, 0x6f, 0x1d, 0xaa, 0xaa, 0xea, 0xd0, 0x34, - 0xcd, 0x4f, 0xfa, 0xe0, 0xf6, 0x61, 0x93, 0x51, 0x5f, 0x09, 0x90, 0x7d, - 0x1b, 0xfd, 0xb7, 0x00, 0xb8, 0xaa, 0x28, 0x4a, 0xb3, 0x0f, 0x7f, 0x6d, - 0xa6, 0xf6, 0xc6, 0x52, 0xaa, 0x05, 0xc0, 0x55, 0x21, 0x44, 0xb3, 0xf7, - 0xcb, 0x3a, 0x42, 0x08, 0x3b, 0x49, 0xa7, 0x1c, 0x97, 0x0e, 0xe9, 0x5f, - 0x1b, 0x6e, 0xfe, 0xa6, 0xa4, 0x51, 0xdc, 0x35, 0xec, 0x51, 0x65, 0x5d, - 0xe1, 0x8a, 0xb4, 0xc7, 0xfb, 0x5a, 0x55, 0x08, 0xe1, 0x22, 0x19, 0x2c, - 0x0b, 0xc2, 0xfe, 0x00, 0x1a, 0x4c, 0xf6, 0x58, 0xc1, 0x7f, 0x9b, 0x0a, - 0xc0, 0x8f, 0x29, 0x20, 0x1a, 0xfb, 0xe4, 0xbe, 0x44, 0xe2, 0xfb, 0xee, - 0xf9, 0x43, 0x5e, 0x1b, 0xf6, 0xbe, 0x86, 0xff, 0x80, 0x2f, 0xbc, 0x85, - 0x1f, 0xca, 0x8f, 0xb4, 0xe7, 0xc7, 0x8e, 0xd3, 0x8f, 0xe9, 0x5f, 0xc1, - 0x8d, 0xaf, 0x03, 0xeb, 0x3f, 0xc1, 0xd8, 0xdc, 0xac, 0xff, 0x5b, 0xbd, - 0x5e, 0xfd, 0xf7, 0xb4, 0xb7, 0xf8, 0x19, 0xf1, 0x7f, 0x2c, 0x2e, 0x06, - 0x08, 0x9c, 0x01, 0xc9, 0x62, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, - 0x44, 0xae, 0x42, 0x60, 0x82 -}; - -unsigned int cc_fps_images_len(void) -{ - return sizeof(cc_fps_images_png); -} diff --git a/cappuccino-sdk/incl/cocos2dx/ccFPSImages.h b/cappuccino-sdk/incl/cocos2dx/ccFPSImages.h deleted file mode 100644 index 20807f8..0000000 --- a/cappuccino-sdk/incl/cocos2dx/ccFPSImages.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2012 Zynga Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -#ifdef __cplusplus -extern "C" { -#endif - -extern unsigned char cc_fps_images_png[]; -unsigned int cc_fps_images_len(void); - -#ifdef __cplusplus -} -#endif diff --git a/cappuccino-sdk/incl/cocos2dx/cocoa/CCAffineTransform.h b/cappuccino-sdk/incl/cocos2dx/cocoa/CCAffineTransform.h deleted file mode 100644 index 6bc8b35..0000000 --- a/cappuccino-sdk/incl/cocos2dx/cocoa/CCAffineTransform.h +++ /dev/null @@ -1,61 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __COCOA_CGAFFINETRANSFORM_H__ -#define __COCOA_CGAFFINETRANSFORM_H__ - -#include "CCGeometry.h" -#include "platform/CCPlatformMacros.h" - -NS_CC_BEGIN - -struct CCAffineTransform { - float a, b, c, d; - float tx, ty; -}; - -CC_DLL CCAffineTransform __CCAffineTransformMake(float a, float b, float c, float d, float tx, float ty); -#define CCAffineTransformMake __CCAffineTransformMake - -CC_DLL CCPoint __CCPointApplyAffineTransform(const CCPoint& point, const CCAffineTransform& t); -#define CCPointApplyAffineTransform __CCPointApplyAffineTransform - -CC_DLL CCSize __CCSizeApplyAffineTransform(const CCSize& size, const CCAffineTransform& t); -#define CCSizeApplyAffineTransform __CCSizeApplyAffineTransform - -CC_DLL CCAffineTransform CCAffineTransformMakeIdentity(); -CC_DLL CCRect CCRectApplyAffineTransform(const CCRect& rect, const CCAffineTransform& anAffineTransform); - -CC_DLL CCAffineTransform CCAffineTransformTranslate(const CCAffineTransform& t, float tx, float ty); -CC_DLL CCAffineTransform CCAffineTransformRotate(const CCAffineTransform& aTransform, float anAngle); -CC_DLL CCAffineTransform CCAffineTransformScale(const CCAffineTransform& t, float sx, float sy); -CC_DLL CCAffineTransform CCAffineTransformConcat(const CCAffineTransform& t1, const CCAffineTransform& t2); -CC_DLL bool CCAffineTransformEqualToTransform(const CCAffineTransform& t1, const CCAffineTransform& t2); -CC_DLL CCAffineTransform CCAffineTransformInvert(const CCAffineTransform& t); - -extern CC_DLL const CCAffineTransform CCAffineTransformIdentity; - -NS_CC_END - -#endif // __COCOA_CGAFFINETRANSFORM_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/cocoa/CCArray.h b/cappuccino-sdk/incl/cocos2dx/cocoa/CCArray.h deleted file mode 100644 index a09c199..0000000 --- a/cappuccino-sdk/incl/cocos2dx/cocoa/CCArray.h +++ /dev/null @@ -1,254 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 ForzeField Studios S.L. http://forzefield.com -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCARRAY_H__ -#define __CCARRAY_H__ - -#include "support/data_support/ccCArray.h" - -/** - * @addtogroup data_structures - * @{ - */ - -/** @def CCARRAY_FOREACH -A convenience macro to iterate over a CCArray using. It is faster than the "fast enumeration" interface. -@since v0.99.4 -*/ - -/* -In cocos2d-iphone 1.0.0, This macro have been update to like this: - -#define CCARRAY_FOREACH(__array__, __object__) \ -if (__array__ && __array__->data->num > 0) \ -for(id *__arr__ = __array__->data->arr, *end = __array__->data->arr + __array__->data->num-1; \ -__arr__ <= end && ((__object__ = *__arr__) != nil || true); \ -__arr__++) - -I found that it's not work in C++. So it keep what it's look like in version 1.0.0-rc3. ---By Bin -*/ -#define CCARRAY_FOREACH(__array__, __object__) \ - if ((__array__) && (__array__)->data->num > 0) \ - for(CCObject** __arr__ = (__array__)->data->arr, **__end__ = (__array__)->data->arr + (__array__)->data->num-1; \ - __arr__ <= __end__ && (((__object__) = *__arr__) != NULL/* || true*/); \ - __arr__++) - -#define CCARRAY_FOREACH_REVERSE(__array__, __object__) \ - if ((__array__) && (__array__)->data->num > 0) \ - for(CCObject** __arr__ = (__array__)->data->arr + (__array__)->data->num-1, **__end__ = (__array__)->data->arr; \ - __arr__ >= __end__ && (((__object__) = *__arr__) != NULL/* || true*/); \ - __arr__--) - -#if defined(COCOS2D_DEBUG) && (COCOS2D_DEBUG > 0) -#define CCARRAY_VERIFY_TYPE(__array__, __type__) \ - do { \ - if ((__array__) && (__array__)->data->num > 0) \ - for(CCObject** __arr__ = (__array__)->data->arr, \ - **__end__ = (__array__)->data->arr + (__array__)->data->num-1; __arr__ <= __end__; __arr__++) \ - CCAssert(dynamic_cast<__type__>(*__arr__), "element type is wrong!"); \ - } while(false) -#else -#define CCARRAY_VERIFY_TYPE(__array__, __type__) void(0) -#endif - -#define arrayMakeObjectsPerformSelector(pArray, func, elementType) \ -do { \ - if(pArray && pArray->count() > 0) \ - { \ - CCObject* child; \ - CCARRAY_FOREACH(pArray, child) \ - { \ - elementType pNode = (elementType) child; \ - if(pNode) \ - { \ - pNode->func(); \ - } \ - } \ - } \ -} \ -while(false) - -#define arrayMakeObjectsPerformSelectorWithObject(pArray, func, pObject, elementType) \ -do { \ - if(pArray && pArray->count() > 0) \ - { \ - CCObject* child = NULL; \ - CCARRAY_FOREACH(pArray, child) \ - { \ - elementType pNode = (elementType) child; \ - if(pNode) \ - { \ - pNode->func(pObject); \ - } \ - } \ - } \ -} \ -while(false) - - -NS_CC_BEGIN -/** - * @js NA - */ -class CC_DLL CCArray : public CCObject -{ -public: - /** - * @lua NA - */ - ~CCArray(); - - /** Create an array */ - static CCArray* create(); - /** Create an array with some objects - * @lua NA - */ - static CCArray* create(CCObject* pObject, ...); - /** Create an array with one object */ - static CCArray* createWithObject(CCObject* pObject); - /** Create an array with capacity */ - static CCArray* createWithCapacity(unsigned int capacity); - /** Create an array with an existing array */ - static CCArray* createWithArray(CCArray* otherArray); - /** - @brief Generate a CCArray pointer by file - @param pFileName The file name of *.plist file - @return The CCArray pointer generated from the file - */ - static CCArray* createWithContentsOfFile(const char* pFileName); - - /* - @brief The same meaning as arrayWithContentsOfFile(), but it doesn't call autorelease, so the - invoker should call release(). - @lua NA - */ - static CCArray* createWithContentsOfFileThreadSafe(const char* pFileName); - - /** Initializes an array - * @lua NA - */ - bool init(); - /** Initializes an array with one object - * @lua NA - */ - bool initWithObject(CCObject* pObject); - /** Initializes an array with some objects - * @lua NA - */ - bool initWithObjects(CCObject* pObject, ...); - /** Initializes an array with capacity - * @lua NA - */ - bool initWithCapacity(unsigned int capacity); - /** Initializes an array with an existing array - * @lua NA - */ - bool initWithArray(CCArray* otherArray); - - // Querying an Array - - /** Returns element count of the array */ - unsigned int count() const; - /** Returns capacity of the array */ - unsigned int capacity() const; - /** Returns index of a certain object, return UINT_MAX if doesn't contain the object */ - unsigned int indexOfObject(CCObject* object) const; - /** Returns an element with a certain index */ - CCObject* objectAtIndex(unsigned int index); - /** Returns last element */ - CCObject* lastObject(); - /** Returns a random element */ - CCObject* randomObject(); - /** Returns a Boolean value that indicates whether object is present in array. */ - bool containsObject(CCObject* object) const; - /** @since 1.1 */ - bool isEqualToArray(CCArray* pOtherArray); - // Adding Objects - - /** Add a certain object */ - void addObject(CCObject* object); - /** Add all elements of an existing array */ - void addObjectsFromArray(CCArray* otherArray); - /** Insert a certain object at a certain index */ - void insertObject(CCObject* object, unsigned int index); - - // Removing Objects - - /** Remove last object */ - void removeLastObject(bool bReleaseObj = true); - /** Remove a certain object */ - void removeObject(CCObject* object, bool bReleaseObj = true); - /** Remove an element with a certain index */ - void removeObjectAtIndex(unsigned int index, bool bReleaseObj = true); - /** Remove all elements */ - void removeObjectsInArray(CCArray* otherArray); - /** Remove all objects */ - void removeAllObjects(); - /** Fast way to remove a certain object */ - void fastRemoveObject(CCObject* object); - /** Fast way to remove an element with a certain index */ - void fastRemoveObjectAtIndex(unsigned int index); - - // Rearranging Content - - /** Swap two elements */ - void exchangeObject(CCObject* object1, CCObject* object2); - /** Swap two elements with certain indexes */ - void exchangeObjectAtIndex(unsigned int index1, unsigned int index2); - - /** Replace object at index with another object. */ - void replaceObjectAtIndex(unsigned int uIndex, CCObject* pObject, bool bReleaseObject = true); - - /** Revers the array */ - void reverseObjects(); - /* Shrinks the array so the memory footprint corresponds with the number of items */ - void reduceMemoryFootprint(); - - /** override functions - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - - /* override functions */ - virtual void acceptVisitor(CCDataVisitor &visitor); - -public: - ccArray* data; - /** - * @lua NA - */ - CCArray(); - /** - * @lua NA - */ - CCArray(unsigned int capacity); -}; - -// end of data_structure group -/// @} - -NS_CC_END - -#endif // __CCARRAY_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/cocoa/CCAutoreleasePool.h b/cappuccino-sdk/incl/cocos2dx/cocoa/CCAutoreleasePool.h deleted file mode 100644 index 5c83686..0000000 --- a/cappuccino-sdk/incl/cocos2dx/cocoa/CCAutoreleasePool.h +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __AUTORELEASEPOOL_H__ -#define __AUTORELEASEPOOL_H__ - -#include "CCObject.h" -#include "CCArray.h" - -NS_CC_BEGIN - -/** - * @addtogroup base_nodes - * @{ - * @js NA - * @lua NA - */ - -class CC_DLL CCAutoreleasePool : public CCObject -{ - CCArray* m_pManagedObjectArray; -public: - CCAutoreleasePool(void); - ~CCAutoreleasePool(void); - - void addObject(CCObject *pObject); - void removeObject(CCObject *pObject); - - void clear(); -}; - -/** - * @js NA - * @lua NA - */ -class CC_DLL CCPoolManager -{ - CCArray* m_pReleasePoolStack; - CCAutoreleasePool* m_pCurReleasePool; - - CCAutoreleasePool* getCurReleasePool(); -public: - CCPoolManager(); - ~CCPoolManager(); - void finalize(); - void push(); - void pop(); - - void removeObject(CCObject* pObject); - void addObject(CCObject* pObject); - - static CCPoolManager* sharedPoolManager(); - static void purgePoolManager(); - - friend class CCAutoreleasePool; -}; - -// end of base_nodes group -/// @} - -NS_CC_END - -#endif //__AUTORELEASEPOOL_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/cocoa/CCBool.h b/cappuccino-sdk/incl/cocos2dx/cocoa/CCBool.h deleted file mode 100644 index 51e5b79..0000000 --- a/cappuccino-sdk/incl/cocos2dx/cocoa/CCBool.h +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCBOOL_H__ -#define __CCBOOL_H__ - -#include "CCObject.h" - -NS_CC_BEGIN - -/** - * @addtogroup data_structures - * @{ - * @js NA - * @lua NA - */ - -class CC_DLL CCBool : public CCObject -{ -public: - CCBool(bool v) - : m_bValue(v) {} - bool getValue() const {return m_bValue;} - - static CCBool* create(bool v) - { - CCBool* pRet = new CCBool(v); - if (pRet) - { - pRet->autorelease(); - } - return pRet; - } - - /* override functions */ - virtual void acceptVisitor(CCDataVisitor &visitor) { visitor.visit(this); } - -private: - bool m_bValue; -}; - -// end of data_structure group -/// @} - -NS_CC_END - -#endif /* __CCBOOL_H__ */ diff --git a/cappuccino-sdk/incl/cocos2dx/cocoa/CCDataVisitor.h b/cappuccino-sdk/incl/cocos2dx/cocoa/CCDataVisitor.h deleted file mode 100644 index 28f01c9..0000000 --- a/cappuccino-sdk/incl/cocos2dx/cocoa/CCDataVisitor.h +++ /dev/null @@ -1,115 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCDATAVISITOR_H__ -#define __CCDATAVISITOR_H__ - -#include "platform/CCPlatformMacros.h" -#include - -NS_CC_BEGIN - -class CCObject; -class CCBool; -class CCInteger; -class CCFloat; -class CCDouble; -class CCString; -class CCArray; -class CCDictionary; -class CCSet; - -/** - * @addtogroup data_structures - * @{ - */ - -/** - * Visitor that helps to perform action that depends on polymorphic object type - * - * Use cases: - * - data serialization, - * - pretty printing of \a CCObject * - * - safe value reading from \a CCArray, \a CCDictionary, \a CCSet - * - * Usage: - * 1. subclass CCDataVisitor - * 2. overload visit() methods for object that you need to handle - * 3. handle other objects in \a visitObject() - * 4. pass your visitor to \a CCObject::acceptVisitor() - * @js NA - * @lua NA - */ -class CC_DLL CCDataVisitor -{ -public: - virtual ~CCDataVisitor() {} - - /** default method, called from non-overloaded methods and for unrecognized objects */ - virtual void visitObject(const CCObject *p) = 0; - - virtual void visit(const CCBool *p); - virtual void visit(const CCInteger *p); - virtual void visit(const CCFloat *p); - virtual void visit(const CCDouble *p); - virtual void visit(const CCString *p); - virtual void visit(const CCArray *p); - virtual void visit(const CCDictionary *p); - virtual void visit(const CCSet *p); -}; - -/** - * @js NA - * @lua NA - */ -class CC_DLL CCPrettyPrinter : public CCDataVisitor -{ -public: - CCPrettyPrinter(int indentLevel = 0); - - virtual void clear(); - virtual std::string getResult(); - - virtual void visitObject(const CCObject *p); - virtual void visit(const CCBool * p); - virtual void visit(const CCInteger *p); - virtual void visit(const CCFloat *p); - virtual void visit(const CCDouble *p); - virtual void visit(const CCString *p); - virtual void visit(const CCArray *p); - virtual void visit(const CCDictionary *p); - virtual void visit(const CCSet *p); -private: - void setIndentLevel(int indentLevel); - int _indentLevel; - std::string _indentStr; - std::string _result; -}; - -// end of data_structure group -/// @} - -NS_CC_END - -#endif // __CCDATAVISITOR_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/cocoa/CCDictionary.h b/cappuccino-sdk/incl/cocos2dx/cocoa/CCDictionary.h deleted file mode 100644 index c86ae64..0000000 --- a/cappuccino-sdk/incl/cocos2dx/cocoa/CCDictionary.h +++ /dev/null @@ -1,436 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012 - 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCDICTIONARY_H__ -#define __CCDICTIONARY_H__ - -#include "support/data_support/uthash.h" -#include "CCObject.h" -#include "CCArray.h" -#include "CCString.h" - -NS_CC_BEGIN - -class CCDictionary; - -/** - * @addtogroup data_structures - * @{ - */ - - -/** - * CCDictElement is used for traversing CCDictionary. - * - * A CCDictElement is one element of CCDictionary, it contains two properties, key and object. - * Its key has two different type (integer and string). - * - * @note The key type is unique, all the elements in CCDictionary has the same key type(integer or string). - * @code - * CCDictElement* pElement; - * CCDICT_FOREACH(dict, pElement) - * { - * const char*key = pElement->getStrKey(); - * // You certainly know the type of value, so we assume that it's a CCSprite. - * CCSprite* pSprite = (CCSprite*)pElement->getObject(); - * // ...... - * } - * @endcode - * @js NA - * @lua NA - */ -class CC_DLL CCDictElement -{ -private: - /** - * Constructor of CCDictElement. It's only for internal usage. CCDictionary is its friend class. - * - * @param pszKey The string key of this element. - * @param pObject The object of this element. - */ - CCDictElement(const char* pszKey, CCObject* pObject); - - /** - * Constructor of CCDictElement. It's only for internal usage. CCDictionary is its friend class. - * - * @param iKey The integer key of this element. - * @param pObject The object of this element. - */ - CCDictElement(intptr_t iKey, CCObject* pObject); - -public: - /** - * The destructor of CCDictElement. - */ - ~CCDictElement(); - - // Inline functions need to be implemented in header file on Android. - - /** - * Get the string key of this element. - * @note This method assumes you know the key type in the element. - * If the element's key type is integer, invoking this method will cause an assert. - * - * @return The string key of this element. - */ - inline const char* getStrKey() const - { - CCAssert(m_szKey[0] != '\0', "Should not call this function for integer dictionary"); - return m_szKey; - } - - /** - * Get the integer key of this element. - * @note This method assumes you know the key type in the element. - * If the element's key type is string, invoking this method will cause an assert. - * - * @return The integer key of this element. - */ - inline intptr_t getIntKey() const - { - CCAssert(m_szKey[0] == '\0', "Should not call this function for string dictionary"); - return m_iKey; - } - - /** - * Get the object of this element. - * - * @return The object of this element. - */ - inline CCObject* getObject() const { return m_pObject; } - -private: - // The max length of string key. - #define MAX_KEY_LEN 256 - // char array is needed for HASH_ADD_STR in UT_HASH. - // So it's a pain that all elements will allocate 256 bytes for this array. - char m_szKey[MAX_KEY_LEN]; // hash key of string type - intptr_t m_iKey; // hash key of integer type - CCObject* m_pObject; // hash value -public: - UT_hash_handle hh; // makes this class hashable - friend class CCDictionary; // declare CCDictionary as friend class -}; - -/** The macro for traversing dictionary - * - * @note It's faster than getting all keys and traversing keys to get objects by objectForKey. - * It's also safe to remove elements while traversing. - */ -#define CCDICT_FOREACH(__dict__, __el__) \ - CCDictElement* pTmp##__dict__##__el__ = NULL; \ - if (__dict__) \ - HASH_ITER(hh, (__dict__)->m_pElements, __el__, pTmp##__dict__##__el__) - - - -/** - * CCDictionary is a class like NSDictionary in Obj-C . - * - * @note Only the pointer of CCObject or its subclass can be inserted to CCDictionary. - * @code - * // Create a dictionary, return an autorelease object. - * CCDictionary* pDict = CCDictionary::create(); - * - * // Insert objects to dictionary - * CCString* pValue1 = CCString::create("100"); - * CCString* pValue2 = CCString::create("120"); - * CCInteger* pValue3 = CCInteger::create(200); - * pDict->setObject(pValue1, "key1"); - * pDict->setObject(pValue2, "key2"); - * pDict->setObject(pValue3, "key3"); - * - * // Get the object for key - * CCString* pStr1 = (CCString*)pDict->objectForKey("key1"); - * CCLog("{ key1: %s }", pStr1->getCString()); - * CCInteger* pInteger = (CCInteger*)pDict->objectForKey("key3"); - * CCLog("{ key3: %d }", pInteger->getValue()); - * @endcode - * @js NA - * - */ - -class CC_DLL CCDictionary : public CCObject -{ -public: - /** - * The constructor of CCDictionary. - * @lua NA - */ - CCDictionary(); - - /** - * The destructor of CCDictionary - * @lua NA - */ - ~CCDictionary(); - - /** - * Get the count of elements in CCDictionary. - * - * @return The count of elements. - */ - unsigned int count(); - - /** - * Return all keys of elements. - * - * @return The array contains all keys of elements. It's an autorelease object yet. - */ - CCArray* allKeys(); - - /** - * Get all keys according to the specified object. - * @warning We use '==' to compare two objects - * @return The array contains all keys for the specified object. It's an autorelease object yet. - */ - CCArray* allKeysForObject(CCObject* object); - - /** - * Get the object according to the specified string key. - * - * @note The dictionary needs to use string as key. If integer is passed, an assert will appear. - * @param key The string key for searching. - * @return The object matches the key. You need to force convert it to the type you know. - * @code - * // Assume that the elements are CCString* pointers. Convert it by following code. - * CCString* pStr = (CCString*)pDict->objectForKey("key1"); - * // Do something about pStr. - * // If you don't know the object type, properly you need to use dynamic_cast to check it. - * CCString* pStr2 = dynamic_cast(pDict->objectForKey("key1")); - * if (pStr2 != NULL) { - * // Do something about pStr2 - * } - * @endcode - * @see objectForKey(intptr_t) - */ - CCObject* objectForKey(const std::string& key); - - /** - * Get the object according to the specified integer key. - * - * @note The dictionary needs to use integer as key. If string is passed, an assert will appear. - * @param key The integer key for searching. - * @return The object matches the key. - * @see objectForKey(const std::string&) - */ - CCObject* objectForKey(intptr_t key); - - /** Get the value according to the specified string key. - * - * @note Be careful to use this function since it assumes the objects in the dictionary are CCString pointer. - * @param key The string key for searching - * @return An instance of CCString. - * It will return an empty string if the objects aren't CCString pointer or the key wasn't found. - * @see valueForKey(intptr_t) - */ - const CCString* valueForKey(const std::string& key); - - /** Get the value according to the specified integer key. - * - * @note Be careful to use this function since it assumes the objects in the dictionary are CCString pointer. - * @param key The string key for searching. - * @return An instance of CCString. - * It will return an empty string if the objects aren't CCString pointer or the key wasn't found. - * @see valueForKey(intptr_t) - */ - const CCString* valueForKey(intptr_t key); - - /** Insert an object to dictionary, and match it with the specified string key. - * - * @note Whe the first time this method is invoked, the key type will be set to string. - * After that you can't setObject with an integer key. - * If the dictionary contains the key you passed, the object matching the key will be released and removed from dictionary. - * Then the new object will be inserted after that. - * - * @param pObject The Object to be inserted. - * @param key The string key for searching. - * @see setObject(CCObject*, intptr_t) - */ - void setObject(CCObject* pObject, const std::string& key); - - /** Insert an object to dictionary, and match it with the specified string key. - * - * @note Then the first time this method is invoked, the key type will be set to string. - * After that you can't setObject with an integer key. - * If the dictionary contains the key you passed, the object matching the key will be released and removed from dictionary. - * Then the new object will be inserted after that. - * @param pObject The Object to be inserted. - * @param key The string key for searching. - * @see setObject(CCObject*, const std::string&) - */ - void setObject(CCObject* pObject, intptr_t key); - - /** - * Remove an object by the specified string key. - * - * @param key The string key for searching. - * @see removeObjectForKey(intptr_t), removeObjectsForKeys(CCArray*), - * removeObjectForElememt(CCDictElement*), removeAllObjects(). - */ - void removeObjectForKey(const std::string& key); - - /** - * Remove an object by the specified integer key. - * - * @param key The integer key for searching. - * @see removeObjectForKey(const std::string&), removeObjectsForKeys(CCArray*), - * removeObjectForElememt(CCDictElement*), removeAllObjects(). - */ - void removeObjectForKey(intptr_t key); - - /** - * Remove objects by an array of keys. - * - * @param pKeyArray The array contains keys to be removed. - * @see removeObjectForKey(const std::string&), removeObjectForKey(intptr_t), - * removeObjectForElememt(CCDictElement*), removeAllObjects(). - */ - void removeObjectsForKeys(CCArray* pKeyArray); - - /** - * Remove an object by an element. - * - * @param pElement The element need to be removed. - * @see removeObjectForKey(const std::string&), removeObjectForKey(intptr_t), - * removeObjectsForKeys(CCArray*), removeAllObjects(). - * @lua NA - */ - void removeObjectForElememt(CCDictElement* pElement); - - /** - * Remove all objects in the dictionary. - * - * @see removeObjectForKey(const std::string&), removeObjectForKey(intptr_t), - * removeObjectsForKeys(CCArray*), removeObjectForElememt(CCDictElement*). - */ - void removeAllObjects(); - - /// @{ - /// @name Function override - /** - * This function is used for deepcopy elements from source dictionary to destination dictionary. - * You shouldn't invoke this function manually since it's called by CCObject::copy. - * @lua NA - * @js NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - /// @} - - /** - * Return a random object in the dictionary. - * - * @return The random object. - * @see objectForKey(intptr_t), objectForKey(const std::string&) - * @lua NA - */ - CCObject* randomObject(); - - /** - * Create a dictionary. - * @return A dictionary which is an autorelease object. - * @see createWithDictionary(CCDictionary*), createWithContentsOfFile(const char*), createWithContentsOfFileThreadSafe(const char*). - */ - static CCDictionary* create(); - - /** - * Create a dictionary with an existing dictionary. - * - * @param srcDict The exist dictionary. - * @return A dictionary which is an autorelease object. - * @see create(), createWithContentsOfFile(const char*), createWithContentsOfFileThreadSafe(const char*). - */ - static CCDictionary* createWithDictionary(CCDictionary* srcDict); - - /** - * Create a dictionary with a plist file. - * @param pFileName The name of the plist file. - * @return A dictionary which is an autorelease object. - * @see create(), createWithDictionary(CCDictionary*), createWithContentsOfFileThreadSafe(const char*). - */ - static CCDictionary* createWithContentsOfFile(const char *pFileName); - - /** - * Write a dictionary to a plist file. - * @param fullPath The full path of the plist file. You can get writeable path by getWritablePath() - * @return true if successed, false if failed - * @lua NA - */ - bool writeToFile(const char *fullPath); - - /** - * Create a dictionary with a plist file. - * - * @note the return object isn't an autorelease object. - * This can make sure not using autorelease pool in a new thread. - * Therefore, you need to manage the lifecycle of the return object. - * It means that when you don't need it, CC_SAFE_RELEASE needs to be invoked. - * - * @param pFileName The name of the plist file. - * @return A dictionary which isn't an autorelease object. - * @lua NA - */ - static CCDictionary* createWithContentsOfFileThreadSafe(const char *pFileName); - - /* override functions - * @lua NA - */ - virtual void acceptVisitor(CCDataVisitor &visitor); - -private: - /** - * For internal usage, invoked by setObject. - */ - void setObjectUnSafe(CCObject* pObject, const std::string& key); - void setObjectUnSafe(CCObject* pObject, const intptr_t key); - -public: - /** - * All the elements in dictionary. - * - * @note For internal usage, we need to declare this member variable as public since it's used in UT_HASH. - */ - CCDictElement* m_pElements; -private: - - /** The support type of dictionary, it's confirmed when setObject is invoked. */ - enum CCDictType - { - kCCDictUnknown = 0, - kCCDictStr, - kCCDictInt - }; - - /** - * The type of dictionary, it's assigned to kCCDictUnknown by default. - */ - CCDictType m_eDictType; -}; - -// end of data_structure group -/// @} - -NS_CC_END - -#endif /* __CCDICTIONARY_H__ */ diff --git a/cappuccino-sdk/incl/cocos2dx/cocoa/CCDouble.h b/cappuccino-sdk/incl/cocos2dx/cocoa/CCDouble.h deleted file mode 100644 index 25023fa..0000000 --- a/cappuccino-sdk/incl/cocos2dx/cocoa/CCDouble.h +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCDOUBLE_H__ -#define __CCDOUBLE_H__ - -#include "CCObject.h" - -NS_CC_BEGIN - -/** - * @addtogroup data_structures - * @{ - * @js NA - * @lua NA - */ - -class CC_DLL CCDouble : public CCObject -{ -public: - CCDouble(double v) - : m_dValue(v) {} - double getValue() const {return m_dValue;} - - static CCDouble* create(double v) - { - CCDouble* pRet = new CCDouble(v); - if (pRet) - { - pRet->autorelease(); - } - return pRet; - } - - /* override functions */ - virtual void acceptVisitor(CCDataVisitor &visitor) { visitor.visit(this); } - -private: - double m_dValue; -}; - -// end of data_structure group -/// @} - -NS_CC_END - -#endif /* __CCDOUBLE_H__ */ diff --git a/cappuccino-sdk/incl/cocos2dx/cocoa/CCFloat.h b/cappuccino-sdk/incl/cocos2dx/cocoa/CCFloat.h deleted file mode 100644 index ab5131d..0000000 --- a/cappuccino-sdk/incl/cocos2dx/cocoa/CCFloat.h +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCFLOAT_H__ -#define __CCFLOAT_H__ - -#include "CCObject.h" - -NS_CC_BEGIN - -/** - * @addtogroup data_structures - * @{ - * @js NA - * @lua NA - */ - -class CC_DLL CCFloat : public CCObject -{ -public: - CCFloat(float v) - : m_fValue(v) {} - float getValue() const {return m_fValue;} - - static CCFloat* create(float v) - { - CCFloat* pRet = new CCFloat(v); - if (pRet) - { - pRet->autorelease(); - } - return pRet; - } - - /* override functions */ - virtual void acceptVisitor(CCDataVisitor &visitor) { visitor.visit(this); } - -private: - float m_fValue; -}; - -// end of data_structure group -/// @} - -NS_CC_END - -#endif /* __CCFLOAT_H__ */ diff --git a/cappuccino-sdk/incl/cocos2dx/cocoa/CCGeometry.h b/cappuccino-sdk/incl/cocos2dx/cocoa/CCGeometry.h deleted file mode 100644 index 9b28209..0000000 --- a/cappuccino-sdk/incl/cocos2dx/cocoa/CCGeometry.h +++ /dev/null @@ -1,347 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCGEMETRY_H__ -#define __CCGEMETRY_H__ - -#include "platform/CCPlatformMacros.h" -#include "CCObject.h" -#include - -NS_CC_BEGIN - -/** - * @addtogroup data_structures - * @{ - */ - -// for CCPoint assignement operator and copy constructor -class CC_DLL CCSize; - -/** - * @js NA - */ -class CC_DLL CCPoint -{ -public: - float x; - float y; - -public: - CCPoint(); - CCPoint(float x, float y); - /** - * @lua NA - */ - CCPoint(const CCPoint& other); - /** - * @lua NA - */ - CCPoint(const CCSize& size); - /** - * @lua NA - */ - CCPoint& operator= (const CCPoint& other); - /** - * @lua NA - */ - CCPoint& operator= (const CCSize& size); - /** - * @lua NA - */ - CCPoint operator+(const CCPoint& right) const; - /** - * @lua NA - */ - CCPoint operator-(const CCPoint& right) const; - /** - * @lua NA - */ - CCPoint operator-() const; - /** - * @lua NA - */ - CCPoint operator*(float a) const; - /** - * @lua NA - */ - CCPoint operator/(float a) const; - /** - * @lua NA - */ - void setPoint(float x, float y); - bool equals(const CCPoint& target) const; - - /** @returns if points have fuzzy equality which means equal with some degree of variance. - * @since v2.1.4 - * @lua NA - */ - bool fuzzyEquals(const CCPoint& target, float variance) const; - - /** Calculates distance between point an origin - * @return float - * @since v2.1.4 - * @lua NA - */ - inline float getLength() const { - return sqrtf(x*x + y*y); - }; - - /** Calculates the square length of a CCPoint (not calling sqrt() ) - * @return float - * @since v2.1.4 - * @lua NA - */ - inline float getLengthSq() const { - return dot(*this); //x*x + y*y; - }; - - /** Calculates the square distance between two points (not calling sqrt() ) - @return float - @since v2.1.4 - */ - inline float getDistanceSq(const CCPoint& other) const { - return (*this - other).getLengthSq(); - }; - - /** Calculates the distance between two points - @return float - @since v2.1.4 - */ - inline float getDistance(const CCPoint& other) const { - return (*this - other).getLength(); - }; - - /** @returns the angle in radians between this vector and the x axis - @since v2.1.4 - */ - inline float getAngle() const { - return atan2f(y, x); - }; - - /** @returns the angle in radians between two vector directions - @since v2.1.4 - */ - float getAngle(const CCPoint& other) const; - - /** Calculates dot product of two points. - @return float - @since v2.1.4 - */ - inline float dot(const CCPoint& other) const { - return x*other.x + y*other.y; - }; - - /** Calculates cross product of two points. - @return float - @since v2.1.4 - */ - inline float cross(const CCPoint& other) const { - return x*other.y - y*other.x; - }; - - /** Calculates perpendicular of v, rotated 90 degrees counter-clockwise -- cross(v, perp(v)) >= 0 - @return CCPoint - @since v2.1.4 - */ - inline CCPoint getPerp() const { - return CCPoint(-y, x); - }; - - /** Calculates perpendicular of v, rotated 90 degrees clockwise -- cross(v, rperp(v)) <= 0 - @return CCPoint - @since v2.1.4 - */ - inline CCPoint getRPerp() const { - return CCPoint(y, -x); - }; - - /** Calculates the projection of this over other. - @return CCPoint - @since v2.1.4 - */ - inline CCPoint project(const CCPoint& other) const { - return other * (dot(other)/other.dot(other)); - }; - - /** Complex multiplication of two points ("rotates" two points). - @return CCPoint vector with an angle of this.getAngle() + other.getAngle(), - and a length of this.getLength() * other.getLength(). - @since v2.1.4 - */ - inline CCPoint rotate(const CCPoint& other) const { - return CCPoint(x*other.x - y*other.y, x*other.y + y*other.x); - }; - - /** Unrotates two points. - @return CCPoint vector with an angle of this.getAngle() - other.getAngle(), - and a length of this.getLength() * other.getLength(). - @since v2.1.4 - */ - inline CCPoint unrotate(const CCPoint& other) const { - return CCPoint(x*other.x + y*other.y, y*other.x - x*other.y); - }; - - /** Returns point multiplied to a length of 1. - * If the point is 0, it returns (1, 0) - @return CCPoint - @since v2.1.4 - */ - inline CCPoint normalize() const { - float length = getLength(); - if(length == 0.) return CCPoint(1.f, 0); - return *this / getLength(); - }; - - /** Linear Interpolation between two points a and b - @returns - alpha == 0 ? a - alpha == 1 ? b - otherwise a value between a..b - @since v2.1.4 - */ - inline CCPoint lerp(const CCPoint& other, float alpha) const { - return *this * (1.f - alpha) + other * alpha; - }; - - /** Rotates a point counter clockwise by the angle around a pivot - @param pivot is the pivot, naturally - @param angle is the angle of rotation ccw in radians - @returns the rotated point - @since v2.1.4 - */ - CCPoint rotateByAngle(const CCPoint& pivot, float angle) const; - - static inline CCPoint forAngle(const float a) - { - return CCPoint(cosf(a), sinf(a)); - } -}; - -/** - * @js NA - */ -class CC_DLL CCSize -{ -public: - float width; - float height; - -public: - CCSize(); - CCSize(float width, float height); - /** - * @lua NA - */ - CCSize(const CCSize& other); - /** - * @lua NA - */ - CCSize(const CCPoint& point); - /** - * @lua NA - */ - CCSize& operator= (const CCSize& other); - /** - * @lua NA - */ - CCSize& operator= (const CCPoint& point); - /** - * @lua NA - */ - CCSize operator+(const CCSize& right) const; - /** - * @lua NA - */ - CCSize operator-(const CCSize& right) const; - /** - * @lua NA - */ - CCSize operator*(float a) const; - /** - * @lua NA - */ - CCSize operator/(float a) const; - /** - * @lua NA - */ - void setSize(float width, float height); - /** - * @lua NA - */ - bool equals(const CCSize& target) const; -}; - -/** - * @js NA - */ -class CC_DLL CCRect -{ -public: - CCPoint origin; - CCSize size; - -public: - CCRect(); - CCRect(float x, float y, float width, float height); - /** - * @lua NA - */ - CCRect(const CCRect& other); - /** - * @lua NA - */ - CCRect& operator= (const CCRect& other); - void setRect(float x, float y, float width, float height); - float getMinX() const; /// return the leftmost x-value of current rect - float getMidX() const; /// return the midpoint x-value of current rect - float getMaxX() const; /// return the rightmost x-value of current rect - float getMinY() const; /// return the bottommost y-value of current rect - float getMidY() const; /// return the midpoint y-value of current rect - float getMaxY() const; /// return the topmost y-value of current rect - bool equals(const CCRect& rect) const; - bool containsPoint(const CCPoint& point) const; - bool intersectsRect(const CCRect& rect) const; -}; - - -#define CCPointMake(x, y) CCPoint((float)(x), (float)(y)) -#define CCSizeMake(width, height) CCSize((float)(width), (float)(height)) -#define CCRectMake(x, y, width, height) CCRect((float)(x), (float)(y), (float)(width), (float)(height)) - - -const CCPoint CCPointZero = CCPointMake(0,0); - -/* The "zero" size -- equivalent to CCSizeMake(0, 0). */ -const CCSize CCSizeZero = CCSizeMake(0,0); - -/* The "zero" rectangle -- equivalent to CCRectMake(0, 0, 0, 0). */ -const CCRect CCRectZero = CCRectMake(0,0,0,0); - -// end of data_structure group -/// @} - -NS_CC_END - -#endif // __CCGEMETRY_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/cocoa/CCInteger.h b/cappuccino-sdk/incl/cocos2dx/cocoa/CCInteger.h deleted file mode 100644 index f700a30..0000000 --- a/cappuccino-sdk/incl/cocos2dx/cocoa/CCInteger.h +++ /dev/null @@ -1,42 +0,0 @@ -#ifndef __CCINTEGER_H__ -#define __CCINTEGER_H__ - -#include "CCObject.h" - -NS_CC_BEGIN - -/** - * @addtogroup data_structures - * @{ - * @js NA - */ - -class CC_DLL CCInteger : public CCObject -{ -public: - CCInteger(int v) - : m_nValue(v) {} - int getValue() const {return m_nValue;} - - static CCInteger* create(int v) - { - CCInteger* pRet = new CCInteger(v); - pRet->autorelease(); - return pRet; - } - - /* override functions - * @lua NA - */ - virtual void acceptVisitor(CCDataVisitor &visitor) { visitor.visit(this); } - -private: - int m_nValue; -}; - -// end of data_structure group -/// @} - -NS_CC_END - -#endif /* __CCINTEGER_H__ */ diff --git a/cappuccino-sdk/incl/cocos2dx/cocoa/CCNS.h b/cappuccino-sdk/incl/cocos2dx/cocoa/CCNS.h deleted file mode 100644 index e5d4744..0000000 --- a/cappuccino-sdk/incl/cocos2dx/cocoa/CCNS.h +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __PLATFOMR_CCNS_H__ -#define __PLATFOMR_CCNS_H__ - -#include "CCGeometry.h" - -NS_CC_BEGIN - -/** - * @addtogroup data_structures - * @{ - */ - -/** -@brief Returns a Core Graphics rectangle structure corresponding to the data in a given string. -@param pszContent A string object whose contents are of the form "{{x,y},{w, h}}", - where x is the x coordinate, y is the y coordinate, w is the width, and h is the height. - These components can represent integer or float values. - An example of a valid string is "{{3,2},{4,5}}". - The string is not localized, so items are always separated with a comma. -@return A Core Graphics structure that represents a rectangle. - If the string is not well-formed, the function returns CCRectZero. -*/ -CCRect CC_DLL CCRectFromString(const char* pszContent); - -/** -@brief Returns a Core Graphics point structure corresponding to the data in a given string. -@param pszContent A string object whose contents are of the form "{x,y}", - where x is the x coordinate and y is the y coordinate. - The x and y values can represent integer or float values. - An example of a valid string is "{3.0,2.5}". - The string is not localized, so items are always separated with a comma. -@return A Core Graphics structure that represents a point. - If the string is not well-formed, the function returns CCPointZero. -*/ -CCPoint CC_DLL CCPointFromString(const char* pszContent); - -/** -@brief Returns a Core Graphics size structure corresponding to the data in a given string. -@param pszContent A string object whose contents are of the form "{w, h}", - where w is the width and h is the height. - The w and h values can be integer or float values. - An example of a valid string is "{3.0,2.5}". - The string is not localized, so items are always separated with a comma. -@return A Core Graphics structure that represents a size. - If the string is not well-formed, the function returns CCSizeZero. -*/ -CCSize CC_DLL CCSizeFromString(const char* pszContent); - -// end of data_structure group -/// @} - -NS_CC_END - -#endif // __PLATFOMR_CCNS_H__ - - diff --git a/cappuccino-sdk/incl/cocos2dx/cocoa/CCObject.h b/cappuccino-sdk/incl/cocos2dx/cocoa/CCObject.h deleted file mode 100644 index 80eccd6..0000000 --- a/cappuccino-sdk/incl/cocos2dx/cocoa/CCObject.h +++ /dev/null @@ -1,126 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCOBJECT_H__ -#define __CCOBJECT_H__ - -#include "CCDataVisitor.h" - -#ifdef EMSCRIPTEN -#include -#endif // EMSCRIPTEN -class DS_Dictionary; -NS_CC_BEGIN - -/** - * @addtogroup base_nodes - * @{ - */ - -class CCZone; -class CCObject; -class CCNode; -class CCEvent; -enum CCObjectType; -/** - * @js NA - * @lua NA - */ -class CC_DLL CCCopying -{ -public: - virtual CCObject* copyWithZone(CCZone* pZone); -}; - -/** - * @js NA - */ -class CC_DLL CCObject : public CCCopying -{ -public: - // object id, CCScriptSupport need public m_uID - unsigned int m_uID; - // Lua reference id - int m_nLuaID; -protected: - unsigned int m_uTag; - // count of references - unsigned int m_uReference; - - CCObjectType m_CCObjectType; - - // count of autorelease - unsigned int m_uAutoReleaseCount; - - unsigned int m_uPadding; -public: - CCObject(void); - /** - * @lua NA - */ - virtual ~CCObject(void); - - void release(void); - void retain(void); - CCObject* autorelease(void); - CCObject* copy(void); - bool isSingleReference(void) const; - unsigned int retainCount(void) const; - virtual bool isEqual(const CCObject* pObject); - - virtual void acceptVisitor(CCDataVisitor &visitor); - virtual void update(float dt) {CC_UNUSED_PARAM(dt);}; - virtual void encodeWithCoder(DS_Dictionary*); //Robtop Modification - virtual bool canEncode(); //Robtop Modification - virtual int getTag() const; //Robtop Modification - virtual void setTag(int); //Robtop Modification - - friend class CCAutoreleasePool; -}; - - -typedef void (CCObject::*SEL_SCHEDULE)(float); -typedef void (CCObject::*SEL_CallFunc)(); -typedef void (CCObject::*SEL_CallFuncN)(CCNode*); -typedef void (CCObject::*SEL_CallFuncND)(CCNode*, void*); -typedef void (CCObject::*SEL_CallFuncO)(CCObject*); -typedef void (CCObject::*SEL_MenuHandler)(CCObject*); -typedef void (CCObject::*SEL_EventHandler)(CCEvent*); -typedef int (CCObject::*SEL_Compare)(CCObject*); - -#define schedule_selector(_SELECTOR) (SEL_SCHEDULE)(&_SELECTOR) -#define callfunc_selector(_SELECTOR) (SEL_CallFunc)(&_SELECTOR) -#define callfuncN_selector(_SELECTOR) (SEL_CallFuncN)(&_SELECTOR) -#define callfuncND_selector(_SELECTOR) (SEL_CallFuncND)(&_SELECTOR) -#define callfuncO_selector(_SELECTOR) (SEL_CallFuncO)(&_SELECTOR) -#define menu_selector(_SELECTOR) (SEL_MenuHandler)(&_SELECTOR) -#define event_selector(_SELECTOR) (SEL_EventHandler)(&_SELECTOR) -#define compare_selector(_SELECTOR) (SEL_Compare)(&_SELECTOR) - -// end of base_nodes group -/// @} - -NS_CC_END - -#endif // __CCOBJECT_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/cocoa/CCSet.h b/cappuccino-sdk/incl/cocos2dx/cocoa/CCSet.h deleted file mode 100644 index d24ae3c..0000000 --- a/cappuccino-sdk/incl/cocos2dx/cocoa/CCSet.h +++ /dev/null @@ -1,125 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_SET_H__ -#define __CC_SET_H__ - -#include -#include "CCObject.h" - -NS_CC_BEGIN - -/** - * @addtogroup data_structures - * @{ - */ - -typedef std::set::iterator CCSetIterator; - -class CC_DLL CCSet : public CCObject -{ -public: - /** - * @js ctor - * @lua NA - */ - CCSet(void); - /** - * @lua NA - */ - CCSet(const CCSet &rSetObject); - /** - * @js NA - * @lua NA - */ - virtual ~CCSet(void); - - /** - * @brief Create and return a new empty set. - * @lua NA - */ - static CCSet * create(); - - /** - *@brief Return a copy of the CCSet, it will copy all the elements. - */ - CCSet* copy(); - /** - *@brief It is the same as copy(). - *@lua NA - */ - CCSet* mutableCopy(); - /** - *@brief Return the number of elements the CCSet contains. - */ - int count(); - /** - *@brief Add a element into CCSet, it will retain the element. - */ - void addObject(CCObject *pObject); - /** - *@brief Remove the given element, nothing todo if no element equals pObject. - */ - void removeObject(CCObject *pObject); - /** - *@brief Remove all elements of the set - */ - void removeAllObjects(); - /** - *@brief Check if CCSet contains a element equals pObject. - */ - bool containsObject(CCObject *pObject); - /** - *@brief Return the iterator that points to the first element. - *@js NA - *@lua NA - */ - CCSetIterator begin(); - /** - *@brief Return the iterator that points to the position after the last element. - *@js NA - *@lua NA - */ - CCSetIterator end(); - /** - *@brief Return the first element if it contains elements, or null if it doesn't contain any element. - */ - CCObject* anyObject(); - /** - * @js NA - * @lua NA - */ - virtual void acceptVisitor(CCDataVisitor &visitor); - -private: - std::set *m_pSet; -}; - -// end of data_structure group -/// @} - -NS_CC_END - -#endif // __CC_SET_H__ - diff --git a/cappuccino-sdk/incl/cocos2dx/cocoa/CCString.h b/cappuccino-sdk/incl/cocos2dx/cocoa/CCString.h deleted file mode 100644 index 43ddcc9..0000000 --- a/cappuccino-sdk/incl/cocos2dx/cocoa/CCString.h +++ /dev/null @@ -1,164 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCSTRING_H__ -#define __CCSTRING_H__ - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY) -#include -#endif - -#include -#include -#include -#include "CCObject.h" - -NS_CC_BEGIN - -/** - * @addtogroup data_structures - * @{ - * @ js NA - */ - -class CC_DLL CCString : public CCObject -{ -public: - /** - * @lua NA - */ - CCString(); - /** - * @lua NA - */ - CCString(const char* str); - /** - * @lua NA - */ - CCString(const std::string& str); - /** - * @lua NA - */ - CCString(const CCString& str); - /** - * @lua NA - */ - virtual ~CCString(); - - /* override assignment operator - * @lua NA - */ - CCString& operator= (const CCString& other); - - /** init a string with format, it's similar with the c function 'sprintf' - * @lua NA - */ - bool initWithFormat(const char* format, ...) CC_FORMAT_PRINTF(2, 3); - - /** convert to int value */ - int intValue() const; - - /** convert to unsigned int value */ - unsigned int uintValue() const; - - /** convert to float value */ - float floatValue() const; - - /** convert to double value */ - double doubleValue() const; - - /** convert to bool value */ - bool boolValue() const; - - /** get the C string */ - const char* getCString() const; - - /** get the length of string */ - unsigned int length() const; - - /** compare to a c string */ - int compare(const char *) const; - - /* override functions - * @lua NA - * @js NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - virtual bool isEqual(const CCObject* pObject); - - /** create a string with std string, you can also pass a c string pointer because the default constructor of std::string can access a c string pointer. - * @return A CCString pointer which is an autorelease object pointer, - * it means that you needn't do a release operation unless you retain it. - */ - static CCString* create(const std::string& str); - - /** create a string with format, it's similar with the c function 'sprintf', the default buffer size is (1024*100) bytes, - * if you want to change it, you should modify the kMaxStringLen macro in CCString.cpp file. - * @return A CCString pointer which is an autorelease object pointer, - * it means that you needn't do a release operation unless you retain it. - * @lua NA - */ - static CCString* createWithFormat(const char* format, ...) CC_FORMAT_PRINTF(1, 2); - - /** create a string with binary data - * @return A CCString pointer which is an autorelease object pointer, - * it means that you needn't do a release operation unless you retain it. - */ - static CCString* createWithData(const unsigned char* pData, unsigned long nLen); - - /** create a string with a file, - * @return A CCString pointer which is an autorelease object pointer, - * it means that you needn't do a release operation unless you retain it. - */ - static CCString* createWithContentsOfFile(const char* pszFileName); - /** - * @lua NA - */ - virtual void acceptVisitor(CCDataVisitor &visitor); - -private: - - /** only for internal use */ - bool initWithFormatAndValist(const char* format, va_list ap); - -public: - std::string m_sString; -}; - -//std::binary_function emoved in C++ 17 -/*struct CCStringCompare : public std::binary_function { - public: - bool operator() (CCString * a, CCString * b) const { - return strcmp(a->getCString(), b->getCString()) < 0; - } -};*/ - -#define CCStringMake(str) CCString::create(str) -#define ccs CCStringMake - -// end of data_structure group -/// @} - -NS_CC_END - -#endif //__CCSTRING_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/cocoa/CCZone.h b/cappuccino-sdk/incl/cocos2dx/cocoa/CCZone.h deleted file mode 100644 index b69648b..0000000 --- a/cappuccino-sdk/incl/cocos2dx/cocoa/CCZone.h +++ /dev/null @@ -1,58 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_ZONE_H__ -#define __CC_ZONE_H__ - -#include "platform/CCPlatformMacros.h" -#include - -NS_CC_BEGIN - -/** - * @addtogroup data_structures - * @{ - */ - -class CCObject; -/** - * @js NA - * @lua NA - */ -class CC_DLL CCZone -{ -public: - CCZone(CCObject *pObject = NULL); - -public: - CCObject *m_pCopyObject; -}; - -// end of data_structure group -/// @} - -NS_CC_END - -#endif // __CC_ZONE_H__ - diff --git a/cappuccino-sdk/incl/cocos2dx/custom/Delegates/CCKeyboardDelegate.h b/cappuccino-sdk/incl/cocos2dx/custom/Delegates/CCKeyboardDelegate.h deleted file mode 100644 index 7654ddc..0000000 --- a/cappuccino-sdk/incl/cocos2dx/custom/Delegates/CCKeyboardDelegate.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef __CCKEYBOARD_DELEGATE_H -#define __CCKEYBOARD_DELEGATE_H - -#include -NS_CC_BEGIN - -enum enumKeyCodes; -class CC_DLL CCKeyboardDelegate { -public: - virtual void keyDown(enumKeyCodes); - virtual void keyUp(enumKeyCodes); -}; - -NS_CC_END -#endif \ No newline at end of file diff --git a/cappuccino-sdk/incl/cocos2dx/custom/Delegates/CCMouseDelegate.h b/cappuccino-sdk/incl/cocos2dx/custom/Delegates/CCMouseDelegate.h deleted file mode 100644 index 452aede..0000000 --- a/cappuccino-sdk/incl/cocos2dx/custom/Delegates/CCMouseDelegate.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef __CCMOUSE_DELEGATE_H -#define __CCMOUSE_DELEGATE_H - -#include -NS_CC_BEGIN - -class CC_DLL CCMouseDelegate { -public: - virtual void rightKeyDown(void); - virtual void rightKeyUp(void); - virtual void scrollWheel(float, float); -}; - -NS_CC_END -#endif \ No newline at end of file diff --git a/cappuccino-sdk/incl/cocos2dx/custom/Sprites/CCMenuItemSpriteExtra/CCMenuItemSpriteExtra.cpp b/cappuccino-sdk/incl/cocos2dx/custom/Sprites/CCMenuItemSpriteExtra/CCMenuItemSpriteExtra.cpp deleted file mode 100644 index eb216c8..0000000 --- a/cappuccino-sdk/incl/cocos2dx/custom/Sprites/CCMenuItemSpriteExtra/CCMenuItemSpriteExtra.cpp +++ /dev/null @@ -1,38 +0,0 @@ -#include "CCMenuItemSpriteExtra.h" - -void CCMenuItemSpriteExtra::selected(){ - CCMenuItemSprite::selected(); - auto resize = cocos2d::CCScaleTo::create(0.3, m_sizeMult * m_origScale); - auto bounce = cocos2d::CCEaseBounceOut::create(resize); - this->runAction(bounce); -} - -void CCMenuItemSpriteExtra::unselected(){ - CCMenuItemSprite::unselected(); - auto resize = cocos2d::CCScaleTo::create(0.3, m_origScale); - auto bounce = cocos2d::CCEaseBounceOut::create(resize); - this->runAction(bounce); -} - -void CCMenuItemSpriteExtra::activate () { - CCMenuItemSprite::activate(); - this->stopAllActions(); - this->setScale(m_origScale); -} - -void CCMenuItemSpriteExtra::setScale(float scale) { - CCMenuItemSprite::setScale(scale); - m_origScale = scale; -} - -CCMenuItemSpriteExtra* CCMenuItemSpriteExtra::create(CCNode *normalSprite, CCNode *selectedSprite, CCObject *target, cocos2d::SEL_MenuHandler selector){ - auto spriteItem = new CCMenuItemSpriteExtra; - if (spriteItem && spriteItem->initWithNormalSprite(normalSprite, selectedSprite, nullptr, target, selector)) - spriteItem->autorelease(); - else { - delete spriteItem; - spriteItem = nullptr; - } - return spriteItem; - -} diff --git a/cappuccino-sdk/incl/cocos2dx/custom/Sprites/CCMenuItemSpriteExtra/CCMenuItemSpriteExtra.h b/cappuccino-sdk/incl/cocos2dx/custom/Sprites/CCMenuItemSpriteExtra/CCMenuItemSpriteExtra.h deleted file mode 100644 index 07dd2fe..0000000 --- a/cappuccino-sdk/incl/cocos2dx/custom/Sprites/CCMenuItemSpriteExtra/CCMenuItemSpriteExtra.h +++ /dev/null @@ -1,15 +0,0 @@ -#pragma once -#include - -class CCMenuItemSpriteExtra : public cocos2d::CCMenuItemSprite{ -private: - float m_sizeMult = 1.25; - float m_origScale = 1.f; -public: - virtual void selected() override; - virtual void unselected() override; - virtual void activate() override; - virtual void setScale(float scale) override; - static CCMenuItemSpriteExtra* create(CCNode *normalSprite, CCNode *selectedSprite, CCObject *target, cocos2d::SEL_MenuHandler selector); - void setSizeMult(float multiplier) { m_sizeMult = multiplier; } -}; diff --git a/cappuccino-sdk/incl/cocos2dx/custom/Sprites/CCSpriteExtra/CCSpriteExtra.h b/cappuccino-sdk/incl/cocos2dx/custom/Sprites/CCSpriteExtra/CCSpriteExtra.h deleted file mode 100644 index 6b3c27d..0000000 --- a/cappuccino-sdk/incl/cocos2dx/custom/Sprites/CCSpriteExtra/CCSpriteExtra.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef __CCSPRITE_EXTRA_H -#define __CCSPRITE_EXTRA_H - -#include -NS_CC_BEGIN - -class CC_DLL CCSpriteExtra : public CCSprite{ -public: - ROB_CC_SYNTHESIZE(float, m_fXOffset, XOffset); - ROB_CC_SYNTHESIZE(float, m_fYOffset, YOffset); -}; - -NS_CC_END -#endif \ No newline at end of file diff --git a/cappuccino-sdk/incl/cocos2dx/draw_nodes/CCDrawNode.h b/cappuccino-sdk/incl/cocos2dx/draw_nodes/CCDrawNode.h deleted file mode 100644 index a6e0d40..0000000 --- a/cappuccino-sdk/incl/cocos2dx/draw_nodes/CCDrawNode.h +++ /dev/null @@ -1,107 +0,0 @@ -/* Copyright (c) 2012 Scott Lembcke and Howling Moon Software - * Copyright (c) 2012 cocos2d-x.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - * Code copied & pasted from SpacePatrol game https://github.com/slembcke/SpacePatrol - * - * Renamed and added some changes for cocos2d - * - */ - -#ifndef __CCDRAWNODES_CCDRAW_NODE_H__ -#define __CCDRAWNODES_CCDRAW_NODE_H__ - -#include "base_nodes/CCNode.h" -#include "ccTypes.h" - -NS_CC_BEGIN - -/** CCDrawNode - Node that draws dots, segments and polygons. - Faster than the "drawing primitives" since they it draws everything in one single batch. - - @since v2.1 - @lua NA - */ -class CC_DLL CCDrawNode : public CCNode -{ -protected: - GLuint m_uVao; - GLuint m_uVbo; - - unsigned int m_uBufferCapacity; - GLsizei m_nBufferCount; - ccV2F_C4B_T2F *m_pBuffer; - - ccBlendFunc m_sBlendFunc; - - bool m_bDirty; - -public: - static CCDrawNode* create(); - virtual ~CCDrawNode(); - - virtual bool init(); - virtual void draw(); - - /** draw a dot at a position, with a given radius and color */ - void drawDot(const CCPoint &pos, float radius, const ccColor4F &color); - - /** draw a segment with a radius and color */ - void drawSegment(const CCPoint &from, const CCPoint &to, float radius, const ccColor4F &color); - - /** draw a polygon with a fill color and line color - * @code - * when this funciton bound to js,the input params are changed - * js:var drawPolygon(var verts, var fillColor,var borderWidth,var borderColor) - * @endcode - */ - void drawPolygon(CCPoint *verts, unsigned int count, const ccColor4F &fillColor, float borderWidth, const ccColor4F &borderColor); - - /** Clear the geometry in the node's buffer. */ - void clear(); - /** - * @js NA - */ - ccBlendFunc getBlendFunc() const; - /** - * @code - * when this function bound to js ,the input param is change - * js:var setBlendFunc(var src,var dst) - * @endcode - */ - void setBlendFunc(const ccBlendFunc &blendFunc); - - CCDrawNode(); - - /** listen the event that coming to foreground on Android - * @js NA - */ - void listenBackToForeground(CCObject *obj); -private: - void ensureCapacity(unsigned int count); - void render(); -}; - -NS_CC_END - -#endif // __CCDRAWNODES_CCDRAW_NODE_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/draw_nodes/CCDrawingPrimitives.h b/cappuccino-sdk/incl/cocos2dx/draw_nodes/CCDrawingPrimitives.h deleted file mode 100644 index cb667d3..0000000 --- a/cappuccino-sdk/incl/cocos2dx/draw_nodes/CCDrawingPrimitives.h +++ /dev/null @@ -1,160 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -/* - * - * IMPORTANT IMPORTANT IMPORTANT IMPORTANT - * - * - * LEGACY FUNCTIONS - * - * USE CCDrawNode instead - * - */ - - -#ifndef __CCDRAWING_PRIMITIVES__ -#define __CCDRAWING_PRIMITIVES__ - - -#include "ccTypes.h" -#include "ccMacros.h" -#include "cocoa/CCGeometry.h" // for CCPoint - -/** - @file - Drawing OpenGL ES primitives. - - ccDrawPoint, ccDrawPoints - - ccDrawLine - - ccDrawRect, ccDrawSolidRect - - ccDrawPoly, ccDrawSolidPoly - - ccDrawCircle - - ccDrawQuadBezier - - ccDrawCubicBezier - - ccDrawCatmullRom - - ccDrawCardinalSpline - - You can change the color, point size, width by calling: - - ccDrawColor4B(), ccDrawColor4F() - - ccPointSize() - - glLineWidth() - - @warning These functions draws the Line, Point, Polygon, immediately. They aren't batched. If you are going to make a game that depends on these primitives, I suggest creating a batch. Instead you should use CCDrawNode - - */ - -NS_CC_BEGIN - -/** - * @addtogroup global - * @{ - */ - -class CCPointArray; - -/** Initializes the drawing primitives */ -void CC_DLL ccDrawInit(); - -/** Frees allocated resources by the drawing primitives */ -void CC_DLL ccDrawFree(); - -/** draws a point given x and y coordinate measured in points */ -void CC_DLL ccDrawPoint( const CCPoint& point ); - -/** draws an array of points. - @since v0.7.2 - */ -void CC_DLL ccDrawPoints( const CCPoint *points, unsigned int numberOfPoints ); - -/** draws a line given the origin and destination point measured in points */ -void CC_DLL ccDrawLine( const CCPoint& origin, const CCPoint& destination ); - -/** draws a rectangle given the origin and destination point measured in points. */ -void CC_DLL ccDrawRect( CCPoint origin, CCPoint destination ); - -/** draws a solid rectangle given the origin and destination point measured in points. - @since 1.1 - */ -void CC_DLL ccDrawSolidRect( CCPoint origin, CCPoint destination, ccColor4F color ); - -/** draws a polygon given a pointer to CCPoint coordinates and the number of vertices measured in points. -The polygon can be closed or open -*/ -void CC_DLL ccDrawPoly( const CCPoint *vertices, unsigned int numOfVertices, bool closePolygon ); - -/** draws a solid polygon given a pointer to CGPoint coordinates, the number of vertices measured in points, and a color. - */ -void CC_DLL ccDrawSolidPoly( const CCPoint *poli, unsigned int numberOfPoints, ccColor4F color ); - -/** draws a circle given the center, radius and number of segments. */ -void CC_DLL ccDrawCircle( const CCPoint& center, float radius, float angle, unsigned int segments, bool drawLineToCenter, float scaleX, float scaleY); -void CC_DLL ccDrawCircle( const CCPoint& center, float radius, float angle, unsigned int segments, bool drawLineToCenter); - -/** draws a quad bezier path - @warning This function could be pretty slow. Use it only for debugging purposes. - @since v0.8 - */ -void CC_DLL ccDrawQuadBezier(const CCPoint& origin, const CCPoint& control, const CCPoint& destination, unsigned int segments); - -/** draws a cubic bezier path - @warning This function could be pretty slow. Use it only for debugging purposes. - @since v0.8 - */ -void CC_DLL ccDrawCubicBezier(const CCPoint& origin, const CCPoint& control1, const CCPoint& control2, const CCPoint& destination, unsigned int segments); - -/** draws a Catmull Rom path. - @warning This function could be pretty slow. Use it only for debugging purposes. - @since v2.0 - */ -void CC_DLL ccDrawCatmullRom( CCPointArray *arrayOfControlPoints, unsigned int segments ); - -/** draws a Cardinal Spline path. - @warning This function could be pretty slow. Use it only for debugging purposes. - @since v2.0 - */ -void CC_DLL ccDrawCardinalSpline( CCPointArray *config, float tension, unsigned int segments ); - -/** set the drawing color with 4 unsigned bytes - @since v2.0 - */ -void CC_DLL ccDrawColor4B( GLubyte r, GLubyte g, GLubyte b, GLubyte a ); - -/** set the drawing color with 4 floats - @since v2.0 - */ -void CC_DLL ccDrawColor4F( GLfloat r, GLfloat g, GLfloat b, GLfloat a ); - -/** set the point size in points. Default 1. - @since v2.0 - */ -void CC_DLL ccPointSize( GLfloat pointSize ); - -// end of global group -/// @} - -NS_CC_END - -#endif // __CCDRAWING_PRIMITIVES__ diff --git a/cappuccino-sdk/incl/cocos2dx/effects/CCGrabber.h b/cappuccino-sdk/incl/cocos2dx/effects/CCGrabber.h deleted file mode 100644 index 9cd11ce..0000000 --- a/cappuccino-sdk/incl/cocos2dx/effects/CCGrabber.h +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2009 On-Core - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __EFFECTS_CCGRABBER_H__ -#define __EFFECTS_CCGRABBER_H__ - -#include "CCConfiguration.h" -#include "cocoa/CCObject.h" -#include "CCGL.h" - -NS_CC_BEGIN - -class CCTexture2D; - -/** - * @addtogroup effects - * @{ - */ - -/** FBO class that grabs the the contents of the screen - * @js NA - * @lua NA - */ -class CCGrabber : public CCObject -{ -public: - CCGrabber(void); - ~CCGrabber(void); - - void grab(CCTexture2D *pTexture); - void beforeRender(CCTexture2D *pTexture); - void afterRender(CCTexture2D *pTexture); - -protected: - GLuint m_FBO; - GLint m_oldFBO; - GLfloat m_oldClearColor[4]; -}; - -// end of effects group -/// @} - -NS_CC_END - -#endif // __EFFECTS_CCGRABBER_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/effects/CCGrid.h b/cappuccino-sdk/incl/cocos2dx/effects/CCGrid.h deleted file mode 100644 index ced7b90..0000000 --- a/cappuccino-sdk/incl/cocos2dx/effects/CCGrid.h +++ /dev/null @@ -1,244 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2009 On-Core - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __EFFECTS_CCGRID_H__ -#define __EFFECTS_CCGRID_H__ - -#include "cocoa/CCObject.h" -#include "base_nodes/CCNode.h" -#include "CCCamera.h" -#include "ccTypes.h" -#include "textures/CCTexture2D.h" -#include "CCDirector.h" -#include "kazmath/mat4.h" -#ifdef EMSCRIPTEN -#include "base_nodes/CCGLBufferedNode.h" -#endif // EMSCRIPTEN - -NS_CC_BEGIN - -class CCTexture2D; -class CCGrabber; -class CCGLProgram; - -/** - * @addtogroup effects - * @{ - */ - -/** Base class for other -*/ -class CC_DLL CCGridBase : public CCObject -{ -public: - /** - * @js NA - * @lua NA - */ - virtual ~CCGridBase(void); - - /** whether or not the grid is active - * @lua NA - */ - inline bool isActive(void) { return m_bActive; } - /** - * @lua NA - */ - void setActive(bool bActive); - - /** number of times that the grid will be reused - * @lua NA - */ - inline int getReuseGrid(void) { return m_nReuseGrid; } - /** - * @lua NA - */ - inline void setReuseGrid(int nReuseGrid) { m_nReuseGrid = nReuseGrid; } - - /** size of the grid - * @lua NA - */ - inline const CCSize& getGridSize(void) { return m_sGridSize; } - /** - * @lua NA - */ - inline void setGridSize(const CCSize& gridSize) { m_sGridSize = gridSize; } - - /** pixels between the grids - * @lua NA - */ - inline const CCPoint& getStep(void) { return m_obStep; } - /** - * @lua NA - */ - inline void setStep(const CCPoint& step) { m_obStep = step; } - - /** is texture flipped - * @lua NA - */ - inline bool isTextureFlipped(void) { return m_bIsTextureFlipped; } - /** - * @lua NA - */ - void setTextureFlipped(bool bFlipped); - /** - * @lua NA - */ - bool initWithSize(const CCSize& gridSize, CCTexture2D *pTexture, bool bFlipped); - /** - * @lua NA - */ - bool initWithSize(const CCSize& gridSize); - /** - * @lua NA - */ - void beforeDraw(void); - /** - * @lua NA - */ - void afterDraw(CCNode *pTarget); - /** - * @lua NA - */ - virtual void blit(void); - /** - * @lua NA - */ - virtual void reuse(void); - /** - * @lua NA - */ - virtual void calculateVertexPoints(void); - -public: - - /** create one Grid - * @lua NA - */ - static CCGridBase* create(const CCSize& gridSize, CCTexture2D *texture, bool flipped); - /** create one Grid - * @lua NA - */ - static CCGridBase* create(const CCSize& gridSize); - /** - * @lua NA - */ - void set2DProjection(void); - -protected: - bool m_bActive; - int m_nReuseGrid; - CCSize m_sGridSize; - CCTexture2D *m_pTexture; - CCPoint m_obStep; - CCGrabber *m_pGrabber; - bool m_bIsTextureFlipped; - CCGLProgram* m_pShaderProgram; - ccDirectorProjection m_directorProjection; -}; - -/** - CCGrid3D is a 3D grid implementation. Each vertex has 3 dimensions: x,y,z - @js NA - @lua NA - */ -class CC_DLL CCGrid3D : public CCGridBase -#ifdef EMSCRIPTEN -, public CCGLBufferedNode -#endif // EMSCRIPTEN -{ -public: - CCGrid3D(); - ~CCGrid3D(void); - - /** returns the vertex at a given position */ - ccVertex3F vertex(const CCPoint& pos); - /** returns the original (non-transformed) vertex at a given position */ - ccVertex3F originalVertex(const CCPoint& pos); - /** sets a new vertex at a given position */ - void setVertex(const CCPoint& pos, const ccVertex3F& vertex); - - virtual void blit(void); - virtual void reuse(void); - virtual void calculateVertexPoints(void); - -public: - /** create one Grid */ - static CCGrid3D* create(const CCSize& gridSize, CCTexture2D *pTexture, bool bFlipped); - /** create one Grid */ - static CCGrid3D* create(const CCSize& gridSize); - -protected: - GLvoid *m_pTexCoordinates; - GLvoid *m_pVertices; - GLvoid *m_pOriginalVertices; - GLushort *m_pIndices; -}; - -/** - CCTiledGrid3D is a 3D grid implementation. It differs from Grid3D in that - the tiles can be separated from the grid. - @js NA - @lua NA -*/ -class CC_DLL CCTiledGrid3D : public CCGridBase -#ifdef EMSCRIPTEN -, public CCGLBufferedNode -#endif // EMSCRIPTEN -{ -public: - CCTiledGrid3D(); - ~CCTiledGrid3D(void); - - /** returns the tile at the given position */ - ccQuad3 tile(const CCPoint& pos); - /** returns the original tile (untransformed) at the given position */ - ccQuad3 originalTile(const CCPoint& pos); - /** sets a new tile */ - void setTile(const CCPoint& pos, const ccQuad3& coords); - - virtual void blit(void); - virtual void reuse(void); - virtual void calculateVertexPoints(void); - -public: - - /** create one Grid */ - static CCTiledGrid3D* create(const CCSize& gridSize, CCTexture2D *pTexture, bool bFlipped); - /** create one Grid */ - static CCTiledGrid3D* create(const CCSize& gridSize); - -protected: - GLvoid *m_pTexCoordinates; - GLvoid *m_pVertices; - GLvoid *m_pOriginalVertices; - GLushort *m_pIndices; -}; - -// end of effects group -/// @} - -NS_CC_END - -#endif // __EFFECTS_CCGRID_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/include/CCEventType.h b/cappuccino-sdk/incl/cocos2dx/include/CCEventType.h deleted file mode 100644 index 297c87c..0000000 --- a/cappuccino-sdk/incl/cocos2dx/include/CCEventType.h +++ /dev/null @@ -1,19 +0,0 @@ - -#ifndef __CCEVENT_TYPE_H__ -#define __CCEVENT_TYPE_H__ - -/** - * This header is used for defining event types using in CCNotificationCenter - */ - -// The application will come to foreground. -// This message is used for reloading resources before come to foreground on Android. -// This message is posted in main.cpp. -#define EVENT_COME_TO_FOREGROUND "event_come_to_foreground" - -// The application will come to background. -// This message is used for doing something before coming to background, such as save CCRenderTexture. -// This message is posted in cocos2dx/platform/android/jni/MessageJni.cpp. -#define EVENT_COME_TO_BACKGROUND "event_come_to_background" - -#endif // __CCEVENT_TYPE_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/include/CCProtocols.h b/cappuccino-sdk/incl/cocos2dx/include/CCProtocols.h deleted file mode 100644 index 5899d56..0000000 --- a/cappuccino-sdk/incl/cocos2dx/include/CCProtocols.h +++ /dev/null @@ -1,225 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCPROTOCOLS_H__ -#define __CCPROTOCOLS_H__ - -#include "ccTypes.h" -#include "textures/CCTexture2D.h" -#include - -NS_CC_BEGIN - -/** - * RGBA protocol that affects CCNode's color and opacity - * @js NA - */ -class CC_DLL CCRGBAProtocol -{ -public: - /** - * Changes the color with R,G,B bytes - * - * @param color Example: ccc3(255,100,0) means R=255, G=100, B=0 - */ - virtual void setColor(const ccColor3B& color) = 0; - - /** - * Returns color that is currently used. - * - * @return The ccColor3B contains R,G,B bytes. - */ - virtual const ccColor3B& getColor(void) = 0; - - /** - * Returns the displayed color. - * - * @return The ccColor3B contains R,G,B bytes. - */ - virtual const ccColor3B& getDisplayedColor(void) = 0; - - /** - * Returns the displayed opacity. - * - * @return The opacity of sprite, from 0 ~ 255 - */ - virtual GLubyte getDisplayedOpacity(void) = 0; - /** - * Returns the opacity. - * - * The opacity which indicates how transparent or opaque this node is. - * 0 indicates fully transparent and 255 is fully opaque. - * - * @return The opacity of sprite, from 0 ~ 255 - */ - virtual GLubyte getOpacity(void) = 0; - - /** - * Changes the opacity. - * - * @param value Goes from 0 to 255, where 255 means fully opaque and 0 means fully transparent. - */ - virtual void setOpacity(GLubyte opacity) = 0; - - // optional - - /** - * Changes the OpacityModifyRGB property. - * If thie property is set to true, then the rendered color will be affected by opacity. - * Normally, r = r * opacity/255, g = g * opacity/255, b = b * opacity/255. - * - * @param bValue true then the opacity will be applied as: glColor(R,G,B,opacity); - * false then the opacity will be applied as: glColor(opacity, opacity, opacity, opacity); - */ - virtual void setOpacityModifyRGB(bool bValue) = 0; - - /** - * Returns whether or not the opacity will be applied using glColor(R,G,B,opacity) - * or glColor(opacity, opacity, opacity, opacity) - * - * @return Returns opacity modify flag. - */ - virtual bool isOpacityModifyRGB(void) = 0; - - /** - * whether or not color should be propagated to its children. - */ - virtual bool isCascadeColorEnabled(void) = 0; - virtual void setCascadeColorEnabled(bool cascadeColorEnabled) = 0; - - /** - * recursive method that updates display color - */ - virtual void updateDisplayedColor(const ccColor3B& color) = 0; - - /** - * whether or not opacity should be propagated to its children. - */ - virtual bool isCascadeOpacityEnabled(void) = 0; - virtual void setCascadeOpacityEnabled(bool cascadeOpacityEnabled) = 0; - - /** - * recursive method that updates the displayed opacity. - */ - virtual void updateDisplayedOpacity(GLubyte opacity) = 0; -}; - -/** - * Specify the blending function according glBlendFunc - * Please refer to glBlendFunc in OpenGL ES Manual - * http://www.khronos.org/opengles/sdk/docs/man/xhtml/glBlendFunc.xml for more details. - * @js NA - * @lua NA - */ -class CC_DLL CCBlendProtocol -{ -public: - /** - * Sets the source blending function. - * - * @param blendFunc A structure with source and destination factor to specify pixel arithmetic, - * e.g. {GL_ONE, GL_ONE}, {GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA}. - * - */ - virtual void setBlendFunc(ccBlendFunc blendFunc) = 0; - - /** - * Returns the blending function that is currently being used. - * - * @return A ccBlendFunc structure with source and destination factor which specified pixel arithmetic. - */ - virtual ccBlendFunc getBlendFunc(void) = 0; -}; - -/** - * CCNode objects that uses a CCTexture2D to render the images. - * The texture can have a blending function. - * If the texture has alpha premultiplied the default blending function is: - * src=GL_ONE dst= GL_ONE_MINUS_SRC_ALPHA - * else - * src=GL_SRC_ALPHA dst= GL_ONE_MINUS_SRC_ALPHA - * But you can change the blending function at any time. - * @js NA - */ -class CC_DLL CCTextureProtocol : public CCBlendProtocol -{ -public: - /** - * Returns the currently used texture - * - * @return The texture that is currenlty being used. - * @lua NA - */ - virtual CCTexture2D* getTexture(void) = 0; - - /** - * Sets a new texuture. It will be retained. - * - * @param texture A valid CCTexture2D object, which will be applied to this sprite object. - * @lua NA - */ - virtual void setTexture(CCTexture2D *texture) = 0; -}; - -/** - * Common interface for Labels - * @js NA - * @lua NA - */ -class CC_DLL CCLabelProtocol -{ -public: - /** - * Sets a new label using an string - * - * @param A null terminated string - */ - virtual void setString(const char *label) = 0; - - /** - * Returns the string that is currently being used in this label - * - * @return The string that is currently being used in this label - */ - virtual const char* getString(void) = 0; -}; - -/** - * OpenGL projection protocol - * @js NA - * @lua NA - */ -class CC_DLL CCDirectorDelegate -{ -public: - /** - * Will be called by CCDirector when the projection is updated, and "custom" projection is used - */ - virtual void updateProjection(void) = 0; -}; - -NS_CC_END - -#endif // __CCPROTOCOLS_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/include/ccConfig.h b/cappuccino-sdk/incl/cocos2dx/include/ccConfig.h deleted file mode 100644 index 5fc2365..0000000 --- a/cappuccino-sdk/incl/cocos2dx/include/ccConfig.h +++ /dev/null @@ -1,269 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCCONFIG_H__ -#define __CCCONFIG_H__ - -#include "platform/CCPlatformConfig.h" - -/** - @file - cocos2d (cc) configuration file -*/ - -/** @def CC_ENABLE_STACKABLE_ACTIONS - If enabled, actions that alter the position property (eg: CCMoveBy, CCJumpBy, CCBezierBy, etc..) will be stacked. - If you run 2 or more 'position' actions at the same time on a node, then end position will be the sum of all the positions. - If disabled, only the last run action will take effect. - - Enabled by default. Disable to be compatible with v2.0 and older versions. - - @since v2.1 - */ -#ifndef CC_ENABLE_STACKABLE_ACTIONS -#define CC_ENABLE_STACKABLE_ACTIONS 1 -#endif - -/** @def CC_ENABLE_GL_STATE_CACHE - If enabled, cocos2d will maintain an OpenGL state cache internally to avoid unnecessary switches. - In order to use them, you have to use the following functions, instead of the the GL ones: - - ccGLUseProgram() instead of glUseProgram() - - ccGLDeleteProgram() instead of glDeleteProgram() - - ccGLBlendFunc() instead of glBlendFunc() - - If this functionality is disabled, then ccGLUseProgram(), ccGLDeleteProgram(), ccGLBlendFunc() will call the GL ones, without using the cache. - - It is recommended to enable whenever possible to improve speed. - If you are migrating your code from GL ES 1.1, then keep it disabled. Once all your code works as expected, turn it on. - - Default value: Enabled by default - - @since v2.0.0 - */ -#ifndef CC_ENABLE_GL_STATE_CACHE -#define CC_ENABLE_GL_STATE_CACHE 1 -#endif - -/** @def CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL -If enabled, the texture coordinates will be calculated by using this formula: -- texCoord.left = (rect.origin.x*2+1) / (texture.wide*2); -- texCoord.right = texCoord.left + (rect.size.width*2-2)/(texture.wide*2); - -The same for bottom and top. - -This formula prevents artifacts by using 99% of the texture. -The "correct" way to prevent artifacts is by using the spritesheet-artifact-fixer.py or a similar tool. - -Affected nodes: -- CCSprite / CCSpriteBatchNode and subclasses: CCLabelBMFont, CCTMXTiledMap -- CCLabelAtlas -- CCQuadParticleSystem -- CCTileMap - -To enabled set it to 1. Disabled by default. - -@since v0.99.5 -*/ -#ifndef CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL -#define CC_FIX_ARTIFACTS_BY_STRECHING_TEXEL 0 -#endif - -/** @def CC_DIRECTOR_FPS_INTERVAL - Seconds between FPS updates. - 0.5 seconds, means that the FPS number will be updated every 0.5 seconds. - Having a bigger number means a more reliable FPS - - Default value: 0.1f - */ -#ifndef CC_DIRECTOR_STATS_INTERVAL -#define CC_DIRECTOR_STATS_INTERVAL (0.5f) -#endif - -/** @def CC_DIRECTOR_FPS_POSITION - Position of the FPS - - Default: 0,0 (bottom-left corner) - */ -#ifndef CC_DIRECTOR_FPS_POSITION -#define CC_DIRECTOR_FPS_POSITION ccp(0,0) -#endif - -/** @def CC_DIRECTOR_DISPATCH_FAST_EVENTS - If enabled, and only when it is used with CCFastDirector, the main loop will wait 0.04 seconds to - dispatch all the events, even if there are not events to dispatch. - If your game uses lot's of events (eg: touches) it might be a good idea to enable this feature. - Otherwise, it is safe to leave it disabled. - - To enable set it to 1. Disabled by default. - - @warning This feature is experimental - */ -#ifndef CC_DIRECTOR_DISPATCH_FAST_EVENTS - #define CC_DIRECTOR_DISPATCH_FAST_EVENTS 0 -#endif - -/** @def CC_DIRECTOR_MAC_USE_DISPLAY_LINK_THREAD -If enabled, cocos2d-mac will run on the Display Link thread. If disabled cocos2d-mac will run in its own thread. - -If enabled, the images will be drawn at the "correct" time, but the events might not be very responsive. -If disabled, some frames might be skipped, but the events will be dispatched as they arrived. - -To enable set it to a 1, to disable it set to 0. Enabled by default. - -Only valid for cocos2d-mac. Not supported on cocos2d-ios. - -*/ -#ifndef CC_DIRECTOR_MAC_USE_DISPLAY_LINK_THREAD -#define CC_DIRECTOR_MAC_USE_DISPLAY_LINK_THREAD 1 -#endif - -/** @def CC_NODE_RENDER_SUBPIXEL - If enabled, the CCNode objects (CCSprite, CCLabel,etc) will be able to render in subpixels. - If disabled, integer pixels will be used. - - To enable set it to 1. Enabled by default. - */ -#ifndef CC_NODE_RENDER_SUBPIXEL -#define CC_NODE_RENDER_SUBPIXEL 1 -#endif - -/** @def CC_SPRITEBATCHNODE_RENDER_SUBPIXEL - If enabled, the CCSprite objects rendered with CCSpriteBatchNode will be able to render in subpixels. - If disabled, integer pixels will be used. - - To enable set it to 1. Enabled by default. - */ -#ifndef CC_SPRITEBATCHNODE_RENDER_SUBPIXEL -#define CC_SPRITEBATCHNODE_RENDER_SUBPIXEL 1 -#endif - -/** @def CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP - Use GL_TRIANGLE_STRIP instead of GL_TRIANGLES when rendering the texture atlas. - It seems it is the recommend way, but it is much slower, so, enable it at your own risk - - To enable set it to a value different than 0. Disabled by default. - - */ -#ifndef CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP -#define CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP 0 -#endif - -/** @def CC_TEXTURE_ATLAS_USE_VAO - By default, CCTextureAtlas (used by many cocos2d classes) will use VAO (Vertex Array Objects). - Apple recommends its usage but they might consume a lot of memory, specially if you use many of them. - So for certain cases, where you might need hundreds of VAO objects, it might be a good idea to disable it. - - To disable it set it to 0. Enabled by default. - - */ -#ifndef CC_TEXTURE_ATLAS_USE_VAO - #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) - #define CC_TEXTURE_ATLAS_USE_VAO 1 - #else - /* Some Windows display adapter driver cannot support VAO. */ - /* Some android devices cannot support VAO very well, so we disable it by default for android platform. */ - /* Blackberry also doesn't support this feature. */ - #define CC_TEXTURE_ATLAS_USE_VAO 0 - #endif -#endif - - -/** @def CC_USE_LA88_LABELS - If enabled, it will use LA88 (Luminance Alpha 16-bit textures) for CCLabelTTF objects. - If it is disabled, it will use A8 (Alpha 8-bit textures). - LA88 textures are 6% faster than A8 textures, but they will consume 2x memory. - - This feature is enabled by default. - - @since v0.99.5 - */ -#ifndef CC_USE_LA88_LABELS -#define CC_USE_LA88_LABELS 1 -#endif - -/** @def CC_SPRITE_DEBUG_DRAW - If enabled, all subclasses of CCSprite will draw a bounding box - Useful for debugging purposes only. It is recommended to leave it disabled. - - To enable set it to a value different than 0. Disabled by default: - 0 -- disabled - 1 -- draw bounding box - 2 -- draw texture box - 0 -- disabled - 1 -- draw bounding box - 2 -- draw texture box -*/ -#ifndef CC_SPRITE_DEBUG_DRAW -#define CC_SPRITE_DEBUG_DRAW 0 -#endif - -/** @def CC_SPRITEBATCHNODE_DEBUG_DRAW -If enabled, all subclasses of CCSprite that are rendered using an CCSpriteBatchNode draw a bounding box. -Useful for debugging purposes only. It is recommended to leave it disabled. - -To enable set it to a value different than 0. Disabled by default. -*/ -#ifndef CC_SPRITEBATCHNODE_DEBUG_DRAW -#define CC_SPRITEBATCHNODE_DEBUG_DRAW 0 -#endif - -/** @def CC_LABELBMFONT_DEBUG_DRAW -If enabled, all subclasses of CCLabelBMFont will draw a bounding box -Useful for debugging purposes only. It is recommended to leave it disabled. - -To enable set it to a value different than 0. Disabled by default. -*/ -#ifndef CC_LABELBMFONT_DEBUG_DRAW -#define CC_LABELBMFONT_DEBUG_DRAW 0 -#endif - -/** @def CC_LABELATLAS_DEBUG_DRAW - If enabled, all subclasses of LabeltAtlas will draw a bounding box - Useful for debugging purposes only. It is recommended to leave it disabled. - - To enable set it to a value different than 0. Disabled by default. - */ -#ifndef CC_LABELATLAS_DEBUG_DRAW -#define CC_LABELATLAS_DEBUG_DRAW 0 -#endif - -/** @def CC_ENABLE_PROFILERS - If enabled, will activate various profilers within cocos2d. This statistical data will be output to the console - once per second showing average time (in milliseconds) required to execute the specific routine(s). - Useful for debugging purposes only. It is recommended to leave it disabled. - - To enable set it to a value different than 0. Disabled by default. - */ -#ifndef CC_ENABLE_PROFILERS -#define CC_ENABLE_PROFILERS 0 -#endif - -/** Enable Lua engine debug log */ -#ifndef CC_LUA_ENGINE_DEBUG -#define CC_LUA_ENGINE_DEBUG 0 -#endif - -#endif // __CCCONFIG_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/include/ccMacros.h b/cappuccino-sdk/incl/cocos2dx/include/ccMacros.h deleted file mode 100644 index e9ae253..0000000 --- a/cappuccino-sdk/incl/cocos2dx/include/ccMacros.h +++ /dev/null @@ -1,259 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCMACROS_H__ -#define __CCMACROS_H__ - -#ifndef _USE_MATH_DEFINES -#define _USE_MATH_DEFINES -#endif - -#include "platform/CCCommon.h" -#include "CCStdC.h" - -#ifndef CCAssert -#if COCOS2D_DEBUG > 0 -extern bool CC_DLL cc_assert_script_compatible(const char *msg); -#define CCAssert(cond, msg) do { \ - if (!(cond)) { \ - if (!cc_assert_script_compatible(msg) && strlen(msg)) \ - cocos2d::CCLog("Assert failed: %s", msg); \ - CC_ASSERT(cond); \ - } \ - } while (0) -#else -#define CCAssert(cond, msg) ((void)(cond)) -#endif -#endif // CCAssert - -#include "ccConfig.h" - -/** @def CC_SWAP -simple macro that swaps 2 variables -*/ -#define CC_SWAP(x, y, type) \ -{ type temp = (x); \ - x = y; y = temp; \ -} - - -/** @def CCRANDOM_MINUS1_1 - returns a random float between -1 and 1 - */ -#define CCRANDOM_MINUS1_1() ((2.0f*((float)rand()/RAND_MAX))-1.0f) - -/** @def CCRANDOM_0_1 - returns a random float between 0 and 1 - */ -#define CCRANDOM_0_1() ((float)rand()/RAND_MAX) - -/** @def CC_DEGREES_TO_RADIANS - converts degrees to radians - */ -#define CC_DEGREES_TO_RADIANS(__ANGLE__) ((__ANGLE__) * 0.01745329252f) // PI / 180 - -/** @def CC_RADIANS_TO_DEGREES - converts radians to degrees - */ -#define CC_RADIANS_TO_DEGREES(__ANGLE__) ((__ANGLE__) * 57.29577951f) // PI * 180 - -#define kCCRepeatForever (UINT_MAX -1) - -/** @def CC_BLEND_SRC -default gl blend src function. Compatible with premultiplied alpha images. -*/ -#define CC_BLEND_SRC GL_ONE -#define CC_BLEND_DST GL_ONE_MINUS_SRC_ALPHA - - -/** @def CC_NODE_DRAW_SETUP - Helpful macro that setups the GL server state, the correct GL program and sets the Model View Projection matrix - @since v2.0 - */ -#define CC_NODE_DRAW_SETUP() \ -do { \ - ccGLEnable(m_eGLServerState); \ - CCAssert(getShaderProgram(), "No shader program set for this node"); \ - { \ - getShaderProgram()->use(); \ - getShaderProgram()->setUniformsForBuiltins(); \ - } \ -} while(0) - - - /** @def CC_DIRECTOR_END - Stops and removes the director from memory. - Removes the CCGLView from its parent - - @since v0.99.4 - */ -#define CC_DIRECTOR_END() \ -do { \ - CCDirector *__director = CCDirector::sharedDirector(); \ - __director->end(); \ -} while(0) - -/** @def CC_CONTENT_SCALE_FACTOR -On Mac it returns 1; -On iPhone it returns 2 if RetinaDisplay is On. Otherwise it returns 1 -*/ -#define CC_CONTENT_SCALE_FACTOR() CCDirector::sharedDirector()->getContentScaleFactor() - -/****************************/ -/** RETINA DISPLAY ENABLED **/ -/****************************/ - -/** @def CC_RECT_PIXELS_TO_POINTS - Converts a rect in pixels to points - */ -#define CC_RECT_PIXELS_TO_POINTS(__rect_in_pixels__) \ - CCRectMake( (__rect_in_pixels__).origin.x / CC_CONTENT_SCALE_FACTOR(), (__rect_in_pixels__).origin.y / CC_CONTENT_SCALE_FACTOR(), \ - (__rect_in_pixels__).size.width / CC_CONTENT_SCALE_FACTOR(), (__rect_in_pixels__).size.height / CC_CONTENT_SCALE_FACTOR() ) - -/** @def CC_RECT_POINTS_TO_PIXELS - Converts a rect in points to pixels - */ -#define CC_RECT_POINTS_TO_PIXELS(__rect_in_points_points__) \ - CCRectMake( (__rect_in_points_points__).origin.x * CC_CONTENT_SCALE_FACTOR(), (__rect_in_points_points__).origin.y * CC_CONTENT_SCALE_FACTOR(), \ - (__rect_in_points_points__).size.width * CC_CONTENT_SCALE_FACTOR(), (__rect_in_points_points__).size.height * CC_CONTENT_SCALE_FACTOR() ) - -/** @def CC_POINT_PIXELS_TO_POINTS - Converts a rect in pixels to points - */ -#define CC_POINT_PIXELS_TO_POINTS(__pixels__) \ -CCPointMake( (__pixels__).x / CC_CONTENT_SCALE_FACTOR(), (__pixels__).y / CC_CONTENT_SCALE_FACTOR()) - -/** @def CC_POINT_POINTS_TO_PIXELS - Converts a rect in points to pixels - */ -#define CC_POINT_POINTS_TO_PIXELS(__points__) \ -CCPointMake( (__points__).x * CC_CONTENT_SCALE_FACTOR(), (__points__).y * CC_CONTENT_SCALE_FACTOR()) - -/** @def CC_POINT_PIXELS_TO_POINTS - Converts a rect in pixels to points - */ -#define CC_SIZE_PIXELS_TO_POINTS(__size_in_pixels__) \ -CCSizeMake( (__size_in_pixels__).width / CC_CONTENT_SCALE_FACTOR(), (__size_in_pixels__).height / CC_CONTENT_SCALE_FACTOR()) - -/** @def CC_POINT_POINTS_TO_PIXELS - Converts a rect in points to pixels - */ -#define CC_SIZE_POINTS_TO_PIXELS(__size_in_points__) \ -CCSizeMake( (__size_in_points__).width * CC_CONTENT_SCALE_FACTOR(), (__size_in_points__).height * CC_CONTENT_SCALE_FACTOR()) - - -#ifndef FLT_EPSILON -#define FLT_EPSILON 1.192092896e-07F -#endif // FLT_EPSILON - -#define DISALLOW_COPY_AND_ASSIGN(TypeName) \ - TypeName(const TypeName&);\ - void operator=(const TypeName&) - -/** -Helper macros which converts 4-byte little/big endian -integral number to the machine native number representation - -It should work same as apples CFSwapInt32LittleToHost(..) -*/ - -/// when define returns true it means that our architecture uses big endian -#define CC_HOST_IS_BIG_ENDIAN (bool)(*(unsigned short *)"\0\xff" < 0x100) -#define CC_SWAP32(i) ((i & 0x000000ff) << 24 | (i & 0x0000ff00) << 8 | (i & 0x00ff0000) >> 8 | (i & 0xff000000) >> 24) -#define CC_SWAP16(i) ((i & 0x00ff) << 8 | (i &0xff00) >> 8) -#define CC_SWAP_INT32_LITTLE_TO_HOST(i) ((CC_HOST_IS_BIG_ENDIAN == true)? CC_SWAP32(i) : (i) ) -#define CC_SWAP_INT16_LITTLE_TO_HOST(i) ((CC_HOST_IS_BIG_ENDIAN == true)? CC_SWAP16(i) : (i) ) -#define CC_SWAP_INT32_BIG_TO_HOST(i) ((CC_HOST_IS_BIG_ENDIAN == true)? (i) : CC_SWAP32(i) ) -#define CC_SWAP_INT16_BIG_TO_HOST(i) ((CC_HOST_IS_BIG_ENDIAN == true)? (i): CC_SWAP16(i) ) - -/**********************/ -/** Profiling Macros **/ -/**********************/ -#if CC_ENABLE_PROFILERS - -#define CC_PROFILER_DISPLAY_TIMERS() CCProfiler::sharedProfiler()->displayTimers() -#define CC_PROFILER_PURGE_ALL() CCProfiler::sharedProfiler()->releaseAllTimers() - -#define CC_PROFILER_START(__name__) CCProfilingBeginTimingBlock(__name__) -#define CC_PROFILER_STOP(__name__) CCProfilingEndTimingBlock(__name__) -#define CC_PROFILER_RESET(__name__) CCProfilingResetTimingBlock(__name__) - -#define CC_PROFILER_START_CATEGORY(__cat__, __name__) do{ if(__cat__) CCProfilingBeginTimingBlock(__name__); } while(0) -#define CC_PROFILER_STOP_CATEGORY(__cat__, __name__) do{ if(__cat__) CCProfilingEndTimingBlock(__name__); } while(0) -#define CC_PROFILER_RESET_CATEGORY(__cat__, __name__) do{ if(__cat__) CCProfilingResetTimingBlock(__name__); } while(0) - -#define CC_PROFILER_START_INSTANCE(__id__, __name__) do{ CCProfilingBeginTimingBlock( CCString::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0) -#define CC_PROFILER_STOP_INSTANCE(__id__, __name__) do{ CCProfilingEndTimingBlock( CCString::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0) -#define CC_PROFILER_RESET_INSTANCE(__id__, __name__) do{ CCProfilingResetTimingBlock( CCString::createWithFormat("%08X - %s", __id__, __name__)->getCString() ); } while(0) - - -#else - -#define CC_PROFILER_DISPLAY_TIMERS() do {} while (0) -#define CC_PROFILER_PURGE_ALL() do {} while (0) - -#define CC_PROFILER_START(__name__) do {} while (0) -#define CC_PROFILER_STOP(__name__) do {} while (0) -#define CC_PROFILER_RESET(__name__) do {} while (0) - -#define CC_PROFILER_START_CATEGORY(__cat__, __name__) do {} while(0) -#define CC_PROFILER_STOP_CATEGORY(__cat__, __name__) do {} while(0) -#define CC_PROFILER_RESET_CATEGORY(__cat__, __name__) do {} while(0) - -#define CC_PROFILER_START_INSTANCE(__id__, __name__) do {} while(0) -#define CC_PROFILER_STOP_INSTANCE(__id__, __name__) do {} while(0) -#define CC_PROFILER_RESET_INSTANCE(__id__, __name__) do {} while(0) - -#endif - -#if !defined(COCOS2D_DEBUG) || COCOS2D_DEBUG == 0 -#define CHECK_GL_ERROR_DEBUG() -#else -#define CHECK_GL_ERROR_DEBUG() \ - do { \ - GLenum __error = glGetError(); \ - if(__error) { \ - CCLog("OpenGL error 0x%04X in %s %s %d\n", __error, __FILE__, __FUNCTION__, __LINE__); \ - } \ - } while (false) -#endif - -/** @def CC_INCREMENT_GL_DRAWS_BY_ONE - Increments the GL Draws counts by one. - The number of calls per frame are displayed on the screen when the CCDirector's stats are enabled. - */ -extern unsigned int CC_DLL g_uNumberOfDraws; -#define CC_INCREMENT_GL_DRAWS(__n__) g_uNumberOfDraws += __n__ - -/*******************/ -/** Notifications **/ -/*******************/ -/** @def CCAnimationFrameDisplayedNotification - Notification name when a CCSpriteFrame is displayed - */ -#define CCAnimationFrameDisplayedNotification "CCAnimationFrameDisplayedNotification" - -#endif // __CCMACROS_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/include/ccTypeInfo.h b/cappuccino-sdk/incl/cocos2dx/include/ccTypeInfo.h deleted file mode 100644 index c7eeedd..0000000 --- a/cappuccino-sdk/incl/cocos2dx/include/ccTypeInfo.h +++ /dev/null @@ -1,57 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef cocos2dx_ccTypeInfo_h -#define cocos2dx_ccTypeInfo_h - -#include "platform/CCPlatformMacros.h" - -#include -#include -#include - -NS_CC_BEGIN - -class TypeInfo -{ -public: - virtual long getClassTypeInfo() = 0; -}; - -static inline unsigned int getHashCodeByString(const char *key) -{ - unsigned int len = strlen(key); - const char *end=key+len; - unsigned int hash; - - for (hash = 0; key < end; key++) - { - hash *= 16777619; - hash ^= (unsigned int) (unsigned char) toupper(*key); - } - return (hash); -} -NS_CC_END - -#endif diff --git a/cappuccino-sdk/incl/cocos2dx/include/ccTypes.h b/cappuccino-sdk/incl/cocos2dx/include/ccTypes.h deleted file mode 100644 index f5596d3..0000000 --- a/cappuccino-sdk/incl/cocos2dx/include/ccTypes.h +++ /dev/null @@ -1,441 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCTYPES_H__ -#define __CCTYPES_H__ - -#include -#include "cocoa/CCGeometry.h" -#include "CCGL.h" - - -NS_CC_BEGIN - -/** RGB color composed of bytes 3 bytes -@since v0.8 - */ -typedef struct _ccColor3B -{ - GLubyte r; - GLubyte g; - GLubyte b; -} ccColor3B; - -//! helper macro that creates an ccColor3B type -static inline ccColor3B -ccc3(const GLubyte r, const GLubyte g, const GLubyte b) -{ - ccColor3B c = {r, g, b}; - return c; -} - -/** returns true if both ccColor3B are equal. Otherwise it returns false. - */ -static inline bool ccc3BEqual(const ccColor3B &col1, const ccColor3B &col2) -{ - return col1.r == col2.r && col1.g == col2.g && col1.b == col2.b; -} - -//ccColor3B predefined colors -//! White color (255,255,255) -static const ccColor3B ccWHITE={255,255,255}; -//! Yellow color (255,255,0) -static const ccColor3B ccYELLOW={255,255,0}; -//! Blue color (0,0,255) -static const ccColor3B ccBLUE={0,0,255}; -//! Green Color (0,255,0) -static const ccColor3B ccGREEN={0,255,0}; -//! Red Color (255,0,0,) -static const ccColor3B ccRED={255,0,0}; -//! Magenta Color (255,0,255) -static const ccColor3B ccMAGENTA={255,0,255}; -//! Black Color (0,0,0) -static const ccColor3B ccBLACK={0,0,0}; -//! Orange Color (255,127,0) -static const ccColor3B ccORANGE={255,127,0}; -//! Gray Color (166,166,166) -static const ccColor3B ccGRAY={166,166,166}; - -/** RGBA color composed of 4 bytes -@since v0.8 -*/ -typedef struct _ccColor4B -{ - GLubyte r; - GLubyte g; - GLubyte b; - GLubyte a; -} ccColor4B; -//! helper macro that creates an ccColor4B type -static inline ccColor4B -ccc4(const GLubyte r, const GLubyte g, const GLubyte b, const GLubyte o) -{ - ccColor4B c = {r, g, b, o}; - return c; -} - - -/** RGBA color composed of 4 floats -@since v0.8 -*/ -typedef struct _ccColor4F { - GLfloat r; - GLfloat g; - GLfloat b; - GLfloat a; -} ccColor4F; - - -/** Returns a ccColor4F from a ccColor3B. Alpha will be 1. - @since v0.99.1 - */ -static inline ccColor4F ccc4FFromccc3B(ccColor3B c) -{ - ccColor4F c4 = {c.r/255.f, c.g/255.f, c.b/255.f, 1.f}; - return c4; -} - -//! helper that creates a ccColor4f type -static inline ccColor4F -ccc4f(const GLfloat r, const GLfloat g, const GLfloat b, const GLfloat a) -{ - ccColor4F c4 = {r, g, b, a}; - return c4; -} - -/** Returns a ccColor4F from a ccColor4B. - @since v0.99.1 - */ -static inline ccColor4F ccc4FFromccc4B(ccColor4B c) -{ - ccColor4F c4 = {c.r/255.f, c.g/255.f, c.b/255.f, c.a/255.f}; - return c4; -} - -static inline ccColor4B ccc4BFromccc4F(ccColor4F c) -{ - ccColor4B ret = {(GLubyte)(c.r*255), (GLubyte)(c.g*255), (GLubyte)(c.b*255), (GLubyte)(c.a*255)}; - return ret; -} - -/** returns YES if both ccColor4F are equal. Otherwise it returns NO. - @since v0.99.1 - */ -static inline bool ccc4FEqual(ccColor4F a, ccColor4F b) -{ - return a.r == b.r && a.g == b.g && a.b == b.b && a.a == b.a; -} - -/** A vertex composed of 2 floats: x, y - @since v0.8 - */ -typedef struct _ccVertex2F -{ - GLfloat x; - GLfloat y; -} ccVertex2F; - -static inline ccVertex2F vertex2(const float x, const float y) -{ - ccVertex2F c = {x, y}; - return c; -} - - -/** A vertex composed of 2 floats: x, y - @since v0.8 - */ -typedef struct _ccVertex3F -{ - GLfloat x; - GLfloat y; - GLfloat z; -} ccVertex3F; - -static inline ccVertex3F vertex3(const float x, const float y, const float z) -{ - ccVertex3F c = {x, y, z}; - return c; -} - -/** A texcoord composed of 2 floats: u, y - @since v0.8 - */ -typedef struct _ccTex2F { - GLfloat u; - GLfloat v; -} ccTex2F; - -static inline ccTex2F tex2(const float u, const float v) -{ - ccTex2F t = {u , v}; - return t; -} - - -//! Point Sprite component -typedef struct _ccPointSprite -{ - ccVertex2F pos; // 8 bytes - ccColor4B color; // 4 bytes - GLfloat size; // 4 bytes -} ccPointSprite; - -//! A 2D Quad. 4 * 2 floats -typedef struct _ccQuad2 { - ccVertex2F tl; - ccVertex2F tr; - ccVertex2F bl; - ccVertex2F br; -} ccQuad2; - - -//! A 3D Quad. 4 * 3 floats -typedef struct _ccQuad3 { - ccVertex3F bl; - ccVertex3F br; - ccVertex3F tl; - ccVertex3F tr; -} ccQuad3; - -//! a Point with a vertex point, a tex coord point and a color 4B -typedef struct _ccV2F_C4B_T2F -{ - //! vertices (2F) - ccVertex2F vertices; - //! colors (4B) - ccColor4B colors; - //! tex coords (2F) - ccTex2F texCoords; -} ccV2F_C4B_T2F; - -//! a Point with a vertex point, a tex coord point and a color 4F -typedef struct _ccV2F_C4F_T2F -{ - //! vertices (2F) - ccVertex2F vertices; - //! colors (4F) - ccColor4F colors; - //! tex coords (2F) - ccTex2F texCoords; -} ccV2F_C4F_T2F; - -//! a Point with a vertex point, a tex coord point and a color 4B -typedef struct _ccV3F_C4B_T2F -{ - //! vertices (3F) - ccVertex3F vertices; // 12 bytes -// char __padding__[4]; - - //! colors (4B) - ccColor4B colors; // 4 bytes -// char __padding2__[4]; - - // tex coords (2F) - ccTex2F texCoords; // 8 bytes -} ccV3F_C4B_T2F; - -//! A Triangle of ccV2F_C4B_T2F -typedef struct _ccV2F_C4B_T2F_Triangle -{ - //! Point A - ccV2F_C4B_T2F a; - //! Point B - ccV2F_C4B_T2F b; - //! Point B - ccV2F_C4B_T2F c; -} ccV2F_C4B_T2F_Triangle; - -//! A Quad of ccV2F_C4B_T2F -typedef struct _ccV2F_C4B_T2F_Quad -{ - //! bottom left - ccV2F_C4B_T2F bl; - //! bottom right - ccV2F_C4B_T2F br; - //! top left - ccV2F_C4B_T2F tl; - //! top right - ccV2F_C4B_T2F tr; -} ccV2F_C4B_T2F_Quad; - -//! 4 ccVertex3FTex2FColor4B -typedef struct _ccV3F_C4B_T2F_Quad -{ - //! top left - ccV3F_C4B_T2F tl; - //! bottom left - ccV3F_C4B_T2F bl; - //! top right - ccV3F_C4B_T2F tr; - //! bottom right - ccV3F_C4B_T2F br; -} ccV3F_C4B_T2F_Quad; - -//! 4 ccVertex2FTex2FColor4F Quad -typedef struct _ccV2F_C4F_T2F_Quad -{ - //! bottom left - ccV2F_C4F_T2F bl; - //! bottom right - ccV2F_C4F_T2F br; - //! top left - ccV2F_C4F_T2F tl; - //! top right - ccV2F_C4F_T2F tr; -} ccV2F_C4F_T2F_Quad; - -//! Blend Function used for textures -typedef struct _ccBlendFunc -{ - //! source blend function - GLenum src; - //! destination blend function - GLenum dst; -} ccBlendFunc; - -static const ccBlendFunc kCCBlendFuncDisable = {GL_ONE, GL_ZERO}; - -// XXX: If any of these enums are edited and/or reordered, update CCTexture2D.m -//! Vertical text alignment type -typedef enum -{ - kCCVerticalTextAlignmentTop, - kCCVerticalTextAlignmentCenter, - kCCVerticalTextAlignmentBottom, -} CCVerticalTextAlignment; - -// XXX: If any of these enums are edited and/or reordered, update CCTexture2D.m -//! Horizontal text alignment type -typedef enum -{ - kCCTextAlignmentLeft, - kCCTextAlignmentCenter, - kCCTextAlignmentRight, -} CCTextAlignment; - -// types for animation in particle systems - -// texture coordinates for a quad -typedef struct _ccT2F_Quad -{ - //! bottom left - ccTex2F bl; - //! bottom right - ccTex2F br; - //! top left - ccTex2F tl; - //! top right - ccTex2F tr; -} ccT2F_Quad; - -// struct that holds the size in pixels, texture coordinates and delays for animated CCParticleSystemQuad -typedef struct -{ - ccT2F_Quad texCoords; - float delay; - CCSize size; -} ccAnimationFrameData; - - - -/** - types used for defining fonts properties (i.e. font name, size, stroke or shadow) - */ - -// shadow attributes -typedef struct _ccFontShadow -{ -public: - - // shadow is not enabled by default - _ccFontShadow(): m_shadowEnabled(false) {} - - // true if shadow enabled - bool m_shadowEnabled; - // shadow x and y offset - CCSize m_shadowOffset; - // shadow blurrines - float m_shadowBlur; - // shadow opacity - float m_shadowOpacity; - -} ccFontShadow; - -// stroke attributes -typedef struct _ccFontStroke -{ -public: - - // stroke is disabled by default - _ccFontStroke(): m_strokeEnabled(false) {} - - // true if stroke enabled - bool m_strokeEnabled; - // stroke color - ccColor3B m_strokeColor; - // stroke size - float m_strokeSize; - -} ccFontStroke; - -// font attributes -/** - * @js NA - * @lua NA - */ -typedef struct _ccFontDefinition -{ -public: - - _ccFontDefinition(): m_alignment(kCCTextAlignmentCenter), - m_vertAlignment(kCCVerticalTextAlignmentTop), - m_fontFillColor(ccWHITE) - { m_dimensions = CCSizeMake(0,0); } - - // font name - std::string m_fontName; - // font size - int m_fontSize; - // horizontal alignment - CCTextAlignment m_alignment; - // vertical alignment - CCVerticalTextAlignment m_vertAlignment; - // renering box - CCSize m_dimensions; - // font color - ccColor3B m_fontFillColor; - // font shadow - ccFontShadow m_shadow; - // font stroke - ccFontStroke m_stroke; - -} ccFontDefinition; - - -NS_CC_END - -#endif //__CCTYPES_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/include/cocos2d.h b/cappuccino-sdk/incl/cocos2dx/include/cocos2d.h deleted file mode 100644 index 40674ba..0000000 --- a/cappuccino-sdk/incl/cocos2dx/include/cocos2d.h +++ /dev/null @@ -1,311 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. -Copyright (c) Microsoft Open Technologies, Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __COCOS2D_H__ -#define __COCOS2D_H__ - -// 0x00 HI ME LO -// 00 02 01 00 -#define COCOS2D_VERSION 0x00020100 - -// -// all cocos2d include files -// -#include "ccConfig.h" - -// actions -#include "actions/CCAction.h" -#include "actions/CCActionInterval.h" -#include "actions/CCActionCamera.h" -#include "actions/CCActionManager.h" -#include "actions/CCActionEase.h" -#include "actions/CCActionPageTurn3D.h" -#include "actions/CCActionGrid.h" -#include "actions/CCActionProgressTimer.h" -#include "actions/CCActionGrid3D.h" -#include "actions/CCActionTiledGrid.h" -#include "actions/CCActionInstant.h" -#include "actions/CCActionTween.h" -#include "actions/CCActionCatmullRom.h" - -// base_nodes -#include "base_nodes/CCNode.h" -#include "base_nodes/CCAtlasNode.h" - -// cocoa -#include "cocoa/CCAffineTransform.h" -#include "cocoa/CCDictionary.h" -#include "cocoa/CCObject.h" -#include "cocoa/CCArray.h" -#include "cocoa/CCGeometry.h" -#include "cocoa/CCSet.h" -#include "cocoa/CCAutoreleasePool.h" -#include "cocoa/CCInteger.h" -#include "cocoa/CCFloat.h" -#include "cocoa/CCDouble.h" -#include "cocoa/CCBool.h" -#include "cocoa/CCString.h" -#include "cocoa/CCNS.h" -#include "cocoa/CCZone.h" - -// draw nodes -#include "draw_nodes/CCDrawingPrimitives.h" -#include "draw_nodes/CCDrawNode.h" - -// effects -#include "effects/CCGrabber.h" -#include "effects/CCGrid.h" - -// include -#include "CCEventType.h" -#include "CCProtocols.h" -#include "ccConfig.h" -#include "ccMacros.h" -#include "ccTypes.h" - -// kazmath -#include "kazmath/include/kazmath/kazmath.h" -#include "kazmath/include/kazmath/GL/matrix.h" - -// keypad_dispatcher -#include "keypad_dispatcher/CCKeypadDelegate.h" -#include "keypad_dispatcher/CCKeypadDispatcher.h" - -// label_nodes -#include "label_nodes/CCLabelAtlas.h" -#include "label_nodes/CCLabelTTF.h" -#include "label_nodes/CCLabelBMFont.h" - -// layers_scenes_transitions_nodes -#include "layers_scenes_transitions_nodes/CCLayer.h" -#include "layers_scenes_transitions_nodes/CCScene.h" -#include "layers_scenes_transitions_nodes/CCTransition.h" -#include "layers_scenes_transitions_nodes/CCTransitionPageTurn.h" -#include "layers_scenes_transitions_nodes/CCTransitionProgress.h" - -// menu_nodes -#include "menu_nodes/CCMenu.h" -#include "menu_nodes/CCMenuItem.h" - -// misc_nodes -#include "misc_nodes/CCClippingNode.h" -#include "misc_nodes/CCMotionStreak.h" -#include "misc_nodes/CCProgressTimer.h" -#include "misc_nodes/CCRenderTexture.h" - -// particle_nodes -#include "particle_nodes/CCParticleBatchNode.h" -#include "particle_nodes/CCParticleSystem.h" -#include "particle_nodes/CCParticleExamples.h" -#include "particle_nodes/CCParticleSystemQuad.h" - -// platform -#include "platform/CCDevice.h" -#include "platform/CCCommon.h" -#include "platform/CCFileUtils.h" -#include "platform/CCImage.h" -#include "platform/CCSAXParser.h" -#include "platform/CCThread.h" -#include "platform/platform.h" -#include "platform/CCPlatformConfig.h" -#include "platform/CCPlatformMacros.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) - #include "platform/ios/CCAccelerometer.h" - #include "platform/ios/CCApplication.h" - #include "platform/ios/CCEGLView.h" - #include "platform/ios/CCGL.h" - #include "platform/ios/CCStdC.h" -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_IOS - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) - #include "platform/android/CCAccelerometer.h" - #include "platform/android/CCApplication.h" - #include "platform/android/CCEGLView.h" - #include "platform/android/CCGL.h" - #include "platform/android/CCStdC.h" -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY) - #include "platform/blackberry/CCAccelerometer.h" - #include "platform/blackberry/CCApplication.h" - #include "platform/blackberry/CCEGLView.h" - #include "platform/blackberry/CCGL.h" - #include "platform/blackberry/CCStdC.h" -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - #include "platform/win32/CCAccelerometer.h" - #include "platform/win32/CCApplication.h" - #include "platform/win32/CCEGLView.h" - #include "platform/win32/CCGL.h" - #include "platform/win32/CCStdC.h" -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WIN32 - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) - #include "platform/winrt/CCApplication.h" - #include "platform/winrt/CCEGLView.h" - #include "platform/winrt/CCGL.h" - #include "platform/winrt/CCStdC.h" - #include "platform/winrt/CCAccelerometer.h" - #include "platform/winrt/CCPrecompiledShaders.h" -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WINRT - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - #include "platform/winrt/CCApplication.h" - #include "platform/wp8/CCEGLView.h" - #include "platform/winrt/CCGL.h" - #include "platform/winrt/CCStdC.h" - #include "platform/winrt/CCAccelerometer.h" - #include "platform/winrt/CCPrecompiledShaders.h" -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_WP8 - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) - #include "platform/mac/CCAccelerometer.h" - #include "platform/mac/CCApplication.h" - #include "platform/mac/CCEGLView.h" - #include "platform/mac/CCGL.h" - #include "platform/mac/CCStdC.h" -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_MAC - - - - - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_LINUX) - #include "platform/linux/CCAccelerometer.h" - #include "platform/linux/CCApplication.h" - #include "platform/linux/CCEGLView.h" - #include "platform/linux/CCGL.h" - #include "platform/linux/CCStdC.h" -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX - -// MARMALADE CHANGE -// Added for Marmalade support -#if (CC_TARGET_PLATFORM == CC_PLATFORM_MARMALADE) - #include "platform/Marmalade/CCAccelerometer.h" - #include "platform/Marmalade/CCApplication.h" - #include "platform/Marmalade/CCEGLView.h" - #include "platform/Marmalade/CCGL.h" - #include "platform/Marmalade/CCStdC.h" -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_LINUX - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_NACL) - #include "platform/nacl/CCAccelerometer.h" - #include "platform/nacl/CCApplication.h" - #include "platform/nacl/CCEGLView.h" - #include "platform/nacl/CCGL.h" - #include "platform/nacl/CCStdC.h" -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_EMSCRIPTEN) - #include "platform/emscripten/CCAccelerometer.h" - #include "platform/emscripten/CCApplication.h" - #include "platform/emscripten/CCEGLView.h" - #include "platform/emscripten/CCGL.h" - #include "platform/emscripten/CCStdC.h" -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_EMSCRIPTEN - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN) - #include "platform/tizen/CCAccelerometer.h" - #include "platform/tizen/CCApplication.h" - #include "platform/tizen/CCEGLView.h" - #include "platform/tizen/CCGL.h" - #include "platform/tizen/CCStdC.h" -#endif // CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN - -// script_support -#include "script_support/CCScriptSupport.h" - -// shaders -#include "shaders/CCGLProgram.h" -#include "shaders/ccGLStateCache.h" -#include "shaders/CCShaderCache.h" -#include "shaders/ccShaders.h" - -// sprite_nodes -#include "sprite_nodes/CCAnimation.h" -#include "sprite_nodes/CCAnimationCache.h" -#include "sprite_nodes/CCSprite.h" -#include "sprite_nodes/CCSpriteBatchNode.h" -#include "sprite_nodes/CCSpriteFrame.h" -#include "sprite_nodes/CCSpriteFrameCache.h" - -// support -#include "support/ccUTF8.h" -#include "support/CCNotificationCenter.h" -#include "support/CCPointExtension.h" -#include "support/CCProfiling.h" -#include "support/user_default/CCUserDefault.h" -#include "support/CCVertex.h" -#include "support/tinyxml2/tinyxml2.h" - -// text_input_node -#include "text_input_node/CCIMEDelegate.h" -#include "text_input_node/CCIMEDispatcher.h" -#include "text_input_node/CCTextFieldTTF.h" - -// textures -#include "textures/CCTexture2D.h" -#include "textures/CCTextureAtlas.h" -#include "textures/CCTextureCache.h" -#include "textures/CCTexturePVR.h" - -// tilemap_parallax_nodes -#include "tilemap_parallax_nodes/CCParallaxNode.h" -#include "tilemap_parallax_nodes/CCTMXLayer.h" -#include "tilemap_parallax_nodes/CCTMXObjectGroup.h" -#include "tilemap_parallax_nodes/CCTMXTiledMap.h" -#include "tilemap_parallax_nodes/CCTMXXMLParser.h" -#include "tilemap_parallax_nodes/CCTileMapAtlas.h" - -// touch_dispatcher -#include "touch_dispatcher/CCTouch.h" -#include "touch_dispatcher/CCTouchDelegateProtocol.h" -#include "touch_dispatcher/CCTouchDispatcher.h" -#include "touch_dispatcher/CCTouchHandler.h" - -// root -#include "CCCamera.h" -#include "CCConfiguration.h" -#include "CCDirector.h" -#include "CCScheduler.h" - -// component -#include "support/component/CCComponent.h" -#include "support/component/CCComponentContainer.h" - -//New Classes -#include "custom/Sprites/CCSpriteExtra/CCSpriteExtra.h" -#include "custom/Sprites//CCMenuItemSpriteExtra/CCMenuItemSpriteExtra.h" -NS_CC_BEGIN - -CC_DLL const char* cocos2dVersion(); - -NS_CC_END - -#endif // __COCOS2D_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/GL/mat4stack.h b/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/GL/mat4stack.h deleted file mode 100644 index a1084c8..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/GL/mat4stack.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef C_STACK_H_INCLUDED -#define C_STACK_H_INCLUDED - -#include "../mat4.h" - -typedef struct km_mat4_stack { - int capacity; //The total item capacity - int item_count; //The number of items - kmMat4* top; - kmMat4* stack; -} km_mat4_stack; - -#ifdef __cplusplus -extern "C" { -#endif - -void km_mat4_stack_initialize(km_mat4_stack* stack); -void km_mat4_stack_push(km_mat4_stack* stack, const kmMat4* item); -void km_mat4_stack_pop(km_mat4_stack* stack, kmMat4* pOut); -void km_mat4_stack_release(km_mat4_stack* stack); - -#ifdef __cplusplus -} -#endif - -#endif // C_STACK_H_INCLUDED diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/GL/matrix.h b/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/GL/matrix.h deleted file mode 100644 index a1c95f8..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/GL/matrix.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef KM_GL_MATRIX_H_INCLUDED -#define KM_GL_MATRIX_H_INCLUDED - -#include "platform/CCPlatformMacros.h" - -#define KM_GL_MODELVIEW 0x1700 -#define KM_GL_PROJECTION 0x1701 -#define KM_GL_TEXTURE 0x1702 - -typedef unsigned int kmGLEnum; - -#include "../mat4.h" -#include "../vec3.h" - -#ifdef __cplusplus -extern "C" { -#endif - -void CC_DLL kmGLFreeAll(void); -void CC_DLL kmGLPushMatrix(void); -void CC_DLL kmGLPopMatrix(void); -void CC_DLL kmGLMatrixMode(kmGLEnum mode); -void CC_DLL kmGLLoadIdentity(void); -void CC_DLL kmGLLoadMatrix(const kmMat4* pIn); -void CC_DLL kmGLMultMatrix(const kmMat4* pIn); -void CC_DLL kmGLTranslatef(float x, float y, float z); -void CC_DLL kmGLRotatef(float angle, float x, float y, float z); -void CC_DLL kmGLScalef(float x, float y, float z); -void CC_DLL kmGLGetMatrix(kmGLEnum mode, kmMat4* pOut); - -#ifdef __cplusplus -} -#endif - -#endif // MATRIX_H_INCLUDED diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/aabb.h b/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/aabb.h deleted file mode 100644 index 629889c..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/aabb.h +++ /dev/null @@ -1,54 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef KAZMATH_AABB_H_INCLUDED -#define KAZMATH_AABB_H_INCLUDED - -#include "platform/CCPlatformMacros.h" -#include "vec3.h" -#include "utility.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * A structure that represents an axis-aligned - * bounding box. - */ -typedef struct kmAABB { - kmVec3 min; /** The max corner of the box */ - kmVec3 max; /** The min corner of the box */ -} kmAABB; - -CC_DLL const int kmAABBContainsPoint(const kmVec3* pPoint, const kmAABB* pBox); -CC_DLL kmAABB* const kmAABBAssign(kmAABB* pOut, const kmAABB* pIn); -CC_DLL kmAABB* const kmAABBScale(kmAABB* pOut, const kmAABB* pIn, kmScalar s); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/kazmath.h b/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/kazmath.h deleted file mode 100644 index ef09870..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/kazmath.h +++ /dev/null @@ -1,39 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef KAZMATH_H_INCLUDED -#define KAZMATH_H_INCLUDED - -#include "vec2.h" -#include "vec3.h" -#include "mat3.h" -#include "mat4.h" -#include "utility.h" -#include "quaternion.h" -#include "plane.h" -#include "aabb.h" -#include "ray2.h" - -#endif // KAZMATH_H_INCLUDED diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/mat3.h b/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/mat3.h deleted file mode 100644 index 4d22dfb..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/mat3.h +++ /dev/null @@ -1,76 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - -#ifndef MAT3_H_INCLUDED -#define MAT3_H_INCLUDED - -#include "platform/CCPlatformMacros.h" -#include "utility.h" - -struct kmVec3; -struct kmQuaternion; - -typedef struct kmMat3{ - kmScalar mat[9]; -} kmMat3; - -#ifdef __cplusplus -extern "C" { -#endif - -CC_DLL kmMat3* const kmMat3Fill(kmMat3* pOut, const kmScalar* pMat); -CC_DLL kmMat3* const kmMat3Adjugate(kmMat3* pOut, const kmMat3* pIn); -CC_DLL kmMat3* const kmMat3Identity(kmMat3* pOut); -CC_DLL kmMat3* const kmMat3Inverse(kmMat3* pOut, const kmScalar pDeterminate, const kmMat3* pM); -CC_DLL const int kmMat3IsIdentity(const kmMat3* pIn); -CC_DLL kmMat3* const kmMat3Transpose(kmMat3* pOut, const kmMat3* pIn); -CC_DLL const kmScalar kmMat3Determinant(const kmMat3* pIn); -CC_DLL kmMat3* const kmMat3Multiply(kmMat3* pOut, const kmMat3* pM1, const kmMat3* pM2); -CC_DLL kmMat3* const kmMat3ScalarMultiply(kmMat3* pOut, const kmMat3* pM, const kmScalar pFactor); - -CC_DLL kmMat3* const kmMat3RotationAxisAngle(kmMat3* pOut, const struct kmVec3* axis, kmScalar radians); -CC_DLL struct kmVec3* const kmMat3RotationToAxisAngle(struct kmVec3* pAxis, kmScalar* radians, const kmMat3* pIn); - -CC_DLL kmMat3* const kmMat3Assign(kmMat3* pOut, const kmMat3* pIn); -CC_DLL const int kmMat3AreEqual(const kmMat3* pM1, const kmMat3* pM2); - -CC_DLL kmMat3* const kmMat3RotationX(kmMat3* pOut, const kmScalar radians); -CC_DLL kmMat3* const kmMat3RotationY(kmMat3* pOut, const kmScalar radians); -CC_DLL kmMat3* const kmMat3RotationZ(kmMat3* pOut, const kmScalar radians); - -CC_DLL kmMat3* const kmMat3Rotation(kmMat3* pOut, const kmScalar radians); -CC_DLL kmMat3* const kmMat3Scaling(kmMat3* pOut, const kmScalar x, const kmScalar y); -CC_DLL kmMat3* const kmMat3Translation(kmMat3* pOut, const kmScalar x, const kmScalar y); - -CC_DLL kmMat3* const kmMat3RotationQuaternion(kmMat3* pOut, const struct kmQuaternion* pIn); -CC_DLL kmMat3* const kmMat3RotationAxisAngle(kmMat3* pOut, const struct kmVec3* axis, kmScalar radians); -CC_DLL struct kmVec3* const kmMat3RotationToAxisAngle(struct kmVec3* pAxis, kmScalar* radians, const kmMat3* pIn); - -#ifdef __cplusplus -} -#endif -#endif // MAT3_H_INCLUDED - diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/mat4.h b/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/mat4.h deleted file mode 100644 index 241a0b9..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/mat4.h +++ /dev/null @@ -1,94 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef MAT4_H_INCLUDED -#define MAT4_H_INCLUDED - -#include "platform/CCPlatformMacros.h" -#include "utility.h" - -struct kmVec3; -struct kmMat3; -struct kmQuaternion; -struct kmPlane; - -/* -A 4x4 matrix - - | 0 4 8 12 | -mat = | 1 5 9 13 | - | 2 6 10 14 | - | 3 7 11 15 | -*/ - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct kmMat4 { - kmScalar mat[16]; -} kmMat4; - -CC_DLL kmMat4* const kmMat4Fill(kmMat4* pOut, const kmScalar* pMat); - - -CC_DLL kmMat4* const kmMat4Identity(kmMat4* pOut); - -CC_DLL kmMat4* const kmMat4Inverse(kmMat4* pOut, const kmMat4* pM); - - -CC_DLL const int kmMat4IsIdentity(const kmMat4* pIn); - -CC_DLL kmMat4* const kmMat4Transpose(kmMat4* pOut, const kmMat4* pIn); -CC_DLL kmMat4* const kmMat4Multiply(kmMat4* pOut, const kmMat4* pM1, const kmMat4* pM2); - -CC_DLL kmMat4* const kmMat4Assign(kmMat4* pOut, const kmMat4* pIn); -CC_DLL const int kmMat4AreEqual(const kmMat4* pM1, const kmMat4* pM2); - -CC_DLL kmMat4* const kmMat4RotationX(kmMat4* pOut, const kmScalar radians); -CC_DLL kmMat4* const kmMat4RotationY(kmMat4* pOut, const kmScalar radians); -CC_DLL kmMat4* const kmMat4RotationZ(kmMat4* pOut, const kmScalar radians); -CC_DLL kmMat4* const kmMat4RotationPitchYawRoll(kmMat4* pOut, const kmScalar pitch, const kmScalar yaw, const kmScalar roll); -CC_DLL kmMat4* const kmMat4RotationQuaternion(kmMat4* pOut, const struct kmQuaternion* pQ); -CC_DLL kmMat4* const kmMat4RotationTranslation(kmMat4* pOut, const struct kmMat3* rotation, const struct kmVec3* translation); -CC_DLL kmMat4* const kmMat4Scaling(kmMat4* pOut, const kmScalar x, const kmScalar y, const kmScalar z); -CC_DLL kmMat4* const kmMat4Translation(kmMat4* pOut, const kmScalar x, const kmScalar y, const kmScalar z); - -CC_DLL struct kmVec3* const kmMat4GetUpVec3(struct kmVec3* pOut, const kmMat4* pIn); -CC_DLL struct kmVec3* const kmMat4GetRightVec3(struct kmVec3* pOut, const kmMat4* pIn); -CC_DLL struct kmVec3* const kmMat4GetForwardVec3(struct kmVec3* pOut, const kmMat4* pIn); - -CC_DLL kmMat4* const kmMat4PerspectiveProjection(kmMat4* pOut, kmScalar fovY, kmScalar aspect, kmScalar zNear, kmScalar zFar); -CC_DLL kmMat4* const kmMat4OrthographicProjection(kmMat4* pOut, kmScalar left, kmScalar right, kmScalar bottom, kmScalar top, kmScalar nearVal, kmScalar farVal); -CC_DLL kmMat4* const kmMat4LookAt(kmMat4* pOut, const struct kmVec3* pEye, const struct kmVec3* pCenter, const struct kmVec3* pUp); - -CC_DLL kmMat4* const kmMat4RotationAxisAngle(kmMat4* pOut, const struct kmVec3* axis, kmScalar radians); -CC_DLL struct kmMat3* const kmMat4ExtractRotation(struct kmMat3* pOut, const kmMat4* pIn); -CC_DLL struct kmPlane* const kmMat4ExtractPlane(struct kmPlane* pOut, const kmMat4* pIn, const kmEnum plane); -CC_DLL struct kmVec3* const kmMat4RotationToAxisAngle(struct kmVec3* pAxis, kmScalar* radians, const kmMat4* pIn); -#ifdef __cplusplus -} -#endif -#endif /* MAT4_H_INCLUDED */ diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/neon_matrix_impl.h b/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/neon_matrix_impl.h deleted file mode 100644 index aa85e6d..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/neon_matrix_impl.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - NEON math library for the iPhone / iPod touch - - Copyright (c) 2009 Justin Saunders - - This software is provided 'as-is', without any express or implied warranty. - In no event will the authors be held liable for any damages arising - from the use of this software. - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it freely, - subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product documentation - would be appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source distribution. -*/ - -#ifndef __NEON_MATRIX_IMPL_H__ -#define __NEON_MATRIX_IMPL_H__ - -#ifdef __arm__ -#if defined(__QNX__) || defined(ANDROID) || defined(I3D_ARCH_ARM) || defined(__native_client__) || defined(TIZEN) // MARMALADE CHANGE: Added for Marmalade support -// blackberry and android don't have arm/arch.h but it defines __arm__ -#else -#include "arm/arch.h" -#endif -#endif // __arm__ - -// Matrices are assumed to be stored in column major format according to OpenGL -// specification. - -// Multiplies two 4x4 matrices (a,b) outputting a 4x4 matrix (output) -void NEON_Matrix4Mul(const float* a, const float* b, float* output ); - -// Multiplies a 4x4 matrix (m) with a vector 4 (v), outputting a vector 4 -void NEON_Matrix4Vector4Mul(const float* m, const float* v, float* output); - - -#endif // __NEON_MATRIX_IMPL_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/plane.h b/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/plane.h deleted file mode 100644 index c4e4fe5..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/plane.h +++ /dev/null @@ -1,71 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef PLANE_H_INCLUDED -#define PLANE_H_INCLUDED - -#define KM_PLANE_LEFT 0 -#define KM_PLANE_RIGHT 1 -#define KM_PLANE_BOTTOM 2 -#define KM_PLANE_TOP 3 -#define KM_PLANE_NEAR 4 -#define KM_PLANE_FAR 5 - -#include "platform/CCPlatformMacros.h" -#include "utility.h" - -struct kmVec3; -struct kmVec4; -struct kmMat4; - -typedef struct kmPlane { - kmScalar a, b, c, d; -} kmPlane; - -#ifdef __cplusplus -extern "C" { -#endif - -typedef enum POINT_CLASSIFICATION { - POINT_INFRONT_OF_PLANE = 0, - POINT_BEHIND_PLANE, - POINT_ON_PLANE, -} POINT_CLASSIFICATION; - -CC_DLL const kmScalar kmPlaneDot(const kmPlane* pP, const struct kmVec4* pV); -CC_DLL const kmScalar kmPlaneDotCoord(const kmPlane* pP, const struct kmVec3* pV); -CC_DLL const kmScalar kmPlaneDotNormal(const kmPlane* pP, const struct kmVec3* pV); -CC_DLL kmPlane* const kmPlaneFromPointNormal(kmPlane* pOut, const struct kmVec3* pPoint, const struct kmVec3* pNormal); -CC_DLL kmPlane* const kmPlaneFromPoints(kmPlane* pOut, const struct kmVec3* p1, const struct kmVec3* p2, const struct kmVec3* p3); -CC_DLL kmVec3* const kmPlaneIntersectLine(struct kmVec3* pOut, const kmPlane* pP, const struct kmVec3* pV1, const struct kmVec3* pV2); -CC_DLL kmPlane* const kmPlaneNormalize(kmPlane* pOut, const kmPlane* pP); -CC_DLL kmPlane* const kmPlaneScale(kmPlane* pOut, const kmPlane* pP, kmScalar s); -CC_DLL const POINT_CLASSIFICATION kmPlaneClassifyPoint(const kmPlane* pIn, const kmVec3* pP); /** Classifies a point against a plane */ - -#ifdef __cplusplus -} -#endif - -#endif // PLANE_H_INCLUDED diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/quaternion.h b/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/quaternion.h deleted file mode 100644 index a3632f0..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/quaternion.h +++ /dev/null @@ -1,114 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef QUATERNION_H_INCLUDED -#define QUATERNION_H_INCLUDED - -#ifdef __cplusplus -extern "C" { -#endif - -#include "platform/CCPlatformMacros.h" -#include "utility.h" - -struct kmMat4; -struct kmMat3; -struct kmVec3; - -typedef struct kmQuaternion { - kmScalar x; - kmScalar y; - kmScalar z; - kmScalar w; -} kmQuaternion; - -CC_DLL kmQuaternion* const kmQuaternionConjugate(kmQuaternion* pOut, const kmQuaternion* pIn); ///< Returns pOut, sets pOut to the conjugate of pIn - -CC_DLL const kmScalar kmQuaternionDot(const kmQuaternion* q1, const kmQuaternion* q2); ///< Returns the dot product of the 2 quaternions - -CC_DLL kmQuaternion* kmQuaternionExp(kmQuaternion* pOut, const kmQuaternion* pIn); ///< Returns the exponential of the quaternion - -///< Makes the passed quaternion an identity quaternion - -CC_DLL kmQuaternion* kmQuaternionIdentity(kmQuaternion* pOut); - -///< Returns the inverse of the passed Quaternion - -CC_DLL kmQuaternion* kmQuaternionInverse(kmQuaternion* pOut, - const kmQuaternion* pIn); - -///< Returns true if the quaternion is an identity quaternion - -CC_DLL int kmQuaternionIsIdentity(const kmQuaternion* pIn); - -///< Returns the length of the quaternion - -CC_DLL kmScalar kmQuaternionLength(const kmQuaternion* pIn); - -///< Returns the length of the quaternion squared (prevents a sqrt) - -CC_DLL kmScalar kmQuaternionLengthSq(const kmQuaternion* pIn); - -///< Returns the natural logarithm - -CC_DLL kmQuaternion* kmQuaternionLn(kmQuaternion* pOut, const kmQuaternion* pIn); - -///< Multiplies 2 quaternions together - -CC_DLL kmQuaternion* kmQuaternionMultiply(kmQuaternion* pOut, const kmQuaternion* q1, const kmQuaternion* q2); - -///< Normalizes a quaternion - -CC_DLL kmQuaternion* kmQuaternionNormalize(kmQuaternion* pOut, const kmQuaternion* pIn); - -///< Rotates a quaternion around an axis - -CC_DLL kmQuaternion* kmQuaternionRotationAxis(kmQuaternion* pOut, const struct kmVec3* pV, kmScalar angle); - -///< Creates a quaternion from a rotation matrix - -CC_DLL kmQuaternion* kmQuaternionRotationMatrix(kmQuaternion* pOut, const struct kmMat3* pIn); - -///< Create a quaternion from yaw, pitch and roll - -CC_DLL kmQuaternion* kmQuaternionRotationYawPitchRoll(kmQuaternion* pOut, kmScalar yaw, kmScalar pitch, kmScalar roll); -///< Interpolate between 2 quaternions -CC_DLL kmQuaternion* kmQuaternionSlerp(kmQuaternion* pOut, const kmQuaternion* q1, const kmQuaternion* q2, kmScalar t); - -///< Get the axis and angle of rotation from a quaternion -CC_DLL void kmQuaternionToAxisAngle(const kmQuaternion* pIn, struct kmVec3* pVector, kmScalar* pAngle); - -///< Scale a quaternion -CC_DLL kmQuaternion* kmQuaternionScale(kmQuaternion* pOut, const kmQuaternion* pIn, kmScalar s); -CC_DLL kmQuaternion* kmQuaternionAssign(kmQuaternion* pOut, const kmQuaternion* pIn); -CC_DLL kmQuaternion* kmQuaternionAdd(kmQuaternion* pOut, const kmQuaternion* pQ1, const kmQuaternion* pQ2); -CC_DLL kmQuaternion* kmQuaternionRotationBetweenVec3(kmQuaternion* pOut, const struct kmVec3* vec1, const struct kmVec3* vec2, const struct kmVec3* fallback); -CC_DLL struct kmVec3* kmQuaternionMultiplyVec3(struct kmVec3* pOut, const kmQuaternion* q, const struct kmVec3* v); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/ray2.h b/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/ray2.h deleted file mode 100644 index 6734a95..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/ray2.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright (c) 2011, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef RAY_2_H -#define RAY_2_H - -#include "platform/CCPlatformMacros.h" -#include "utility.h" -#include "vec2.h" - -#ifdef __cplusplus -extern "C" { -#endif - -typedef struct kmRay2 { - kmVec2 start; - kmVec2 dir; -} kmRay2; - -CC_DLL void kmRay2Fill(kmRay2* ray, kmScalar px, kmScalar py, kmScalar vx, kmScalar vy); -CC_DLL kmBool kmRay2IntersectLineSegment(const kmRay2* ray, const kmVec2* p1, const kmVec2* p2, kmVec2* intersection); -CC_DLL kmBool kmRay2IntersectTriangle(const kmRay2* ray, const kmVec2* p1, const kmVec2* p2, const kmVec2* p3, kmVec2* intersection, kmVec2* normal_out); -CC_DLL kmBool kmRay2IntersectCircle(const kmRay2* ray, const kmVec2 centre, const kmScalar radius, kmVec2* intersection); - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/utility.h b/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/utility.h deleted file mode 100644 index ed6bff6..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/utility.h +++ /dev/null @@ -1,75 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef UTILITY_H_INCLUDED -#define UTILITY_H_INCLUDED - -#include "platform/CCPlatformMacros.h" -#include - -#ifndef kmScalar -#define kmScalar float -#endif - -#ifndef kmBool -#define kmBool unsigned char -#endif - -#ifndef kmEnum -#define kmEnum unsigned int -#endif - -#ifndef KM_FALSE -#define KM_FALSE 0 -#endif - -#ifndef KM_TRUE -#define KM_TRUE 1 -#endif - -#define kmPI 3.141592f -#define kmPIOver180 0.017453f // PI / 180 -#define kmPIUnder180 57.295779f // 180 / PI -#define kmEpsilon 1.0 / 64.0 - - - -#ifdef __cplusplus -extern "C" { -#endif - -CC_DLL kmScalar kmSQR(kmScalar s); -CC_DLL kmScalar kmDegreesToRadians(kmScalar degrees); -CC_DLL kmScalar kmRadiansToDegrees(kmScalar radians); - -CC_DLL kmScalar kmMin(kmScalar lhs, kmScalar rhs); -CC_DLL kmScalar kmMax(kmScalar lhs, kmScalar rhs); -CC_DLL kmBool kmAlmostEqual(kmScalar lhs, kmScalar rhs); - -#ifdef __cplusplus -} -#endif - -#endif /* UTILITY_H_INCLUDED */ diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/vec2.h b/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/vec2.h deleted file mode 100644 index 6c29d40..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/vec2.h +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VEC2_H_INCLUDED -#define VEC2_H_INCLUDED - -#include "platform/CCPlatformMacros.h" - -struct kmMat3; - -#ifndef kmScalar -#define kmScalar float -#endif - -#pragma pack(push) /* push current alignment to stack */ -#pragma pack(1) /* set alignment to 1 byte boundary */ -typedef struct kmVec2 { - kmScalar x; - kmScalar y; -} kmVec2; - -#pragma pack(pop) - -#ifdef __cplusplus -extern "C" { -#endif -CC_DLL kmVec2* kmVec2Fill(kmVec2* pOut, kmScalar x, kmScalar y); -CC_DLL kmScalar kmVec2Length(const kmVec2* pIn); ///< Returns the length of the vector -CC_DLL kmScalar kmVec2LengthSq(const kmVec2* pIn); ///< Returns the square of the length of the vector -CC_DLL kmVec2* kmVec2Normalize(kmVec2* pOut, const kmVec2* pIn); ///< Returns the vector passed in set to unit length -CC_DLL kmVec2* kmVec2Add(kmVec2* pOut, const kmVec2* pV1, const kmVec2* pV2); ///< Adds 2 vectors and returns the result -CC_DLL kmScalar kmVec2Dot(const kmVec2* pV1, const kmVec2* pV2); /** Returns the Dot product which is the cosine of the angle between the two vectors multiplied by their lengths */ -CC_DLL kmVec2* kmVec2Subtract(kmVec2* pOut, const kmVec2* pV1, const kmVec2* pV2); ///< Subtracts 2 vectors and returns the result -CC_DLL kmVec2* kmVec2Transform(kmVec2* pOut, const kmVec2* pV1, const struct kmMat3* pM); /** Transform the Vector */ -CC_DLL kmVec2* kmVec2TransformCoord(kmVec2* pOut, const kmVec2* pV, const struct kmMat3* pM); /// - -#ifndef kmScalar -#define kmScalar float -#endif - -struct kmMat4; - -typedef struct kmVec3 { - kmScalar x; - kmScalar y; - kmScalar z; -} kmVec3; - -#ifdef __cplusplus -extern "C" { -#endif - -CC_DLL kmVec3* kmVec3Fill(kmVec3* pOut, kmScalar x, kmScalar y, kmScalar z); -CC_DLL kmScalar kmVec3Length(const kmVec3* pIn); /** Returns the length of the vector */ -CC_DLL kmScalar kmVec3LengthSq(const kmVec3* pIn); /** Returns the square of the length of the vector */ -CC_DLL kmVec3* kmVec3Normalize(kmVec3* pOut, const kmVec3* pIn); /** Returns the vector passed in set to unit length */ -CC_DLL kmVec3* kmVec3Cross(kmVec3* pOut, const kmVec3* pV1, const kmVec3* pV2); /** Returns a vector perpendicular to 2 other vectors */ -CC_DLL kmScalar kmVec3Dot(const kmVec3* pV1, const kmVec3* pV2); /** Returns the cosine of the angle between 2 vectors */ -CC_DLL kmVec3* kmVec3Add(kmVec3* pOut, const kmVec3* pV1, const kmVec3* pV2); /** Adds 2 vectors and returns the result */ -CC_DLL kmVec3* kmVec3Subtract(kmVec3* pOut, const kmVec3* pV1, const kmVec3* pV2); /** Subtracts 2 vectors and returns the result */ -CC_DLL kmVec3* kmVec3Transform(kmVec3* pOut, const kmVec3* pV1, const struct kmMat4* pM); /** Transforms a vector (assuming w=1) by a given matrix */ -CC_DLL kmVec3* kmVec3TransformNormal(kmVec3* pOut, const kmVec3* pV, const struct kmMat4* pM);/**Transforms a 3D normal by a given matrix */ -CC_DLL kmVec3* kmVec3TransformCoord(kmVec3* pOut, const kmVec3* pV, const struct kmMat4* pM); /**Transforms a 3D vector by a given matrix, projecting the result back into w = 1. */ -CC_DLL kmVec3* kmVec3Scale(kmVec3* pOut, const kmVec3* pIn, const kmScalar s); /** Scales a vector to length s */ -CC_DLL int kmVec3AreEqual(const kmVec3* p1, const kmVec3* p2); -CC_DLL kmVec3* kmVec3InverseTransform(kmVec3* pOut, const kmVec3* pV, const struct kmMat4* pM); -CC_DLL kmVec3* kmVec3InverseTransformNormal(kmVec3* pOut, const kmVec3* pVect, const struct kmMat4* pM); -CC_DLL kmVec3* kmVec3Assign(kmVec3* pOut, const kmVec3* pIn); -CC_DLL kmVec3* kmVec3Zero(kmVec3* pOut); - -#ifdef __cplusplus -} -#endif -#endif /* VEC3_H_INCLUDED */ diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/vec4.h b/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/vec4.h deleted file mode 100644 index 7956d2a..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/include/kazmath/vec4.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef VEC4_H_INCLUDED -#define VEC4_H_INCLUDED - -#include "platform/CCPlatformMacros.h" -#include "utility.h" - -struct kmMat4; - -#pragma pack(push) /* push current alignment to stack */ -#pragma pack(1) /* set alignment to 1 byte boundary */ - -typedef struct kmVec4 { - kmScalar x; - kmScalar y; - kmScalar z; - kmScalar w; -} kmVec4; - -#pragma pack(pop) - -#ifdef __cplusplus -extern "C" { -#endif - -CC_DLL kmVec4* kmVec4Fill(kmVec4* pOut, kmScalar x, kmScalar y, kmScalar z, kmScalar w); -CC_DLL kmVec4* kmVec4Add(kmVec4* pOut, const kmVec4* pV1, const kmVec4* pV2); -CC_DLL kmScalar kmVec4Dot(const kmVec4* pV1, const kmVec4* pV2); -CC_DLL kmScalar kmVec4Length(const kmVec4* pIn); -CC_DLL kmScalar kmVec4LengthSq(const kmVec4* pIn); -CC_DLL kmVec4* kmVec4Lerp(kmVec4* pOut, const kmVec4* pV1, const kmVec4* pV2, kmScalar t); -CC_DLL kmVec4* kmVec4Normalize(kmVec4* pOut, const kmVec4* pIn); -CC_DLL kmVec4* kmVec4Scale(kmVec4* pOut, const kmVec4* pIn, const kmScalar s); ///< Scales a vector to length s -CC_DLL kmVec4* kmVec4Subtract(kmVec4* pOut, const kmVec4* pV1, const kmVec4* pV2); -CC_DLL kmVec4* kmVec4Transform(kmVec4* pOut, const kmVec4* pV, const struct kmMat4* pM); -CC_DLL kmVec4* kmVec4TransformArray(kmVec4* pOut, unsigned int outStride, - const kmVec4* pV, unsigned int vStride, const struct kmMat4* pM, unsigned int count); -CC_DLL int kmVec4AreEqual(const kmVec4* p1, const kmVec4* p2); -CC_DLL kmVec4* kmVec4Assign(kmVec4* pOut, const kmVec4* pIn); - -#ifdef __cplusplus -} -#endif - -#endif // VEC4_H_INCLUDED diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/src/CMakeLists.txt b/cappuccino-sdk/incl/cocos2dx/kazmath/src/CMakeLists.txt deleted file mode 100644 index a389466..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/src/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ - -#ADD_LIBRARY(Kazmath STATIC ${KAZMATH_SRCS}) -#INSTALL(TARGETS Kazmath ARCHIVE DESTINATION lib) - -INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/include ) - -ADD_LIBRARY(kazmath STATIC ${KAZMATH_SOURCES}) -INSTALL(TARGETS kazmath ARCHIVE DESTINATION lib) - -#ADD_LIBRARY(KazmathGL STATIC ${GL_UTILS_SRCS}) -#INSTALL(TARGETS KazmathGL ARCHIVE DESTINATION lib) - -INSTALL(FILES ${KAZMATH_HEADERS} DESTINATION include/kazmath) -INSTALL(FILES ${GL_UTILS_HEADERS} DESTINATION include/kazmath/GL) diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/src/ChangeLog b/cappuccino-sdk/incl/cocos2dx/kazmath/src/ChangeLog deleted file mode 100644 index f13b823..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/src/ChangeLog +++ /dev/null @@ -1,738 +0,0 @@ ------------------------------------------------------------- -revno: 111 -committer: Kazade -branch nick: kazmath -timestamp: Thu 2010-08-19 12:07:29 +0100 -message: - Fix #620352. Fix a reference to kmMat4RotationAxisAngle ------------------------------------------------------------- -revno: 110 -committer: Carsten Haubld -branch nick: kazmath -timestamp: Wed 2010-04-21 12:55:39 +0200 -message: - applied the change to the header files as well ------------------------------------------------------------- -revno: 109 -committer: Carsten Haubld -branch nick: kazmath -timestamp: Wed 2010-04-21 12:54:06 +0200 -message: - fixed kmMat4RotationAxis ------------------------------------------------------------- -revno: 108 [merge] -committer: Carsten Haubld -branch nick: kazmath -timestamp: Wed 2010-04-21 12:27:53 +0200 -message: - fixed CMake in kazmathxx due to missing utility.h ------------------------------------------------------------- -revno: 107 -committer: Carsten Haubld -branch nick: kazmath -timestamp: Wed 2010-04-21 12:22:40 +0200 -message: - fixed mat4 rotation axis by normalizing the axis first ------------------------------------------------------------- -revno: 106 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sat 2010-01-09 16:56:04 +0000 -message: - Add cmake module ------------------------------------------------------------- -revno: 105 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sat 2010-01-09 16:23:31 +0000 -message: - Remove kazmodel - it really should belong in its own repo ------------------------------------------------------------- -revno: 104 -committer: Luke Benstead -branch nick: kazmath -timestamp: Fri 2010-01-08 23:03:13 +0000 -message: - Reorganize the headers so that the tests can compile in place ------------------------------------------------------------- -revno: 103 -committer: Carsten Haubld -branch nick: kazmath -timestamp: Mon 2009-08-31 11:21:42 +0200 -message: - Operators now inline, constructors fixed ------------------------------------------------------------- -revno: 102 -committer: Carsten Haubld -branch nick: kazmath -timestamp: Sat 2009-08-29 11:42:59 +0200 -message: - fixed some compilation errors - still how do we define operators in headers correctly?? ------------------------------------------------------------- -revno: 101 -committer: Luke Benstead -branch nick: kazmath -timestamp: Wed 2009-08-26 10:37:52 +0100 -message: - Added the header defines ------------------------------------------------------------- -revno: 100 -committer: Luke Benstead -branch nick: kazmath -timestamp: Wed 2009-08-26 09:38:47 +0100 -message: - Added a V2 for kazmathxx ------------------------------------------------------------- -revno: 99 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sun 2009-08-02 08:08:26 +0100 -message: - Added missing header file to one of the tests ------------------------------------------------------------- -revno: 98 -committer: Carsten Haubld -branch nick: kazmath -timestamp: Sat 2009-08-01 12:05:25 +0200 -message: - No longer doing self assignment in kmMat4Inverse ------------------------------------------------------------- -revno: 97 -committer: Carsten Haubld -branch nick: kazmath -timestamp: Sat 2009-08-01 11:15:36 +0200 -message: - Fixed kmMat4Inverse ------------------------------------------------------------- -revno: 96 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sat 2009-08-01 09:20:33 +0100 -message: - Fixed some whitespace issues in plane.c ------------------------------------------------------------- -revno: 95 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sat 2009-08-01 09:17:01 +0100 -message: - Rename kmAABBPointInBox to kmAABBContainsPoint ------------------------------------------------------------- -revno: 94 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sat 2009-08-01 09:16:28 +0100 -message: - Implement kmAABBPointInBox ------------------------------------------------------------- -revno: 93 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sat 2009-08-01 09:14:00 +0100 -message: - Implement kmAABBAssign ------------------------------------------------------------- -revno: 92 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sat 2009-08-01 09:10:36 +0100 -message: - Fixed some whitespace and added some comments ------------------------------------------------------------- -revno: 91 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sat 2009-08-01 08:56:13 +0100 -message: - Implemented (untested) kmMat4RotationTranslation to construct a 4x4 matrix from a 3x3 + vec3 ------------------------------------------------------------- -revno: 90 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sun 2009-07-05 07:55:45 +0100 -message: - Added kmMat3RotationX, kmMat3RotationY and kmMat3RotationZ ------------------------------------------------------------- -revno: 89 -committer: Carsten Haubld -branch nick: kazmath -timestamp: Sat 2009-06-27 09:38:20 +0200 -message: - Fixed a crash? ------------------------------------------------------------- -revno: 88 -committer: Luke Benstead -branch nick: kazmath -timestamp: Tue 2009-04-28 09:52:57 +0100 -message: - Added a test for kmMat4Transpose ------------------------------------------------------------- -revno: 87 -committer: Luke Benstead -branch nick: kazmath -timestamp: Tue 2009-04-28 08:49:59 +0100 -message: - Added a commented test for kmMat4Inverse, however kmMat4Adjugate and kmMat4Determinate need implementing ------------------------------------------------------------- -revno: 86 -committer: Luke Benstead -branch nick: kazmath -timestamp: Tue 2009-04-28 08:46:03 +0100 -message: - Fixed bug in kmQuaternionRotationMatrix ------------------------------------------------------------- -revno: 85 -committer: Luke Benstead -branch nick: kazmath -timestamp: Tue 2009-04-28 08:41:27 +0100 -message: - Added missing include to test_mat3.cpp ------------------------------------------------------------- -revno: 84 -committer: Carsten Haubld -branch nick: kazmath -timestamp: Mon 2009-04-27 22:59:08 +0200 -message: - fixed CMakeLists.txt for the tests ------------------------------------------------------------- -revno: 83 -committer: Luke Benstead -branch nick: kazmath -timestamp: Mon 2009-04-27 21:34:20 +0100 -message: - Added a test for kmMat3Translation ------------------------------------------------------------- -revno: 82 -committer: Luke Benstead -branch nick: kazmath -timestamp: Mon 2009-04-27 21:32:19 +0100 -message: - Fixed bugs in kmMat3Scaling and kmMat3Translation, added test for kmMat3Scaling ------------------------------------------------------------- -revno: 81 [merge] -committer: Luke Benstead -branch nick: kazmath -timestamp: Mon 2009-04-27 19:04:56 +0100 -message: - Merge from upstream. Fixed mismatching prototype in quaternion.c ------------------------------------------------------------- -revno: 80 -committer: Luke Benstead -branch nick: kazmath -timestamp: Mon 2009-04-27 19:01:35 +0100 -message: - Added a test for kmMat3AreEqual. Fixed a bug in kmMat3AreEqual ------------------------------------------------------------- -revno: 79 -committer: Luke Benstead -branch nick: kazmath -timestamp: Mon 2009-04-27 18:57:28 +0100 -message: - Added a test for kmMat3IsIdentity ------------------------------------------------------------- -revno: 78 -committer: Luke Benstead -branch nick: kazmath -timestamp: Mon 2009-04-27 18:54:48 +0100 -message: - Added a test for kmMat3Identity ------------------------------------------------------------- -revno: 77 -committer: Luke Benstead -branch nick: kazmath -timestamp: Mon 2009-04-27 18:52:14 +0100 -message: - Added a test for kmMat3Fill ------------------------------------------------------------- -revno: 76 -committer: Luke Benstead -branch nick: kazmath -timestamp: Mon 2009-04-27 18:46:30 +0100 -message: - Added some mat3 unit tests. Fixed a bug in kmMat3AreEqual ------------------------------------------------------------- -revno: 75 -committer: Luke Benstead -branch nick: kazmath -timestamp: Mon 2009-04-27 11:08:43 +0100 -message: - Added mat4 test stub ------------------------------------------------------------- -revno: 74 -committer: Luke Benstead -branch nick: kazmath -timestamp: Mon 2009-04-27 11:06:12 +0100 -message: - Enabled unit testing in cmake ------------------------------------------------------------- -revno: 73 -committer: Luke Benstead -branch nick: kazmath -timestamp: Mon 2009-04-27 10:44:37 +0100 -message: - Added cmakelists.txt to the tests subfolder ------------------------------------------------------------- -revno: 72 -committer: Luke Benstead -branch nick: kazmath -timestamp: Mon 2009-04-27 10:37:34 +0100 -message: - Added stub mat3 test file ------------------------------------------------------------- -revno: 71 -committer: Luke Benstead -branch nick: kazmath -timestamp: Mon 2009-04-27 10:35:48 +0100 -message: - Added tests folder for new boost::unit based tests ------------------------------------------------------------- -revno: 70 -committer: Carsten Haubld -branch nick: kazmath -timestamp: Sun 2009-04-26 14:25:48 +0200 -message: - Fixed the new quaternion -> Matrix -> AngleAxis methods and added them to mat4 ------------------------------------------------------------- -revno: 69 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sun 2009-04-26 12:40:08 +0100 -message: - Added kazmodel to the kazlibs repo ------------------------------------------------------------- -revno: 68 [merge] -committer: Luke Benstead -branch nick: kazmath -timestamp: Sun 2009-04-26 12:34:27 +0100 -message: - Merge from upstream ------------------------------------------------------------- -revno: 67 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sun 2009-04-26 12:33:43 +0100 -message: - Reorganized bzr ------------------------------------------------------------- -revno: 66 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sun 2009-04-26 10:00:18 +0100 -message: - Renamed kmMat3RotationAxis to kmMat3RotationAxisAngle to be more accurate ------------------------------------------------------------- -revno: 65 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sun 2009-04-26 09:57:19 +0100 -message: - Fixed some compilation errors ------------------------------------------------------------- -revno: 64 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sun 2009-04-26 09:54:12 +0100 -message: - Added untested implementation of kmMat3RotationToAxisAngle ------------------------------------------------------------- -revno: 63 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sun 2009-04-26 09:49:17 +0100 -message: - Added stub for kmMat3RotationToAxisAngle() ------------------------------------------------------------- -revno: 62 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sun 2009-04-26 09:45:58 +0100 -message: - Corrected a typo ------------------------------------------------------------- -revno: 61 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sun 2009-04-26 09:44:39 +0100 -message: - Fixed broken Quaternion functions - Added (untested) kmMat3RotationAxis() ------------------------------------------------------------- -revno: 60 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sat 2009-04-18 08:55:29 +0100 -message: - Fixed some errors in the quaternion header. - Changed kmQuaternionRotationMatrix to accept a kmMat3 instead of kmMat4 ------------------------------------------------------------- -revno: 59 -committer: Luke Benstead -branch nick: kazmath -timestamp: Sat 2009-04-18 08:42:38 +0100 -message: - Added kmMat3RotationQuaternion ------------------------------------------------------------- -revno: 58 -committer: Carsten Haubld -branch nick: kazmath -timestamp: Sun 2009-04-05 11:58:29 +0200 -message: - Added mat3 ------------------------------------------------------------- -revno: 57 [merge] -committer: Carsten Haubld -branch nick: kazmath -timestamp: Sun 2009-04-05 11:54:15 +0200 -message: - Implemented mat4 and vec4 for kazmathxx ------------------------------------------------------------- -revno: 56 -committer: Carsten Haubld -branch nick: kazmath -timestamp: Sun 2009-04-05 11:53:07 +0200 -message: - Implemented mat4 and vec4 for kazmathxx ------------------------------------------------------------- -revno: 55 -committer: Carsten Haubld -branch nick: kazmath -timestamp: Fri 2009-03-13 16:46:26 +0100 -message: - added km::vec3 to kazmathxx ------------------------------------------------------------- -revno: 54 -committer: Carsten Haubld -branch nick: kazmath -timestamp: Fri 2009-03-13 16:14:51 +0100 -message: - Fixed: kmVec2 is no longer transformed by kmMat4\nAdded km::vec2 ------------------------------------------------------------- -revno: 53 -committer: Carsten Haubld -branch nick: kazmath -timestamp: Fri 2009-03-13 15:38:53 +0100 -message: - Added folder for kazmathxx ------------------------------------------------------------- -revno: 52 [merge] -committer: Luke Benstead -branch nick: trunk -timestamp: Fri 2009-03-13 14:04:32 +0000 -message: - Merge from upstream ------------------------------------------------------------- -revno: 51 -committer: Luke Benstead -branch nick: trunk -timestamp: Fri 2009-03-13 14:00:14 +0000 -message: - Fixed for C89 ------------------------------------------------------------- -revno: 50 -committer: Carsten Haubold -timestamp: Tue 2008-12-30 12:45:23 +0100 -message: - fixed kmGLTranslate ------------------------------------------------------------- -revno: 49 -committer: Carsten Haubold -timestamp: Tue 2008-12-30 12:15:27 +0100 -message: - fixed some stack memory leaks ------------------------------------------------------------- -revno: 48 -committer: Carsten Haubold -timestamp: Tue 2008-12-30 11:01:35 +0100 -message: - The GL matrix stacks now work as expected - matrix multiplication was the wrong way round ------------------------------------------------------------- -revno: 47 -committer: Carsten Haubold -timestamp: Tue 2008-12-30 10:52:28 +0100 -message: - Debug output ------------------------------------------------------------- -revno: 46 -committer: Carsten Haubold -timestamp: Mon 2008-12-29 18:32:13 +0100 -message: - Fixed some compiler errors ------------------------------------------------------------- -revno: 45 -committer: Luke -timestamp: Wed 2008-11-19 08:36:47 +0000 -message: - Added kmGLTranslatef, kmGLScalef and kmGLRotatef ------------------------------------------------------------- -revno: 44 -committer: Luke -timestamp: Tue 2008-11-04 20:57:30 +0000 -message: - Fixed up kazmathxx ------------------------------------------------------------- -revno: 43 -committer: Luke -timestamp: Wed 2008-10-29 09:24:32 +0000 -message: - Started implementing C++ operators in kazmathxx.h ------------------------------------------------------------- -revno: 42 -committer: Luke -timestamp: Tue 2008-10-28 18:21:16 +0000 -message: - Added kazmathxx.h for C++ usage ------------------------------------------------------------- -revno: 41 -committer: Luke -timestamp: Tue 2008-10-28 11:00:41 +0000 -message: - Added Doxygen documentation ------------------------------------------------------------- -revno: 40 -committer: Luke -timestamp: Tue 2008-10-28 08:46:19 +0000 -message: - Began documenting the kmPlane functions. - Changed some assert(0)s to include a not implemented message ------------------------------------------------------------- -revno: 39 -committer: Luke -timestamp: Tue 2008-10-28 08:42:24 +0000 -message: - - Wrote stubs for the AABB functions which raise assertions if used. - - Documented the AABB functions - - Changed the definition of kmAABBPointInBox so that it actually makes sense ------------------------------------------------------------- -revno: 38 -committer: Luke -timestamp: Tue 2008-10-28 08:38:48 +0000 -message: - - Documented utility.c ------------------------------------------------------------- -revno: 37 -committer: Luke -timestamp: Tue 2008-10-28 08:36:30 +0000 -message: - - Documented vec3.c in detail. - - Fixed up a not-implemented assertion. - - Changed existing doc strings to C style - /** */ ------------------------------------------------------------- -revno: 36 -committer: Luke -timestamp: Tue 2008-10-28 08:30:00 +0000 -message: - Removed uneccessary files from git ------------------------------------------------------------- -revno: 35 -committer: Luke -timestamp: Tue 2008-10-28 08:28:49 +0000 -message: - - Documented all the functions in mat4.c - - Fixed up all asserts in mat4.c to include a message - - Tidied up the code. Mat4.c is now done. ------------------------------------------------------------- -revno: 34 -committer: Luke -timestamp: Mon 2008-10-27 21:52:33 +0000 -message: - Added potential 0.1 release binary ------------------------------------------------------------- -revno: 33 -committer: Luke Benstead -timestamp: Mon 2008-10-27 21:46:55 +0000 -message: - Changed the README to include the BSD license ------------------------------------------------------------- -revno: 32 -committer: Luke Benstead -timestamp: Mon 2008-10-27 21:45:51 +0000 -message: - Added the modified BSD license to all source files ------------------------------------------------------------- -revno: 31 -committer: Luke Benstead -timestamp: Mon 2008-10-27 21:11:51 +0000 -message: - Fixed the installation of header files in CMake ------------------------------------------------------------- -revno: 30 -committer: Luke -timestamp: Mon 2008-10-27 21:05:51 +0000 -message: - Added kazmath project files ------------------------------------------------------------- -revno: 29 [merge] -committer: Luke -timestamp: Mon 2008-10-27 21:03:22 +0000 -message: - Merge branch 'master' of git@github.com:Kazade/kazmath ------------------------------------------------------------- -revno: 28 -committer: Luke -timestamp: Mon 2008-10-27 21:02:04 +0000 -message: - Finally got kazmath compiling on VC++, man that compiler sucks! Have MS not heard of C99? ------------------------------------------------------------- -revno: 27 -committer: Luke Benstead -timestamp: Sun 2008-10-26 21:35:24 +0000 -message: - Changed the readme slightly, we need to change the license everywhere ------------------------------------------------------------- -revno: 26 -committer: Luke Benstead -timestamp: Sun 2008-10-26 21:21:47 +0000 -message: - Implemented the stacks test, fixed the undefined references I was getting ------------------------------------------------------------- -revno: 25 -committer: Luke Benstead -timestamp: Sun 2008-10-26 20:59:34 +0000 -message: - Removed the old matrix stack stuff ------------------------------------------------------------- -revno: 24 -committer: Luke Benstead -timestamp: Sun 2008-10-26 20:11:58 +0000 -message: - Started implementing the matrix stack tests ------------------------------------------------------------- -revno: 23 -committer: Luke Benstead -timestamp: Sun 2008-10-26 10:56:51 +0000 -message: - Started new implementation of the GL matrix stack ------------------------------------------------------------- -revno: 22 -committer: Carsten Haubold -timestamp: Thu 2008-08-28 12:37:41 +0200 -message: - Added kmGLRotation ------------------------------------------------------------- -revno: 21 -committer: Luke Benstead -timestamp: Thu 2008-08-28 09:24:00 +0100 -message: - We now have a working matrix stack ------------------------------------------------------------- -revno: 20 -committer: Luke Benstead -timestamp: Wed 2008-08-27 13:34:49 +0100 -message: - Fixed the stack memory constants ------------------------------------------------------------- -revno: 19 -committer: Luke Benstead -timestamp: Wed 2008-08-27 13:33:12 +0100 -message: - Added the initial gl_utils implementation for replacing the matrix functionality deprecated in OpenGL 3.0 ------------------------------------------------------------- -revno: 18 -committer: Carsten Haubold -timestamp: Mon 2008-08-25 12:46:16 +0200 -message: - Fixed a bug in kmMat4LookAt ------------------------------------------------------------- -revno: 17 [merge] -committer: Carsten Haubold -timestamp: Sun 2008-08-24 22:07:49 +0200 -message: - Merge branch 'master' of git@github.com:Kazade/kazmath ------------------------------------------------------------- -revno: 16 -committer: Carsten Haubold -timestamp: Sun 2008-08-24 22:06:45 +0200 -message: - Added kmMat4LookAt ------------------------------------------------------------- -revno: 15 -committer: Carsten Haubold -timestamp: Wed 2008-08-20 11:18:10 +0200 -message: - Added Fill methods for all Vec and Mat structs ------------------------------------------------------------- -revno: 14 -committer: Carsten Haubold -timestamp: Tue 2008-08-19 22:31:55 +0200 -message: - Added UnitTests, changed bool to int and fixed some minor bugs ------------------------------------------------------------- -revno: 13 -committer: Carsten Haubold -timestamp: Sun 2008-08-17 23:19:21 +0200 -message: - removed .svn entries which did not belong here ------------------------------------------------------------- -revno: 12 -committer: Carsten Haubold -timestamp: Sun 2008-08-17 23:17:07 +0200 -message: - some tweaks on matrices and first test-app, PerspectiveProjection is correct ! ------------------------------------------------------------- -revno: 11 -committer: Carsten Haubold -timestamp: Sun 2008-08-17 16:04:09 +0200 -message: - Renamed cotangent to cotangens ------------------------------------------------------------- -revno: 10 -committer: Luke Benstead -timestamp: Sat 2008-08-16 21:51:22 +0100 -message: - Added kmMat4PerspectiveProjection and kmMat4OrthographicProjection ------------------------------------------------------------- -revno: 9 -committer: Luke Benstead -timestamp: Thu 2008-08-14 21:15:45 +0100 -message: - Added the aabb struct ------------------------------------------------------------- -revno: 8 -committer: Luke Benstead -timestamp: Thu 2008-08-14 17:57:43 +0100 -message: - Added the kmAABB structure ------------------------------------------------------------- -revno: 7 -committer: Luke Benstead -timestamp: Thu 2008-08-14 14:32:24 +0100 -message: - Fixed broken kmMat3Transpose ------------------------------------------------------------- -revno: 6 -committer: Luke Benstead -timestamp: Thu 2008-08-14 14:21:04 +0100 -message: - Fixed broken kmMat4Translation, w component was not set ------------------------------------------------------------- -revno: 5 -committer: Luke Benstead -timestamp: Thu 2008-08-14 14:01:47 +0100 -message: - Added mat3.c and mat3.h to the cmake file ------------------------------------------------------------- -revno: 4 -committer: Luke Benstead -timestamp: Thu 2008-08-14 13:56:26 +0100 -message: - Added the authors section to the readme ------------------------------------------------------------- -revno: 3 -committer: Luke Benstead -timestamp: Thu 2008-08-14 13:55:41 +0100 -message: - Updated the readme file ------------------------------------------------------------- -revno: 2 -committer: Luke Benstead -timestamp: Thu 2008-08-14 13:53:26 +0100 -message: - Added kazmath to git ------------------------------------------------------------- -revno: 1 -committer: Luke Benstead -timestamp: Thu 2008-08-14 13:47:51 +0100 -message: - First commit ------------------------------------------------------------- -Use --include-merges or -n0 to see merged revisions. diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/src/GL/mat4stack.c b/cappuccino-sdk/incl/cocos2dx/kazmath/src/GL/mat4stack.c deleted file mode 100644 index da89c50..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/src/GL/mat4stack.c +++ /dev/null @@ -1,74 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include -#include -#include -#include - -#define INITIAL_SIZE 30 -#define INCREMENT 50 - -#include "kazmath/GL/mat4stack.h" - -void km_mat4_stack_initialize(km_mat4_stack* stack) { - stack->stack = (kmMat4*) malloc(sizeof(kmMat4) * INITIAL_SIZE); //allocate the memory - stack->capacity = INITIAL_SIZE; //Set the capacity to 10 - stack->top = NULL; //Set the top to NULL - stack->item_count = 0; -}; - -void km_mat4_stack_push(km_mat4_stack* stack, const kmMat4* item) -{ - stack->top = &stack->stack[stack->item_count]; - kmMat4Assign(stack->top, item); - stack->item_count++; - - if(stack->item_count >= stack->capacity) - { - kmMat4* temp = NULL; - stack->capacity += INCREMENT; - temp = stack->stack; - stack->stack = (kmMat4*) malloc(stack->capacity*sizeof(kmMat4)); - memcpy(stack->stack, temp, sizeof(kmMat4)*(stack->capacity - INCREMENT)); - free(temp); - stack->top = &stack->stack[stack->item_count - 1]; - } -} - -void km_mat4_stack_pop(km_mat4_stack* stack, kmMat4* pOut) -{ - assert(stack->item_count && "Cannot pop an empty stack"); - - stack->item_count--; - stack->top = &stack->stack[stack->item_count - 1]; -} - -void km_mat4_stack_release(km_mat4_stack* stack) { - free(stack->stack); - stack->top = NULL; - stack->item_count = 0; - stack->capacity = 0; -} diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/src/GL/matrix.c b/cappuccino-sdk/incl/cocos2dx/kazmath/src/GL/matrix.c deleted file mode 100644 index dfd8a87..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/src/GL/matrix.c +++ /dev/null @@ -1,191 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include -#include - -#include "kazmath/GL/matrix.h" -#include "kazmath/GL/mat4stack.h" - -km_mat4_stack modelview_matrix_stack; -km_mat4_stack projection_matrix_stack; -km_mat4_stack texture_matrix_stack; - -km_mat4_stack* current_stack = NULL; - -static unsigned char initialized = 0; - -void lazyInitialize() -{ - - if (!initialized) { - kmMat4 identity; //Temporary identity matrix - - //Initialize all 3 stacks - //modelview_matrix_stack = (km_mat4_stack*) malloc(sizeof(km_mat4_stack)); - km_mat4_stack_initialize(&modelview_matrix_stack); - - //projection_matrix_stack = (km_mat4_stack*) malloc(sizeof(km_mat4_stack)); - km_mat4_stack_initialize(&projection_matrix_stack); - - //texture_matrix_stack = (km_mat4_stack*) malloc(sizeof(km_mat4_stack)); - km_mat4_stack_initialize(&texture_matrix_stack); - - current_stack = &modelview_matrix_stack; - initialized = 1; - - kmMat4Identity(&identity); - - //Make sure that each stack has the identity matrix - km_mat4_stack_push(&modelview_matrix_stack, &identity); - km_mat4_stack_push(&projection_matrix_stack, &identity); - km_mat4_stack_push(&texture_matrix_stack, &identity); - } -} - -void kmGLMatrixMode(kmGLEnum mode) -{ - lazyInitialize(); - - switch(mode) - { - case KM_GL_MODELVIEW: - current_stack = &modelview_matrix_stack; - break; - case KM_GL_PROJECTION: - current_stack = &projection_matrix_stack; - break; - case KM_GL_TEXTURE: - current_stack = &texture_matrix_stack; - break; - default: - assert(0 && "Invalid matrix mode specified"); //TODO: Proper error handling - break; - } -} - -void kmGLPushMatrix(void) -{ - kmMat4 top; - - lazyInitialize(); //Initialize the stacks if they haven't been already - - //Duplicate the top of the stack (i.e the current matrix) - kmMat4Assign(&top, current_stack->top); - km_mat4_stack_push(current_stack, &top); -} - -void kmGLPopMatrix(void) -{ - assert(initialized && "Cannot Pop empty matrix stack"); - //No need to lazy initialize, you shouldn't be popping first anyway! - km_mat4_stack_pop(current_stack, NULL); -} - -void kmGLLoadIdentity() -{ - lazyInitialize(); - - kmMat4Identity(current_stack->top); //Replace the top matrix with the identity matrix -} - -void kmGLFreeAll() -{ - //Clear the matrix stacks - km_mat4_stack_release(&modelview_matrix_stack); - km_mat4_stack_release(&projection_matrix_stack); - km_mat4_stack_release(&texture_matrix_stack); - - //Delete the matrices - initialized = 0; //Set to uninitialized - - current_stack = NULL; //Set the current stack to point nowhere -} - -void kmGLMultMatrix(const kmMat4* pIn) -{ - lazyInitialize(); - kmMat4Multiply(current_stack->top, current_stack->top, pIn); -} - -void kmGLLoadMatrix(const kmMat4* pIn) -{ - lazyInitialize(); - kmMat4Assign(current_stack->top, pIn); -} - -void kmGLGetMatrix(kmGLEnum mode, kmMat4* pOut) -{ - lazyInitialize(); - - switch(mode) - { - case KM_GL_MODELVIEW: - kmMat4Assign(pOut, modelview_matrix_stack.top); - break; - case KM_GL_PROJECTION: - kmMat4Assign(pOut, projection_matrix_stack.top); - break; - case KM_GL_TEXTURE: - kmMat4Assign(pOut, texture_matrix_stack.top); - break; - default: - assert(1 && "Invalid matrix mode specified"); //TODO: Proper error handling - break; - } -} - -void kmGLTranslatef(float x, float y, float z) -{ - kmMat4 translation; - - //Create a rotation matrix using the axis and the angle - kmMat4Translation(&translation,x,y,z); - - //Multiply the rotation matrix by the current matrix - kmMat4Multiply(current_stack->top, current_stack->top, &translation); -} - -void kmGLRotatef(float angle, float x, float y, float z) -{ - kmVec3 axis; - kmMat4 rotation; - - //Create an axis vector - kmVec3Fill(&axis, x, y, z); - - //Create a rotation matrix using the axis and the angle - kmMat4RotationAxisAngle(&rotation, &axis, kmDegreesToRadians(angle)); - - //Multiply the rotation matrix by the current matrix - kmMat4Multiply(current_stack->top, current_stack->top, &rotation); -} - -void kmGLScalef(float x, float y, float z) -{ - kmMat4 scaling; - kmMat4Scaling(&scaling, x, y, z); - kmMat4Multiply(current_stack->top, current_stack->top, &scaling); -} diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/src/aabb.c b/cappuccino-sdk/incl/cocos2dx/kazmath/src/aabb.c deleted file mode 100644 index 83b3748..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/src/aabb.c +++ /dev/null @@ -1,63 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "kazmath/aabb.h" - -/** - * Returns KM_TRUE if point is in the specified AABB, returns - * KM_FALSE otherwise. - */ -const int kmAABBContainsPoint(const kmVec3* pPoint, const kmAABB* pBox) -{ - if(pPoint->x >= pBox->min.x && pPoint->x <= pBox->max.x && - pPoint->y >= pBox->min.y && pPoint->y <= pBox->max.y && - pPoint->z >= pBox->min.z && pPoint->z <= pBox->max.z) { - return KM_TRUE; - } - - return KM_FALSE; -} - -/** - * Assigns pIn to pOut, returns pOut. - */ -kmAABB* const kmAABBAssign(kmAABB* pOut, const kmAABB* pIn) -{ - kmVec3Assign(&pOut->min, &pIn->min); - kmVec3Assign(&pOut->max, &pIn->max); - return pOut; -} - -/** - * Scales pIn by s, stores the resulting AABB in pOut. Returns pOut - */ -kmAABB* const kmAABBScale(kmAABB* pOut, const kmAABB* pIn, kmScalar s) -{ - assert(0 && "Not implemented"); - return 0; -} - - - diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/src/mat3.c b/cappuccino-sdk/incl/cocos2dx/kazmath/src/mat3.c deleted file mode 100644 index 6654d06..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/src/mat3.c +++ /dev/null @@ -1,372 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include -#include -#include - -#include "kazmath/utility.h" -#include "kazmath/vec3.h" -#include "kazmath/mat3.h" -#include "kazmath/quaternion.h" - -kmMat3* const kmMat3Fill(kmMat3* pOut, const kmScalar* pMat) -{ - memcpy(pOut->mat, pMat, sizeof(kmScalar) * 9); - return pOut; -} - -/** Sets pOut to an identity matrix returns pOut*/ -kmMat3* const kmMat3Identity(kmMat3* pOut) -{ - memset(pOut->mat, 0, sizeof(float) * 9); - pOut->mat[0] = pOut->mat[4] = pOut->mat[8] = 1.0f; - return pOut; -} - -const kmScalar kmMat3Determinant(const kmMat3* pIn) -{ - kmScalar output; - /* - calculating the determinant following the rule of sarus, - | 0 3 6 | 0 3 | - m = | 1 4 7 | 1 4 | - | 2 5 8 | 2 5 | - now sum up the products of the diagonals going to the right (i.e. 0,4,8) - and subtract the products of the other diagonals (i.e. 2,4,6) - */ - - output = pIn->mat[0] * pIn->mat[4] * pIn->mat[8] + pIn->mat[1] * pIn->mat[5] * pIn->mat[6] + pIn->mat[2] * pIn->mat[3] * pIn->mat[7]; - output -= pIn->mat[2] * pIn->mat[4] * pIn->mat[6] + pIn->mat[0] * pIn->mat[5] * pIn->mat[7] + pIn->mat[1] * pIn->mat[3] * pIn->mat[8]; - - return output; -} - - -kmMat3* const kmMat3Adjugate(kmMat3* pOut, const kmMat3* pIn) -{ - pOut->mat[0] = pIn->mat[4] * pIn->mat[8] - pIn->mat[5] * pIn->mat[7]; - pOut->mat[1] = pIn->mat[2] * pIn->mat[7] - pIn->mat[1] * pIn->mat[8]; - pOut->mat[2] = pIn->mat[1] * pIn->mat[5] - pIn->mat[2] * pIn->mat[4]; - pOut->mat[3] = pIn->mat[5] * pIn->mat[6] - pIn->mat[3] * pIn->mat[8]; - pOut->mat[4] = pIn->mat[0] * pIn->mat[8] - pIn->mat[2] * pIn->mat[6]; - pOut->mat[5] = pIn->mat[2] * pIn->mat[3] - pIn->mat[0] * pIn->mat[5]; - pOut->mat[6] = pIn->mat[3] * pIn->mat[7] - pIn->mat[4] * pIn->mat[6]; - - // XXX: pIn->mat[9] is invalid! -// pOut->mat[7] = pIn->mat[1] * pIn->mat[6] - pIn->mat[9] * pIn->mat[7]; - pOut->mat[8] = pIn->mat[0] * pIn->mat[4] - pIn->mat[1] * pIn->mat[3]; - - return pOut; -} - -kmMat3* const kmMat3Inverse(kmMat3* pOut, const kmScalar pDeterminate, const kmMat3* pM) -{ - kmScalar detInv; - kmMat3 adjugate; - - if(pDeterminate == 0.0) - { - return NULL; - } - - detInv = 1.0f / pDeterminate; - - kmMat3Adjugate(&adjugate, pM); - kmMat3ScalarMultiply(pOut, &adjugate, detInv); - - return pOut; -} - -/** Returns true if pIn is an identity matrix */ -const int kmMat3IsIdentity(const kmMat3* pIn) -{ - static const float identity [] = { 1.0f, 0.0f, 0.0f, - 0.0f, 1.0f, 0.0f, - 0.0f, 0.0f, 1.0f}; - - return (memcmp(identity, pIn->mat, sizeof(float) * 9) == 0); -} - -/** Sets pOut to the transpose of pIn, returns pOut */ -kmMat3* const kmMat3Transpose(kmMat3* pOut, const kmMat3* pIn) -{ - int z, x; - for (z = 0; z < 3; ++z) { - for (x = 0; x < 3; ++x) { - pOut->mat[(z * 3) + x] = pIn->mat[(x * 3) + z]; - } - } - - return pOut; -} - -/* Multiplies pM1 with pM2, stores the result in pOut, returns pOut */ -kmMat3* const kmMat3Multiply(kmMat3* pOut, const kmMat3* pM1, const kmMat3* pM2) -{ - float mat[9]; - - const float *m1 = pM1->mat, *m2 = pM2->mat; - - mat[0] = m1[0] * m2[0] + m1[3] * m2[1] + m1[6] * m2[2]; - mat[1] = m1[1] * m2[0] + m1[4] * m2[1] + m1[7] * m2[2]; - mat[2] = m1[2] * m2[0] + m1[5] * m2[1] + m1[8] * m2[2]; - - mat[3] = m1[0] * m2[3] + m1[3] * m2[4] + m1[6] * m2[5]; - mat[4] = m1[1] * m2[3] + m1[4] * m2[4] + m1[7] * m2[5]; - mat[5] = m1[2] * m2[3] + m1[5] * m2[4] + m1[8] * m2[5]; - - mat[6] = m1[0] * m2[6] + m1[3] * m2[7] + m1[6] * m2[8]; - mat[7] = m1[1] * m2[6] + m1[4] * m2[7] + m1[7] * m2[8]; - mat[8] = m1[2] * m2[6] + m1[5] * m2[7] + m1[8] * m2[8]; - - memcpy(pOut->mat, mat, sizeof(float)*9); - - return pOut; -} - -kmMat3* const kmMat3ScalarMultiply(kmMat3* pOut, const kmMat3* pM, const kmScalar pFactor) -{ - float mat[9]; - int i; - - for(i = 0; i < 9; i++) - { - mat[i] = pM->mat[i] * pFactor; - } - - memcpy(pOut->mat, mat, sizeof(float)*9); - - return pOut; -} - -/** Assigns the value of pIn to pOut */ -kmMat3* const kmMat3Assign(kmMat3* pOut, const kmMat3* pIn) -{ - assert(pOut != pIn); //You have tried to self-assign!! - - memcpy(pOut->mat, pIn->mat, sizeof(float)*9); - - return pOut; -} - -/** Returns true if the 2 matrices are equal (approximately) */ -const int kmMat3AreEqual(const kmMat3* pMat1, const kmMat3* pMat2) -{ - int i; - if (pMat1 == pMat2) { - return KM_TRUE; - } - - for (i = 0; i < 9; ++i) { - if (!(pMat1->mat[i] + kmEpsilon > pMat2->mat[i] && - pMat1->mat[i] - kmEpsilon < pMat2->mat[i])) { - return KM_FALSE; - } - } - - return KM_TRUE; -} - -/* Rotation around the z axis so everything stays planar in XY */ -kmMat3* const kmMat3Rotation(kmMat3* pOut, const float radians) -{ - /* - | cos(A) -sin(A) 0 | - M = | sin(A) cos(A) 0 | - | 0 0 1 | - */ - - pOut->mat[0] = cosf(radians); - pOut->mat[1] = sinf(radians); - pOut->mat[2] = 0.0f; - - pOut->mat[3] = -sinf(radians);; - pOut->mat[4] = cosf(radians); - pOut->mat[5] = 0.0f; - - pOut->mat[6] = 0.0f; - pOut->mat[7] = 0.0f; - pOut->mat[8] = 1.0f; - - return pOut; -} - -/** Builds a scaling matrix */ -kmMat3* const kmMat3Scaling(kmMat3* pOut, const kmScalar x, const kmScalar y) -{ -// memset(pOut->mat, 0, sizeof(float) * 9); - kmMat3Identity(pOut); - pOut->mat[0] = x; - pOut->mat[4] = y; - - return pOut; -} - -kmMat3* const kmMat3Translation(kmMat3* pOut, const kmScalar x, const kmScalar y) -{ -// memset(pOut->mat, 0, sizeof(float) * 9); - kmMat3Identity(pOut); - pOut->mat[6] = x; - pOut->mat[7] = y; -// pOut->mat[8] = 1.0; - - return pOut; -} - - -kmMat3* const kmMat3RotationQuaternion(kmMat3* pOut, const kmQuaternion* pIn) -{ - if (!pIn || !pOut) { - return NULL; - } - - // First row - pOut->mat[0] = 1.0f - 2.0f * (pIn->y * pIn->y + pIn->z * pIn->z); - pOut->mat[1] = 2.0f * (pIn->x * pIn->y - pIn->w * pIn->z); - pOut->mat[2] = 2.0f * (pIn->x * pIn->z + pIn->w * pIn->y); - - // Second row - pOut->mat[3] = 2.0f * (pIn->x * pIn->y + pIn->w * pIn->z); - pOut->mat[4] = 1.0f - 2.0f * (pIn->x * pIn->x + pIn->z * pIn->z); - pOut->mat[5] = 2.0f * (pIn->y * pIn->z - pIn->w * pIn->x); - - // Third row - pOut->mat[6] = 2.0f * (pIn->x * pIn->z - pIn->w * pIn->y); - pOut->mat[7] = 2.0f * (pIn->y * pIn->z + pIn->w * pIn->x); - pOut->mat[8] = 1.0f - 2.0f * (pIn->x * pIn->x + pIn->y * pIn->y); - - return pOut; -} - -kmMat3* const kmMat3RotationAxisAngle(kmMat3* pOut, const struct kmVec3* axis, kmScalar radians) -{ - float rcos = cosf(radians); - float rsin = sinf(radians); - - pOut->mat[0] = rcos + axis->x * axis->x * (1 - rcos); - pOut->mat[1] = axis->z * rsin + axis->y * axis->x * (1 - rcos); - pOut->mat[2] = -axis->y * rsin + axis->z * axis->x * (1 - rcos); - - pOut->mat[3] = -axis->z * rsin + axis->x * axis->y * (1 - rcos); - pOut->mat[4] = rcos + axis->y * axis->y * (1 - rcos); - pOut->mat[5] = axis->x * rsin + axis->z * axis->y * (1 - rcos); - - pOut->mat[6] = axis->y * rsin + axis->x * axis->z * (1 - rcos); - pOut->mat[7] = -axis->x * rsin + axis->y * axis->z * (1 - rcos); - pOut->mat[8] = rcos + axis->z * axis->z * (1 - rcos); - - return pOut; -} - -kmVec3* const kmMat3RotationToAxisAngle(kmVec3* pAxis, kmScalar* radians, const kmMat3* pIn) -{ - /*Surely not this easy?*/ - kmQuaternion temp; - kmQuaternionRotationMatrix(&temp, pIn); - kmQuaternionToAxisAngle(&temp, pAxis, radians); - return pAxis; -} - -/** - * Builds an X-axis rotation matrix and stores it in pOut, returns pOut - */ -kmMat3* const kmMat3RotationX(kmMat3* pOut, const float radians) -{ - /* - | 1 0 0 | - M = | 0 cos(A) -sin(A) | - | 0 sin(A) cos(A) | - - */ - - pOut->mat[0] = 1.0f; - pOut->mat[1] = 0.0f; - pOut->mat[2] = 0.0f; - - pOut->mat[3] = 0.0f; - pOut->mat[4] = cosf(radians); - pOut->mat[5] = sinf(radians); - - pOut->mat[6] = 0.0f; - pOut->mat[7] = -sinf(radians); - pOut->mat[8] = cosf(radians); - - return pOut; -} - -/** - * Builds a rotation matrix using the rotation around the Y-axis - * The result is stored in pOut, pOut is returned. - */ -kmMat3* const kmMat3RotationY(kmMat3* pOut, const float radians) -{ - /* - | cos(A) 0 sin(A) | - M = | 0 1 0 | - | -sin(A) 0 cos(A) | - */ - - pOut->mat[0] = cosf(radians); - pOut->mat[1] = 0.0f; - pOut->mat[2] = -sinf(radians); - - pOut->mat[3] = 0.0f; - pOut->mat[4] = 1.0f; - pOut->mat[5] = 0.0f; - - pOut->mat[6] = sinf(radians); - pOut->mat[7] = 0.0f; - pOut->mat[8] = cosf(radians); - - return pOut; -} - -/** - * Builds a rotation matrix around the Z-axis. The resulting - * matrix is stored in pOut. pOut is returned. - */ -kmMat3* const kmMat3RotationZ(kmMat3* pOut, const float radians) -{ - /* - | cos(A) -sin(A) 0 | - M = | sin(A) cos(A) 0 | - | 0 0 1 | - */ - - pOut->mat[0] = cosf(radians); - pOut->mat[1] =-sinf(radians); - pOut->mat[2] = 0.0f; - - pOut->mat[3] = sinf(radians);; - pOut->mat[4] = cosf(radians); - pOut->mat[5] = 0.0f; - - pOut->mat[6] = 0.0f; - pOut->mat[7] = 0.0f; - pOut->mat[8] = 1.0f; - - return pOut; -} diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/src/mat4.c b/cappuccino-sdk/incl/cocos2dx/kazmath/src/mat4.c deleted file mode 100644 index 33fe83e..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/src/mat4.c +++ /dev/null @@ -1,790 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/** - * @file mat4.c - */ -#include -#include -#include - -#include "kazmath/utility.h" -#include "kazmath/vec3.h" -#include "kazmath/mat4.h" -#include "kazmath/mat3.h" -#include "kazmath/quaternion.h" -#include "kazmath/plane.h" - -#include "kazmath/neon_matrix_impl.h" - -/** - * Fills a kmMat4 structure with the values from a 16 - * element array of floats - * @Params pOut - A pointer to the destination matrix - * pMat - A 16 element array of floats - * @Return Returns pOut so that the call can be nested - */ -kmMat4* const kmMat4Fill(kmMat4* pOut, const kmScalar* pMat) -{ - memcpy(pOut->mat, pMat, sizeof(kmScalar) * 16); - return pOut; -} - -/** - * Sets pOut to an identity matrix returns pOut - * @Params pOut - A pointer to the matrix to set to identity - * @Return Returns pOut so that the call can be nested - */ -kmMat4* const kmMat4Identity(kmMat4* pOut) -{ - memset(pOut->mat, 0, sizeof(float) * 16); - pOut->mat[0] = pOut->mat[5] = pOut->mat[10] = pOut->mat[15] = 1.0f; - return pOut; -} - - -float get(const kmMat4 * pIn, int row, int col) -{ - return pIn->mat[row + 4*col]; -} - -void set(kmMat4 * pIn, int row, int col, float value) -{ - pIn->mat[row + 4*col] = value; -} - -void swap(kmMat4 * pIn, int r1, int c1, int r2, int c2) -{ - float tmp = get(pIn,r1,c1); - set(pIn,r1,c1,get(pIn,r2,c2)); - set(pIn,r2,c2, tmp); -} - -//Returns an upper and a lower triangular matrix which are L and R in the Gauss algorithm -int gaussj(kmMat4 *a, kmMat4 *b) -{ - int i, icol = 0, irow = 0, j, k, l, ll, n = 4, m = 4; - float big, dum, pivinv; - int indxc[4] = {0}; - int indxr[4] = {0}; - int ipiv[4] = {0}; - - for (j = 0; j < n; j++) { - ipiv[j] = 0; - } - - for (i = 0; i < n; i++) { - big = 0.0f; - for (j = 0; j < n; j++) { - if (ipiv[j] != 1) { - for (k = 0; k < n; k++) { - if (ipiv[k] == 0) { - if (abs(get(a,j, k)) >= big) { - big = abs(get(a,j, k)); - irow = j; - icol = k; - } - } - } - } - } - ++(ipiv[icol]); - if (irow != icol) { - for (l = 0; l < n; l++) { - swap(a,irow, l, icol, l); - } - for (l = 0; l < m; l++) { - swap(b,irow, l, icol, l); - } - } - indxr[i] = irow; - indxc[i] = icol; - if (get(a,icol, icol) == 0.0) { - return KM_FALSE; - } - pivinv = 1.0f / get(a,icol, icol); - set(a,icol, icol, 1.0f); - for (l = 0; l < n; l++) { - set(a,icol, l, get(a,icol, l) * pivinv); - } - for (l = 0; l < m; l++) { - set(b,icol, l, get(b,icol, l) * pivinv); - } - - for (ll = 0; ll < n; ll++) { - if (ll != icol) { - dum = get(a,ll, icol); - set(a,ll, icol, 0.0f); - for (l = 0; l < n; l++) { - set(a,ll, l, get(a,ll, l) - get(a,icol, l) * dum); - } - for (l = 0; l < m; l++) { - set(b,ll, l, get(a,ll, l) - get(b,icol, l) * dum); - } - } - } - } -// This is the end of the main loop over columns of the reduction. It only remains to unscram- -// ble the solution in view of the column interchanges. We do this by interchanging pairs of -// columns in the reverse order that the permutation was built up. - for (l = n - 1; l >= 0; l--) { - if (indxr[l] != indxc[l]) { - for (k = 0; k < n; k++) { - swap(a,k, indxr[l], k, indxc[l]); - } - } - } - return KM_TRUE; -} - -/** - * Calculates the inverse of pM and stores the result in - * pOut. - * @Return Returns NULL if there is no inverse, else pOut - */ -kmMat4* const kmMat4Inverse(kmMat4* pOut, const kmMat4* pM) -{ - kmMat4 inv; - kmMat4 tmp; - - kmMat4Assign(&inv, pM); - - kmMat4Identity(&tmp); - - if(gaussj(&inv, &tmp) == KM_FALSE) { - return NULL; - } - - kmMat4Assign(pOut, &inv); - return pOut; -} -/** - * Returns KM_TRUE if pIn is an identity matrix - * KM_FALSE otherwise - */ -const int kmMat4IsIdentity(const kmMat4* pIn) -{ - static const float identity [] = { 1.0f, 0.0f, 0.0f, 0.0f, - 0.0f, 1.0f, 0.0f, 0.0f, - 0.0f, 0.0f, 1.0f, 0.0f, - 0.0f, 0.0f, 0.0f, 1.0f - }; - - return (memcmp(identity, pIn->mat, sizeof(float) * 16) == 0); -} - -/** - * Sets pOut to the transpose of pIn, returns pOut - */ -kmMat4* const kmMat4Transpose(kmMat4* pOut, const kmMat4* pIn) -{ - int x, z; - - for (z = 0; z < 4; ++z) { - for (x = 0; x < 4; ++x) { - pOut->mat[(z * 4) + x] = pIn->mat[(x * 4) + z]; - } - } - - return pOut; -} - -/** - * Multiplies pM1 with pM2, stores the result in pOut, returns pOut - */ -kmMat4* const kmMat4Multiply(kmMat4* pOut, const kmMat4* pM1, const kmMat4* pM2) -{ -#if defined(__ARM_NEON__) - - float mat[16]; - - // Invert column-order with row-order - NEON_Matrix4Mul( &pM2->mat[0], &pM1->mat[0], &mat[0] ); - -#else - float mat[16]; - - const float *m1 = pM1->mat, *m2 = pM2->mat; - - mat[0] = m1[0] * m2[0] + m1[4] * m2[1] + m1[8] * m2[2] + m1[12] * m2[3]; - mat[1] = m1[1] * m2[0] + m1[5] * m2[1] + m1[9] * m2[2] + m1[13] * m2[3]; - mat[2] = m1[2] * m2[0] + m1[6] * m2[1] + m1[10] * m2[2] + m1[14] * m2[3]; - mat[3] = m1[3] * m2[0] + m1[7] * m2[1] + m1[11] * m2[2] + m1[15] * m2[3]; - - mat[4] = m1[0] * m2[4] + m1[4] * m2[5] + m1[8] * m2[6] + m1[12] * m2[7]; - mat[5] = m1[1] * m2[4] + m1[5] * m2[5] + m1[9] * m2[6] + m1[13] * m2[7]; - mat[6] = m1[2] * m2[4] + m1[6] * m2[5] + m1[10] * m2[6] + m1[14] * m2[7]; - mat[7] = m1[3] * m2[4] + m1[7] * m2[5] + m1[11] * m2[6] + m1[15] * m2[7]; - - mat[8] = m1[0] * m2[8] + m1[4] * m2[9] + m1[8] * m2[10] + m1[12] * m2[11]; - mat[9] = m1[1] * m2[8] + m1[5] * m2[9] + m1[9] * m2[10] + m1[13] * m2[11]; - mat[10] = m1[2] * m2[8] + m1[6] * m2[9] + m1[10] * m2[10] + m1[14] * m2[11]; - mat[11] = m1[3] * m2[8] + m1[7] * m2[9] + m1[11] * m2[10] + m1[15] * m2[11]; - - mat[12] = m1[0] * m2[12] + m1[4] * m2[13] + m1[8] * m2[14] + m1[12] * m2[15]; - mat[13] = m1[1] * m2[12] + m1[5] * m2[13] + m1[9] * m2[14] + m1[13] * m2[15]; - mat[14] = m1[2] * m2[12] + m1[6] * m2[13] + m1[10] * m2[14] + m1[14] * m2[15]; - mat[15] = m1[3] * m2[12] + m1[7] * m2[13] + m1[11] * m2[14] + m1[15] * m2[15]; - -#endif - - memcpy(pOut->mat, mat, sizeof(float)*16); - - return pOut; -} - -/** - * Assigns the value of pIn to pOut - */ -kmMat4* const kmMat4Assign(kmMat4* pOut, const kmMat4* pIn) -{ - assert(pOut != pIn && "You have tried to self-assign!!"); - - memcpy(pOut->mat, pIn->mat, sizeof(float)*16); - - return pOut; -} - -/** - * Returns KM_TRUE if the 2 matrices are equal (approximately) - */ -const int kmMat4AreEqual(const kmMat4* pMat1, const kmMat4* pMat2) -{ - int i = 0; - - assert(pMat1 != pMat2 && "You are comparing the same thing!"); - - for (i = 0; i < 16; ++i) - { - if (!(pMat1->mat[i] + kmEpsilon > pMat2->mat[i] && - pMat1->mat[i] - kmEpsilon < pMat2->mat[i])) { - return KM_FALSE; - } - } - - return KM_TRUE; -} - -/** - * Build a rotation matrix from an axis and an angle. Result is stored in pOut. - * pOut is returned. - */ -kmMat4* const kmMat4RotationAxisAngle(kmMat4* pOut, const kmVec3* axis, kmScalar radians) -{ - float rcos = cosf(radians); - float rsin = sinf(radians); - - kmVec3 normalizedAxis; - kmVec3Normalize(&normalizedAxis, axis); - - pOut->mat[0] = rcos + normalizedAxis.x * normalizedAxis.x * (1 - rcos); - pOut->mat[1] = normalizedAxis.z * rsin + normalizedAxis.y * normalizedAxis.x * (1 - rcos); - pOut->mat[2] = -normalizedAxis.y * rsin + normalizedAxis.z * normalizedAxis.x * (1 - rcos); - pOut->mat[3] = 0.0f; - - pOut->mat[4] = -normalizedAxis.z * rsin + normalizedAxis.x * normalizedAxis.y * (1 - rcos); - pOut->mat[5] = rcos + normalizedAxis.y * normalizedAxis.y * (1 - rcos); - pOut->mat[6] = normalizedAxis.x * rsin + normalizedAxis.z * normalizedAxis.y * (1 - rcos); - pOut->mat[7] = 0.0f; - - pOut->mat[8] = normalizedAxis.y * rsin + normalizedAxis.x * normalizedAxis.z * (1 - rcos); - pOut->mat[9] = -normalizedAxis.x * rsin + normalizedAxis.y * normalizedAxis.z * (1 - rcos); - pOut->mat[10] = rcos + normalizedAxis.z * normalizedAxis.z * (1 - rcos); - pOut->mat[11] = 0.0f; - - pOut->mat[12] = 0.0f; - pOut->mat[13] = 0.0f; - pOut->mat[14] = 0.0f; - pOut->mat[15] = 1.0f; - - return pOut; -} - -/** - * Builds an X-axis rotation matrix and stores it in pOut, returns pOut - */ -kmMat4* const kmMat4RotationX(kmMat4* pOut, const float radians) -{ - /* - | 1 0 0 0 | - M = | 0 cos(A) -sin(A) 0 | - | 0 sin(A) cos(A) 0 | - | 0 0 0 1 | - - */ - - pOut->mat[0] = 1.0f; - pOut->mat[1] = 0.0f; - pOut->mat[2] = 0.0f; - pOut->mat[3] = 0.0f; - - pOut->mat[4] = 0.0f; - pOut->mat[5] = cosf(radians); - pOut->mat[6] = sinf(radians); - pOut->mat[7] = 0.0f; - - pOut->mat[8] = 0.0f; - pOut->mat[9] = -sinf(radians); - pOut->mat[10] = cosf(radians); - pOut->mat[11] = 0.0f; - - pOut->mat[12] = 0.0f; - pOut->mat[13] = 0.0f; - pOut->mat[14] = 0.0f; - pOut->mat[15] = 1.0f; - - return pOut; -} - -/** - * Builds a rotation matrix using the rotation around the Y-axis - * The result is stored in pOut, pOut is returned. - */ -kmMat4* const kmMat4RotationY(kmMat4* pOut, const float radians) -{ - /* - | cos(A) 0 sin(A) 0 | - M = | 0 1 0 0 | - | -sin(A) 0 cos(A) 0 | - | 0 0 0 1 | - */ - - pOut->mat[0] = cosf(radians); - pOut->mat[1] = 0.0f; - pOut->mat[2] = -sinf(radians); - pOut->mat[3] = 0.0f; - - pOut->mat[4] = 0.0f; - pOut->mat[5] = 1.0f; - pOut->mat[6] = 0.0f; - pOut->mat[7] = 0.0f; - - pOut->mat[8] = sinf(radians); - pOut->mat[9] = 0.0f; - pOut->mat[10] = cosf(radians); - pOut->mat[11] = 0.0f; - - pOut->mat[12] = 0.0f; - pOut->mat[13] = 0.0f; - pOut->mat[14] = 0.0f; - pOut->mat[15] = 1.0f; - - return pOut; -} - -/** - * Builds a rotation matrix around the Z-axis. The resulting - * matrix is stored in pOut. pOut is returned. - */ -kmMat4* const kmMat4RotationZ(kmMat4* pOut, const float radians) -{ - /* - | cos(A) -sin(A) 0 0 | - M = | sin(A) cos(A) 0 0 | - | 0 0 1 0 | - | 0 0 0 1 | - */ - - pOut->mat[0] = cosf(radians); - pOut->mat[1] = sinf(radians); - pOut->mat[2] = 0.0f; - pOut->mat[3] = 0.0f; - - pOut->mat[4] = -sinf(radians);; - pOut->mat[5] = cosf(radians); - pOut->mat[6] = 0.0f; - pOut->mat[7] = 0.0f; - - pOut->mat[8] = 0.0f; - pOut->mat[9] = 0.0f; - pOut->mat[10] = 1.0f; - pOut->mat[11] = 0.0f; - - pOut->mat[12] = 0.0f; - pOut->mat[13] = 0.0f; - pOut->mat[14] = 0.0f; - pOut->mat[15] = 1.0f; - - return pOut; -} - -/** - * Builds a rotation matrix from pitch, yaw and roll. The resulting - * matrix is stored in pOut and pOut is returned - */ -kmMat4* const kmMat4RotationPitchYawRoll(kmMat4* pOut, const kmScalar pitch, const kmScalar yaw, const kmScalar roll) -{ - double cr = cos(pitch); - double sr = sin(pitch); - double cp = cos(yaw); - double sp = sin(yaw); - double cy = cos(roll); - double sy = sin(roll); - double srsp = sr * sp; - double crsp = cr * sp; - - pOut->mat[0] = (kmScalar) cp * cy; - pOut->mat[4] = (kmScalar) cp * sy; - pOut->mat[8] = (kmScalar) - sp; - - pOut->mat[1] = (kmScalar) srsp * cy - cr * sy; - pOut->mat[5] = (kmScalar) srsp * sy + cr * cy; - pOut->mat[9] = (kmScalar) sr * cp; - - pOut->mat[2] = (kmScalar) crsp * cy + sr * sy; - pOut->mat[6] = (kmScalar) crsp * sy - sr * cy; - pOut->mat[10] = (kmScalar) cr * cp; - - pOut->mat[3] = pOut->mat[7] = pOut->mat[11] = 0.0; - pOut->mat[15] = 1.0; - - return pOut; -} - -/** Converts a quaternion to a rotation matrix, - * the result is stored in pOut, returns pOut - */ -kmMat4* const kmMat4RotationQuaternion(kmMat4* pOut, const kmQuaternion* pQ) -{ - pOut->mat[0] = 1.0f - 2.0f * (pQ->y * pQ->y + pQ->z * pQ->z ); - pOut->mat[1] = 2.0f * (pQ->x * pQ->y + pQ->z * pQ->w); - pOut->mat[2] = 2.0f * (pQ->x * pQ->z - pQ->y * pQ->w); - pOut->mat[3] = 0.0f; - - // Second row - pOut->mat[4] = 2.0f * ( pQ->x * pQ->y - pQ->z * pQ->w ); - pOut->mat[5] = 1.0f - 2.0f * ( pQ->x * pQ->x + pQ->z * pQ->z ); - pOut->mat[6] = 2.0f * (pQ->z * pQ->y + pQ->x * pQ->w ); - pOut->mat[7] = 0.0f; - - // Third row - pOut->mat[8] = 2.0f * ( pQ->x * pQ->z + pQ->y * pQ->w ); - pOut->mat[9] = 2.0f * ( pQ->y * pQ->z - pQ->x * pQ->w ); - pOut->mat[10] = 1.0f - 2.0f * ( pQ->x * pQ->x + pQ->y * pQ->y ); - pOut->mat[11] = 0.0f; - - // Fourth row - pOut->mat[12] = 0; - pOut->mat[13] = 0; - pOut->mat[14] = 0; - pOut->mat[15] = 1.0f; - - return pOut; -} - -/** Builds a scaling matrix */ -kmMat4* const kmMat4Scaling(kmMat4* pOut, const kmScalar x, const kmScalar y, - const kmScalar z) -{ - memset(pOut->mat, 0, sizeof(float) * 16); - pOut->mat[0] = x; - pOut->mat[5] = y; - pOut->mat[10] = z; - pOut->mat[15] = 1.0f; - - return pOut; -} - -/** - * Builds a translation matrix. All other elements in the matrix - * will be set to zero except for the diagonal which is set to 1.0 - */ -kmMat4* const kmMat4Translation(kmMat4* pOut, const kmScalar x, - const kmScalar y, const kmScalar z) -{ - //FIXME: Write a test for this - memset(pOut->mat, 0, sizeof(float) * 16); - - pOut->mat[0] = 1.0f; - pOut->mat[5] = 1.0f; - pOut->mat[10] = 1.0f; - - pOut->mat[12] = x; - pOut->mat[13] = y; - pOut->mat[14] = z; - pOut->mat[15] = 1.0f; - - return pOut; -} - -/** - * Get the up vector from a matrix. pIn is the matrix you - * wish to extract the vector from. pOut is a pointer to the - * kmVec3 structure that should hold the resulting vector - */ -kmVec3* const kmMat4GetUpVec3(kmVec3* pOut, const kmMat4* pIn) -{ - pOut->x = pIn->mat[4]; - pOut->y = pIn->mat[5]; - pOut->z = pIn->mat[6]; - - kmVec3Normalize(pOut, pOut); - - return pOut; -} - -/** Extract the right vector from a 4x4 matrix. The result is - * stored in pOut. Returns pOut. - */ -kmVec3* const kmMat4GetRightVec3(kmVec3* pOut, const kmMat4* pIn) -{ - pOut->x = pIn->mat[0]; - pOut->y = pIn->mat[1]; - pOut->z = pIn->mat[2]; - - kmVec3Normalize(pOut, pOut); - - return pOut; -} - -/** - * Extract the forward vector from a 4x4 matrix. The result is - * stored in pOut. Returns pOut. - */ -kmVec3* const kmMat4GetForwardVec3(kmVec3* pOut, const kmMat4* pIn) -{ - pOut->x = pIn->mat[8]; - pOut->y = pIn->mat[9]; - pOut->z = pIn->mat[10]; - - kmVec3Normalize(pOut, pOut); - - return pOut; -} - -/** - * Creates a perspective projection matrix in the - * same way as gluPerspective - */ -kmMat4* const kmMat4PerspectiveProjection(kmMat4* pOut, kmScalar fovY, - kmScalar aspect, kmScalar zNear, - kmScalar zFar) -{ - kmScalar r = kmDegreesToRadians(fovY / 2); - kmScalar deltaZ = zFar - zNear; - kmScalar s = sin(r); - kmScalar cotangent = 0; - - if (deltaZ == 0 || s == 0 || aspect == 0) { - return NULL; - } - - //cos(r) / sin(r) = cot(r) - cotangent = cos(r) / s; - - kmMat4Identity(pOut); - pOut->mat[0] = cotangent / aspect; - pOut->mat[5] = cotangent; - pOut->mat[10] = -(zFar + zNear) / deltaZ; - pOut->mat[11] = -1; - pOut->mat[14] = -2 * zNear * zFar / deltaZ; - pOut->mat[15] = 0; - - return pOut; -} - -/** Creates an orthographic projection matrix like glOrtho */ -kmMat4* const kmMat4OrthographicProjection(kmMat4* pOut, kmScalar left, - kmScalar right, kmScalar bottom, - kmScalar top, kmScalar nearVal, - kmScalar farVal) -{ - kmScalar tx = -((right + left) / (right - left)); - kmScalar ty = -((top + bottom) / (top - bottom)); - kmScalar tz = -((farVal + nearVal) / (farVal - nearVal)); - - kmMat4Identity(pOut); - pOut->mat[0] = 2 / (right - left); - pOut->mat[5] = 2 / (top - bottom); - pOut->mat[10] = -2 / (farVal - nearVal); - pOut->mat[12] = tx; - pOut->mat[13] = ty; - pOut->mat[14] = tz; - - return pOut; -} - -/** - * Builds a translation matrix in the same way as gluLookAt() - * the resulting matrix is stored in pOut. pOut is returned. - */ -kmMat4* const kmMat4LookAt(kmMat4* pOut, const kmVec3* pEye, - const kmVec3* pCenter, const kmVec3* pUp) -{ - kmVec3 f, up, s, u; - kmMat4 translate; - - kmVec3Subtract(&f, pCenter, pEye); - kmVec3Normalize(&f, &f); - - kmVec3Assign(&up, pUp); - kmVec3Normalize(&up, &up); - - kmVec3Cross(&s, &f, &up); - kmVec3Normalize(&s, &s); - - kmVec3Cross(&u, &s, &f); - kmVec3Normalize(&s, &s); - - kmMat4Identity(pOut); - - pOut->mat[0] = s.x; - pOut->mat[4] = s.y; - pOut->mat[8] = s.z; - - pOut->mat[1] = u.x; - pOut->mat[5] = u.y; - pOut->mat[9] = u.z; - - pOut->mat[2] = -f.x; - pOut->mat[6] = -f.y; - pOut->mat[10] = -f.z; - - kmMat4Translation(&translate, -pEye->x, -pEye->y, -pEye->z); - kmMat4Multiply(pOut, pOut, &translate); - - return pOut; -} - -/** - * Extract a 3x3 rotation matrix from the input 4x4 transformation. - * Stores the result in pOut, returns pOut - */ -kmMat3* const kmMat4ExtractRotation(kmMat3* pOut, const kmMat4* pIn) -{ - pOut->mat[0] = pIn->mat[0]; - pOut->mat[1] = pIn->mat[1]; - pOut->mat[2] = pIn->mat[2]; - - pOut->mat[3] = pIn->mat[4]; - pOut->mat[4] = pIn->mat[5]; - pOut->mat[5] = pIn->mat[6]; - - pOut->mat[6] = pIn->mat[8]; - pOut->mat[7] = pIn->mat[9]; - pOut->mat[8] = pIn->mat[10]; - - return pOut; -} - -/** - * Take the rotation from a 4x4 transformation matrix, and return it as an axis and an angle (in radians) - * returns the output axis. - */ -kmVec3* const kmMat4RotationToAxisAngle(kmVec3* pAxis, kmScalar* radians, const kmMat4* pIn) -{ - /*Surely not this easy?*/ - kmQuaternion temp; - kmMat3 rotation; - kmMat4ExtractRotation(&rotation, pIn); - kmQuaternionRotationMatrix(&temp, &rotation); - kmQuaternionToAxisAngle(&temp, pAxis, radians); - return pAxis; -} - -/** Build a 4x4 OpenGL transformation matrix using a 3x3 rotation matrix, - * and a 3d vector representing a translation. Assign the result to pOut, - * pOut is also returned. - */ -kmMat4* const kmMat4RotationTranslation(kmMat4* pOut, const kmMat3* rotation, const kmVec3* translation) -{ - pOut->mat[0] = rotation->mat[0]; - pOut->mat[1] = rotation->mat[1]; - pOut->mat[2] = rotation->mat[2]; - pOut->mat[3] = 0.0f; - - pOut->mat[4] = rotation->mat[3]; - pOut->mat[5] = rotation->mat[4]; - pOut->mat[6] = rotation->mat[5]; - pOut->mat[7] = 0.0f; - - pOut->mat[8] = rotation->mat[6]; - pOut->mat[9] = rotation->mat[7]; - pOut->mat[10] = rotation->mat[8]; - pOut->mat[11] = 0.0f; - - pOut->mat[12] = translation->x; - pOut->mat[13] = translation->y; - pOut->mat[14] = translation->z; - pOut->mat[15] = 1.0f; - - return pOut; -} - -kmPlane* const kmMat4ExtractPlane(kmPlane* pOut, const kmMat4* pIn, const kmEnum plane) -{ - float t = 1.0f; - - switch(plane) { - case KM_PLANE_RIGHT: - pOut->a = pIn->mat[3] - pIn->mat[0]; - pOut->b = pIn->mat[7] - pIn->mat[4]; - pOut->c = pIn->mat[11] - pIn->mat[8]; - pOut->d = pIn->mat[15] - pIn->mat[12]; - break; - case KM_PLANE_LEFT: - pOut->a = pIn->mat[3] + pIn->mat[0]; - pOut->b = pIn->mat[7] + pIn->mat[4]; - pOut->c = pIn->mat[11] + pIn->mat[8]; - pOut->d = pIn->mat[15] + pIn->mat[12]; - break; - case KM_PLANE_BOTTOM: - pOut->a = pIn->mat[3] + pIn->mat[1]; - pOut->b = pIn->mat[7] + pIn->mat[5]; - pOut->c = pIn->mat[11] + pIn->mat[9]; - pOut->d = pIn->mat[15] + pIn->mat[13]; - break; - case KM_PLANE_TOP: - pOut->a = pIn->mat[3] - pIn->mat[1]; - pOut->b = pIn->mat[7] - pIn->mat[5]; - pOut->c = pIn->mat[11] - pIn->mat[9]; - pOut->d = pIn->mat[15] - pIn->mat[13]; - break; - case KM_PLANE_FAR: - pOut->a = pIn->mat[3] - pIn->mat[2]; - pOut->b = pIn->mat[7] - pIn->mat[6]; - pOut->c = pIn->mat[11] - pIn->mat[10]; - pOut->d = pIn->mat[15] - pIn->mat[14]; - break; - case KM_PLANE_NEAR: - pOut->a = pIn->mat[3] + pIn->mat[2]; - pOut->b = pIn->mat[7] + pIn->mat[6]; - pOut->c = pIn->mat[11] + pIn->mat[10]; - pOut->d = pIn->mat[15] + pIn->mat[14]; - break; - default: - assert(0 && "Invalid plane index"); - } - - t = sqrtf(pOut->a * pOut->a + - pOut->b * pOut->b + - pOut->c * pOut->c); - pOut->a /= t; - pOut->b /= t; - pOut->c /= t; - pOut->d /= t; - - return pOut; -} diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/src/neon_matrix_impl.c b/cappuccino-sdk/incl/cocos2dx/kazmath/src/neon_matrix_impl.c deleted file mode 100644 index 9790b73..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/src/neon_matrix_impl.c +++ /dev/null @@ -1,97 +0,0 @@ -/* - NEON math library for the iPhone / iPod touch - - Copyright (c) 2009 Justin Saunders - - This software is provided 'as-is', without any express or implied warranty. - In no event will the authors be held liable for any damages arising - from the use of this software. - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it freely, - subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must - not claim that you wrote the original software. If you use this - software in a product, an acknowledgment in the product documentation - would be appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must - not be misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source distribution. -*/ - -#include "kazmath/neon_matrix_impl.h" - -#if defined(__ARM_NEON__) - -void NEON_Matrix4Mul(const float* a, const float* b, float* output ) -{ - __asm__ volatile - ( - // Store A & B leaving room for q4-q7, which should be preserved - "vldmia %1, { q0-q3 } \n\t" - "vldmia %2, { q8-q11 }\n\t" - - // result = first column of B x first row of A - "vmul.f32 q12, q8, d0[0]\n\t" - "vmul.f32 q13, q8, d2[0]\n\t" - "vmul.f32 q14, q8, d4[0]\n\t" - "vmul.f32 q15, q8, d6[0]\n\t" - - // result += second column of B x second row of A - "vmla.f32 q12, q9, d0[1]\n\t" - "vmla.f32 q13, q9, d2[1]\n\t" - "vmla.f32 q14, q9, d4[1]\n\t" - "vmla.f32 q15, q9, d6[1]\n\t" - - // result += third column of B x third row of A - "vmla.f32 q12, q10, d1[0]\n\t" - "vmla.f32 q13, q10, d3[0]\n\t" - "vmla.f32 q14, q10, d5[0]\n\t" - "vmla.f32 q15, q10, d7[0]\n\t" - - // result += last column of B x last row of A - "vmla.f32 q12, q11, d1[1]\n\t" - "vmla.f32 q13, q11, d3[1]\n\t" - "vmla.f32 q14, q11, d5[1]\n\t" - "vmla.f32 q15, q11, d7[1]\n\t" - - // output = result registers - "vstmia %0, { q12-q15 }" - : // no output - : "r" (output), "r" (a), "r" (b) // input - note *value* of pointer doesn't change - : "memory", "q0", "q1", "q2", "q3", "q8", "q9", "q10", "q11", "q12", "q13", "q14", "q15" //clobber - ); -} - -void NEON_Matrix4Vector4Mul(const float* m, const float* v, float* output) -{ - __asm__ volatile - ( - // Store m & v - avoiding q4-q7 which need to be preserved - q0 = result - "vldmia %1, { q8-q11 } \n\t" // q8-q11 = m - "vldmia %2, { q1 } \n\t" // q1 = v - - // result = first column of A x V.x - "vmul.f32 q0, q8, d2[0]\n\t" - - // result += second column of A x V.y - "vmla.f32 q0, q9, d2[1]\n\t" - - // result += third column of A x V.z - "vmla.f32 q0, q10, d3[0]\n\t" - - // result += last column of A x V.w - "vmla.f32 q0, q11, d3[1]\n\t" - - // output = result registers - "vstmia %0, { q0 }" - - : // no output - : "r" (output), "r" (m), "r" (v) // input - note *value* of pointer doesn't change - : "memory", "q0", "q1", "q8", "q9", "q10", "q11" //clobber - ); -} - -#endif diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/src/plane.c b/cappuccino-sdk/incl/cocos2dx/kazmath/src/plane.c deleted file mode 100644 index 91a7ff7..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/src/plane.c +++ /dev/null @@ -1,175 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include -#include - -#include "kazmath/vec3.h" -#include "kazmath/vec4.h" -#include "kazmath/plane.h" - -const kmScalar kmPlaneDot(const kmPlane* pP, const kmVec4* pV) -{ - //a*x + b*y + c*z + d*w - - return (pP->a * pV->x + - pP->b * pV->y + - pP->c * pV->z + - pP->d * pV->w); -} - -const kmScalar kmPlaneDotCoord(const kmPlane* pP, const kmVec3* pV) -{ - return (pP->a * pV->x + - pP->b * pV->y + - pP->c * pV->z + pP->d); -} - -const kmScalar kmPlaneDotNormal(const kmPlane* pP, const kmVec3* pV) -{ - return (pP->a * pV->x + - pP->b * pV->y + - pP->c * pV->z); -} - -kmPlane* const kmPlaneFromPointNormal(kmPlane* pOut, const kmVec3* pPoint, const kmVec3* pNormal) -{ - /* - Planea = Nx - Planeb = Ny - Planec = Nz - Planed = −Nâ‹…P - */ - - - pOut->a = pNormal->x; - pOut->b = pNormal->y; - pOut->c = pNormal->z; - pOut->d = -kmVec3Dot(pNormal, pPoint); - - return pOut; -} - -/** - * Creates a plane from 3 points. The result is stored in pOut. - * pOut is returned. - */ -kmPlane* const kmPlaneFromPoints(kmPlane* pOut, const kmVec3* p1, const kmVec3* p2, const kmVec3* p3) -{ - /* - v = (B − A) × (C − A) - n = 1â„|v| v - Outa = nx - Outb = ny - Outc = nz - Outd = −nâ‹…A - */ - - kmVec3 n, v1, v2; - kmVec3Subtract(&v1, p2, p1); //Create the vectors for the 2 sides of the triangle - kmVec3Subtract(&v2, p3, p1); - kmVec3Cross(&n, &v1, &v2); //Use the cross product to get the normal - - kmVec3Normalize(&n, &n); //Normalize it and assign to pOut->m_N - - pOut->a = n.x; - pOut->b = n.y; - pOut->c = n.z; - pOut->d = kmVec3Dot(kmVec3Scale(&n, &n, -1.0), p1); - - return pOut; -} - -kmVec3* const kmPlaneIntersectLine(kmVec3* pOut, const kmPlane* pP, const kmVec3* pV1, const kmVec3* pV2) -{ - /* - n = (Planea, Planeb, Planec) - d = V − U - Out = U − dâ‹…(Pd + nâ‹…U)â„(dâ‹…n) [iff dâ‹…n ≠ 0] - */ - kmVec3 d; - assert(0 && "Not implemented"); - - - kmVec3Subtract(&d, pV2, pV1); //Get the direction vector - - - //TODO: Continue here! - /*if (fabs(kmVec3Dot(&pP->m_N, &d)) > kmEpsilon) - { - //If we get here then the plane and line are parallel (i.e. no intersection) - pOut = nullptr; //Set to nullptr - - return pOut; - } */ - - return NULL; -} - -kmPlane* const kmPlaneNormalize(kmPlane* pOut, const kmPlane* pP) -{ - kmVec3 n; - kmScalar l = 0; - - n.x = pP->a; - n.y = pP->b; - n.z = pP->c; - - l = 1.0f / kmVec3Length(&n); //Get 1/length - kmVec3Normalize(&n, &n); //Normalize the vector and assign to pOut - - pOut->a = n.x; - pOut->b = n.y; - pOut->c = n.z; - - pOut->d = pP->d * l; //Scale the D value and assign to pOut - - return pOut; -} - -kmPlane* const kmPlaneScale(kmPlane* pOut, const kmPlane* pP, kmScalar s) -{ - assert(0 && "Not implemented"); - return NULL; -} - -/** - * Returns POINT_INFRONT_OF_PLANE if pP is infront of pIn. Returns - * POINT_BEHIND_PLANE if it is behind. Returns POINT_ON_PLANE otherwise - */ -const POINT_CLASSIFICATION kmPlaneClassifyPoint(const kmPlane* pIn, const kmVec3* pP) -{ - // This function will determine if a point is on, in front of, or behind - // the plane. First we store the dot product of the plane and the point. - float distance = pIn->a * pP->x + pIn->b * pP->y + pIn->c * pP->z + pIn->d; - - // Simply put if the dot product is greater than 0 then it is infront of it. - // If it is less than 0 then it is behind it. And if it is 0 then it is on it. - if(distance > 0.001) return POINT_INFRONT_OF_PLANE; - if(distance < -0.001) return POINT_BEHIND_PLANE; - - return POINT_ON_PLANE; -} - diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/src/quaternion.c b/cappuccino-sdk/incl/cocos2dx/kazmath/src/quaternion.c deleted file mode 100644 index f901cf1..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/src/quaternion.c +++ /dev/null @@ -1,586 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - -#include -#include - -#include "kazmath/utility.h" -#include "kazmath/mat3.h" -#include "kazmath/vec3.h" -#include "kazmath/quaternion.h" - -#ifndef NULL -#define NULL ((void *)0) -#endif - -///< Returns pOut, sets pOut to the conjugate of pIn -kmQuaternion* const kmQuaternionConjugate(kmQuaternion* pOut, const kmQuaternion* pIn) -{ - pOut->x = -pIn->x; - pOut->y = -pIn->y; - pOut->z = -pIn->z; - pOut->w = pIn->w; - - return pOut; -} - -///< Returns the dot product of the 2 quaternions -const kmScalar kmQuaternionDot(const kmQuaternion* q1, const kmQuaternion* q2) -{ - // A dot B = B dot A = AtBt + AxBx + AyBy + AzBz - - return (q1->w * q2->w + - q1->x * q2->x + - q1->y * q2->y + - q1->z * q2->z); -} - -///< Returns the exponential of the quaternion -kmQuaternion* kmQuaternionExp(kmQuaternion* pOut, const kmQuaternion* pIn) -{ - assert(0); - - return pOut; -} - -///< Makes the passed quaternion an identity quaternion -kmQuaternion* kmQuaternionIdentity(kmQuaternion* pOut) -{ - pOut->x = 0.0; - pOut->y = 0.0; - pOut->z = 0.0; - pOut->w = 1.0; - - return pOut; -} - -///< Returns the inverse of the passed Quaternion -kmQuaternion* kmQuaternionInverse(kmQuaternion* pOut, - const kmQuaternion* pIn) -{ - kmScalar l = kmQuaternionLength(pIn); - kmQuaternion tmp; - - if (fabs(l) > kmEpsilon) - { - pOut->x = 0.0; - pOut->y = 0.0; - pOut->z = 0.0; - pOut->w = 0.0; - - return pOut; - } - - - - ///Get the conjugute and divide by the length - kmQuaternionScale(pOut, - kmQuaternionConjugate(&tmp, pIn), 1.0f / l); - - return pOut; -} - -///< Returns true if the quaternion is an identity quaternion -int kmQuaternionIsIdentity(const kmQuaternion* pIn) -{ - return (pIn->x == 0.0 && pIn->y == 0.0 && pIn->z == 0.0 && - pIn->w == 1.0); -} - -///< Returns the length of the quaternion -kmScalar kmQuaternionLength(const kmQuaternion* pIn) -{ - return sqrtf(kmQuaternionLengthSq(pIn)); -} - -///< Returns the length of the quaternion squared (prevents a sqrt) -kmScalar kmQuaternionLengthSq(const kmQuaternion* pIn) -{ - return pIn->x * pIn->x + pIn->y * pIn->y + - pIn->z * pIn->z + pIn->w * pIn->w; -} - -///< Returns the natural logarithm -kmQuaternion* kmQuaternionLn(kmQuaternion* pOut, - const kmQuaternion* pIn) -{ - /* - A unit quaternion, is defined by: - Q == (cos(theta), sin(theta) * v) where |v| = 1 - The natural logarithm of Q is, ln(Q) = (0, theta * v) - */ - - assert(0); - - return pOut; -} - -///< Multiplies 2 quaternions together -extern -kmQuaternion* kmQuaternionMultiply(kmQuaternion* pOut, - const kmQuaternion* q1, - const kmQuaternion* q2) -{ - pOut->w = q1->w * q2->w - q1->x * q2->x - q1->y * q2->y - q1->z * q2->z; - pOut->x = q1->w * q2->x + q1->x * q2->w + q1->y * q2->z - q1->z * q2->y; - pOut->y = q1->w * q2->y + q1->y * q2->w + q1->z * q2->x - q1->x * q2->z; - pOut->z = q1->w * q2->z + q1->z * q2->w + q1->x * q2->y - q1->y * q2->x; - - return pOut; -} - -///< Normalizes a quaternion -kmQuaternion* kmQuaternionNormalize(kmQuaternion* pOut, - const kmQuaternion* pIn) -{ - kmScalar length = kmQuaternionLength(pIn); - assert(fabs(length) > kmEpsilon); - kmQuaternionScale(pOut, pIn, 1.0f / length); - - return pOut; -} - -///< Rotates a quaternion around an axis -kmQuaternion* kmQuaternionRotationAxis(kmQuaternion* pOut, - const kmVec3* pV, - kmScalar angle) -{ - kmScalar rad = angle * 0.5f; - kmScalar scale = sinf(rad); - - pOut->w = cosf(rad); - pOut->x = pV->x * scale; - pOut->y = pV->y * scale; - pOut->z = pV->z * scale; - - return pOut; -} - -///< Creates a quaternion from a rotation matrix -kmQuaternion* kmQuaternionRotationMatrix(kmQuaternion* pOut, - const kmMat3* pIn) -{ -/* -Note: The OpenGL matrices are transposed from the description below -taken from the Matrix and Quaternion FAQ - - if ( mat[0] > mat[5] && mat[0] > mat[10] ) { // Column 0: - S = sqrt( 1.0 + mat[0] - mat[5] - mat[10] ) * 2; - X = 0.25 * S; - Y = (mat[4] + mat[1] ) / S; - Z = (mat[2] + mat[8] ) / S; - W = (mat[9] - mat[6] ) / S; - } else if ( mat[5] > mat[10] ) { // Column 1: - S = sqrt( 1.0 + mat[5] - mat[0] - mat[10] ) * 2; - X = (mat[4] + mat[1] ) / S; - Y = 0.25 * S; - Z = (mat[9] + mat[6] ) / S; - W = (mat[2] - mat[8] ) / S; - } else { // Column 2: - S = sqrt( 1.0 + mat[10] - mat[0] - mat[5] ) * 2; - X = (mat[2] + mat[8] ) / S; - Y = (mat[9] + mat[6] ) / S; - Z = 0.25 * S; - W = (mat[4] - mat[1] ) / S; - } -*/ - - float x, y, z, w; - float *pMatrix = NULL; - float m4x4[16] = {0}; - float scale = 0.0f; - float diagonal = 0.0f; - - if(!pIn) { - return NULL; - } - -/* 0 3 6 - 1 4 7 - 2 5 8 - - 0 1 2 3 - 4 5 6 7 - 8 9 10 11 - 12 13 14 15*/ - - m4x4[0] = pIn->mat[0]; - m4x4[1] = pIn->mat[3]; - m4x4[2] = pIn->mat[6]; - m4x4[4] = pIn->mat[1]; - m4x4[5] = pIn->mat[4]; - m4x4[6] = pIn->mat[7]; - m4x4[8] = pIn->mat[2]; - m4x4[9] = pIn->mat[5]; - m4x4[10] = pIn->mat[8]; - m4x4[15] = 1; - pMatrix = &m4x4[0]; - - diagonal = pMatrix[0] + pMatrix[5] + pMatrix[10] + 1; - - if(diagonal > kmEpsilon) { - // Calculate the scale of the diagonal - scale = (float)sqrt(diagonal ) * 2; - - // Calculate the x, y, x and w of the quaternion through the respective equation - x = ( pMatrix[9] - pMatrix[6] ) / scale; - y = ( pMatrix[2] - pMatrix[8] ) / scale; - z = ( pMatrix[4] - pMatrix[1] ) / scale; - w = 0.25f * scale; - } - else - { - // If the first element of the diagonal is the greatest value - if ( pMatrix[0] > pMatrix[5] && pMatrix[0] > pMatrix[10] ) - { - // Find the scale according to the first element, and double that value - scale = (float)sqrt( 1.0f + pMatrix[0] - pMatrix[5] - pMatrix[10] ) * 2.0f; - - // Calculate the x, y, x and w of the quaternion through the respective equation - x = 0.25f * scale; - y = (pMatrix[4] + pMatrix[1] ) / scale; - z = (pMatrix[2] + pMatrix[8] ) / scale; - w = (pMatrix[9] - pMatrix[6] ) / scale; - } - // Else if the second element of the diagonal is the greatest value - else if (pMatrix[5] > pMatrix[10]) - { - // Find the scale according to the second element, and double that value - scale = (float)sqrt( 1.0f + pMatrix[5] - pMatrix[0] - pMatrix[10] ) * 2.0f; - - // Calculate the x, y, x and w of the quaternion through the respective equation - x = (pMatrix[4] + pMatrix[1] ) / scale; - y = 0.25f * scale; - z = (pMatrix[9] + pMatrix[6] ) / scale; - w = (pMatrix[2] - pMatrix[8] ) / scale; - } - // Else the third element of the diagonal is the greatest value - else - { - // Find the scale according to the third element, and double that value - scale = (float)sqrt( 1.0f + pMatrix[10] - pMatrix[0] - pMatrix[5] ) * 2.0f; - - // Calculate the x, y, x and w of the quaternion through the respective equation - x = (pMatrix[2] + pMatrix[8] ) / scale; - y = (pMatrix[9] + pMatrix[6] ) / scale; - z = 0.25f * scale; - w = (pMatrix[4] - pMatrix[1] ) / scale; - } - } - - pOut->x = x; - pOut->y = y; - pOut->z = z; - pOut->w = w; - - return pOut; - -#if 0 - kmScalar T = pIn->mat[0] + pIn->mat[5] + pIn->mat[10]; - - if (T > kmEpsilon) { - //If the trace is greater than zero we always use this calculation: - /* S = sqrt(T) * 2; - X = ( mat[9] - mat[6] ) / S; - Y = ( mat[2] - mat[8] ) / S; - Z = ( mat[4] - mat[1] ) / S; - W = 0.25 * S;*/ - -/* kmScalar s = sqrtf(T) * 2; - pOut->x = (pIn->mat[9] - pIn->mat[6]) / s; - pOut->y = (pIn->mat[8] - pIn->mat[2]) / s; - pOut->z = (pIn->mat[1] - pIn->mat[4]) / s; - pOut->w = 0.25f * s; - - kmQuaternionNormalize(pOut, pOut); - return pOut; - } - - //Otherwise the calculation depends on which major diagonal element has the greatest value. - - if (pIn->mat[0] > pIn->mat[5] && pIn->mat[0] > pIn->mat[10]) { - kmScalar s = sqrtf(1 + pIn->mat[0] - pIn->mat[5] - pIn->mat[10]) * 2; - pOut->x = 0.25f * s; - pOut->y = (pIn->mat[1] + pIn->mat[4]) / s; - pOut->z = (pIn->mat[8] + pIn->mat[2]) / s; - pOut->w = (pIn->mat[9] - pIn->mat[6]) / s; - } - else if (pIn->mat[5] > pIn->mat[10]) { - kmScalar s = sqrtf(1 + pIn->mat[5] - pIn->mat[0] - pIn->mat[10]) * 2; - pOut->x = (pIn->mat[1] + pIn->mat[4]) / s; - pOut->y = 0.25f * s; - pOut->z = (pIn->mat[9] + pIn->mat[6]) / s; - pOut->w = (pIn->mat[8] - pIn->mat[2]) / s; - } - else { - kmScalar s = sqrt(1.0f + pIn->mat[10] - pIn->mat[0] - pIn->mat[5]) * 2.0f; - pOut->x = (pIn->mat[8] + pIn->mat[2] ) / s; - pOut->y = (pIn->mat[6] + pIn->mat[9] ) / s; - pOut->z = 0.25f * s; - pOut->w = (pIn->mat[1] - pIn->mat[4] ) / s; - } - - kmQuaternionNormalize(pOut, pOut); - return pOut;*/ -#endif // 0 -} - -///< Create a quaternion from yaw, pitch and roll -kmQuaternion* kmQuaternionRotationYawPitchRoll(kmQuaternion* pOut, - kmScalar yaw, - kmScalar pitch, - kmScalar roll) -{ - kmScalar ex, ey, ez; // temp half euler angles - kmScalar cr, cp, cy, sr, sp, sy, cpcy, spsy; // temp vars in roll,pitch yaw - - ex = kmDegreesToRadians(pitch) / 2.0f; // convert to rads and half them - ey = kmDegreesToRadians(yaw) / 2.0f; - ez = kmDegreesToRadians(roll) / 2.0f; - - cr = cosf(ex); - cp = cosf(ey); - cy = cosf(ez); - - sr = sinf(ex); - sp = sinf(ey); - sy = sinf(ez); - - cpcy = cp * cy; - spsy = sp * sy; - - pOut->w = cr * cpcy + sr * spsy; - - pOut->x = sr * cpcy - cr * spsy; - pOut->y = cr * sp * cy + sr * cp * sy; - pOut->z = cr * cp * sy - sr * sp * cy; - - kmQuaternionNormalize(pOut, pOut); - - return pOut; -} - -///< Interpolate between 2 quaternions -kmQuaternion* kmQuaternionSlerp(kmQuaternion* pOut, - const kmQuaternion* q1, - const kmQuaternion* q2, - kmScalar t) -{ - - /*float CosTheta = Q0.DotProd(Q1); - float Theta = acosf(CosTheta); - float SinTheta = sqrtf(1.0f-CosTheta*CosTheta); - - float Sin_T_Theta = sinf(T*Theta)/SinTheta; - float Sin_OneMinusT_Theta = sinf((1.0f-T)*Theta)/SinTheta; - - Quaternion Result = Q0*Sin_OneMinusT_Theta; - Result += (Q1*Sin_T_Theta); - - return Result;*/ - - if (q1->x == q2->x && - q1->y == q2->y && - q1->z == q2->z && - q1->w == q2->w) { - - pOut->x = q1->x; - pOut->y = q1->y; - pOut->z = q1->z; - pOut->w = q1->w; - - return pOut; - } - { - kmScalar ct = kmQuaternionDot(q1, q2); - kmScalar theta = acosf(ct); - kmScalar st = sqrtf(1.0 - kmSQR(ct)); - - kmScalar stt = sinf(t * theta) / st; - kmScalar somt = sinf((1.0 - t) * theta) / st; - - kmQuaternion temp, temp2; - kmQuaternionScale(&temp, q1, somt); - kmQuaternionScale(&temp2, q2, stt); - kmQuaternionAdd(pOut, &temp, &temp2); - } - return pOut; -} - -///< Get the axis and angle of rotation from a quaternion -void kmQuaternionToAxisAngle(const kmQuaternion* pIn, - kmVec3* pAxis, - kmScalar* pAngle) -{ - kmScalar tempAngle; // temp angle - kmScalar scale; // temp vars - - tempAngle = acosf(pIn->w); - scale = sqrtf(kmSQR(pIn->x) + kmSQR(pIn->y) + kmSQR(pIn->z)); - - if (((scale > -kmEpsilon) && scale < kmEpsilon) - || (scale < 2*kmPI + kmEpsilon && scale > 2*kmPI - kmEpsilon)) // angle is 0 or 360 so just simply set axis to 0,0,1 with angle 0 - { - *pAngle = 0.0f; - - pAxis->x = 0.0f; - pAxis->y = 0.0f; - pAxis->z = 1.0f; - } - else - { - *pAngle = tempAngle * 2.0f; // angle in radians - - pAxis->x = pIn->x / scale; - pAxis->y = pIn->y / scale; - pAxis->z = pIn->z / scale; - kmVec3Normalize(pAxis, pAxis); - } -} - -kmQuaternion* kmQuaternionScale(kmQuaternion* pOut, - const kmQuaternion* pIn, - kmScalar s) -{ - pOut->x = pIn->x * s; - pOut->y = pIn->y * s; - pOut->z = pIn->z * s; - pOut->w = pIn->w * s; - - return pOut; -} - -kmQuaternion* kmQuaternionAssign(kmQuaternion* pOut, const kmQuaternion* pIn) -{ - memcpy(pOut, pIn, sizeof(float) * 4); - - return pOut; -} - -kmQuaternion* kmQuaternionAdd(kmQuaternion* pOut, const kmQuaternion* pQ1, const kmQuaternion* pQ2) -{ - pOut->x = pQ1->x + pQ2->x; - pOut->y = pQ1->y + pQ2->y; - pOut->z = pQ1->z + pQ2->z; - pOut->w = pQ1->w + pQ2->w; - - return pOut; -} - -/** Adapted from the OGRE engine! - - Gets the shortest arc quaternion to rotate this vector to the destination - vector. -@remarks - If you call this with a dest vector that is close to the inverse - of this vector, we will rotate 180 degrees around the 'fallbackAxis' - (if specified, or a generated axis if not) since in this case - ANY axis of rotation is valid. -*/ - -kmQuaternion* kmQuaternionRotationBetweenVec3(kmQuaternion* pOut, const kmVec3* vec1, const kmVec3* vec2, const kmVec3* fallback) { - - kmVec3 v1, v2; - kmScalar a; - - kmVec3Assign(&v1, vec1); - kmVec3Assign(&v2, vec2); - - kmVec3Normalize(&v1, &v1); - kmVec3Normalize(&v2, &v2); - - a = kmVec3Dot(&v1, &v2); - - if (a >= 1.0) { - kmQuaternionIdentity(pOut); - return pOut; - } - - if (a < (1e-6f - 1.0f)) { - if (fabs(kmVec3LengthSq(fallback)) < kmEpsilon) { - kmQuaternionRotationAxis(pOut, fallback, kmPI); - } else { - kmVec3 axis; - kmVec3 X; - X.x = 1.0; - X.y = 0.0; - X.z = 0.0; - - - kmVec3Cross(&axis, &X, vec1); - - //If axis is zero - if (fabs(kmVec3LengthSq(&axis)) < kmEpsilon) { - kmVec3 Y; - Y.x = 0.0; - Y.y = 1.0; - Y.z = 0.0; - - kmVec3Cross(&axis, &Y, vec1); - } - - kmVec3Normalize(&axis, &axis); - - kmQuaternionRotationAxis(pOut, &axis, kmPI); - } - } else { - kmScalar s = sqrtf((1+a) * 2); - kmScalar invs = 1 / s; - - kmVec3 c; - kmVec3Cross(&c, &v1, &v2); - - pOut->x = c.x * invs; - pOut->y = c.y * invs; - pOut->z = c.z * invs; - pOut->w = s * 0.5f; - - kmQuaternionNormalize(pOut, pOut); - } - - return pOut; - -} - -kmVec3* kmQuaternionMultiplyVec3(kmVec3* pOut, const kmQuaternion* q, const kmVec3* v) { - kmVec3 uv, uuv, qvec; - - qvec.x = q->x; - qvec.y = q->y; - qvec.z = q->z; - - kmVec3Cross(&uv, &qvec, v); - kmVec3Cross(&uuv, &qvec, &uv); - - kmVec3Scale(&uv, &uv, (2.0f * q->w)); - kmVec3Scale(&uuv, &uuv, 2.0f); - - kmVec3Add(pOut, v, &uv); - kmVec3Add(pOut, pOut, &uuv); - - return pOut; -} - diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/src/ray2.c b/cappuccino-sdk/incl/cocos2dx/kazmath/src/ray2.c deleted file mode 100644 index 8f3b430..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/src/ray2.c +++ /dev/null @@ -1,186 +0,0 @@ -#include -#include -#include "kazmath/ray2.h" - -void kmRay2Fill(kmRay2* ray, kmScalar px, kmScalar py, kmScalar vx, kmScalar vy) { - ray->start.x = px; - ray->start.y = py; - ray->dir.x = vx; - ray->dir.y = vy; -} - -kmBool kmRay2IntersectLineSegment(const kmRay2* ray, const kmVec2* p1, const kmVec2* p2, kmVec2* intersection) { - - float x1 = ray->start.x; - float y1 = ray->start.y; - float x2 = ray->start.x + ray->dir.x; - float y2 = ray->start.y + ray->dir.y; - float x3 = p1->x; - float y3 = p1->y; - float x4 = p2->x; - float y4 = p2->y; - - float denom = (y4 -y3) * (x2 - x1) - (x4 - x3) * (y2 - y1); - float ua, x, y; - //If denom is zero, the lines are parallel - if(denom > -kmEpsilon && denom < kmEpsilon) { - return KM_FALSE; - } - - ua = ((x4 - x3) * (y1 - y3) - (y4 - y3) * (x1 - x3)) / denom; -// float ub = ((x2 - x1) * (y1 - y3) - (y2 - y1) * (x1 - x3)) / denom; - - x = x1 + ua * (x2 - x1); - y = y1 + ua * (y2 - y1); - - if(x < kmMin(p1->x, p2->x) - kmEpsilon || - x > kmMax(p1->x, p2->x) + kmEpsilon || - y < kmMin(p1->y, p2->y) - kmEpsilon || - y > kmMax(p1->y, p2->y) + kmEpsilon) { - //Outside of line - //printf("Outside of line, %f %f (%f %f)(%f, %f)\n", x, y, p1->x, p1->y, p2->x, p2->y); - return KM_FALSE; - } - - if(x < kmMin(x1, x2) - kmEpsilon || - x > kmMax(x1, x2) + kmEpsilon || - y < kmMin(y1, y2) - kmEpsilon || - y > kmMax(y1, y2) + kmEpsilon) { - //printf("Outside of ray, %f %f (%f %f)(%f, %f)\n", x, y, x1, y1, x2, y2); - return KM_FALSE; - } - - intersection->x = x; - intersection->y = y; - - return KM_TRUE; - - -/* - kmScalar A1, B1, C1; - kmScalar A2, B2, C2; - - A1 = ray->dir.y; - B1 = ray->dir.x; - C1 = A1 * ray->start.x + B1 * ray->start.y; - - A2 = p2->y - p1->y; - B2 = p2->x - p1->x; - C2 = A2 * p1->x + B2 * p1->y; - - double det = (A1 * B2) - (A2 * B1); - if(det == 0) { - printf("Parallel\n"); - return KM_FALSE; - } - - double x = (B2*C1 - B1*C2) / det; - double y = (A1*C2 - A2*C1) / det; - - if(x < min(p1->x, p2->x) - kmEpsilon || - x > max(p1->x, p2->x) + kmEpsilon || - y < min(p1->y, p2->y) - kmEpsilon || - y > max(p1->y, p2->y) + kmEpsilon) { - //Outside of line - printf("Outside of line, %f %f (%f %f)(%f, %f)\n", x, y, p1->x, p1->y, p2->x, p2->y); - return KM_FALSE; - } - - kmScalar x1 = ray->start.x; - kmScalar x2 = ray->start.x + ray->dir.x; - - kmScalar y1 = ray->start.y; - kmScalar y2 = ray->start.y + ray->dir.y; - - if(x < min(x1, x2) - kmEpsilon || - x > max(x1, x2) + kmEpsilon || - y < min(y1, y2) - kmEpsilon || - y > max(y1, y2) + kmEpsilon) { - printf("Outside of ray, %f %f (%f %f)(%f, %f)\n", x, y, x1, y1, x2, y2); - return KM_FALSE; - } - - intersection->x = x; - intersection->y = y; - - return KM_TRUE;*/ -} - -void calculate_line_normal(kmVec2 p1, kmVec2 p2, kmVec2* normal_out) { - kmVec2 tmp; - kmVec2Subtract(&tmp, &p2, &p1); //Get direction vector - - normal_out->x = -tmp.y; - normal_out->y = tmp.x; - kmVec2Normalize(normal_out, normal_out); - - //TODO: should check that the normal is pointing out of the triangle -} - -kmBool kmRay2IntersectTriangle(const kmRay2* ray, const kmVec2* p1, const kmVec2* p2, const kmVec2* p3, kmVec2* intersection, kmVec2* normal_out) { - kmVec2 intersect; - kmVec2 final_intersect = {0., 0.}, normal = {0., 0.}; // Silencing LLVM SA. - kmScalar distance = 10000.0f; - kmBool intersected = KM_FALSE; - - if(kmRay2IntersectLineSegment(ray, p1, p2, &intersect)) { - kmVec2 tmp; - kmScalar this_distance; - - intersected = KM_TRUE; - this_distance = kmVec2Length(kmVec2Subtract(&tmp, &intersect, &ray->start)); - if(this_distance < distance) { - final_intersect.x = intersect.x; - final_intersect.y = intersect.y; - distance = this_distance; - - calculate_line_normal(*p1, *p2, &normal); - } - } - - if(kmRay2IntersectLineSegment(ray, p2, p3, &intersect)) { - kmVec2 tmp; - kmScalar this_distance; - intersected = KM_TRUE; - - this_distance = kmVec2Length(kmVec2Subtract(&tmp, &intersect, &ray->start)); - if(this_distance < distance) { - final_intersect.x = intersect.x; - final_intersect.y = intersect.y; - distance = this_distance; - - calculate_line_normal(*p2, *p3, &normal); - } - } - - if(kmRay2IntersectLineSegment(ray, p3, p1, &intersect)) { - kmVec2 tmp; - kmScalar this_distance; - intersected = KM_TRUE; - - this_distance = kmVec2Length(kmVec2Subtract(&tmp, &intersect, &ray->start)); - if(this_distance < distance) { - final_intersect.x = intersect.x; - final_intersect.y = intersect.y; - //distance = this_distance; - - calculate_line_normal(*p3, *p1, &normal); - } - } - - if(intersected) { - intersection->x = final_intersect.x; - intersection->y = final_intersect.y; - if(normal_out) { - normal_out->x = normal.x; - normal_out->y = normal.y; - } - } - - return intersected; -} - -kmBool kmRay2IntersectCircle(const kmRay2* ray, const kmVec2 centre, const kmScalar radius, kmVec2* intersection) { - assert(0 && "Not implemented"); - return 0; -} diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/src/utility.c b/cappuccino-sdk/incl/cocos2dx/kazmath/src/utility.c deleted file mode 100644 index 067f40d..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/src/utility.c +++ /dev/null @@ -1,59 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include "kazmath/utility.h" - -/** - * Returns the square of s (e.g. s*s) - */ -kmScalar kmSQR(kmScalar s) { - return s*s; -} - -/** - * Returns degrees as radians. - */ -kmScalar kmDegreesToRadians(kmScalar degrees) { - return degrees * kmPIOver180; -} - -/** - * Returns radians as degrees - */ -kmScalar kmRadiansToDegrees(kmScalar radians) { - return radians * kmPIUnder180; -} - -kmScalar kmMin(kmScalar lhs, kmScalar rhs) { - return (lhs < rhs)? lhs : rhs; -} - -kmScalar kmMax(kmScalar lhs, kmScalar rhs) { - return (lhs > rhs)? lhs : rhs; -} - -kmBool kmAlmostEqual(kmScalar lhs, kmScalar rhs) { - return (lhs + kmEpsilon > rhs && lhs - kmEpsilon < rhs); -} diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/src/vec2.c b/cappuccino-sdk/incl/cocos2dx/kazmath/src/vec2.c deleted file mode 100644 index 2ff18f5..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/src/vec2.c +++ /dev/null @@ -1,118 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#include -#include - -#include "kazmath/mat3.h" -#include "kazmath/vec2.h" -#include "kazmath/utility.h" - -kmVec2* kmVec2Fill(kmVec2* pOut, kmScalar x, kmScalar y) -{ - pOut->x = x; - pOut->y = y; - return pOut; -} - -kmScalar kmVec2Length(const kmVec2* pIn) -{ - return sqrtf(kmSQR(pIn->x) + kmSQR(pIn->y)); -} - -kmScalar kmVec2LengthSq(const kmVec2* pIn) -{ - return kmSQR(pIn->x) + kmSQR(pIn->y); -} - -kmVec2* kmVec2Normalize(kmVec2* pOut, const kmVec2* pIn) -{ - kmScalar l = 1.0f / kmVec2Length(pIn); - - kmVec2 v; - v.x = pIn->x * l; - v.y = pIn->y * l; - - pOut->x = v.x; - pOut->y = v.y; - - return pOut; -} - -kmVec2* kmVec2Add(kmVec2* pOut, const kmVec2* pV1, const kmVec2* pV2) -{ - pOut->x = pV1->x + pV2->x; - pOut->y = pV1->y + pV2->y; - - return pOut; -} - -kmScalar kmVec2Dot(const kmVec2* pV1, const kmVec2* pV2) -{ - return pV1->x * pV2->x + pV1->y * pV2->y; -} - -kmVec2* kmVec2Subtract(kmVec2* pOut, const kmVec2* pV1, const kmVec2* pV2) -{ - pOut->x = pV1->x - pV2->x; - pOut->y = pV1->y - pV2->y; - - return pOut; -} - -kmVec2* kmVec2Transform(kmVec2* pOut, const kmVec2* pV, const kmMat3* pM) -{ - kmVec2 v; - - v.x = pV->x * pM->mat[0] + pV->y * pM->mat[3] + pM->mat[6]; - v.y = pV->x * pM->mat[1] + pV->y * pM->mat[4] + pM->mat[7]; - - pOut->x = v.x; - pOut->y = v.y; - - return pOut; -} - -kmVec2* kmVec2TransformCoord(kmVec2* pOut, const kmVec2* pV, const kmMat3* pM) -{ - assert(0); - return NULL; -} - -kmVec2* kmVec2Scale(kmVec2* pOut, const kmVec2* pIn, const kmScalar s) -{ - pOut->x = pIn->x * s; - pOut->y = pIn->y * s; - - return pOut; -} - -int kmVec2AreEqual(const kmVec2* p1, const kmVec2* p2) -{ - return ( - (p1->x < p2->x + kmEpsilon && p1->x > p2->x - kmEpsilon) && - (p1->y < p2->y + kmEpsilon && p1->y > p2->y - kmEpsilon) - ); -} diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/src/vec3.c b/cappuccino-sdk/incl/cocos2dx/kazmath/src/vec3.c deleted file mode 100644 index 93075a0..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/src/vec3.c +++ /dev/null @@ -1,310 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -/** - * @file vec3.c - */ - -#include -#include - -#include "kazmath/utility.h" -#include "kazmath/vec4.h" -#include "kazmath/mat4.h" -#include "kazmath/vec3.h" - -/** - * Fill a kmVec3 structure using 3 floating point values - * The result is store in pOut, returns pOut - */ -kmVec3* kmVec3Fill(kmVec3* pOut, kmScalar x, kmScalar y, kmScalar z) -{ - pOut->x = x; - pOut->y = y; - pOut->z = z; - return pOut; -} - - -/** - * Returns the length of the vector - */ -kmScalar kmVec3Length(const kmVec3* pIn) -{ - return sqrtf(kmSQR(pIn->x) + kmSQR(pIn->y) + kmSQR(pIn->z)); -} - -/** - * Returns the square of the length of the vector - */ -kmScalar kmVec3LengthSq(const kmVec3* pIn) -{ - return kmSQR(pIn->x) + kmSQR(pIn->y) + kmSQR(pIn->z); -} - - /** - * Returns the vector passed in set to unit length - * the result is stored in pOut. - */ -kmVec3* kmVec3Normalize(kmVec3* pOut, const kmVec3* pIn) -{ - kmScalar l = 1.0f / kmVec3Length(pIn); - - kmVec3 v; - v.x = pIn->x * l; - v.y = pIn->y * l; - v.z = pIn->z * l; - - pOut->x = v.x; - pOut->y = v.y; - pOut->z = v.z; - - return pOut; -} - -/** - * Returns a vector perpendicular to 2 other vectors. - * The result is stored in pOut. - */ -kmVec3* kmVec3Cross(kmVec3* pOut, const kmVec3* pV1, const kmVec3* pV2) -{ - - kmVec3 v; - - v.x = (pV1->y * pV2->z) - (pV1->z * pV2->y); - v.y = (pV1->z * pV2->x) - (pV1->x * pV2->z); - v.z = (pV1->x * pV2->y) - (pV1->y * pV2->x); - - pOut->x = v.x; - pOut->y = v.y; - pOut->z = v.z; - - return pOut; -} - -/** - * Returns the cosine of the angle between 2 vectors - */ -kmScalar kmVec3Dot(const kmVec3* pV1, const kmVec3* pV2) -{ - return ( pV1->x * pV2->x - + pV1->y * pV2->y - + pV1->z * pV2->z ); -} - -/** - * Adds 2 vectors and returns the result. The resulting - * vector is stored in pOut. - */ -kmVec3* kmVec3Add(kmVec3* pOut, const kmVec3* pV1, const kmVec3* pV2) -{ - kmVec3 v; - - v.x = pV1->x + pV2->x; - v.y = pV1->y + pV2->y; - v.z = pV1->z + pV2->z; - - pOut->x = v.x; - pOut->y = v.y; - pOut->z = v.z; - - return pOut; -} - - /** - * Subtracts 2 vectors and returns the result. The result is stored in - * pOut. - */ -kmVec3* kmVec3Subtract(kmVec3* pOut, const kmVec3* pV1, const kmVec3* pV2) -{ - kmVec3 v; - - v.x = pV1->x - pV2->x; - v.y = pV1->y - pV2->y; - v.z = pV1->z - pV2->z; - - pOut->x = v.x; - pOut->y = v.y; - pOut->z = v.z; - - return pOut; -} - - /** - * Transforms vector (x, y, z, 1) by a given matrix. The result - * is stored in pOut. pOut is returned. - */ -kmVec3* kmVec3Transform(kmVec3* pOut, const kmVec3* pV, const kmMat4* pM) -{ - /* - a = (Vx, Vy, Vz, 1) - b = (a×M)T - Out = (bx, by, bz) - */ - - kmVec3 v; - - v.x = pV->x * pM->mat[0] + pV->y * pM->mat[4] + pV->z * pM->mat[8] + pM->mat[12]; - v.y = pV->x * pM->mat[1] + pV->y * pM->mat[5] + pV->z * pM->mat[9] + pM->mat[13]; - v.z = pV->x * pM->mat[2] + pV->y * pM->mat[6] + pV->z * pM->mat[10] + pM->mat[14]; - - pOut->x = v.x; - pOut->y = v.y; - pOut->z = v.z; - - return pOut; -} - -kmVec3* kmVec3InverseTransform(kmVec3* pOut, const kmVec3* pVect, const kmMat4* pM) -{ - kmVec3 v1, v2; - - v1.x = pVect->x - pM->mat[12]; - v1.y = pVect->y - pM->mat[13]; - v1.z = pVect->z - pM->mat[14]; - - v2.x = v1.x * pM->mat[0] + v1.y * pM->mat[1] + v1.z * pM->mat[2]; - v2.y = v1.x * pM->mat[4] + v1.y * pM->mat[5] + v1.z * pM->mat[6]; - v2.z = v1.x * pM->mat[8] + v1.y * pM->mat[9] + v1.z * pM->mat[10]; - - pOut->x = v2.x; - pOut->y = v2.y; - pOut->z = v2.z; - - return pOut; -} - -kmVec3* kmVec3InverseTransformNormal(kmVec3* pOut, const kmVec3* pVect, const kmMat4* pM) -{ - kmVec3 v; - - v.x = pVect->x * pM->mat[0] + pVect->y * pM->mat[1] + pVect->z * pM->mat[2]; - v.y = pVect->x * pM->mat[4] + pVect->y * pM->mat[5] + pVect->z * pM->mat[6]; - v.z = pVect->x * pM->mat[8] + pVect->y * pM->mat[9] + pVect->z * pM->mat[10]; - - pOut->x = v.x; - pOut->y = v.y; - pOut->z = v.z; - - return pOut; -} - - -kmVec3* kmVec3TransformCoord(kmVec3* pOut, const kmVec3* pV, const kmMat4* pM) -{ - /* - a = (Vx, Vy, Vz, 1) - b = (a×M)T - Out = 1â„bw(bx, by, bz) - */ - - kmVec4 v; - kmVec4 inV; - kmVec4Fill(&inV, pV->x, pV->y, pV->z, 1.0); - - kmVec4Transform(&v, &inV,pM); - - pOut->x = v.x / v.w; - pOut->y = v.y / v.w; - pOut->z = v.z / v.w; - - return pOut; -} - -kmVec3* kmVec3TransformNormal(kmVec3* pOut, const kmVec3* pV, const kmMat4* pM) -{ -/* - a = (Vx, Vy, Vz, 0) - b = (a×M)T - Out = (bx, by, bz) -*/ - //Omits the translation, only scaling + rotating - kmVec3 v; - - v.x = pV->x * pM->mat[0] + pV->y * pM->mat[4] + pV->z * pM->mat[8]; - v.y = pV->x * pM->mat[1] + pV->y * pM->mat[5] + pV->z * pM->mat[9]; - v.z = pV->x * pM->mat[2] + pV->y * pM->mat[6] + pV->z * pM->mat[10]; - - pOut->x = v.x; - pOut->y = v.y; - pOut->z = v.z; - - return pOut; - -} - -/** - * Scales a vector to length s. Does not normalize first, - * you should do that! - */ -kmVec3* kmVec3Scale(kmVec3* pOut, const kmVec3* pIn, const kmScalar s) -{ - pOut->x = pIn->x * s; - pOut->y = pIn->y * s; - pOut->z = pIn->z * s; - - return pOut; -} - -/** - * Returns KM_TRUE if the 2 vectors are approximately equal - */ -int kmVec3AreEqual(const kmVec3* p1, const kmVec3* p2) -{ - if ((p1->x < (p2->x + kmEpsilon) && p1->x > (p2->x - kmEpsilon)) && - (p1->y < (p2->y + kmEpsilon) && p1->y > (p2->y - kmEpsilon)) && - (p1->z < (p2->z + kmEpsilon) && p1->z > (p2->z - kmEpsilon))) { - return 1; - } - - return 0; -} - -/** - * Assigns pIn to pOut. Returns pOut. If pIn and pOut are the same - * then nothing happens but pOut is still returned - */ -kmVec3* kmVec3Assign(kmVec3* pOut, const kmVec3* pIn) { - if (pOut == pIn) { - return pOut; - } - - pOut->x = pIn->x; - pOut->y = pIn->y; - pOut->z = pIn->z; - - return pOut; -} - -/** - * Sets all the elements of pOut to zero. Returns pOut. - */ -kmVec3* kmVec3Zero(kmVec3* pOut) { - pOut->x = 0.0f; - pOut->y = 0.0f; - pOut->z = 0.0f; - - return pOut; -} diff --git a/cappuccino-sdk/incl/cocos2dx/kazmath/src/vec4.c b/cappuccino-sdk/incl/cocos2dx/kazmath/src/vec4.c deleted file mode 100644 index bfe0414..0000000 --- a/cappuccino-sdk/incl/cocos2dx/kazmath/src/vec4.c +++ /dev/null @@ -1,154 +0,0 @@ -/* -Copyright (c) 2008, Luke Benstead. -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - - -#include -#include - -#include "kazmath/utility.h" -#include "kazmath/vec4.h" -#include "kazmath/mat4.h" - - -kmVec4* kmVec4Fill(kmVec4* pOut, kmScalar x, kmScalar y, kmScalar z, kmScalar w) -{ - pOut->x = x; - pOut->y = y; - pOut->z = z; - pOut->w = w; - return pOut; -} - - -/// Adds 2 4D vectors together. The result is store in pOut, the function returns -/// pOut so that it can be nested in another function. -kmVec4* kmVec4Add(kmVec4* pOut, const kmVec4* pV1, const kmVec4* pV2) { - pOut->x = pV1->x + pV2->x; - pOut->y = pV1->y + pV2->y; - pOut->z = pV1->z + pV2->z; - pOut->w = pV1->w + pV2->w; - - return pOut; -} - -/// Returns the dot product of 2 4D vectors -kmScalar kmVec4Dot(const kmVec4* pV1, const kmVec4* pV2) { - return ( pV1->x * pV2->x - + pV1->y * pV2->y - + pV1->z * pV2->z - + pV1->w * pV2->w ); -} - -/// Returns the length of a 4D vector, this uses a sqrt so if the squared length will do use -/// kmVec4LengthSq -kmScalar kmVec4Length(const kmVec4* pIn) { - return sqrtf(kmSQR(pIn->x) + kmSQR(pIn->y) + kmSQR(pIn->z) + kmSQR(pIn->w)); -} - -/// Returns the length of the 4D vector squared. -kmScalar kmVec4LengthSq(const kmVec4* pIn) { - return kmSQR(pIn->x) + kmSQR(pIn->y) + kmSQR(pIn->z) + kmSQR(pIn->w); -} - -/// Returns the interpolation of 2 4D vectors based on t. Currently not implemented! -kmVec4* kmVec4Lerp(kmVec4* pOut, const kmVec4* pV1, const kmVec4* pV2, kmScalar t) { - assert(0); - return pOut; -} - -/// Normalizes a 4D vector. The result is stored in pOut. pOut is returned -kmVec4* kmVec4Normalize(kmVec4* pOut, const kmVec4* pIn) { - kmScalar l = 1.0f / kmVec4Length(pIn); - - pOut->x *= l; - pOut->y *= l; - pOut->z *= l; - pOut->w *= l; - - return pOut; -} - -/// Scales a vector to the required length. This performs a Normalize before multiplying by S. -kmVec4* kmVec4Scale(kmVec4* pOut, const kmVec4* pIn, const kmScalar s) { - kmVec4Normalize(pOut, pIn); - - pOut->x *= s; - pOut->y *= s; - pOut->z *= s; - pOut->w *= s; - return pOut; -} - -/// Subtracts one 4D pV2 from pV1. The result is stored in pOut. pOut is returned -kmVec4* kmVec4Subtract(kmVec4* pOut, const kmVec4* pV1, const kmVec4* pV2) { - pOut->x = pV1->x - pV2->x; - pOut->y = pV1->y - pV2->y; - pOut->z = pV1->z - pV2->z; - pOut->w = pV1->w - pV2->w; - - return pOut; -} - -/// Transforms a 4D vector by a matrix, the result is stored in pOut, and pOut is returned. -kmVec4* kmVec4Transform(kmVec4* pOut, const kmVec4* pV, const kmMat4* pM) { - pOut->x = pV->x * pM->mat[0] + pV->y * pM->mat[4] + pV->z * pM->mat[8] + pV->w * pM->mat[12]; - pOut->y = pV->x * pM->mat[1] + pV->y * pM->mat[5] + pV->z * pM->mat[9] + pV->w * pM->mat[13]; - pOut->z = pV->x * pM->mat[2] + pV->y * pM->mat[6] + pV->z * pM->mat[10] + pV->w * pM->mat[14]; - pOut->w = pV->x * pM->mat[3] + pV->y * pM->mat[7] + pV->z * pM->mat[11] + pV->w * pM->mat[15]; - return pOut; -} - -/// Loops through an input array transforming each vec4 by the matrix. -kmVec4* kmVec4TransformArray(kmVec4* pOut, unsigned int outStride, - const kmVec4* pV, unsigned int vStride, const kmMat4* pM, unsigned int count) { - unsigned int i = 0; - //Go through all of the vectors - while (i < count) { - const kmVec4* in = pV + (i * vStride); //Get a pointer to the current input - kmVec4* out = pOut + (i * outStride); //and the current output - kmVec4Transform(out, in, pM); //Perform transform on it - ++i; - } - - return pOut; -} - -int kmVec4AreEqual(const kmVec4* p1, const kmVec4* p2) { - return ( - (p1->x < p2->x + kmEpsilon && p1->x > p2->x - kmEpsilon) && - (p1->y < p2->y + kmEpsilon && p1->y > p2->y - kmEpsilon) && - (p1->z < p2->z + kmEpsilon && p1->z > p2->z - kmEpsilon) && - (p1->w < p2->w + kmEpsilon && p1->w > p2->w - kmEpsilon) - ); -} - -kmVec4* kmVec4Assign(kmVec4* pOut, const kmVec4* pIn) { - assert(pOut != pIn); - - memcpy(pOut, pIn, sizeof(float) * 4); - - return pOut; -} - diff --git a/cappuccino-sdk/incl/cocos2dx/keypad_dispatcher/CCKeypadDelegate.h b/cappuccino-sdk/incl/cocos2dx/keypad_dispatcher/CCKeypadDelegate.h deleted file mode 100644 index 5a92eb1..0000000 --- a/cappuccino-sdk/incl/cocos2dx/keypad_dispatcher/CCKeypadDelegate.h +++ /dev/null @@ -1,82 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCKEYPAD_DELEGATE_H__ -#define __CCKEYPAD_DELEGATE_H__ - - -#include "cocoa/CCObject.h" - -NS_CC_BEGIN - -/** - * @addtogroup input - * @{ - * @js NA - * @lua NA - */ - -class CC_DLL CCKeypadDelegate -{ -public: - // The back key clicked - virtual void keyBackClicked() {} - - // The menu key clicked. only available on wophone & android - virtual void keyMenuClicked() {}; -}; - -/** - * @brief - * CCKeypadHandler - * Object than contains the CCKeypadDelegate. - * @js NA - * @lua NA - */ -class CC_DLL CCKeypadHandler : public CCObject -{ -public: - virtual ~CCKeypadHandler(void); - - /** delegate */ - CCKeypadDelegate* getDelegate(); - void setDelegate(CCKeypadDelegate *pDelegate); - - /** initializes a CCKeypadHandler with a delegate */ - virtual bool initWithDelegate(CCKeypadDelegate *pDelegate); - -public: - /** allocates a CCKeypadHandler with a delegate */ - static CCKeypadHandler* handlerWithDelegate(CCKeypadDelegate *pDelegate); - -protected: - CCKeypadDelegate* m_pDelegate; -}; - -// end of input group -/// @} - -NS_CC_END - -#endif // __CCKEYPAD_DELEGATE_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/keypad_dispatcher/CCKeypadDispatcher.h b/cappuccino-sdk/incl/cocos2dx/keypad_dispatcher/CCKeypadDispatcher.h deleted file mode 100644 index 87d321c..0000000 --- a/cappuccino-sdk/incl/cocos2dx/keypad_dispatcher/CCKeypadDispatcher.h +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCKEYPAD_DISPATCHER_H__ -#define __CCKEYPAD_DISPATCHER_H__ - -#include "CCKeypadDelegate.h" -#include "cocoa/CCArray.h" - -NS_CC_BEGIN - -/** - * @addtogroup input - * @{ - */ - -typedef enum { - // the back key clicked msg - kTypeBackClicked = 1, - kTypeMenuClicked, -} ccKeypadMSGType; - -struct _ccCArray; -/** -@class CCKeypadDispatcher -@brief Dispatch the keypad message from the phone -@js NA -@lua NA -*/ -class CC_DLL CCKeypadDispatcher : public CCObject -{ -public: - CCKeypadDispatcher(); - ~CCKeypadDispatcher(); - - /** - @brief add delegate to concern keypad msg - */ - void addDelegate(CCKeypadDelegate* pDelegate); - - /** - @brief remove the delegate from the delegates who concern keypad msg - */ - void removeDelegate(CCKeypadDelegate* pDelegate); - - /** - @brief force add the delegate - */ - void forceAddDelegate(CCKeypadDelegate* pDelegate); - - /** - @brief force remove the delegate - */ - void forceRemoveDelegate(CCKeypadDelegate* pDelegate); - - /** - @brief dispatch the key pad msg - */ - bool dispatchKeypadMSG(ccKeypadMSGType nMsgType); - -protected: - - CCArray* m_pDelegates; - bool m_bLocked; - bool m_bToAdd; - bool m_bToRemove; - - struct _ccCArray *m_pHandlersToAdd; - struct _ccCArray *m_pHandlersToRemove; -}; - -// end of input group -/// @} - -NS_CC_END - -#endif //__CCKEYPAD_DISPATCHER_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/label_nodes/CCLabelAtlas.h b/cappuccino-sdk/incl/cocos2dx/label_nodes/CCLabelAtlas.h deleted file mode 100644 index 600a6d4..0000000 --- a/cappuccino-sdk/incl/cocos2dx/label_nodes/CCLabelAtlas.h +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCLABEL_ATLAS_H__ -#define __CCLABEL_ATLAS_H__ - -#include "base_nodes/CCAtlasNode.h" - -NS_CC_BEGIN - -/** - * @addtogroup GUI - * @{ - * @addtogroup label - * @{ - */ - -/** @brief CCLabelAtlas is a subclass of CCAtlasNode. - -It can be as a replacement of CCLabel since it is MUCH faster. - -CCLabelAtlas versus CCLabel: -- CCLabelAtlas is MUCH faster than CCLabel -- CCLabelAtlas "characters" have a fixed height and width -- CCLabelAtlas "characters" can be anything you want since they are taken from an image file - -A more flexible class is CCLabelBMFont. It supports variable width characters and it also has a nice editor. -*/ -class CC_DLL CCLabelAtlas : public CCAtlasNode, public CCLabelProtocol -{ -public: - /** - * @js ctor - * @lua NA - */ - CCLabelAtlas() - :m_sString("") - {} - /** - * @js NA - * @lua NA - */ - virtual ~CCLabelAtlas() - { - m_sString.clear(); - } - - /** creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas */ - static CCLabelAtlas * create(const char *string, const char *charMapFile, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap); - - /** creates the CCLabelAtlas with a string and a configuration file - @since v2.0 - @js _create - */ - static CCLabelAtlas* create(const char *string, const char *fntFile); - - /** initializes the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas */ - bool initWithString(const char *string, const char *charMapFile, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap); - - /** initializes the CCLabelAtlas with a string and a configuration file - @since v2.0 - */ - bool initWithString(const char *string, const char *fntFile); - - /** initializes the CCLabelAtlas with a string, a texture, the width and height in points of each element and the starting char of the atlas */ - bool initWithString(const char* string, CCTexture2D* texture, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap); - - // super methods - virtual void updateAtlasValues(); - virtual void setString(const char *label); - virtual const char* getString(void); - -#if CC_LABELATLAS_DEBUG_DRAW - virtual void draw(); -#endif - -protected: - // string to render - std::string m_sString; - // the first char in the charmap - unsigned int m_uMapStartChar; -}; - -// end of GUI group -/// @} -/// @} - - -NS_CC_END - -#endif //__CCLABEL_ATLAS_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/label_nodes/CCLabelBMFont.h b/cappuccino-sdk/incl/cocos2dx/label_nodes/CCLabelBMFont.h deleted file mode 100644 index 017fac6..0000000 --- a/cappuccino-sdk/incl/cocos2dx/label_nodes/CCLabelBMFont.h +++ /dev/null @@ -1,344 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -Use any of these editors to generate BMFonts: - http://glyphdesigner.71squared.com/ (Commercial, Mac OS X) - http://www.n4te.com/hiero/hiero.jnlp (Free, Java) - http://slick.cokeandcode.com/demos/hiero.jnlp (Free, Java) - http://www.angelcode.com/products/bmfont/ (Free, Windows only) - -****************************************************************************/ -#ifndef __CCBITMAP_FONT_ATLAS_H__ -#define __CCBITMAP_FONT_ATLAS_H__ - -#include "sprite_nodes/CCSpriteBatchNode.h" -#include "support/data_support/uthash.h" -#include -#include -#include -#include - -NS_CC_BEGIN - -/** - * @addtogroup GUI - * @{ - * @addtogroup label - * @{ - */ - -enum { - kCCLabelAutomaticWidth = -1, -}; - -struct _FontDefHashElement; - -/** -@struct ccBMFontDef -BMFont definition -*/ -typedef struct _BMFontDef { - //! ID of the character - unsigned int charID; - //! origin and size of the font - CCRect rect; - //! The X amount the image should be offset when drawing the image (in pixels) - short xOffset; - //! The Y amount the image should be offset when drawing the image (in pixels) - short yOffset; - //! The amount to move the current position after drawing the character (in pixels) - short xAdvance; -} ccBMFontDef; - -/** @struct ccBMFontPadding -BMFont padding -@since v0.8.2 -*/ -typedef struct _BMFontPadding { - /// padding left - int left; - /// padding top - int top; - /// padding right - int right; - /// padding bottom - int bottom; -} ccBMFontPadding; - -typedef struct _FontDefHashElement -{ - unsigned int key; // key. Font Unicode value - ccBMFontDef fontDef; // font definition - UT_hash_handle hh; -} tCCFontDefHashElement; - -// Equal function for targetSet. -typedef struct _KerningHashElement -{ - int key; // key for the hash. 16-bit for 1st element, 16-bit for 2nd element - int amount; - UT_hash_handle hh; -} tCCKerningHashElement; - -/** @brief CCBMFontConfiguration has parsed configuration of the the .fnt file -@since v0.8 -@js NA -@lua NA -*/ -class CC_DLL CCBMFontConfiguration : public CCObject -{ - // XXX: Creating a public interface so that the bitmapFontArray[] is accessible -public://@public - // BMFont definitions - tCCFontDefHashElement *m_pFontDefDictionary; - - //! FNTConfig: Common Height Should be signed (issue #1343) - int m_nCommonHeight; - //! Padding - ccBMFontPadding m_tPadding; - //! atlas name - std::string m_sAtlasName; - //! values for kerning - tCCKerningHashElement *m_pKerningDictionary; - - // Character Set defines the letters that actually exist in the font - std::set *m_pCharacterSet; -public: - CCBMFontConfiguration(); - /** - * @js NA - * @lua NA - */ - virtual ~CCBMFontConfiguration(); - /** - * @js NA - * @lua NA - */ - const char * description(); - - /** allocates a CCBMFontConfiguration with a FNT file */ - static CCBMFontConfiguration * create(const char *FNTfile); - - /** initializes a BitmapFontConfiguration with a FNT file */ - bool initWithFNTfile(const char *FNTfile); - - inline const char* getAtlasName(){ return m_sAtlasName.c_str(); } - inline void setAtlasName(const char* atlasName) { m_sAtlasName = atlasName; } - - std::set* getCharacterSet() const; -private: - std::set* parseConfigFile(const char *controlFile); - void parseCharacterDefinition(std::string line, ccBMFontDef *characterDefinition); - void parseInfoArguments(std::string line); - void parseCommonArguments(std::string line); - void parseImageFileName(std::string line, const char *fntFile); - void parseKerningEntry(std::string line); - void purgeKerningDictionary(); - void purgeFontDefDictionary(); -}; - -/** @brief CCLabelBMFont is a subclass of CCSpriteBatchNode. - -Features: -- Treats each character like a CCSprite. This means that each individual character can be: -- rotated -- scaled -- translated -- tinted -- change the opacity -- It can be used as part of a menu item. -- anchorPoint can be used to align the "label" -- Supports AngelCode text format - -Limitations: -- All inner characters are using an anchorPoint of (0.5f, 0.5f) and it is not recommend to change it -because it might affect the rendering - -CCLabelBMFont implements the protocol CCLabelProtocol, like CCLabel and CCLabelAtlas. -CCLabelBMFont has the flexibility of CCLabel, the speed of CCLabelAtlas and all the features of CCSprite. -If in doubt, use CCLabelBMFont instead of CCLabelAtlas / CCLabel. - -Supported editors: -http://glyphdesigner.71squared.com/ (Commercial, Mac OS X) -http://www.n4te.com/hiero/hiero.jnlp (Free, Java) -http://slick.cokeandcode.com/demos/hiero.jnlp (Free, Java) -http://www.angelcode.com/products/bmfont/ (Free, Windows only) - -@since v0.8 -*/ - -class CC_DLL CCLabelBMFont : public CCSpriteBatchNode, public CCLabelProtocol, public CCRGBAProtocol -{ -public: - /** - * @js ctor - */ - CCLabelBMFont(); - /** - * @js NA - * @lua NA - */ - virtual ~CCLabelBMFont(); - /** Purges the cached data. - Removes from memory the cached configurations and the atlas name dictionary. - @since v0.99.3 - */ - static void purgeCachedData(); - - /** creates a bitmap font atlas with an initial string and the FNT file */ - static CCLabelBMFont * create(const char *str, const char *fntFile, float width, CCTextAlignment alignment, CCPoint imageOffset); - - static CCLabelBMFont * create(const char *str, const char *fntFile, float width, CCTextAlignment alignment); - - static CCLabelBMFont * create(const char *str, const char *fntFile, float width); - - static CCLabelBMFont * create(const char *str, const char *fntFile); - - /** Creates an label. - */ - static CCLabelBMFont * create(); - - bool init(); - /** init a bitmap font atlas with an initial string and the FNT file */ - bool initWithString(const char *str, const char *fntFile, float width = kCCLabelAutomaticWidth, CCTextAlignment alignment = kCCTextAlignmentLeft, CCPoint imageOffset = CCPointZero); - - /** updates the font chars based on the string to render */ - void createFontChars(); - // super method - virtual void setString(const char *newString); - virtual void setString(const char *newString, bool needUpdateLabel); - - virtual const char* getString(void); - virtual void setCString(const char *label); - virtual void setAnchorPoint(const CCPoint& var); - virtual void updateLabel(); - virtual void setAlignment(CCTextAlignment alignment); - virtual void setWidth(float width); - virtual void setLineBreakWithoutSpace(bool breakWithoutSpace); - virtual void setScale(float scale); - virtual void setScaleX(float scaleX); - virtual void setScaleY(float scaleY); - - // CCRGBAProtocol - virtual bool isOpacityModifyRGB(); - virtual void setOpacityModifyRGB(bool isOpacityModifyRGB); virtual GLubyte getOpacity(); - virtual GLubyte getDisplayedOpacity(); - virtual void setOpacity(GLubyte opacity); - virtual void updateDisplayedOpacity(GLubyte parentOpacity); - virtual bool isCascadeOpacityEnabled(); - virtual void setCascadeOpacityEnabled(bool cascadeOpacityEnabled); - virtual const ccColor3B& getColor(void); - virtual const ccColor3B& getDisplayedColor(); - virtual void setColor(const ccColor3B& color); - virtual void updateDisplayedColor(const ccColor3B& parentColor); - virtual bool isCascadeColorEnabled(); - virtual void setCascadeColorEnabled(bool cascadeColorEnabled); - - void setFntFile(const char* fntFile); - const char* getFntFile(); - CCBMFontConfiguration* getConfiguration() const; - - //Robtop Modifications: - static bool createBatched(char const*, char const*, CCArray*); - bool getIsBatched(void)const; - CCArray* getTargetArray(void)const; - void limitLabelWidth(float, float, float); - void setIsBatched(bool); - void setTargetArray(CCArray*); - -#if CC_LABELBMFONT_DEBUG_DRAW - virtual void draw(); -#endif // CC_LABELBMFONT_DEBUG_DRAW -private: - char * atlasNameFromFntFile(const char *fntFile); - int kerningAmountForFirst(unsigned short first, unsigned short second); - float getLetterPosXLeft( CCSprite* characterSprite ); - float getLetterPosXRight( CCSprite* characterSprite ); - -protected: - virtual void setString(unsigned short *newString, bool needUpdateLabel); - // string to render - unsigned short* m_sString; //0x10C - - // name of fntFile - std::string m_sFntFile; //0x110 - - //m_sInitialString is placed continously after the 28 bytes of std::string(instead of +4 bytes of padding), in LE notatio operator& - //returns the address at with an offset of 4 bytes where the object actually is in memory, whenever std::string is aligned + other data type - //the formula is: T offset = (address of string) + 28 - sizeof(T) - - // initial string without line breaks - unsigned short* m_sInitialString; //0x128 - std::string m_sInitialStringUTF8; //0x12C - - // alignment of all lines - CCTextAlignment m_pAlignment; //0x144 - // max width until a line break is added - float m_fWidth; //0x148 - - CCBMFontConfiguration *m_pConfiguration; //0x14C - - bool m_bLineBreakWithoutSpaces; //0x150 - // offset of the texture atlas - CCPoint m_tImageOffset; //0x154(padding) - - // reused char - CCSprite *m_pReusedChar; //0x15C - - // texture RGBA - GLubyte m_cDisplayedOpacity; //0x15D - GLubyte m_cRealOpacity; //0x15E - //2 bytes padding - - ccColor3B m_tDisplayedColor; //0x160 - ccColor3B m_tRealColor; //0x164 - bool m_bCascadeColorEnabled; //0x165 - bool m_bCascadeOpacityEnabled; //0x166 - /** conforms to CCRGBAProtocol protocol */ - bool m_bIsOpacityModifyRGB; //0x167, but this is actually 16A - //Robtop Modifications: - bool m_bIsBatched; //0x16B - CCArray* m_pTargetArray; //16C - uint32_t m_uUnknown; //0x170 - - //CCLabelBMFont::getIsBatched = 16B - //CLabelBMFont::getTargetArray = 16C - -}; - -/** Free function that parses a FNT file a place it on the cache -*/ -CC_DLL CCBMFontConfiguration * FNTConfigLoadFile( const char *file ); -/** Purges the FNT config cache -*/ -CC_DLL void FNTConfigRemoveCache( void ); - -// end of GUI group -/// @} -/// @} - -NS_CC_END - -#endif //__CCBITMAP_FONT_ATLAS_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/label_nodes/CCLabelTTF.h b/cappuccino-sdk/incl/cocos2dx/label_nodes/CCLabelTTF.h deleted file mode 100644 index 46c6bd7..0000000 --- a/cappuccino-sdk/incl/cocos2dx/label_nodes/CCLabelTTF.h +++ /dev/null @@ -1,212 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCLABELTTF_H__ -#define __CCLABELTTF_H__ - -#include "sprite_nodes/CCSprite.h" -#include "textures/CCTexture2D.h" - -NS_CC_BEGIN - -/** - * @addtogroup GUI - * @{ - * @addtogroup label - * @{ - */ - - - -/** @brief CCLabelTTF is a subclass of CCTextureNode that knows how to render text labels - * - * All features from CCTextureNode are valid in CCLabelTTF - * - * CCLabelTTF objects are slow. Consider using CCLabelAtlas or CCLabelBMFont instead. - * - * Custom ttf file can be put in assets/ or external storage that the Application can access. - * @code - * CCLabelTTF *label1 = CCLabelTTF::create("alignment left", "A Damn Mess", fontSize, blockSize, - * kCCTextAlignmentLeft, kCCVerticalTextAlignmentCenter); - * CCLabelTTF *label2 = CCLabelTTF::create("alignment right", "/mnt/sdcard/Scissor Cuts.ttf", fontSize, blockSize, - * kCCTextAlignmentLeft, kCCVerticalTextAlignmentCenter); - * @endcode - * - */ -class CC_DLL CCLabelTTF : public CCSprite, public CCLabelProtocol -{ -public: - /** - * @js ctor - */ - CCLabelTTF(); - /** - * @js NA - * @lua NA - */ - virtual ~CCLabelTTF(); - /** - * @js NA - * @lua NA - */ - const char* description(); - - /** creates a CCLabelTTF with a font name and font size in points - @since v2.0.1 - */ - static CCLabelTTF * create(const char *string, const char *fontName, float fontSize); - - /** creates a CCLabelTTF from a fontname, horizontal alignment, dimension in points, and font size in points. - @since v2.0.1 - */ - static CCLabelTTF * create(const char *string, const char *fontName, float fontSize, - const CCSize& dimensions, CCTextAlignment hAlignment); - - /** creates a CCLabel from a fontname, alignment, dimension in points and font size in points - @since v2.0.1 - */ - static CCLabelTTF * create(const char *string, const char *fontName, float fontSize, - const CCSize& dimensions, CCTextAlignment hAlignment, - CCVerticalTextAlignment vAlignment); - - - /** Create a lable with string and a font definition*/ - static CCLabelTTF * createWithFontDefinition(const char *string, ccFontDefinition &textDefinition); - - /** initializes the CCLabelTTF with a font name and font size */ - bool initWithString(const char *string, const char *fontName, float fontSize); - - /** initializes the CCLabelTTF with a font name, alignment, dimension and font size */ - bool initWithString(const char *string, const char *fontName, float fontSize, - const CCSize& dimensions, CCTextAlignment hAlignment); - - /** initializes the CCLabelTTF with a font name, alignment, dimension and font size */ - bool initWithString(const char *string, const char *fontName, float fontSize, - const CCSize& dimensions, CCTextAlignment hAlignment, - CCVerticalTextAlignment vAlignment); - - /** initializes the CCLabelTTF with a font name, alignment, dimension and font size */ - bool initWithStringAndTextDefinition(const char *string, ccFontDefinition &textDefinition); - - /** set the text definition used by this label */ - void setTextDefinition(ccFontDefinition *theDefinition); - - /** get the text definition used by this label */ - ccFontDefinition * getTextDefinition(); - - - - /** enable or disable shadow for the label */ - void enableShadow(const CCSize &shadowOffset, float shadowOpacity, float shadowBlur, bool mustUpdateTexture = true); - - /** disable shadow rendering */ - void disableShadow(bool mustUpdateTexture = true); - - /** enable or disable stroke */ - void enableStroke(const ccColor3B &strokeColor, float strokeSize, bool mustUpdateTexture = true); - - /** disable stroke */ - void disableStroke(bool mustUpdateTexture = true); - - /** set text tinting */ - void setFontFillColor(const ccColor3B &tintColor, bool mustUpdateTexture = true); - - - - /** initializes the CCLabelTTF */ - bool init(); - - /** Creates an label. - */ - static CCLabelTTF * create(); - - /** changes the string to render - * @warning Changing the string is as expensive as creating a new CCLabelTTF. To obtain better performance use CCLabelAtlas - */ - virtual void setString(const char *label); - virtual const char* getString(void); - - CCTextAlignment getHorizontalAlignment(); - void setHorizontalAlignment(CCTextAlignment alignment); - - CCVerticalTextAlignment getVerticalAlignment(); - void setVerticalAlignment(CCVerticalTextAlignment verticalAlignment); - - CCSize getDimensions(); - void setDimensions(const CCSize &dim); - - float getFontSize(); - void setFontSize(float fontSize); - - const char* getFontName(); - void setFontName(const char *fontName); - -private: - bool updateTexture(); -protected: - - /** set the text definition for this label */ - void _updateWithTextDefinition(ccFontDefinition & textDefinition, bool mustUpdateTexture = true); - ccFontDefinition _prepareTextDefinition(bool adjustForResolution = false); - - /** Dimensions of the label in Points */ - CCSize m_tDimensions; - /** The alignment of the label */ - CCTextAlignment m_hAlignment; - /** The vertical alignment of the label */ - CCVerticalTextAlignment m_vAlignment; - /** Font name used in the label */ - std::string * m_pFontName; - /** Font size of the label */ - float m_fFontSize; - /** label's string */ - std::string m_string; - - /** font shadow */ - bool m_shadowEnabled; - CCSize m_shadowOffset; - float m_shadowOpacity; - float m_shadowBlur; - - - /** font stroke */ - bool m_strokeEnabled; - ccColor3B m_strokeColor; - float m_strokeSize; - - /** font tint */ - ccColor3B m_textFillColor; - - -}; - - -// end of GUI group -/// @} -/// @} - -NS_CC_END - -#endif //__CCLABEL_H__ - diff --git a/cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h b/cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h deleted file mode 100644 index f1ff6e9..0000000 --- a/cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCLayer.h +++ /dev/null @@ -1,457 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCLAYER_H__ -#define __CCLAYER_H__ - -#include "base_nodes/CCNode.h" -#include "CCProtocols.h" -#include "touch_dispatcher/CCTouchDelegateProtocol.h" -#include "platform/CCAccelerometerDelegate.h" -#include "keypad_dispatcher/CCKeypadDelegate.h" -#include "cocoa/CCArray.h" -#include "custom/Delegates/CCKeyboardDelegate.h" -#include "custom/Delegates/CCMouseDelegate.h" -#ifdef EMSCRIPTEN -#include "base_nodes/CCGLBufferedNode.h" -#endif // EMSCRIPTEN - -NS_CC_BEGIN - -typedef enum { - kCCTouchesAllAtOnce, - kCCTouchesOneByOne, -} ccTouchesMode; - -/** - * @addtogroup layer - * @{ - */ - -class CCTouchScriptHandlerEntry; - -// -// CCLayer -// -/** @brief CCLayer is a subclass of CCNode that implements the TouchEventsDelegate protocol. - -All features from CCNode are valid, plus the following new features: -- It can receive iPhone Touches -- It can receive Accelerometer input -*/ -class CC_DLL CCLayer : public CCNode, public CCTouchDelegate, public CCAccelerometerDelegate, public CCKeypadDelegate, - public CCKeyboardDelegate, public CCMouseDelegate -{ -public: - /** - * @js ctor - */ - CCLayer(); - /** - * @js NA - * @lua NA - */ - virtual ~CCLayer(); - virtual bool init(); - - /** create one layer */ - static CCLayer *create(void); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - /** - * @js NA - * @lua NA - */ - virtual void onExit(); - /** - * @js NA - * @lua NA - */ - virtual void onEnterTransitionDidFinish(); - - // default implements are used to call script callback if exist - virtual bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent); - - // default implements are used to call script callback if exist - virtual void ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent); - virtual void ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent); - virtual void ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent); - virtual void ccTouchesCancelled(CCSet *pTouches, CCEvent *pEvent); - /** - * @js NA - * @lua NA - */ - virtual void didAccelerate(CCAcceleration* pAccelerationValue); - void registerScriptAccelerateHandler(int nHandler); - void unregisterScriptAccelerateHandler(void); - - /** If isTouchEnabled, this method is called onEnter. Override it to change the - way CCLayer receives touch events. - ( Default: CCTouchDispatcher::sharedDispatcher()->addStandardDelegate(this,0); ) - Example: - void CCLayer::registerWithTouchDispatcher() - { - CCTouchDispatcher::sharedDispatcher()->addTargetedDelegate(this,INT_MIN+1,true); - } - @since v0.8.0 - */ - virtual void registerWithTouchDispatcher(void); - - /** Register script touch events handler */ - virtual void registerScriptTouchHandler(int nHandler, bool bIsMultiTouches = false, int nPriority = INT_MIN, bool bSwallowsTouches = false); - /** Unregister script touch events handler */ - virtual void unregisterScriptTouchHandler(void); - - /** whether or not it will receive Touch events. - You can enable / disable touch events with this property. - Only the touches of this node will be affected. This "method" is not propagated to it's children. - @since v0.8.1 - */ - virtual bool isTouchEnabled(); - virtual void setTouchEnabled(bool value); - - virtual void setTouchMode(ccTouchesMode mode); - virtual int getTouchMode(); - - /** priority of the touch events. Default is 0 */ - virtual void setTouchPriority(int priority); - virtual int getTouchPriority(); - - /** whether or not it will receive Accelerometer events - You can enable / disable accelerometer events with this property. - @since v0.8.1 - */ - virtual bool isAccelerometerEnabled(); - virtual void setAccelerometerEnabled(bool value); - virtual void setAccelerometerInterval(double interval); - - /** whether or not it will receive keypad events - You can enable / disable accelerometer events with this property. - it's new in cocos2d-x - */ - virtual bool isKeypadEnabled(); - virtual void setKeypadEnabled(bool value); - - //Robtop Modifications: - virtual bool isKeyboardEnabled(); - virtual void setKeyboardEnabled(bool value); - virtual bool isMouseEnabled(); - virtual void setMouseEnabled(bool value); - - /** Register keypad events handler */ - void registerScriptKeypadHandler(int nHandler); - /** Unregister keypad events handler */ - void unregisterScriptKeypadHandler(void); - - virtual void keyBackClicked(void); - virtual void keyMenuClicked(void); - - //Robtop Modification - virtual void keyDown(enumKeyCodes key); - - inline CCTouchScriptHandlerEntry* getScriptTouchHandlerEntry() { return m_pScriptTouchHandlerEntry; }; - inline CCScriptHandlerEntry* getScriptKeypadHandlerEntry() { return m_pScriptKeypadHandlerEntry; }; - inline CCScriptHandlerEntry* getScriptAccelerateHandlerEntry() { return m_pScriptAccelerateHandlerEntry; }; -protected: - bool m_bTouchEnabled; //assume this is 0x100 - bool m_bAccelerometerEnabled; //0x101 - bool m_bKeypadEnabled; //0x102 - bool m_bKeyboardEnabled;//0x103 - bool m_bMouseEnabled; //0x104 - -private: - // Script touch events handler - CCTouchScriptHandlerEntry* m_pScriptTouchHandlerEntry; //0x108 - CCScriptHandlerEntry* m_pScriptKeypadHandlerEntry; //0x10C - CCScriptHandlerEntry* m_pScriptAccelerateHandlerEntry; //0x110 - - int m_nTouchPriority; //0x114 - ccTouchesMode m_eTouchMode; //0X118 - - int excuteScriptTouchHandler(int nEventType, CCTouch *pTouch); - int excuteScriptTouchHandler(int nEventType, CCSet *pTouches); -}; - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) -#pragma mark - -#pragma mark CCLayerRGBA -#endif - -/** CCLayerRGBA is a subclass of CCLayer that implements the CCRGBAProtocol protocol using a solid color as the background. - - All features from CCLayer are valid, plus the following new features that propagate into children that conform to the CCRGBAProtocol: - - opacity - - RGB colors - @since 2.1 - */ -class CC_DLL CCLayerRGBA : public CCLayer, public CCRGBAProtocol -{ -public: - CREATE_FUNC(CCLayerRGBA); - /** - * @js ctor - */ - CCLayerRGBA(); - /** - * @js NA - * @lua NA - */ - virtual ~CCLayerRGBA(); - - virtual bool init(); - - virtual GLubyte getOpacity(); - virtual GLubyte getDisplayedOpacity(); - virtual void setOpacity(GLubyte opacity); - virtual void updateDisplayedOpacity(GLubyte parentOpacity); - virtual bool isCascadeOpacityEnabled(); - virtual void setCascadeOpacityEnabled(bool cascadeOpacityEnabled); - - virtual const ccColor3B& getColor(); - virtual const ccColor3B& getDisplayedColor(); - virtual void setColor(const ccColor3B& color); - virtual void updateDisplayedColor(const ccColor3B& parentColor); - virtual bool isCascadeColorEnabled(); - virtual void setCascadeColorEnabled(bool cascadeColorEnabled); - - virtual void setOpacityModifyRGB(bool bValue) {CC_UNUSED_PARAM(bValue);} - virtual bool isOpacityModifyRGB() { return false; } -protected: - GLubyte _displayedOpacity, _realOpacity; - ccColor3B _displayedColor, _realColor; - bool _cascadeOpacityEnabled, _cascadeColorEnabled; -}; - -// -// CCLayerColor -// -/** @brief CCLayerColor is a subclass of CCLayer that implements the CCRGBAProtocol protocol. - -All features from CCLayer are valid, plus the following new features: -- opacity -- RGB colors -*/ -class CC_DLL CCLayerColor : public CCLayerRGBA, public CCBlendProtocol -#ifdef EMSCRIPTEN -, public CCGLBufferedNode -#endif // EMSCRIPTEN -{ -protected: - ccVertex2F m_pSquareVertices[4]; - ccColor4F m_pSquareColors[4]; - -public: - /** - * @js ctor - */ - CCLayerColor(); - /** - * @js NA - * @lua NA - */ - virtual ~CCLayerColor(); - - virtual void draw(); - virtual void setContentSize(const CCSize & var); - - static CCLayerColor* create(); - - /** creates a CCLayer with color, width and height in Points */ - static CCLayerColor * create(const ccColor4B& color, GLfloat width, GLfloat height); - /** creates a CCLayer with color. Width and height are the window size. */ - static CCLayerColor * create(const ccColor4B& color); - - virtual bool init(); - /** initializes a CCLayer with color, width and height in Points */ - virtual bool initWithColor(const ccColor4B& color, GLfloat width, GLfloat height); - /** initializes a CCLayer with color. Width and height are the window size. */ - virtual bool initWithColor(const ccColor4B& color); - - /** change width in Points*/ - void changeWidth(GLfloat w); - /** change height in Points*/ - void changeHeight(GLfloat h); - /** change width and height in Points - @since v0.8 - */ - void changeWidthAndHeight(GLfloat w ,GLfloat h); - - /** BlendFunction. Conforms to CCBlendProtocol protocol */ - CC_PROPERTY(ccBlendFunc, m_tBlendFunc, BlendFunc) - - virtual void setColor(const ccColor3B &color); - virtual void setOpacity(GLubyte opacity); - -protected: - virtual void updateColor(); -}; - -// -// CCLayerGradient -// -/** @brief CCLayerGradient is a subclass of CCLayerColor that draws gradients across the background. - -All features from CCLayerColor are valid, plus the following new features: -- direction -- final color -- interpolation mode - -Color is interpolated between the startColor and endColor along the given -vector (starting at the origin, ending at the terminus). If no vector is -supplied, it defaults to (0, -1) -- a fade from top to bottom. - -If 'compressedInterpolation' is disabled, you will not see either the start or end color for -non-cardinal vectors; a smooth gradient implying both end points will be still -be drawn, however. - -If ' compressedInterpolation' is enabled (default mode) you will see both the start and end colors of the gradient. - -@since v0.99.5 -*/ -class CC_DLL CCLayerGradient : public CCLayerColor -{ -public: - - /** Creates a full-screen CCLayer with a gradient between start and end. */ - static CCLayerGradient* create(const ccColor4B& start, const ccColor4B& end); - - /** Creates a full-screen CCLayer with a gradient between start and end in the direction of v. */ - static CCLayerGradient* create(const ccColor4B& start, const ccColor4B& end, const CCPoint& v); - - virtual bool init(); - /** Initializes the CCLayer with a gradient between start and end. - * @js init - */ - virtual bool initWithColor(const ccColor4B& start, const ccColor4B& end); - - /** Initializes the CCLayer with a gradient between start and end in the direction of v. - * @js init - */ - virtual bool initWithColor(const ccColor4B& start, const ccColor4B& end, const CCPoint& v); - - CC_PROPERTY_PASS_BY_REF(ccColor3B, m_startColor, StartColor) - CC_PROPERTY_PASS_BY_REF(ccColor3B, m_endColor, EndColor) - CC_PROPERTY(GLubyte, m_cStartOpacity, StartOpacity) - CC_PROPERTY(GLubyte, m_cEndOpacity, EndOpacity) - CC_PROPERTY_PASS_BY_REF(CCPoint, m_AlongVector, Vector) - - /** Whether or not the interpolation will be compressed in order to display all the colors of the gradient both in canonical and non canonical vectors - Default: YES - */ -protected: - bool m_bCompressedInterpolation; -public: - virtual void setCompressedInterpolation(bool bCompressedInterpolation); - virtual bool isCompressedInterpolation(); - - static CCLayerGradient* create(); - -protected: - virtual void updateColor(); -}; - - -/** @brief CCMultipleLayer is a CCLayer with the ability to multiplex it's children. -Features: -- It supports one or more children -- Only one children will be active a time -*/ -class CC_DLL CCLayerMultiplex : public CCLayer -{ -protected: - unsigned int m_nEnabledLayer; - CCArray* m_pLayers; -public: - /** - * @js ctor - * @lua NA - */ - CCLayerMultiplex(); - /** - * @js NA - * @lua NA - */ - virtual ~CCLayerMultiplex(); - /** - * @js NA - */ - static CCLayerMultiplex* create(); - - /** creates a CCMultiplexLayer with an array of layers. - * @since v2.1 - * @js NA - */ - static CCLayerMultiplex* createWithArray(CCArray* arrayOfLayers); - - /** creates a CCLayerMultiplex with one or more layers using a variable argument list. - * @lua NA - */ - static CCLayerMultiplex * create(CCLayer* layer, ... ); - - /** - * lua script can not init with undetermined number of variables - * so add these functions to be used with lua. - */ - static CCLayerMultiplex * createWithLayer(CCLayer* layer); - - void addLayer(CCLayer* layer); - - /** initializes a MultiplexLayer with one or more layers using a variable argument list. - * @js NA - * @lua NA - */ - bool initWithLayers(CCLayer* layer, va_list params); - /** switches to a certain layer indexed by n. - The current (old) layer will be removed from it's parent with 'cleanup:YES'. - */ - - /** initializes a CCMultiplexLayer with an array of layers - * @since v2.1 - * @lua NA - */ - bool initWithArray(CCArray* arrayOfLayers); - - void switchTo(unsigned int n); - /** release the current layer and switches to another layer indexed by n. - The current (old) layer will be removed from it's parent with 'cleanup:YES'. - */ - void switchToAndReleaseMe(unsigned int n); -}; - - -// end of layer group -/// @} - -NS_CC_END - -#endif // __CCLAYER_H__ - diff --git a/cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCScene.h b/cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCScene.h deleted file mode 100644 index 509c258..0000000 --- a/cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCScene.h +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCSCENE_H__ -#define __CCSCENE_H__ - -#include "base_nodes/CCNode.h" - -NS_CC_BEGIN - -/** - * @addtogroup scene - * @{ - */ - -/** @brief CCScene is a subclass of CCNode that is used only as an abstract concept. - -CCScene an CCNode are almost identical with the difference that CCScene has it's -anchor point (by default) at the center of the screen. - -For the moment CCScene has no other logic than that, but in future releases it might have -additional logic. - -It is a good practice to use and CCScene as the parent of all your nodes. -*/ -class CC_DLL CCScene : public CCNode -{ -private: - uint32_t m_uUnknown; -public: - /** - * @js ctor - */ - CCScene(); - /** - * @js NA - * @lua NA - */ - virtual ~CCScene(); - bool init(); - int getHighestChildZ(); - - static CCScene *create(void); -}; - -// end of scene group -/// @} - -NS_CC_END - -#endif // __CCSCENE_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCTransition.h b/cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCTransition.h deleted file mode 100644 index 3678f9f..0000000 --- a/cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCTransition.h +++ /dev/null @@ -1,845 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCTRANSITION_H__ -#define __CCTRANSITION_H__ - -#include "CCScene.h" -#include "ccTypes.h" - -NS_CC_BEGIN - -/** - * @addtogroup transition - * @{ - */ - -//static creation function macro -//c/c++ don't support object creation of using class name -//so, all classes need creation method. - -class CCActionInterval; -class CCNode; - -/** @brief CCTransitionEaseScene can ease the actions of the scene protocol. -@since v0.8.2 -*/ -class CC_DLL CCTransitionEaseScene// : public CCObject -{ -public: - /** returns the Ease action that will be performed on a linear action. - @since v0.8.2 - */ - virtual CCActionInterval * easeActionWithAction(CCActionInterval * action) = 0; -}; - -/** Orientation Type used by some transitions -*/ -typedef enum { - /// An horizontal orientation where the Left is nearer - kCCTransitionOrientationLeftOver = 0, - /// An horizontal orientation where the Right is nearer - kCCTransitionOrientationRightOver = 1, - /// A vertical orientation where the Up is nearer - kCCTransitionOrientationUpOver = 0, - /// A vertical orientation where the Bottom is nearer - kCCTransitionOrientationDownOver = 1, - - // Deprecated - // kOrientationLeftOver = kCCTransitionOrientationLeftOver, - // kOrientationRightOver = kCCTransitionOrientationRightOver, - // kOrientationUpOver = kCCTransitionOrientationUpOver, - // kOrientationDownOver = kCCTransitionOrientationDownOver, -} tOrientation; - -/** @brief Base class for CCTransition scenes -*/ -class CC_DLL CCTransitionScene : public CCScene -{ - -protected: - CCScene * m_pInScene; - CCScene * m_pOutScene; - float m_fDuration; - bool m_bIsInSceneOnTop; - bool m_bIsSendCleanupToScene; - -public: - /** - * @js ctor - */ - CCTransitionScene(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionScene(); - virtual void draw(); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - /** - * @js NA - * @lua NA - */ - virtual void onExit(); - virtual void cleanup(); - - /** creates a base transition with duration and incoming scene */ - static CCTransitionScene * create(float t, CCScene *scene); - - /** initializes a transition with duration and incoming scene */ - virtual bool initWithDuration(float t,CCScene* scene); - - /** called after the transition finishes */ - void finish(void); - - /** used by some transitions to hide the outer scene */ - void hideOutShowIn(void); - -protected: - virtual void sceneOrder(); -private: - void setNewScene(float dt); - -}; - -/** @brief A CCTransition that supports orientation like. -* Possible orientation: LeftOver, RightOver, UpOver, DownOver -*/ -class CC_DLL CCTransitionSceneOriented : public CCTransitionScene -{ -protected: - tOrientation m_eOrientation; - -public: - /** - * @js ctor - */ - CCTransitionSceneOriented(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionSceneOriented(); - - /** creates a base transition with duration and incoming scene */ - static CCTransitionSceneOriented * create(float t,CCScene* scene, tOrientation orientation); - - /** initializes a transition with duration and incoming scene */ - virtual bool initWithDuration(float t,CCScene* scene,tOrientation orientation); -}; - -/** @brief CCTransitionRotoZoom: -Rotate and zoom out the outgoing scene, and then rotate and zoom in the incoming -*/ -class CC_DLL CCTransitionRotoZoom : public CCTransitionScene -{ -public: - /** - * @js ctor - */ - CCTransitionRotoZoom(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionRotoZoom(); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - - static CCTransitionRotoZoom* create(float t, CCScene* scene); -}; - -/** @brief CCTransitionJumpZoom: -Zoom out and jump the outgoing scene, and then jump and zoom in the incoming -*/ -class CC_DLL CCTransitionJumpZoom : public CCTransitionScene -{ -public: - /** - * @js ctor - */ - CCTransitionJumpZoom(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionJumpZoom(); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - - static CCTransitionJumpZoom* create(float t, CCScene* scene); -}; - -/** @brief CCTransitionMoveInL: -Move in from to the left the incoming scene. -*/ -class CC_DLL CCTransitionMoveInL : public CCTransitionScene, public CCTransitionEaseScene -{ -public: - /** - * @js ctor - */ - CCTransitionMoveInL(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionMoveInL(); - /** initializes the scenes */ - virtual void initScenes(void); - /** returns the action that will be performed */ - virtual CCActionInterval* action(void); - - virtual CCActionInterval* easeActionWithAction(CCActionInterval * action); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - - static CCTransitionMoveInL* create(float t, CCScene* scene); -}; - -/** @brief CCTransitionMoveInR: -Move in from to the right the incoming scene. -*/ -class CC_DLL CCTransitionMoveInR : public CCTransitionMoveInL -{ -public: - /** - * @js ctor - */ - CCTransitionMoveInR(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionMoveInR(); - virtual void initScenes(); - - static CCTransitionMoveInR* create(float t, CCScene* scene); -}; - -/** @brief CCTransitionMoveInT: -Move in from to the top the incoming scene. -*/ -class CC_DLL CCTransitionMoveInT : public CCTransitionMoveInL -{ -public: - /** - * @js ctor - */ - CCTransitionMoveInT(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionMoveInT(); - virtual void initScenes(); - - static CCTransitionMoveInT* create(float t, CCScene* scene); -}; - -/** @brief CCTransitionMoveInB: -Move in from to the bottom the incoming scene. -*/ -class CC_DLL CCTransitionMoveInB : public CCTransitionMoveInL -{ -public: - /** - * @js ctor - */ - CCTransitionMoveInB(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionMoveInB(); - virtual void initScenes(); - - static CCTransitionMoveInB* create(float t, CCScene* scene); -}; - -/** @brief CCTransitionSlideInL: -Slide in the incoming scene from the left border. -*/ -class CC_DLL CCTransitionSlideInL : public CCTransitionScene, public CCTransitionEaseScene -{ -public: - /** - * @js ctor - */ - CCTransitionSlideInL(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionSlideInL(); - - /** initializes the scenes */ - virtual void initScenes(void); - /** returns the action that will be performed by the incoming and outgoing scene */ - virtual CCActionInterval* action(void); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - - virtual CCActionInterval* easeActionWithAction(CCActionInterval * action); - - static CCTransitionSlideInL* create(float t, CCScene* scene); -protected: - virtual void sceneOrder(); -}; - -/** @brief CCTransitionSlideInR: -Slide in the incoming scene from the right border. -*/ -class CC_DLL CCTransitionSlideInR : public CCTransitionSlideInL -{ -public: - /** - * @js ctor - */ - CCTransitionSlideInR(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionSlideInR(); - - /** initializes the scenes */ - virtual void initScenes(void); - /** returns the action that will be performed by the incoming and outgoing scene */ - virtual CCActionInterval* action(void); - - static CCTransitionSlideInR* create(float t, CCScene* scene); -protected: - virtual void sceneOrder(); -}; - -/** @brief CCTransitionSlideInB: -Slide in the incoming scene from the bottom border. -*/ -class CC_DLL CCTransitionSlideInB : public CCTransitionSlideInL -{ -public: - /** - * @js ctor - */ - CCTransitionSlideInB(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionSlideInB(); - - /** initializes the scenes */ - virtual void initScenes(void); - /** returns the action that will be performed by the incoming and outgoing scene */ - virtual CCActionInterval* action(void); - - static CCTransitionSlideInB* create(float t, CCScene* scene); -protected: - virtual void sceneOrder(); -}; - -/** @brief CCTransitionSlideInT: -Slide in the incoming scene from the top border. -*/ -class CC_DLL CCTransitionSlideInT : public CCTransitionSlideInL -{ -public: - /** - * @js ctor - */ - CCTransitionSlideInT(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionSlideInT(); - - /** initializes the scenes */ - virtual void initScenes(void); - /** returns the action that will be performed by the incoming and outgoing scene */ - virtual CCActionInterval* action(void); - - static CCTransitionSlideInT* create(float t, CCScene* scene); -protected: - virtual void sceneOrder(); -}; - -/** -@brief Shrink the outgoing scene while grow the incoming scene -*/ -class CC_DLL CCTransitionShrinkGrow : public CCTransitionScene , public CCTransitionEaseScene -{ -public: - /** - * @js ctor - */ - CCTransitionShrinkGrow(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionShrinkGrow(); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - virtual CCActionInterval* easeActionWithAction(CCActionInterval * action); - - static CCTransitionShrinkGrow* create(float t, CCScene* scene); -}; - -/** @brief CCTransitionFlipX: -Flips the screen horizontally. -The front face is the outgoing scene and the back face is the incoming scene. -*/ -class CC_DLL CCTransitionFlipX : public CCTransitionSceneOriented -{ -public: - /** - * @js ctor - */ - CCTransitionFlipX(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionFlipX(); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - - static CCTransitionFlipX* create(float t, CCScene* s, tOrientation o); - static CCTransitionFlipX* create(float t, CCScene* s); -}; - -/** @brief CCTransitionFlipY: -Flips the screen vertically. -The front face is the outgoing scene and the back face is the incoming scene. -*/ -class CC_DLL CCTransitionFlipY : public CCTransitionSceneOriented -{ -public: - /** - * @js ctor - */ - CCTransitionFlipY(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionFlipY(); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - - static CCTransitionFlipY* create(float t, CCScene* s, tOrientation o); - static CCTransitionFlipY* create(float t, CCScene* s); -}; - -/** @brief CCTransitionFlipAngular: -Flips the screen half horizontally and half vertically. -The front face is the outgoing scene and the back face is the incoming scene. -*/ -class CC_DLL CCTransitionFlipAngular : public CCTransitionSceneOriented -{ -public: - /** - * @js ctor - */ - CCTransitionFlipAngular(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionFlipAngular(); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - - static CCTransitionFlipAngular* create(float t, CCScene* s, tOrientation o); - static CCTransitionFlipAngular* create(float t, CCScene* s); -}; - -/** @brief CCTransitionZoomFlipX: -Flips the screen horizontally doing a zoom out/in -The front face is the outgoing scene and the back face is the incoming scene. -*/ -class CC_DLL CCTransitionZoomFlipX : public CCTransitionSceneOriented -{ -public: - /** - * @js ctor - */ - CCTransitionZoomFlipX(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionZoomFlipX(); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - - static CCTransitionZoomFlipX* create(float t, CCScene* s, tOrientation o); - static CCTransitionZoomFlipX* create(float t, CCScene* s); -}; - -/** @brief CCTransitionZoomFlipY: -Flips the screen vertically doing a little zooming out/in -The front face is the outgoing scene and the back face is the incoming scene. -*/ -class CC_DLL CCTransitionZoomFlipY : public CCTransitionSceneOriented -{ -public: - /** - * @js ctor - */ - CCTransitionZoomFlipY(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionZoomFlipY(); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - - static CCTransitionZoomFlipY* create(float t, CCScene* s, tOrientation o); - static CCTransitionZoomFlipY* create(float t, CCScene* s); -}; - -/** @brief CCTransitionZoomFlipAngular: -Flips the screen half horizontally and half vertically doing a little zooming out/in. -The front face is the outgoing scene and the back face is the incoming scene. -*/ -class CC_DLL CCTransitionZoomFlipAngular : public CCTransitionSceneOriented -{ -public: - /** - * @js ctor - */ - CCTransitionZoomFlipAngular(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionZoomFlipAngular(); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - - static CCTransitionZoomFlipAngular* create(float t, CCScene* s, tOrientation o); - static CCTransitionZoomFlipAngular* create(float t, CCScene* s); -}; - -/** @brief CCTransitionFade: -Fade out the outgoing scene and then fade in the incoming scene.''' -*/ -class CC_DLL CCTransitionFade : public CCTransitionScene -{ -protected: - ccColor4B m_tColor; - -public: - /** - * @js ctor - */ - CCTransitionFade(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionFade(); - - /** creates the transition with a duration and with an RGB color - * Example: FadeTransition::create(2, scene, ccc3(255,0,0); // red color - */ - static CCTransitionFade* create(float duration,CCScene* scene, const ccColor3B& color); - static CCTransitionFade* create(float duration,CCScene* scene); - - /** initializes the transition with a duration and with an RGB color */ - virtual bool initWithDuration(float t, CCScene*scene ,const ccColor3B& color); - - virtual bool initWithDuration(float t,CCScene* scene); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - /** - * @js NA - * @lua NA - */ - virtual void onExit(); -}; - -class CCRenderTexture; -/** -@brief CCTransitionCrossFade: -Cross fades two scenes using the CCRenderTexture object. -*/ -class CC_DLL CCTransitionCrossFade : public CCTransitionScene -{ -public : - /** - * @js ctor - */ - CCTransitionCrossFade(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionCrossFade(); - - virtual void draw(); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - /** - * @js NA - * @lua NA - */ - virtual void onExit(); - -public: - static CCTransitionCrossFade* create(float t, CCScene* scene); -}; - -/** @brief CCTransitionTurnOffTiles: -Turn off the tiles of the outgoing scene in random order -*/ -class CC_DLL CCTransitionTurnOffTiles : public CCTransitionScene ,public CCTransitionEaseScene -{ -public : - /** - * @js ctor - */ - CCTransitionTurnOffTiles(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionTurnOffTiles(); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - virtual CCActionInterval * easeActionWithAction(CCActionInterval * action); - -public: - static CCTransitionTurnOffTiles* create(float t, CCScene* scene); -protected: - virtual void sceneOrder(); -}; - -/** @brief CCTransitionSplitCols: -The odd columns goes upwards while the even columns goes downwards. -*/ -class CC_DLL CCTransitionSplitCols : public CCTransitionScene , public CCTransitionEaseScene -{ -public: - /** - * @js ctor - */ - CCTransitionSplitCols(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionSplitCols(); - - virtual CCActionInterval* action(void); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - virtual CCActionInterval * easeActionWithAction(CCActionInterval * action); - -public: - - static CCTransitionSplitCols* create(float t, CCScene* scene); -}; - -/** @brief CCTransitionSplitRows: -The odd rows goes to the left while the even rows goes to the right. -*/ -class CC_DLL CCTransitionSplitRows : public CCTransitionSplitCols -{ -public: - /** - * @js ctor - */ - CCTransitionSplitRows(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionSplitRows(); - - virtual CCActionInterval* action(void); - -public: - - static CCTransitionSplitRows* create(float t, CCScene* scene); -}; - -/** @brief CCTransitionFadeTR: -Fade the tiles of the outgoing scene from the left-bottom corner the to top-right corner. -*/ -class CC_DLL CCTransitionFadeTR : public CCTransitionScene , public CCTransitionEaseScene -{ -public: - /** - * @js ctor - */ - CCTransitionFadeTR(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionFadeTR(); - virtual CCActionInterval* actionWithSize(const CCSize& size); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - virtual CCActionInterval* easeActionWithAction(CCActionInterval * action); - -public: - - static CCTransitionFadeTR* create(float t, CCScene* scene); -protected: - virtual void sceneOrder(); -}; - -/** @brief CCTransitionFadeBL: -Fade the tiles of the outgoing scene from the top-right corner to the bottom-left corner. -*/ -class CC_DLL CCTransitionFadeBL : public CCTransitionFadeTR -{ -public: - /** - * @js ctor - */ - CCTransitionFadeBL(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionFadeBL(); - virtual CCActionInterval* actionWithSize(const CCSize& size); - -public: - - static CCTransitionFadeBL* create(float t, CCScene* scene); -}; - -/** @brief CCTransitionFadeUp: -* Fade the tiles of the outgoing scene from the bottom to the top. -*/ -class CC_DLL CCTransitionFadeUp : public CCTransitionFadeTR -{ -public: - /** - * @js ctor - */ - CCTransitionFadeUp(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionFadeUp(); - virtual CCActionInterval* actionWithSize(const CCSize& size); - -public: - - static CCTransitionFadeUp* create(float t, CCScene* scene); -}; - -/** @brief CCTransitionFadeDown: -* Fade the tiles of the outgoing scene from the top to the bottom. -*/ -class CC_DLL CCTransitionFadeDown : public CCTransitionFadeTR -{ -public: - /** - * @js ctor - */ - CCTransitionFadeDown(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionFadeDown(); - virtual CCActionInterval* actionWithSize(const CCSize& size); - -public: - - static CCTransitionFadeDown* create(float t, CCScene* scene); -}; - -// end of transition group -/// @} - -NS_CC_END - -#endif // __CCTRANSITION_H__ - diff --git a/cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCTransitionPageTurn.h b/cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCTransitionPageTurn.h deleted file mode 100644 index 8693184..0000000 --- a/cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCTransitionPageTurn.h +++ /dev/null @@ -1,96 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2009 Sindesso Pty Ltd http://www.sindesso.com/ - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCPAGE_TURN_TRANSITION_H__ -#define __CCPAGE_TURN_TRANSITION_H__ - -#include "CCTransition.h" - -NS_CC_BEGIN - -/** - * @addtogroup transition - * @{ - */ - -/** -@brief A transition which peels back the bottom right hand corner of a scene -to transition to the scene beneath it simulating a page turn. - -This uses a 3DAction so it's strongly recommended that depth buffering -is turned on in CCDirector using: - - CCDirector::sharedDirector()->setDepthBufferFormat(kDepthBuffer16); - - @since v0.8.2 -*/ -class CC_DLL CCTransitionPageTurn : public CCTransitionScene -{ -protected: - bool m_bBack; - -public: - /** - * @js ctor - */ - CCTransitionPageTurn(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTransitionPageTurn(); - - /** - * Creates a base transition with duration and incoming scene. - * If back is true then the effect is reversed to appear as if the incoming - * scene is being turned from left over the outgoing scene. - */ - static CCTransitionPageTurn* create(float t,CCScene* scene,bool backwards); - - /** - * Creates a base transition with duration and incoming scene. - * If back is true then the effect is reversed to appear as if the incoming - * scene is being turned from left over the outgoing scene. - */ - virtual bool initWithDuration(float t,CCScene* scene,bool backwards); - - CCActionInterval* actionWithSize(const CCSize& vector); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - -protected: - virtual void sceneOrder(); -}; - -// end of transition group -/// @} - -NS_CC_END - -#endif // __CCPAGE_TURN_TRANSITION_H__ - diff --git a/cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCTransitionProgress.h b/cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCTransitionProgress.h deleted file mode 100644 index 0963dff..0000000 --- a/cappuccino-sdk/incl/cocos2dx/layers_scenes_transitions_nodes/CCTransitionProgress.h +++ /dev/null @@ -1,145 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2009 Lam Pham -Copyright (c) 2012 Ricardo Quesada - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCTRANSITIONPROGRESS_H__ -#define __CCTRANSITIONPROGRESS_H__ - -#include "CCTransition.h" - -NS_CC_BEGIN - -class CCProgressTimer; -class CCRenderTexture; - -/** - * @addtogroup transition - * @{ - */ - -class CC_DLL CCTransitionProgress : public CCTransitionScene -{ -public: - static CCTransitionProgress* create(float t, CCScene* scene); - /** - * @js ctor - */ - CCTransitionProgress(); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - /** - * @js NA - * @lua NA - */ - virtual void onExit(); -protected: - virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture); - virtual void setupTransition(); - virtual void sceneOrder(); - float m_fTo; - float m_fFrom; - CCScene* m_pSceneToBeModified; -}; - - -/** CCTransitionRadialCCW transition. - A counter clock-wise radial transition to the next scene - */ -class CC_DLL CCTransitionProgressRadialCCW : public CCTransitionProgress -{ -public: - static CCTransitionProgressRadialCCW* create(float t, CCScene* scene); -protected: - virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture); - -}; - - -/** CCTransitionRadialCW transition. - A counter clock-wise radial transition to the next scene -*/ -class CC_DLL CCTransitionProgressRadialCW : public CCTransitionProgress -{ -public: - static CCTransitionProgressRadialCW* create(float t, CCScene* scene); -protected: - virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture); - -}; - -/** CCTransitionProgressHorizontal transition. - A clock-wise radial transition to the next scene - */ -class CC_DLL CCTransitionProgressHorizontal : public CCTransitionProgress -{ -public: - - static CCTransitionProgressHorizontal* create(float t, CCScene* scene); -protected: - virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture); - -}; - -class CC_DLL CCTransitionProgressVertical : public CCTransitionProgress -{ -public: - - static CCTransitionProgressVertical* create(float t, CCScene* scene); -protected: - virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture); - -}; - -class CC_DLL CCTransitionProgressInOut : public CCTransitionProgress -{ -public: - - static CCTransitionProgressInOut* create(float t, CCScene* scene); -protected: - virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture); - virtual void sceneOrder(); - virtual void setupTransition(); -}; - -class CC_DLL CCTransitionProgressOutIn : public CCTransitionProgress -{ -public: - - static CCTransitionProgressOutIn* create(float t, CCScene* scene); -protected: - virtual CCProgressTimer* progressTimerNodeWithRenderTexture(CCRenderTexture* texture); - -}; - -// end of transition group -/// @} - -NS_CC_END - -#endif /* __CCTRANSITIONPROGRESS_H__ */ - diff --git a/cappuccino-sdk/incl/cocos2dx/menu_nodes/CCMenu.h b/cappuccino-sdk/incl/cocos2dx/menu_nodes/CCMenu.h deleted file mode 100644 index 5f8e607..0000000 --- a/cappuccino-sdk/incl/cocos2dx/menu_nodes/CCMenu.h +++ /dev/null @@ -1,200 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCMENU_H_ -#define __CCMENU_H_ - -#include "CCMenuItem.h" -#include "layers_scenes_transitions_nodes/CCLayer.h" - -NS_CC_BEGIN - -/** - * @addtogroup GUI - * @{ - * @addtogroup menu - * @{ - */ -typedef enum -{ - kCCMenuStateWaiting, - kCCMenuStateTrackingTouch -} tCCMenuState; - -enum { - //* priority used by the menu for the event handler - kCCMenuHandlerPriority = -128, -}; - -/** @brief A CCMenu -* -* Features and Limitation: -* - You can add MenuItem objects in runtime using addChild: -* - But the only accepted children are MenuItem objects -*/ -class CC_DLL CCMenu : public CCLayerRGBA -{ - /** whether or not the menu will receive events */ - bool m_bEnabled; - -public: - /** - * @js ctor - */ - CCMenu() : m_pSelectedItem(NULL) {} - /** - * @js NA - * @lua NA - */ - virtual ~CCMenu(){} - - /** creates an empty CCMenu */ - static CCMenu* create(); - - /** creates a CCMenu with CCMenuItem objects - * @lua NA - */ - static CCMenu* create(CCMenuItem* item, ...); - - /** creates a CCMenu with a CCArray of CCMenuItem objects - * @js NA - */ - static CCMenu* createWithArray(CCArray* pArrayOfItems); - - /** creates a CCMenu with it's item, then use addChild() to add - * other items. It is used for script, it can't init with undetermined - * number of variables. - * @js NA - */ - static CCMenu* createWithItem(CCMenuItem* item); - - /** creates a CCMenu with CCMenuItem objects - * @js NA - * @lua NA - */ - static CCMenu* createWithItems(CCMenuItem *firstItem, va_list args); - - /** initializes an empty CCMenu */ - bool init(); - - /** initializes a CCMenu with a NSArray of CCMenuItem objects - * @lua NA - */ - bool initWithArray(CCArray* pArrayOfItems); - - /** align items vertically */ - void alignItemsVertically(); - /** align items vertically with padding - @since v0.7.2 - */ - void alignItemsVerticallyWithPadding(float padding); - - /** align items horizontally */ - void alignItemsHorizontally(); - /** align items horizontally with padding - @since v0.7.2 - */ - void alignItemsHorizontallyWithPadding(float padding); - - /** align items in rows of columns - * @code - * when this function bound to js,the input params are changed - * js:var alignItemsInColumns(...) - * @endcode - * @lua NA - */ - void alignItemsInColumns(unsigned int columns, ...); - /** - * @js NA - * @lua NA - */ - void alignItemsInColumns(unsigned int columns, va_list args); - /** - * @js NA - */ - void alignItemsInColumnsWithArray(CCArray* rows); - - /** align items in columns of rows - * @code - * when this function bound to js,the input params are changed - * js:var alignItemsInRows(...) - * @endcode - * @lua NA - */ - void alignItemsInRows(unsigned int rows, ...); - /** - * @js NA - * @lua NA - */ - void alignItemsInRows(unsigned int rows, va_list args); - /** - * @js NA - */ - void alignItemsInRowsWithArray(CCArray* columns); - - /** set event handler priority. By default it is: kCCMenuTouchPriority */ - void setHandlerPriority(int newPriority); - - //super methods - virtual void addChild(CCNode * child); - virtual void addChild(CCNode * child, int zOrder); - virtual void addChild(CCNode * child, int zOrder, int tag); - virtual void registerWithTouchDispatcher(); - virtual void removeChild(CCNode* child, bool cleanup); - - /** - @brief For phone event handle functions - */ - virtual bool ccTouchBegan(CCTouch* touch, CCEvent* event); - virtual void ccTouchEnded(CCTouch* touch, CCEvent* event); - virtual void ccTouchCancelled(CCTouch *touch, CCEvent* event); - virtual void ccTouchMoved(CCTouch* touch, CCEvent* event); - - /** - @since v0.99.5 - override onExit - * @js NA - * @lua NA - */ - virtual void onExit(); - - virtual void setOpacityModifyRGB(bool bValue) {CC_UNUSED_PARAM(bValue);} - virtual bool isOpacityModifyRGB(void) { return false;} - - virtual bool isEnabled() { return m_bEnabled; } - virtual void setEnabled(bool value) { m_bEnabled = value; }; - -protected: - CCMenuItem* itemForTouch(CCTouch * touch); - tCCMenuState m_eState; - CCMenuItem *m_pSelectedItem; -}; - -// end of GUI group -/// @} -/// @} - -NS_CC_END - -#endif//__CCMENU_H_ diff --git a/cappuccino-sdk/incl/cocos2dx/menu_nodes/CCMenuItem.h b/cappuccino-sdk/incl/cocos2dx/menu_nodes/CCMenuItem.h deleted file mode 100644 index 8363baf..0000000 --- a/cappuccino-sdk/incl/cocos2dx/menu_nodes/CCMenuItem.h +++ /dev/null @@ -1,433 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2011 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCMENU_ITEM_H__ -#define __CCMENU_ITEM_H__ - -#include "base_nodes/CCNode.h" -#include "CCProtocols.h" -#include "cocoa/CCArray.h" - -NS_CC_BEGIN - -class CCLabelTTF; -class CCLabelAtlas; -class CCSprite; -class CCSpriteFrame; -#define kCCItemSize 32 - -/** - * @addtogroup GUI - * @{ - * @addtogroup menu - * @{ - */ - -/** @brief CCMenuItem base class - * - * Subclass CCMenuItem (or any subclass) to create your custom CCMenuItem objects. - */ -class CC_DLL CCMenuItem : public CCNodeRGBA -{ -protected: - /** whether or not the item is selected - @since v0.8.2 - */ - bool m_bSelected; - bool m_bEnabled; - -public: - /** - * @js ctor - */ - CCMenuItem() - : m_bSelected(false) - , m_bEnabled(false) - , m_pListener(NULL) - , m_pfnSelector(NULL) - , m_nScriptTapHandler(0) - {} - /** - * @js NA - * @lua NA - */ - virtual ~CCMenuItem(); - - /** Creates a CCMenuItem with no target/selector - * @js NA - * @lua NA - */ - static CCMenuItem* create(); - /** Creates a CCMenuItem with a target/selector */ - static CCMenuItem* create(CCObject *rec, SEL_MenuHandler selector); - /** Initializes a CCMenuItem with a target/selector - * @lua NA - */ - bool initWithTarget(CCObject *rec, SEL_MenuHandler selector); - /** Returns the outside box */ - CCRect rect(); - /** Activate the item */ - virtual void activate(); - /** The item was selected (not activated), similar to "mouse-over" */ - virtual void selected(); - /** The item was unselected */ - virtual void unselected(); - - /** Register menu handler script function */ - virtual void registerScriptTapHandler(int nHandler); - virtual void unregisterScriptTapHandler(void); - int getScriptTapHandler() { return m_nScriptTapHandler; }; - - virtual bool isEnabled(); - //@note: It's 'setIsEnable' in cocos2d-iphone. - virtual void setEnabled(bool value); - virtual bool isSelected(); - - /** set the target/selector of the menu item*/ - void setTarget(CCObject *rec, SEL_MenuHandler selector); - -protected: - CCObject* m_pListener; - SEL_MenuHandler m_pfnSelector; - int m_nScriptTapHandler; -}; - -/** @brief An abstract class for "label" CCMenuItemLabel items - Any CCNode that supports the CCLabelProtocol protocol can be added. - Supported nodes: - - CCBitmapFontAtlas - - CCLabelAtlas - - CCLabelTTF - */ -class CC_DLL CCMenuItemLabel : public CCMenuItem -{ - /** the color that will be used to disable the item */ - CC_PROPERTY_PASS_BY_REF(ccColor3B, m_tDisabledColor, DisabledColor); - /** Label that is rendered. It can be any CCNode that implements the CCLabelProtocol */ - CC_PROPERTY(CCNode*, m_pLabel, Label); -public: - /** - * @js ctor - */ - CCMenuItemLabel() - : m_pLabel(NULL) - , m_fOriginalScale(0.0) - {} - /** - * @js NA - * @lua NA - */ - virtual ~CCMenuItemLabel(); - - /** creates a CCMenuItemLabel with a Label, target and selector - * @lua NA - */ - static CCMenuItemLabel * create(CCNode*label, CCObject* target, SEL_MenuHandler selector); - /** creates a CCMenuItemLabel with a Label. Target and selector will be nil */ - static CCMenuItemLabel* create(CCNode *label); - - /** initializes a CCMenuItemLabel with a Label, target and selector */ - bool initWithLabel(CCNode* label, CCObject* target, SEL_MenuHandler selector); - /** sets a new string to the inner label */ - void setString(const char * label); - // super methods - virtual void activate(); - virtual void selected(); - virtual void unselected(); - /** Enable or disabled the CCMenuItemFont - @warning setEnabled changes the RGB color of the font - */ - virtual void setEnabled(bool enabled); - -protected: - ccColor3B m_tColorBackup; - float m_fOriginalScale; -}; - - -/** @brief A CCMenuItemAtlasFont - Helper class that creates a MenuItemLabel class with a LabelAtlas - */ -class CC_DLL CCMenuItemAtlasFont : public CCMenuItemLabel -{ -public: - /** - * @js ctor - */ - CCMenuItemAtlasFont(){} - /** - * @js NA - * @lua NA - */ - virtual ~CCMenuItemAtlasFont(){} - - /** creates a menu item from a string and atlas with a target/selector */ - static CCMenuItemAtlasFont* create(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap); - /** creates a menu item from a string and atlas. Use it with MenuItemToggle - * @lua NA - */ - static CCMenuItemAtlasFont* create(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap, CCObject* target, SEL_MenuHandler selector); - /** initializes a menu item from a string and atlas with a target/selector */ - bool initWithString(const char *value, const char *charMapFile, int itemWidth, int itemHeight, char startCharMap, CCObject* target, SEL_MenuHandler selector); -}; - - -/** @brief A CCMenuItemFont - Helper class that creates a CCMenuItemLabel class with a Label - */ -class CC_DLL CCMenuItemFont : public CCMenuItemLabel -{ -public: - /** - * @js ctor - */ - CCMenuItemFont() : m_uFontSize(0), m_strFontName(""){} - /** - * @js NA - * @lua NA - */ - virtual ~CCMenuItemFont(){} - /** set default font size */ - static void setFontSize(unsigned int s); - /** get default font size */ - static unsigned int fontSize(); - /** set the default font name */ - static void setFontName(const char *name); - /** get the default font name */ - static const char *fontName(); - - /** creates a menu item from a string without target/selector. To be used with CCMenuItemToggle */ - static CCMenuItemFont * create(const char *value); - /** creates a menu item from a string with a target/selector - * @lua NA - */ - static CCMenuItemFont * create(const char *value, CCObject* target, SEL_MenuHandler selector); - - /** initializes a menu item from a string with a target/selector */ - bool initWithString(const char *value, CCObject* target, SEL_MenuHandler selector); - - /** set font size - * c++ can not overload static and non-static member functions with the same parameter types - * so change the name to setFontSizeObj - * @js setFontSize - */ - void setFontSizeObj(unsigned int s); - - /** get font size - * @js fontSize - */ - unsigned int fontSizeObj(); - - /** set the font name - * c++ can not overload static and non-static member functions with the same parameter types - * so change the name to setFontNameObj - * @js setFontName - */ - void setFontNameObj(const char* name); - /** - * @js fontName - */ - const char* fontNameObj(); - -protected: - void recreateLabel(); - - unsigned int m_uFontSize; - std::string m_strFontName; -}; - - -/** @brief CCMenuItemSprite accepts CCNode objects as items. - The images has 3 different states: - - unselected image - - selected image - - disabled image - - @since v0.8.0 - */ -class CC_DLL CCMenuItemSprite : public CCMenuItem -{ - /** the image used when the item is not selected */ - CC_PROPERTY(CCNode*, m_pNormalImage, NormalImage); - /** the image used when the item is selected */ - CC_PROPERTY(CCNode*, m_pSelectedImage, SelectedImage); - /** the image used when the item is disabled */ - CC_PROPERTY(CCNode*, m_pDisabledImage, DisabledImage); -public: - /** - * @js ctor - */ - CCMenuItemSprite() - :m_pNormalImage(NULL) - ,m_pSelectedImage(NULL) - ,m_pDisabledImage(NULL) - {} - - /** creates a menu item with a normal, selected and disabled image*/ - static CCMenuItemSprite * create(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite = NULL); - /** creates a menu item with a normal and selected image with target/selector - * @lua NA - */ - static CCMenuItemSprite * create(CCNode* normalSprite, CCNode* selectedSprite, CCObject* target, SEL_MenuHandler selector); - /** creates a menu item with a normal,selected and disabled image with target/selector - * @lua NA - */ - static CCMenuItemSprite * create(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite, CCObject* target, SEL_MenuHandler selector); - - /** initializes a menu item with a normal, selected and disabled image with target/selector */ - bool initWithNormalSprite(CCNode* normalSprite, CCNode* selectedSprite, CCNode* disabledSprite, CCObject* target, SEL_MenuHandler selector); - - /** - @since v0.99.5 - */ - virtual void selected(); - virtual void unselected(); - virtual void setEnabled(bool bEnabled); - -protected: - virtual void updateImagesVisibility(); -}; - - -/** @brief CCMenuItemImage accepts images as items. - The images has 3 different states: - - unselected image - - selected image - - disabled image - - For best results try that all images are of the same size - */ -class CC_DLL CCMenuItemImage : public CCMenuItemSprite -{ -public: - /** - * @js ctor - * @lua NA - */ - CCMenuItemImage(){} - /** - * @js NA - * @lua NA - */ - virtual ~CCMenuItemImage(){} - - /** creates a menu item with a normal and selected image*/ - static CCMenuItemImage* create(const char *normalImage, const char *selectedImage); - /** creates a menu item with a normal,selected and disabled image*/ - static CCMenuItemImage* create(const char *normalImage, const char *selectedImage, const char *disabledImage); - /** creates a menu item with a normal and selected image with target/selector - * @lua NA - */ - static CCMenuItemImage* create(const char *normalImage, const char *selectedImage, CCObject* target, SEL_MenuHandler selector); - /** creates a menu item with a normal,selected and disabled image with target/selector - * @lua NA - */ - static CCMenuItemImage* create(const char *normalImage, const char *selectedImage, const char *disabledImage, CCObject* target, SEL_MenuHandler selector); - - bool init(); - /** initializes a menu item with a normal, selected and disabled image with target/selector */ - bool initWithNormalImage(const char *normalImage, const char *selectedImage, const char *disabledImage, CCObject* target, SEL_MenuHandler selector); - /** sets the sprite frame for the normal image */ - void setNormalSpriteFrame(CCSpriteFrame* frame); - /** sets the sprite frame for the selected image */ - void setSelectedSpriteFrame(CCSpriteFrame* frame); - /** sets the sprite frame for the disabled image */ - void setDisabledSpriteFrame(CCSpriteFrame* frame); - - /** Creates an CCMenuItemImage. - * @js NA - */ - static CCMenuItemImage* create(); -}; - - -/** @brief A CCMenuItemToggle - A simple container class that "toggles" it's inner items - The inner items can be any MenuItem - */ -class CC_DLL CCMenuItemToggle : public CCMenuItem -{ - /** returns the selected item */ - CC_PROPERTY(unsigned int, m_uSelectedIndex, SelectedIndex); - /** CCMutableArray that contains the subitems. You can add/remove items in runtime, and you can replace the array with a new one. - @since v0.7.2 - */ - CC_PROPERTY(CCArray*, m_pSubItems, SubItems); -public: - /** - * @js ctor - */ - CCMenuItemToggle() - : m_uSelectedIndex(0) - , m_pSubItems(NULL) - {} - /** - * @js NA - * @lua NA - */ - virtual ~CCMenuItemToggle(); - - /** creates a menu item from a CCArray with a target selector */ - static CCMenuItemToggle * createWithTarget(CCObject* target, SEL_MenuHandler selector, CCArray* menuItems); - - /** creates a menu item from a list of items with a target/selector */ - static CCMenuItemToggle* createWithTarget(CCObject* target, SEL_MenuHandler selector, CCMenuItem* item, ...); - - /** creates a menu item with no target/selector and no items - * @js NA - * @lua NA - */ - static CCMenuItemToggle* create(); - - /** initializes a menu item from a list of items with a target selector */ - bool initWithTarget(CCObject* target, SEL_MenuHandler selector, CCMenuItem* item, va_list args); - - /** creates a menu item with a item */ - static CCMenuItemToggle* create(CCMenuItem *item); - - /** initializes a menu item with a item */ - bool initWithItem(CCMenuItem *item); - /** add more menu item */ - void addSubItem(CCMenuItem *item); - - /** return the selected item */ - CCMenuItem* selectedItem(); - // super methods - virtual void activate(); - virtual void selected(); - virtual void unselected(); - virtual void setEnabled(bool var); - -}; - - -// end of GUI group -/// @} -/// @} - -NS_CC_END - -#endif //__CCMENU_ITEM_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/misc_nodes/CCClippingNode.h b/cappuccino-sdk/incl/cocos2dx/misc_nodes/CCClippingNode.h deleted file mode 100644 index 222bd48..0000000 --- a/cappuccino-sdk/incl/cocos2dx/misc_nodes/CCClippingNode.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * cocos2d-x: http://www.cocos2d-x.org - * - * Copyright (c) 2012 Pierre-David Bélanger - * Copyright (c) 2012 cocos2d-x.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - */ - -#ifndef __MISCNODE_CCCLIPPING_NODE_H__ -#define __MISCNODE_CCCLIPPING_NODE_H__ - -#include "base_nodes/CCNode.h" -#include "CCGL.h" - -NS_CC_BEGIN - -/** CCClippingNode is a subclass of CCNode. - It draws its content (childs) clipped using a stencil. - The stencil is an other CCNode that will not be drawn. - The clipping is done using the alpha part of the stencil (adjusted with an alphaThreshold). - */ -class CC_DLL CCClippingNode : public CCNode -{ -protected: - CCNode* m_pStencil; - GLfloat m_fAlphaThreshold; - bool m_bInverted; - -public: - /** Creates and initializes a clipping node without a stencil. - */ - static CCClippingNode* create(); - - /** Creates and initializes a clipping node with an other node as its stencil. - The stencil node will be retained. - */ - static CCClippingNode* create(CCNode *pStencil); - /** - * @js NA - * @lua NA - */ - virtual ~CCClippingNode(); - - /** Initializes a clipping node without a stencil. - */ - virtual bool init(); - - /** Initializes a clipping node with an other node as its stencil. - The stencil node will be retained, and its parent will be set to this clipping node. - */ - virtual bool init(CCNode *pStencil); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - /** - * @js NA - * @lua NA - */ - virtual void onEnterTransitionDidFinish(); - /** - * @js NA - * @lua NA - */ - virtual void onExitTransitionDidStart(); - /** - * @js NA - * @lua NA - */ - virtual void onExit(); - virtual void visit(); - - /** The CCNode to use as a stencil to do the clipping. - The stencil node will be retained. - This default to nil. - */ - CCNode* getStencil() const; - void setStencil(CCNode *pStencil); - - /** The alpha threshold. - The content is drawn only where the stencil have pixel with alpha greater than the alphaThreshold. - Should be a float between 0 and 1. - This default to 1 (so alpha test is disabled). - */ - GLfloat getAlphaThreshold() const; - void setAlphaThreshold(GLfloat fAlphaThreshold); - - /** Inverted. If this is set to YES, - the stencil is inverted, so the content is drawn where the stencil is NOT drawn. - This default to NO. - */ - bool isInverted() const; - void setInverted(bool bInverted); - -protected: - CCClippingNode(); -}; - -NS_CC_END - -#endif // __MISCNODE_CCCLIPPING_NODE_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/misc_nodes/CCMotionStreak.h b/cappuccino-sdk/incl/cocos2dx/misc_nodes/CCMotionStreak.h deleted file mode 100644 index 6c9460f..0000000 --- a/cappuccino-sdk/incl/cocos2dx/misc_nodes/CCMotionStreak.h +++ /dev/null @@ -1,140 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2011 ForzeField Studios S.L. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCMOTION_STREAK_H__ -#define __CCMOTION_STREAK_H__ - -#include "CCProtocols.h" -#include "textures/CCTexture2D.h" -#include "ccTypes.h" -#include "base_nodes/CCNode.h" -#ifdef EMSCRIPTEN -#include "base_nodes/CCGLBufferedNode.h" -#endif // EMSCRIPTEN - -NS_CC_BEGIN - -/** - * @addtogroup misc_nodes - * @{ - */ - -/** MotionStreak. - Creates a trailing path. - */ -class CC_DLL CCMotionStreak : public CCNodeRGBA, public CCTextureProtocol -#ifdef EMSCRIPTEN -, public CCGLBufferedNode -#endif // EMSCRIPTEN -{ -public: - /** - * @js ctor - */ - CCMotionStreak(); - /** - * @js NA - * @lua NA - */ - virtual ~CCMotionStreak(); - - /** creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture filename */ - static CCMotionStreak* create(float fade, float minSeg, float stroke, const ccColor3B& color, const char* path); - /** creates and initializes a motion streak with fade in seconds, minimum segments, stroke's width, color, texture */ - static CCMotionStreak* create(float fade, float minSeg, float stroke, const ccColor3B& color, CCTexture2D* texture); - - /** initializes a motion streak with fade in seconds, minimum segments, stroke's width, color and texture filename */ - bool initWithFade(float fade, float minSeg, float stroke, const ccColor3B& color, const char* path); - /** initializes a motion streak with fade in seconds, minimum segments, stroke's width, color and texture */ - bool initWithFade(float fade, float minSeg, float stroke, const ccColor3B& color, CCTexture2D* texture); - - /** color used for the tint */ - void tintWithColor(ccColor3B colors); - - /** Remove all living segments of the ribbon */ - void reset(); - - /** Override super methods */ - virtual void setPosition(const CCPoint& position); - virtual void draw(); - virtual void update(float delta); - - /* Implement interfaces */ - virtual CCTexture2D* getTexture(void); - virtual void setTexture(CCTexture2D *texture); - /** - * @js NA - */ - virtual void setBlendFunc(ccBlendFunc blendFunc); - /** - * @js NA - */ - virtual ccBlendFunc getBlendFunc(void); - virtual GLubyte getOpacity(void); - virtual void setOpacity(GLubyte opacity); - virtual void setOpacityModifyRGB(bool bValue); - virtual bool isOpacityModifyRGB(void); - - /** When fast mode is enabled, new points are added faster but with lower precision */ - inline bool isFastMode() { return m_bFastMode; } - inline void setFastMode(bool bFastMode) { m_bFastMode = bFastMode; } - - inline bool isStartingPositionInitialized() { return m_bStartingPositionInitialized; } - inline void setStartingPositionInitialized(bool bStartingPositionInitialized) - { - m_bStartingPositionInitialized = bStartingPositionInitialized; - } -protected: - bool m_bFastMode; - bool m_bStartingPositionInitialized; -private: - /** texture used for the motion streak */ - CCTexture2D* m_pTexture; - ccBlendFunc m_tBlendFunc; - CCPoint m_tPositionR; - - float m_fStroke; - float m_fFadeDelta; - float m_fMinSeg; - - unsigned int m_uMaxPoints; - unsigned int m_uNuPoints; - unsigned int m_uPreviousNuPoints; - - /** Pointers */ - CCPoint* m_pPointVertexes; - float* m_pPointState; - - // Opengl - ccVertex2F* m_pVertices; - GLubyte* m_pColorPointer; - ccTex2F* m_pTexCoords; -}; - -// end of misc_nodes group -/// @} - -NS_CC_END - -#endif //__CCMOTION_STREAK_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/misc_nodes/CCProgressTimer.h b/cappuccino-sdk/incl/cocos2dx/misc_nodes/CCProgressTimer.h deleted file mode 100644 index 4166e8f..0000000 --- a/cappuccino-sdk/incl/cocos2dx/misc_nodes/CCProgressTimer.h +++ /dev/null @@ -1,156 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2010 Lam Pham - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __MISC_NODE_CCPROGRESS_TIMER_H__ -#define __MISC_NODE_CCPROGRESS_TIMER_H__ - -#include "sprite_nodes/CCSprite.h" -#ifdef EMSCRIPTEN -#include "base_nodes/CCGLBufferedNode.h" -#endif // EMSCRIPTEN - -NS_CC_BEGIN - -/** - * @addtogroup misc_nodes - * @{ - */ - -/** Types of progress - @since v0.99.1 - */ -typedef enum { - /// Radial Counter-Clockwise - kCCProgressTimerTypeRadial, - /// Bar - kCCProgressTimerTypeBar, -} CCProgressTimerType; - -/** - @brief CCProgressTimer is a subclass of CCNode. - It renders the inner sprite according to the percentage. - The progress can be Radial, Horizontal or vertical. - @since v0.99.1 - */ -class CC_DLL CCProgressTimer : public CCNodeRGBA -#ifdef EMSCRIPTEN -, public CCGLBufferedNode -#endif // EMSCRIPTEN -{ -public: - /** - * @js ctor - */ - CCProgressTimer(); - /** - * @js NA - * @lua NA - */ - ~CCProgressTimer(void); - - /** Change the percentage to change progress. */ - inline CCProgressTimerType getType(void) { return m_eType; } - - /** Percentages are from 0 to 100 */ - inline float getPercentage(void) {return m_fPercentage; } - - /** The image to show the progress percentage, retain */ - inline CCSprite* getSprite(void) { return m_pSprite; } - - /** Initializes a progress timer with the sprite as the shape the timer goes through */ - bool initWithSprite(CCSprite* sp); - - void setPercentage(float fPercentage); - void setSprite(CCSprite *pSprite); - void setType(CCProgressTimerType type); - /** - * @js setReverseDirection - */ - void setReverseProgress(bool reverse); - - virtual void draw(void); - void setAnchorPoint(CCPoint anchorPoint); - - virtual void setColor(const ccColor3B& color); - virtual const ccColor3B& getColor() const; - virtual GLubyte getOpacity() const; - virtual void setOpacity(GLubyte opacity); - - inline bool isReverseDirection() { return m_bReverseDirection; }; - inline void setReverseDirection(bool value) { m_bReverseDirection = value; }; - -public: - /** Creates a progress timer with the sprite as the shape the timer goes through */ - static CCProgressTimer* create(CCSprite* sp); - - //Robtop Modification - void updateColor(void); - -protected: - ccTex2F textureCoordFromAlphaPoint(CCPoint alpha); - ccVertex2F vertexFromAlphaPoint(CCPoint alpha); - void updateProgress(void); - void updateBar(void); - void updateRadial(void); - //void updateColor(void); - CCPoint boundaryTexCoord(char index); - -protected: - CCProgressTimerType m_eType; - float m_fPercentage; - CCSprite *m_pSprite; - int m_nVertexDataCount; - ccV2F_C4B_T2F *m_pVertexData; - - /** - * Midpoint is used to modify the progress start position. - * If you're using radials type then the midpoint changes the center point - * If you're using bar type the the midpoint changes the bar growth - * it expands from the center but clamps to the sprites edge so: - * you want a left to right then set the midpoint all the way to ccp(0,y) - * you want a right to left then set the midpoint all the way to ccp(1,y) - * you want a bottom to top then set the midpoint all the way to ccp(x,0) - * you want a top to bottom then set the midpoint all the way to ccp(x,1) - */ - CC_PROPERTY(CCPoint, m_tMidpoint, Midpoint); - - /** - * This allows the bar type to move the component at a specific rate - * Set the component to 0 to make sure it stays at 100%. - * For example you want a left to right bar but not have the height stay 100% - * Set the rate to be ccp(0,1); and set the midpoint to = ccp(0,.5f); - */ - - //Robtop Modification - ROB_CC_SYNTHESIZE(CCPoint, m_tBarChangeRate, BarChangeRate); - - bool m_bReverseDirection; -}; - -// end of misc_nodes group -/// @} - -NS_CC_END - -#endif //__MISC_NODE_CCPROGRESS_TIMER_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/misc_nodes/CCRenderTexture.h b/cappuccino-sdk/incl/cocos2dx/misc_nodes/CCRenderTexture.h deleted file mode 100644 index 442bff9..0000000 --- a/cappuccino-sdk/incl/cocos2dx/misc_nodes/CCRenderTexture.h +++ /dev/null @@ -1,192 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2009 Jason Booth - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCRENDER_TEXTURE_H__ -#define __CCRENDER_TEXTURE_H__ - -#include "base_nodes/CCNode.h" -#include "sprite_nodes/CCSprite.h" -#include "kazmath/mat4.h" - -NS_CC_BEGIN - -/** - * @addtogroup textures - * @{ - */ - -typedef enum eImageFormat -{ - kCCImageFormatJPEG = 0, - kCCImageFormatPNG = 1, -} tCCImageFormat; -/** -@brief CCRenderTexture is a generic rendering target. To render things into it, -simply construct a render target, call begin on it, call visit on any cocos -scenes or objects to render them, and call end. For convenience, render texture -adds a sprite as it's display child with the results, so you can simply add -the render texture to your scene and treat it like any other CocosNode. -There are also functions for saving the render texture to disk in PNG or JPG format. - -@since v0.8.1 -*/ -class CC_DLL CCRenderTexture : public CCNode -{ - /** The CCSprite being used. - The sprite, by default, will use the following blending function: GL_ONE, GL_ONE_MINUS_SRC_ALPHA. - The blending function can be changed in runtime by calling: - - [[renderTexture sprite] setBlendFunc:(ccBlendFunc){GL_ONE, GL_ONE_MINUS_SRC_ALPHA}]; - */ - CC_PROPERTY(CCSprite*, m_pSprite, Sprite) -public: - /** - * @js ctor - */ - CCRenderTexture(); - /** - * @js NA - * @lua NA - */ - virtual ~CCRenderTexture(); - - virtual void visit(); - virtual void draw(); - - /** initializes a RenderTexture object with width and height in Points and a pixel format( only RGB and RGBA formats are valid ) and depthStencil format*/ - static CCRenderTexture * create(int w ,int h, CCTexture2DPixelFormat eFormat, GLuint uDepthStencilFormat); - - /** creates a RenderTexture object with width and height in Points and a pixel format, only RGB and RGBA formats are valid */ - static CCRenderTexture * create(int w, int h, CCTexture2DPixelFormat eFormat); - - /** creates a RenderTexture object with width and height in Points, pixel format is RGBA8888 */ - static CCRenderTexture * create(int w, int h); - - /** initializes a RenderTexture object with width and height in Points and a pixel format, only RGB and RGBA formats are valid */ - bool initWithWidthAndHeight(int w, int h, CCTexture2DPixelFormat eFormat); - - /** initializes a RenderTexture object with width and height in Points and a pixel format( only RGB and RGBA formats are valid ) and depthStencil format*/ - bool initWithWidthAndHeight(int w, int h, CCTexture2DPixelFormat eFormat, GLuint uDepthStencilFormat); - - /** starts grabbing */ - void begin(); - - /** starts rendering to the texture while clearing the texture first. - This is more efficient then calling -clear first and then -begin */ - void beginWithClear(float r, float g, float b, float a); - - /** starts rendering to the texture while clearing the texture first. - This is more efficient then calling -clear first and then -begin */ - void beginWithClear(float r, float g, float b, float a, float depthValue); - - /** starts rendering to the texture while clearing the texture first. - This is more efficient then calling -clear first and then -begin */ - void beginWithClear(float r, float g, float b, float a, float depthValue, int stencilValue); - - /** end is key word of lua, use other name to export to lua. */ - inline void endToLua(){ end();}; - - /** ends grabbing*/ - void end(); - - /** clears the texture with a color */ - void clear(float r, float g, float b, float a); - - /** clears the texture with a specified depth value */ - void clearDepth(float depthValue); - - /** clears the texture with a specified stencil value */ - void clearStencil(int stencilValue); - /* creates a new CCImage from with the texture's data. - Caller is responsible for releasing it by calling delete. - */ - CCImage* newCCImage(bool flipImage = true); - - /** saves the texture into a file using JPEG format. The file will be saved in the Documents folder. - Returns YES if the operation is successful. - */ - bool saveToFile(const char *szFilePath); - - /** saves the texture into a file. The format could be JPG or PNG. The file will be saved in the Documents folder. - Returns YES if the operation is successful. - */ - bool saveToFile(const char *name, tCCImageFormat format); - - /** Listen "come to background" message, and save render texture. - It only has effect on Android. - */ - void listenToBackground(CCObject *obj); - - /** Listen "come to foreground" message and restore the frame buffer object - It only has effect on Android. - */ - void listenToForeground(CCObject *obj); - - /** Valid flags: GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT, GL_STENCIL_BUFFER_BIT. They can be OR'ed. Valid when "autoDraw is YES. */ - unsigned int getClearFlags() const; - void setClearFlags(unsigned int uClearFlags); - - /** Clear color value. Valid only when "autoDraw" is true. */ - const ccColor4F& getClearColor() const; - void setClearColor(const ccColor4F &clearColor); - - /** Value for clearDepth. Valid only when autoDraw is true. */ - float getClearDepth() const; - void setClearDepth(float fClearDepth); - - /** Value for clear Stencil. Valid only when autoDraw is true */ - int getClearStencil() const; - void setClearStencil(float fClearStencil); - - /** When enabled, it will render its children into the texture automatically. Disabled by default for compatiblity reasons. - Will be enabled in the future. - */ - bool isAutoDraw() const; - void setAutoDraw(bool bAutoDraw); - -private: - void beginWithClear(float r, float g, float b, float a, float depthValue, int stencilValue, GLbitfield flags); - -protected: - GLuint m_uFBO; - GLuint m_uDepthRenderBufffer; - GLint m_nOldFBO; - CCTexture2D* m_pTexture; - CCTexture2D* m_pTextureCopy; // a copy of m_pTexture - CCImage* m_pUITextureImage; - GLenum m_ePixelFormat; - - // code for "auto" update - GLbitfield m_uClearFlags; - ccColor4F m_sClearColor; - GLclampf m_fClearDepth; - GLint m_nClearStencil; - bool m_bAutoDraw; -}; - -// end of textures group -/// @} - -NS_CC_END - -#endif //__CCRENDER_TEXTURE_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/particle_nodes/CCParticleBatchNode.h b/cappuccino-sdk/incl/cocos2dx/particle_nodes/CCParticleBatchNode.h deleted file mode 100644 index f55f3eb..0000000 --- a/cappuccino-sdk/incl/cocos2dx/particle_nodes/CCParticleBatchNode.h +++ /dev/null @@ -1,142 +0,0 @@ -/* - * Copyright (c) 2010-2012 cocos2d-x.org - * Copyright (C) 2009 Matt Oswald - * Copyright (c) 2009-2010 Ricardo Quesada - * Copyright (c) 2011 Zynga Inc. - * Copyright (c) 2011 Marco Tillemans - * - * http://www.cocos2d-x.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - */ -#ifndef __CCPARTICLEBATCHNODE_H__ -#define __CCPARTICLEBATCHNODE_H__ - -#include "base_nodes/CCNode.h" -#include "CCProtocols.h" - -NS_CC_BEGIN - -class CCTexture2D; -class CCTextureAtlas; -class CCParticleSystem; - -/** - * @addtogroup particle_nodes - * @{ - */ - -#define kCCParticleDefaultCapacity 500 - -/** CCParticleBatchNode is like a batch node: if it contains children, it will draw them in 1 single OpenGL call - * (often known as "batch draw"). - * - * A CCParticleBatchNode can reference one and only one texture (one image file, one texture atlas). - * Only the CCParticleSystems that are contained in that texture can be added to the CCSpriteBatchNode. - * All CCParticleSystems added to a CCSpriteBatchNode are drawn in one OpenGL ES draw call. - * If the CCParticleSystems are not added to a CCParticleBatchNode then an OpenGL ES draw call will be needed for each one, which is less efficient. - * - * - * Limitations: - * - At the moment only CCParticleSystemQuad is supported - * - All systems need to be drawn with the same parameters, blend function, aliasing, texture - * - * Most efficient usage - * - Initialize the ParticleBatchNode with the texture and enough capacity for all the particle systems - * - Initialize all particle systems and add them as child to the batch node - * @since v1.1 - */ - -class CC_DLL CCParticleBatchNode : public CCNode, public CCTextureProtocol -{ -public: - /** - * @js ctor - */ - CCParticleBatchNode(); - /** - * @js NA - * @lua NA - */ - virtual ~CCParticleBatchNode(); - - /** initializes the particle system with CCTexture2D, a capacity of particles, which particle system to use */ - static CCParticleBatchNode* createWithTexture(CCTexture2D *tex, unsigned int capacity = kCCParticleDefaultCapacity); - - /** initializes the particle system with the name of a file on disk (for a list of supported formats look at the CCTexture2D class), a capacity of particles */ - static CCParticleBatchNode* create(const char* fileImage, unsigned int capacity = kCCParticleDefaultCapacity); - - /** initializes the particle system with CCTexture2D, a capacity of particles */ - bool initWithTexture(CCTexture2D *tex, unsigned int capacity); - - /** initializes the particle system with the name of a file on disk (for a list of supported formats look at the CCTexture2D class), a capacity of particles */ - bool initWithFile(const char* fileImage, unsigned int capacity); - - /** Add a child into the CCParticleBatchNode */ - virtual void addChild(CCNode * child); - virtual void addChild(CCNode * child, int zOrder); - virtual void addChild(CCNode * child, int zOrder, int tag); - - /** Inserts a child into the CCParticleBatchNode */ - void insertChild(CCParticleSystem* pSystem, unsigned int index); - - /** remove child from the CCParticleBatchNode */ - virtual void removeChild(CCNode* child, bool cleanup); - virtual void reorderChild(CCNode * child, int zOrder); - void removeChildAtIndex(unsigned int index, bool doCleanup); - void removeAllChildrenWithCleanup(bool doCleanup); - /** disables a particle by inserting a 0'd quad into the texture atlas */ - void disableParticle(unsigned int particleIndex); - virtual void draw(void); - // returns the used texture - virtual CCTexture2D* getTexture(void); - // sets a new texture. it will be retained - virtual void setTexture(CCTexture2D *texture); - virtual void setBlendFunc(ccBlendFunc blendFunc); - /** returns the blending function used for the texture - * @js NA - */ - virtual ccBlendFunc getBlendFunc(void); - - void visit(); - -private: - void updateAllAtlasIndexes(); - void increaseAtlasCapacityTo(unsigned int quantity); - unsigned int searchNewPositionInChildrenForZ(int z); - void getCurrentIndex(unsigned int* oldIndex, unsigned int* newIndex, CCNode* child, int z); - unsigned int addChildHelper(CCParticleSystem* child, int z, int aTag); - void updateBlendFunc(void); - /** the texture atlas used for drawing the quads */ - - //Robtop Modification: - ROB_CC_SYNTHESIZE(CCTextureAtlas*, m_pTextureAtlas, TextureAtlas); -private: - /** the blend function used for drawing the quads */ - ccBlendFunc m_tBlendFunc; -}; - -// end of particle_nodes group -/// @} - -NS_CC_END - -#endif /* __CCPARTICLEBATCHNODE_H__ */ - diff --git a/cappuccino-sdk/incl/cocos2dx/particle_nodes/CCParticleExamples.h b/cappuccino-sdk/incl/cocos2dx/particle_nodes/CCParticleExamples.h deleted file mode 100644 index e27bc9d..0000000 --- a/cappuccino-sdk/incl/cocos2dx/particle_nodes/CCParticleExamples.h +++ /dev/null @@ -1,263 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCPARTICLE_EXAMPLE_H__ -#define __CCPARTICLE_EXAMPLE_H__ - -#include "CCParticleSystemQuad.h" - -NS_CC_BEGIN - -/** - * @addtogroup particle_nodes - * @{ - */ - -//! @brief A fire particle system -class CC_DLL CCParticleFire : public CCParticleSystemQuad -{ -public: - /** - * @js ctor - */ - CCParticleFire(){} - /** - * @js NA - * @lua NA - */ - virtual ~CCParticleFire(){} - bool init(){ return initWithTotalParticles(250); } - virtual bool initWithTotalParticles(unsigned int numberOfParticles); - - static CCParticleFire* create(); - static CCParticleFire* createWithTotalParticles(unsigned int numberOfParticles); -}; - -//! @brief A fireworks particle system -class CC_DLL CCParticleFireworks : public CCParticleSystemQuad -{ -public: - /** - * @js ctor - */ - CCParticleFireworks(){} - /** - * @js NA - * @lua NA - */ - virtual ~CCParticleFireworks(){} - bool init(){ return initWithTotalParticles(1500); } - virtual bool initWithTotalParticles(unsigned int numberOfParticles); - - static CCParticleFireworks* create(); - static CCParticleFireworks* createWithTotalParticles(unsigned int numberOfParticles); -}; - -//! @brief A sun particle system -class CC_DLL CCParticleSun : public CCParticleSystemQuad -{ -public: - /** - * @js ctor - */ - CCParticleSun(){} - /** - * @js NA - * @lua NA - */ - virtual ~CCParticleSun(){} - bool init(){ return initWithTotalParticles(350); } - virtual bool initWithTotalParticles(unsigned int numberOfParticles); - - static CCParticleSun* create(); - static CCParticleSun* createWithTotalParticles(unsigned int numberOfParticles); -}; - -//! @brief A galaxy particle system -class CC_DLL CCParticleGalaxy : public CCParticleSystemQuad -{ -public: - /** - * @js ctor - */ - CCParticleGalaxy(){} - /** - * @js NA - * @lua NA - */ - virtual ~CCParticleGalaxy(){} - bool init(){ return initWithTotalParticles(200); } - virtual bool initWithTotalParticles(unsigned int numberOfParticles); - - static CCParticleGalaxy* create(); - static CCParticleGalaxy* createWithTotalParticles(unsigned int numberOfParticles); -}; - -//! @brief A flower particle system -class CC_DLL CCParticleFlower : public CCParticleSystemQuad -{ -public: - /** - * @js ctor - */ - CCParticleFlower(){} - /** - * @js NA - * @lua NA - */ - virtual ~CCParticleFlower(){} - bool init(){ return initWithTotalParticles(250); } - virtual bool initWithTotalParticles(unsigned int numberOfParticles); - - static CCParticleFlower* create(); - static CCParticleFlower* createWithTotalParticles(unsigned int numberOfParticles); -}; - -//! @brief A meteor particle system -class CC_DLL CCParticleMeteor : public CCParticleSystemQuad -{ -public: - /** - * @js ctor - */ - CCParticleMeteor(){} - /** - * @js NA - * @lua NA - */ - virtual ~CCParticleMeteor(){} - bool init(){ return initWithTotalParticles(150); } - virtual bool initWithTotalParticles(unsigned int numberOfParticles); - - static CCParticleMeteor * create(); - static CCParticleMeteor* createWithTotalParticles(unsigned int numberOfParticles); -}; - -//! @brief An spiral particle system -class CC_DLL CCParticleSpiral : public CCParticleSystemQuad -{ -public: - /** - * @js ctor - */ - CCParticleSpiral(){} - /** - * @js NA - * @lua NA - */ - virtual ~CCParticleSpiral(){} - bool init(){ return initWithTotalParticles(500); } - virtual bool initWithTotalParticles(unsigned int numberOfParticles); - - static CCParticleSpiral* create(); - static CCParticleSpiral* createWithTotalParticles(unsigned int numberOfParticles); -}; - -//! @brief An explosion particle system -class CC_DLL CCParticleExplosion : public CCParticleSystemQuad -{ -public: - /** - * @js ctor - */ - CCParticleExplosion(){} - /** - * @js NA - * @lua NA - */ - virtual ~CCParticleExplosion(){} - bool init(){ return initWithTotalParticles(700); } - virtual bool initWithTotalParticles(unsigned int numberOfParticles); - - static CCParticleExplosion* create(); - static CCParticleExplosion* createWithTotalParticles(unsigned int numberOfParticles); -}; - -//! @brief An smoke particle system -class CC_DLL CCParticleSmoke : public CCParticleSystemQuad -{ -public: - /** - * @js ctor - */ - CCParticleSmoke(){} - /** - * @js NA - * @lua NA - */ - virtual ~CCParticleSmoke(){} - bool init(){ return initWithTotalParticles(200); } - virtual bool initWithTotalParticles(unsigned int numberOfParticles); - - static CCParticleSmoke* create(); - static CCParticleSmoke* createWithTotalParticles(unsigned int numberOfParticles); -}; - -//! @brief An snow particle system -class CC_DLL CCParticleSnow : public CCParticleSystemQuad -{ -public: - /** - * @js ctor - */ - CCParticleSnow(){} - /** - * @js NA - * @lua NA - */ - virtual ~CCParticleSnow(){} - bool init(){ return initWithTotalParticles(700); } - virtual bool initWithTotalParticles(unsigned int numberOfParticles); - - static CCParticleSnow* create(); - static CCParticleSnow* createWithTotalParticles(unsigned int numberOfParticles); -}; - -//! @brief A rain particle system -class CC_DLL CCParticleRain : public CCParticleSystemQuad -{ -public: - /** - * @js ctor - */ - CCParticleRain(){} - /** - * @js NA - * @lua NA - */ - virtual ~CCParticleRain(){} - bool init(){ return initWithTotalParticles(1000); } - virtual bool initWithTotalParticles(unsigned int numberOfParticles); - - static CCParticleRain* create(); - static CCParticleRain* createWithTotalParticles(unsigned int numberOfParticles); -}; - -// end of particle_nodes group -/// @} - -NS_CC_END - -#endif //__CCPARTICLE_EXAMPLE_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/particle_nodes/CCParticleSystem.h b/cappuccino-sdk/incl/cocos2dx/particle_nodes/CCParticleSystem.h deleted file mode 100644 index 4936666..0000000 --- a/cappuccino-sdk/incl/cocos2dx/particle_nodes/CCParticleSystem.h +++ /dev/null @@ -1,457 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCPARTICLE_SYSTEM_H__ -#define __CCPARTICLE_SYSTEM_H__ - -#include "CCProtocols.h" -#include "base_nodes/CCNode.h" -#include "cocoa/CCDictionary.h" -#include "cocoa/CCString.h" - -NS_CC_BEGIN - -/** - * @addtogroup particle_nodes - * @{ - */ - -class CCParticleBatchNode; - -//* @enum -enum { - /** The Particle emitter lives forever */ - kCCParticleDurationInfinity = -1, - - /** The starting size of the particle is equal to the ending size */ - kCCParticleStartSizeEqualToEndSize = -1, - - /** The starting radius of the particle is equal to the ending radius */ - kCCParticleStartRadiusEqualToEndRadius = -1, - - // backward compatible - kParticleStartSizeEqualToEndSize = kCCParticleStartSizeEqualToEndSize, - kParticleDurationInfinity = kCCParticleDurationInfinity, -}; - -//* @enum -enum { - /** Gravity mode (A mode) */ - kCCParticleModeGravity, - - /** Radius mode (B mode) */ - kCCParticleModeRadius, -}; - - -/** @typedef tCCPositionType -possible types of particle positions -*/ -typedef enum { - /** Living particles are attached to the world and are unaffected by emitter repositioning. */ - kCCPositionTypeFree, - - /** Living particles are attached to the world but will follow the emitter repositioning. - Use case: Attach an emitter to an sprite, and you want that the emitter follows the sprite. - */ - kCCPositionTypeRelative, - - /** Living particles are attached to the emitter and are translated along with it. */ - kCCPositionTypeGrouped, -}tCCPositionType; - -// backward compatible -enum { - kPositionTypeFree = kCCPositionTypeFree, - kPositionTypeGrouped = kCCPositionTypeGrouped, -}; - -/** -Structure that contains the values of each particle -*/ -typedef struct sCCParticle { - CCPoint pos; - CCPoint startPos; - - ccColor4F color; - ccColor4F deltaColor; - - float size; - float deltaSize; - - float rotation; - float deltaRotation; - - float timeToLive; - - unsigned int atlasIndex; - - //! Mode A: gravity, direction, radial accel, tangential accel - struct { - CCPoint dir; - float radialAccel; - float tangentialAccel; - } modeA; - - //! Mode B: radius mode - struct { - float angle; - float degreesPerSecond; - float radius; - float deltaRadius; - } modeB; - -}tCCParticle; - -//typedef void (*CC_UPDATE_PARTICLE_IMP)(id, SEL, tCCParticle*, CCPoint); - -class CCTexture2D; - -/** @brief Particle System base class. -Attributes of a Particle System: -- emission rate of the particles -- Gravity Mode (Mode A): -- gravity -- direction -- speed +- variance -- tangential acceleration +- variance -- radial acceleration +- variance -- Radius Mode (Mode B): -- startRadius +- variance -- endRadius +- variance -- rotate +- variance -- Properties common to all modes: -- life +- life variance -- start spin +- variance -- end spin +- variance -- start size +- variance -- end size +- variance -- start color +- variance -- end color +- variance -- life +- variance -- blending function -- texture - -cocos2d also supports particles generated by Particle Designer (http://particledesigner.71squared.com/). -'Radius Mode' in Particle Designer uses a fixed emit rate of 30 hz. Since that can't be guaranteed in cocos2d, -cocos2d uses a another approach, but the results are almost identical. - -cocos2d supports all the variables used by Particle Designer plus a bit more: -- spinning particles (supported when using CCParticleSystemQuad) -- tangential acceleration (Gravity mode) -- radial acceleration (Gravity mode) -- radius direction (Radius mode) (Particle Designer supports outwards to inwards direction only) - -It is possible to customize any of the above mentioned properties in runtime. Example: - -@code -emitter.radialAccel = 15; -emitter.startSpin = 0; -@endcode - -*/ -class CC_DLL CCParticleSystem : public CCNode, public CCTextureProtocol -{ -protected: - std::string m_sPlistFile; - //! time elapsed since the start of the system (in seconds) - float m_fElapsed; - - // Different modes - //! Mode A:Gravity + Tangential Accel + Radial Accel - struct { - /** Gravity value. Only available in 'Gravity' mode. */ - CCPoint gravity; - /** speed of each particle. Only available in 'Gravity' mode. */ - float speed; - /** speed variance of each particle. Only available in 'Gravity' mode. */ - float speedVar; - /** tangential acceleration of each particle. Only available in 'Gravity' mode. */ - float tangentialAccel; - /** tangential acceleration variance of each particle. Only available in 'Gravity' mode. */ - float tangentialAccelVar; - /** radial acceleration of each particle. Only available in 'Gravity' mode. */ - float radialAccel; - /** radial acceleration variance of each particle. Only available in 'Gravity' mode. */ - float radialAccelVar; - /** set the rotation of each particle to its direction Only available in 'Gravity' mode. */ - bool rotationIsDir; - } modeA; - - //! Mode B: circular movement (gravity, radial accel and tangential accel don't are not used in this mode) - struct { - /** The starting radius of the particles. Only available in 'Radius' mode. */ - float startRadius; - /** The starting radius variance of the particles. Only available in 'Radius' mode. */ - float startRadiusVar; - /** The ending radius of the particles. Only available in 'Radius' mode. */ - float endRadius; - /** The ending radius variance of the particles. Only available in 'Radius' mode. */ - float endRadiusVar; - /** Number of degrees to rotate a particle around the source pos per second. Only available in 'Radius' mode. */ - float rotatePerSecond; - /** Variance in degrees for rotatePerSecond. Only available in 'Radius' mode. */ - float rotatePerSecondVar; - } modeB; - - //! Array of particles - tCCParticle *m_pParticles; - - // color modulate - // BOOL colorModulate; - - //! How many particles can be emitted per second - float m_fEmitCounter; - - //! particle idx - unsigned int m_uParticleIdx; - - // Optimization - //CC_UPDATE_PARTICLE_IMP updateParticleImp; - //SEL updateParticleSel; - - /** weak reference to the CCSpriteBatchNode that renders the CCSprite */ - CC_PROPERTY(CCParticleBatchNode*, m_pBatchNode, BatchNode); - - // index of system in batch node array - //Robtop Modification: - ROB_CC_SYNTHESIZE(unsigned int, m_uAtlasIndex, AtlasIndex); - - //true if scaled or rotated - bool m_bTransformSystemDirty; - // Number of allocated particles - unsigned int m_uAllocatedParticles; - - /** Is the emitter active */ - bool m_bIsActive; - /** Quantity of particles that are being simulated at the moment */ - CC_PROPERTY_READONLY(unsigned int, m_uParticleCount, ParticleCount) - /** How many seconds the emitter will run. -1 means 'forever' */ - CC_PROPERTY(float, m_fDuration, Duration) - /** sourcePosition of the emitter */ - CC_PROPERTY_PASS_BY_REF(CCPoint, m_tSourcePosition, SourcePosition) - /** Position variance of the emitter */ - CC_PROPERTY_PASS_BY_REF(CCPoint, m_tPosVar, PosVar) - /** life, and life variation of each particle */ - CC_PROPERTY(float, m_fLife, Life) - /** life variance of each particle */ - CC_PROPERTY(float, m_fLifeVar, LifeVar) - /** angle and angle variation of each particle */ - CC_PROPERTY(float, m_fAngle, Angle) - /** angle variance of each particle */ - CC_PROPERTY(float, m_fAngleVar, AngleVar) - -////////////////////////////////////////////////////////////////////////// -public: - // mode A - virtual const CCPoint& getGravity(); - virtual void setGravity(const CCPoint& g); - virtual float getSpeed(); - virtual void setSpeed(float speed); - virtual float getSpeedVar(); - virtual void setSpeedVar(float speed); - virtual float getTangentialAccel(); - virtual void setTangentialAccel(float t); - virtual float getTangentialAccelVar(); - virtual void setTangentialAccelVar(float t); - virtual float getRadialAccel(); - virtual void setRadialAccel(float t); - virtual float getRadialAccelVar(); - virtual void setRadialAccelVar(float t); - virtual bool getRotationIsDir(); - virtual void setRotationIsDir(bool t); - // mode B - virtual float getStartRadius(); - virtual void setStartRadius(float startRadius); - virtual float getStartRadiusVar(); - virtual void setStartRadiusVar(float startRadiusVar); - virtual float getEndRadius(); - virtual void setEndRadius(float endRadius); - virtual float getEndRadiusVar(); - virtual void setEndRadiusVar(float endRadiusVar); - virtual float getRotatePerSecond(); - virtual void setRotatePerSecond(float degrees); - virtual float getRotatePerSecondVar(); - virtual void setRotatePerSecondVar(float degrees); - - virtual void setScale(float s); - virtual void setRotation(float newRotation); - virtual void setScaleX(float newScaleX); - virtual void setScaleY(float newScaleY); - - virtual bool isActive(); - virtual bool isBlendAdditive(); - virtual void setBlendAdditive(bool value); -////////////////////////////////////////////////////////////////////////// - - /** start size in pixels of each particle */ - CC_PROPERTY(float, m_fStartSize, StartSize) - /** size variance in pixels of each particle */ - CC_PROPERTY(float, m_fStartSizeVar, StartSizeVar) - /** end size in pixels of each particle */ - CC_PROPERTY(float, m_fEndSize, EndSize) - /** end size variance in pixels of each particle */ - CC_PROPERTY(float, m_fEndSizeVar, EndSizeVar) - /** start color of each particle */ - CC_PROPERTY_PASS_BY_REF(ccColor4F, m_tStartColor, StartColor) - /** start color variance of each particle */ - CC_PROPERTY_PASS_BY_REF(ccColor4F, m_tStartColorVar, StartColorVar) - /** end color and end color variation of each particle */ - CC_PROPERTY_PASS_BY_REF(ccColor4F, m_tEndColor, EndColor) - /** end color variance of each particle */ - CC_PROPERTY_PASS_BY_REF(ccColor4F, m_tEndColorVar, EndColorVar) - //* initial angle of each particle - CC_PROPERTY(float, m_fStartSpin, StartSpin) - //* initial angle of each particle - CC_PROPERTY(float, m_fStartSpinVar, StartSpinVar) - //* initial angle of each particle - CC_PROPERTY(float, m_fEndSpin, EndSpin) - //* initial angle of each particle - CC_PROPERTY(float, m_fEndSpinVar, EndSpinVar) - /** emission rate of the particles */ - CC_PROPERTY(float, m_fEmissionRate, EmissionRate) - /** maximum particles of the system */ - CC_PROPERTY(unsigned int, m_uTotalParticles, TotalParticles) - /** conforms to CocosNodeTexture protocol */ - CC_PROPERTY(CCTexture2D*, m_pTexture, Texture) - /** conforms to CocosNodeTexture protocol */ - CC_PROPERTY(ccBlendFunc, m_tBlendFunc, BlendFunc) - /** does the alpha value modify color */ - CC_PROPERTY(bool, m_bOpacityModifyRGB, OpacityModifyRGB) - - /** whether or not the particles are using blend additive. - If enabled, the following blending function will be used. - @code - source blend function = GL_SRC_ALPHA; - dest blend function = GL_ONE; - @endcode - */ - bool m_bIsBlendAdditive; - /** particles movement type: Free or Grouped - @since v0.8 - */ - CC_PROPERTY(tCCPositionType, m_ePositionType, PositionType) - /** whether or not the node will be auto-removed when it has no particles left. - By default it is false. - @since v0.8 - */ -protected: - bool m_bIsAutoRemoveOnFinish; -public: - virtual bool isAutoRemoveOnFinish(); - virtual void setAutoRemoveOnFinish(bool var); - - /** Switch between different kind of emitter modes: - - kCCParticleModeGravity: uses gravity, speed, radial and tangential acceleration - - kCCParticleModeRadius: uses radius movement + rotation - */ - CC_PROPERTY(int, m_nEmitterMode, EmitterMode) //0x210 -private: - //Robtop Modifications: - float m_fUnknown01; //0x214 - float m_fUnknown02; //0x218 - float m_fUnknown03; //0x21C - float m_fUnknown04; //0x220 - float m_fUnknown05; //0x224 - float m_fUnknown06; //0x228 - uint32_t m_uUnknown7; //0x22C -public: - /** - * @js ctor - */ - CCParticleSystem(); - /** - * @js NA - * @lua NA - */ - virtual ~CCParticleSystem(); - - /** creates an initializes a CCParticleSystem from a plist file. - This plist files can be created manually or with Particle Designer: - http://particledesigner.71squared.com/ - @since v2.0 - */ - static CCParticleSystem * create(const char *plistFile); - - //! create a system with a fixed number of particles - static CCParticleSystem* createWithTotalParticles(unsigned int numberOfParticles); - - /** initializes a CCParticleSystem*/ - bool init(); - /** initializes a CCParticleSystem from a plist file. - This plist files can be created manually or with Particle Designer: - http://particledesigner.71squared.com/ - @since v0.99.3 - */ - bool initWithFile(const char *plistFile); - - /** initializes a CCQuadParticleSystem from a CCDictionary. - @since v0.99.3 - */ - bool initWithDictionary(CCDictionary *dictionary); - - /** initializes a particle system from a NSDictionary and the path from where to load the png - @since v2.1 - */ - bool initWithDictionary(CCDictionary *dictionary, const char *dirname); - - //! Initializes a system with a fixed number of particles - virtual bool initWithTotalParticles(unsigned int numberOfParticles); - //! Add a particle to the emitter - bool addParticle(); - //! Initializes a particle - void initParticle(tCCParticle* particle); - //! stop emitting particles. Running particles will continue to run until they die - void stopSystem(); - //! Kill all living particles. - void resetSystem(); - //! whether or not the system is full - bool isFull(); - - //! should be overridden by subclasses - virtual void updateQuadWithParticle(tCCParticle* particle, const CCPoint& newPosition); - //! should be overridden by subclasses - virtual void postStep(); - - virtual void update(float dt); - virtual void updateWithNoTime(void); - -protected: - virtual void updateBlendFunc(); -public: - //Robtop modifications - void loadDefaults(void); - void loadScaledDefaults(float); - void resumeSystem(void); - void saveDefaults(void); - -}; - -// end of particle_nodes group -/// @} - -NS_CC_END - -#endif //__CCPARTICLE_SYSTEM_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/particle_nodes/CCParticleSystemQuad.h b/cappuccino-sdk/incl/cocos2dx/particle_nodes/CCParticleSystemQuad.h deleted file mode 100644 index 315d99e..0000000 --- a/cappuccino-sdk/incl/cocos2dx/particle_nodes/CCParticleSystemQuad.h +++ /dev/null @@ -1,151 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2009 Leonardo KasperaviÄius -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CC_PARTICLE_SYSTEM_QUAD_H__ -#define __CC_PARTICLE_SYSTEM_QUAD_H__ - -#include "CCParticleSystem.h" - -NS_CC_BEGIN - -class CCSpriteFrame; - -/** - * @addtogroup particle_nodes - * @{ - */ - -/** @brief CCParticleSystemQuad is a subclass of CCParticleSystem - -It includes all the features of ParticleSystem. - -Special features and Limitations: -- Particle size can be any float number. -- The system can be scaled -- The particles can be rotated -- It supports subrects -- It supports batched rendering since 1.1 -@since v0.8 -*/ -class CC_DLL CCParticleSystemQuad : public CCParticleSystem -{ -protected: - ccV3F_C4B_T2F_Quad *m_pQuads; // quads to be rendered - GLushort *m_pIndices; // indices - -#if CC_TEXTURE_ATLAS_USE_VAO - GLuint m_uVAOname; -#endif - - GLuint m_pBuffersVBO[2]; //0: vertex 1: indices - -public: - /** - * @js ctor - */ - CCParticleSystemQuad(); - /** - * @js NA - * @lua NA - */ - virtual ~CCParticleSystemQuad(); - - /** creates an initializes a CCParticleSystemQuad from a plist file. - This plist files can be created manually or with Particle Designer: - */ - static CCParticleSystemQuad * create(const char *plistFile); - - /** initializes the indices for the vertices*/ - void initIndices(); - - /** initializes the texture with a rectangle measured Points */ - void initTexCoordsWithRect(const CCRect& rect); - - /** Sets a new CCSpriteFrame as particle. - WARNING: this method is experimental. Use setTexture:withRect instead. - @since v0.99.4 - */ - void setDisplayFrame(CCSpriteFrame *spriteFrame); - - /** Sets a new texture with a rect. The rect is in Points. - @since v0.99.4 - */ - void setTextureWithRect(CCTexture2D *texture, const CCRect& rect); - /** super methods - * @js NA - * @lua NA - */ - virtual bool initWithTotalParticles(unsigned int numberOfParticles); - /** - * @js NA - */ - virtual void setTexture(CCTexture2D* texture); - /** - * @js NA - */ - virtual void updateQuadWithParticle(tCCParticle* particle, const CCPoint& newPosition); - /** - * @js NA - */ - virtual void postStep(); - /** - * @js NA - * @lua NA - */ - virtual void draw(); - /** - * @js NA - */ - virtual void setBatchNode(CCParticleBatchNode* batchNode); - /** - * @js NA - */ - virtual void setTotalParticles(unsigned int tp); - - /** listen the event that coming to foreground on Android - * @js NA - * @lua NA - */ - void listenBackToForeground(CCObject *obj); - - static CCParticleSystemQuad * create(); - static CCParticleSystemQuad * createWithTotalParticles(unsigned int numberOfParticles); -private: -#if CC_TEXTURE_ATLAS_USE_VAO - void setupVBOandVAO(); -#else - void setupVBO(); -#endif - bool allocMemory(); -}; - -// end of particle_nodes group -/// @} - -NS_CC_END - -#endif //__CC_PARTICLE_SYSTEM_QUAD_H__ - diff --git a/cappuccino-sdk/incl/cocos2dx/particle_nodes/firePngData.h b/cappuccino-sdk/incl/cocos2dx/particle_nodes/firePngData.h deleted file mode 100644 index 8c5f220..0000000 --- a/cappuccino-sdk/incl/cocos2dx/particle_nodes/firePngData.h +++ /dev/null @@ -1,48 +0,0 @@ -const unsigned char __firePngData[] = { -0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52, -0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x08, 0x06, 0x00, 0x00, 0x00, 0x73, 0x7A, 0x7A, -0xF4, 0x00, 0x00, 0x00, 0x04, 0x67, 0x41, 0x4D, 0x41, 0x00, 0x00, 0xAF, 0xC8, 0x37, 0x05, 0x8A, -0xE9, 0x00, 0x00, 0x00, 0x19, 0x74, 0x45, 0x58, 0x74, 0x53, 0x6F, 0x66, 0x74, 0x77, 0x61, 0x72, -0x65, 0x00, 0x41, 0x64, 0x6F, 0x62, 0x65, 0x20, 0x49, 0x6D, 0x61, 0x67, 0x65, 0x52, 0x65, 0x61, -0x64, 0x79, 0x71, 0xC9, 0x65, 0x3C, 0x00, 0x00, 0x02, 0x64, 0x49, 0x44, 0x41, 0x54, 0x78, 0xDA, -0xC4, 0x97, 0x89, 0x6E, 0xEB, 0x20, 0x10, 0x45, 0xBD, 0xE1, 0x2D, 0x4B, 0xFF, 0xFF, 0x37, 0x5F, -0x5F, 0x0C, 0xD8, 0xC4, 0xAE, 0x2D, 0xDD, 0xA9, 0x6E, 0xA7, 0x38, 0xC1, 0x91, 0xAA, 0x44, 0xBA, -0xCA, 0x06, 0xCC, 0x99, 0x85, 0x01, 0xE7, 0xCB, 0xB2, 0x64, 0xEF, 0x7C, 0x55, 0x2F, 0xCC, 0x69, -0x56, 0x15, 0xAB, 0x72, 0x68, 0x81, 0xE6, 0x55, 0xFE, 0xE8, 0x62, 0x79, 0x62, 0x04, 0x36, 0xA3, -0x06, 0xC0, 0x9B, 0xCA, 0x08, 0xC0, 0x7D, 0x55, 0x80, 0xA6, 0x54, 0x98, 0x67, 0x11, 0xA8, 0xA1, -0x86, 0x3E, 0x0B, 0x44, 0x41, 0x00, 0x33, 0x19, 0x1F, 0x21, 0x43, 0x9F, 0x5F, 0x02, 0x68, 0x49, -0x1D, 0x20, 0x1A, 0x82, 0x28, 0x09, 0xE0, 0x4E, 0xC6, 0x3D, 0x64, 0x57, 0x39, 0x80, 0xBA, 0xA3, -0x00, 0x1D, 0xD4, 0x93, 0x3A, 0xC0, 0x34, 0x0F, 0x00, 0x3C, 0x8C, 0x59, 0x4A, 0x99, 0x44, 0xCA, -0xA6, 0x02, 0x88, 0xC7, 0xA7, 0x55, 0x67, 0xE8, 0x44, 0x10, 0x12, 0x05, 0x0D, 0x30, 0x92, 0xE7, -0x52, 0x33, 0x32, 0x26, 0xC3, 0x38, 0xF7, 0x0C, 0xA0, 0x06, 0x40, 0x0F, 0xC3, 0xD7, 0x55, 0x17, -0x05, 0xD1, 0x92, 0x77, 0x02, 0x20, 0x85, 0xB7, 0x19, 0x18, 0x28, 0x4D, 0x05, 0x19, 0x9F, 0xA1, -0xF1, 0x08, 0xC0, 0x05, 0x10, 0x57, 0x7C, 0x4F, 0x01, 0x10, 0xEF, 0xC5, 0xF8, 0xAC, 0x76, 0xC8, -0x2E, 0x80, 0x14, 0x99, 0xE4, 0xFE, 0x44, 0x51, 0xB8, 0x52, 0x14, 0x3A, 0x32, 0x22, 0x00, 0x13, -0x85, 0xBF, 0x52, 0xC6, 0x05, 0x8E, 0xE5, 0x63, 0x00, 0x86, 0xB6, 0x9C, 0x86, 0x38, 0xAB, 0x54, -0x74, 0x18, 0x5B, 0x50, 0x58, 0x6D, 0xC4, 0xF3, 0x89, 0x6A, 0xC3, 0x61, 0x8E, 0xD9, 0x03, 0xA8, -0x08, 0xA0, 0x55, 0xBB, 0x40, 0x40, 0x3E, 0x00, 0xD2, 0x53, 0x47, 0x94, 0x0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0x45, 0x4E, 0x44, 0xAE, 0x42, -0x60, 0x82 -}; diff --git a/cappuccino-sdk/incl/cocos2dx/platform/CCAccelerometerDelegate.h b/cappuccino-sdk/incl/cocos2dx/platform/CCAccelerometerDelegate.h deleted file mode 100644 index cd99695..0000000 --- a/cappuccino-sdk/incl/cocos2dx/platform/CCAccelerometerDelegate.h +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCACCELEROMETER_DELEGATE_H__ -#define __CCACCELEROMETER_DELEGATE_H__ - -#include "CCCommon.h" - -NS_CC_BEGIN -/** -@brief The device accelerometer reports values for each axis in units of g-force -*/ -class CCAcceleration -{ -public: - double x; - double y; - double z; - - double timestamp; -}; - -/** -@brief -The CCAccelerometerDelegate defines a single method for -receiving acceleration-related data from the system. -@js NA -@lua NA -*/ -class CC_DLL CCAccelerometerDelegate -{ -public: - virtual void didAccelerate(CCAcceleration* pAccelerationValue) {CC_UNUSED_PARAM(pAccelerationValue);} -}; - -NS_CC_END - -#endif diff --git a/cappuccino-sdk/incl/cocos2dx/platform/CCApplicationProtocol.h b/cappuccino-sdk/incl/cocos2dx/platform/CCApplicationProtocol.h deleted file mode 100644 index 2dcd554..0000000 --- a/cappuccino-sdk/incl/cocos2dx/platform/CCApplicationProtocol.h +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2013 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CC_APPLICATION_PROTOCOL_H__ -#define __CC_APPLICATION_PROTOCOL_H__ - -NS_CC_BEGIN - -enum TargetPlatform -{ - kTargetWindows, - kTargetLinux, - kTargetMacOS, - kTargetAndroid, - kTargetIphone, - kTargetIpad, - kTargetBlackBerry, - kTargetNaCl, - kTargetEmscripten, - kTargetTizen, - kTargetWinRT, - kTargetWP8 -}; - -/** - * @addtogroup platform - * @{ - * @js NA - * @lua NA - */ - -class CC_DLL CCApplicationProtocol -{ -public: - - virtual ~CCApplicationProtocol() {} - - /** - @brief Implement CCDirector and CCScene init code here. - @return true Initialize success, app continue. - @return false Initialize failed, app terminate. - */ - virtual bool applicationDidFinishLaunching() = 0; - - /** - @brief The function be called when the application enter background - @param the pointer of the application - */ - virtual void applicationDidEnterBackground() = 0; - - /** - @brief The function be called when the application enter foreground - @param the pointer of the application - */ - virtual void applicationWillEnterForeground() = 0; - - /** - @brief Callback by CCDirector for limit FPS. - @interval The time, expressed in seconds, between current frame and next. - */ - virtual void setAnimationInterval(double interval) = 0; - - /** - @brief Get current language config - @return Current language config - */ - virtual ccLanguageType getCurrentLanguage() = 0; - - /** - @brief Get target platform - */ - virtual TargetPlatform getTargetPlatform() = 0; -}; - -// end of platform group -/// @} - -NS_CC_END - -#endif // __CC_APPLICATION_PROTOCOL_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/platform/CCCommon.h b/cappuccino-sdk/incl/cocos2dx/platform/CCCommon.h deleted file mode 100644 index d2e9286..0000000 --- a/cappuccino-sdk/incl/cocos2dx/platform/CCCommon.h +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_COMMON_H__ -#define __CC_COMMON_H__ - -#include "CCPlatformMacros.h" - -NS_CC_BEGIN - -/** - * @addtogroup platform - * @{ - */ - -/// The max length of CCLog message. -static const int kMaxLogLen = 16*1024; - -/** -@brief Output Debug message. -*/ -void CC_DLL CCLog(const char * pszFormat, ...) CC_FORMAT_PRINTF(1, 2); - -/** - * lua can not deal with ... - */ -void CC_DLL CCLuaLog(const char * pszFormat); - -/** -@brief Pop out a message box -*/ -void CC_DLL CCMessageBox(const char * pszMsg, const char * pszTitle); - -/** -@brief Enum the language type supported now -*/ -typedef enum LanguageType -{ - kLanguageEnglish = 0, - kLanguageChinese, - kLanguageFrench, - kLanguageItalian, - kLanguageGerman, - kLanguageSpanish, - kLanguageDutch, - kLanguageRussian, - kLanguageKorean, - kLanguageJapanese, - kLanguageHungarian, - kLanguagePortuguese, - kLanguageArabic -} ccLanguageType; - -// end of platform group -/// @} - -NS_CC_END - -#endif // __CC_COMMON_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/platform/CCDevice.h b/cappuccino-sdk/incl/cocos2dx/platform/CCDevice.h deleted file mode 100644 index 8f5599e..0000000 --- a/cappuccino-sdk/incl/cocos2dx/platform/CCDevice.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef __CCDEVICE_H__ -#define __CCDEVICE_H__ - -#include "CCPlatformMacros.h" - -NS_CC_BEGIN -/** - @js NA - @lua NA - */ -class CC_DLL CCDevice -{ -private: - CCDevice(); -public: - /** - * Gets the DPI of device - * @return The DPI of device. - */ - static int getDPI(); -}; - - -NS_CC_END - -#endif /* __CCDEVICE_H__ */ diff --git a/cappuccino-sdk/incl/cocos2dx/platform/CCEGLViewProtocol.h b/cappuccino-sdk/incl/cocos2dx/platform/CCEGLViewProtocol.h deleted file mode 100644 index a77a4e8..0000000 --- a/cappuccino-sdk/incl/cocos2dx/platform/CCEGLViewProtocol.h +++ /dev/null @@ -1,202 +0,0 @@ -#ifndef __CCEGLVIEWPROTOCOL_H__ -#define __CCEGLVIEWPROTOCOL_H__ - -#include "ccTypes.h" - -enum ResolutionPolicy -{ - // The entire application is visible in the specified area without trying to preserve the original aspect ratio. - // Distortion can occur, and the application may appear stretched or compressed. - kResolutionExactFit, - // The entire application fills the specified area, without distortion but possibly with some cropping, - // while maintaining the original aspect ratio of the application. - kResolutionNoBorder, - // The entire application is visible in the specified area without distortion while maintaining the original - // aspect ratio of the application. Borders can appear on two sides of the application. - kResolutionShowAll, - // The application takes the height of the design resolution size and modifies the width of the internal - // canvas so that it fits the aspect ratio of the device - // no distortion will occur however you must make sure your application works on different - // aspect ratios - kResolutionFixedHeight, - // The application takes the width of the design resolution size and modifies the height of the internal - // canvas so that it fits the aspect ratio of the device - // no distortion will occur however you must make sure your application works on different - // aspect ratios - kResolutionFixedWidth, - - kResolutionUnKnown, -}; - -NS_CC_BEGIN - -#define CC_MAX_TOUCHES 5 - -class EGLTouchDelegate; -class CCSet; - -/** - * @addtogroup platform - * @{ - * @js NA - */ - -class CC_DLL CCEGLViewProtocol -{ -public: - /** - * @lua NA - */ - CCEGLViewProtocol(); - /** - * @lua NA - */ - virtual ~CCEGLViewProtocol(); - - /** Force destroying EGL view, subclass must implement this method. - * @lua NA - */ - virtual void end() = 0; - - /** Get whether opengl render system is ready, subclass must implement this method. - * @lua NA - */ - virtual bool isOpenGLReady() = 0; - - /** Exchanges the front and back buffers, subclass must implement this method. - * @lua NA - */ - virtual void swapBuffers() = 0; - - /** Open or close IME keyboard , subclass must implement this method. - * @lua NA - */ - virtual void setIMEKeyboardState(bool bOpen) = 0; - - /** - * Get the frame size of EGL view. - * In general, it returns the screen size since the EGL view is a fullscreen view. - */ - virtual const CCSize& getFrameSize() const; - - /** - * Set the frame size of EGL view. - */ - virtual void setFrameSize(float width, float height); - - /** - * Get the visible area size of opengl viewport. - */ - virtual CCSize getVisibleSize() const; - - /** - * Get the visible origin point of opengl viewport. - */ - virtual CCPoint getVisibleOrigin() const; - - /** - * Set the design resolution size. - * @param width Design resolution width. - * @param height Design resolution height. - * @param resolutionPolicy The resolution policy desired, you may choose: - * [1] kResolutionExactFit Fill screen by stretch-to-fit: if the design resolution ratio of width to height is different from the screen resolution ratio, your game view will be stretched. - * [2] kResolutionNoBorder Full screen without black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two areas of your game view will be cut. - * [3] kResolutionShowAll Full screen with black border: if the design resolution ratio of width to height is different from the screen resolution ratio, two black borders will be shown. - */ - virtual void setDesignResolutionSize(float width, float height, ResolutionPolicy resolutionPolicy); - - /** Get design resolution size. - * Default resolution size is the same as 'getFrameSize'. - */ - virtual const CCSize& getDesignResolutionSize() const; - - /** Set touch delegate */ - virtual void setTouchDelegate(EGLTouchDelegate * pDelegate); - - /** - * Set opengl view port rectangle with points. - */ - virtual void setViewPortInPoints(float x , float y , float w , float h); - - /** - * Set Scissor rectangle with points. - */ - virtual void setScissorInPoints(float x , float y , float w , float h); - - /** - * Get whether GL_SCISSOR_TEST is enable - * @lua NA - */ - virtual bool isScissorEnabled(); - - /** - * Get the current scissor rectangle - * @lua NA - */ - virtual CCRect getScissorRect(); - /** - * @lua NA - */ - virtual void setViewName(const char* pszViewName); - /** - * @lua NA - */ - const char* getViewName(); - - /** Touch events are handled by default; if you want to customize your handlers, please override these functions: - * @lua NA - */ - virtual void handleTouchesBegin(int num, int ids[], float xs[], float ys[]); - /** - * @lua NA - */ - virtual void handleTouchesMove(int num, int ids[], float xs[], float ys[]); - /** - * @lua NA - */ - virtual void handleTouchesEnd(int num, int ids[], float xs[], float ys[]); - /** - * @lua NA - */ - virtual void handleTouchesCancel(int num, int ids[], float xs[], float ys[]); - - /** - * Get the opengl view port rectangle. - */ - const CCRect& getViewPortRect() const; - - /** - * Get scale factor of the horizontal direction. - */ - float getScaleX() const; - - /** - * Get scale factor of the vertical direction. - */ - float getScaleY() const; -private: - void getSetOfTouchesEndOrCancel(CCSet& set, int num, int ids[], float xs[], float ys[]); - -protected: - EGLTouchDelegate* m_pDelegate; - - // real screen size - CCSize m_obScreenSize; - // resolution size, it is the size appropriate for the app resources. - CCSize m_obDesignResolutionSize; - // the view port size - CCRect m_obViewPortRect; - // the view name - char m_szViewName[50]; - - float m_fScaleX; - float m_fScaleY; - ResolutionPolicy m_eResolutionPolicy; -}; - -// end of platform group -/// @} - -NS_CC_END - -#endif /* __CCEGLVIEWPROTOCOL_H__ */ diff --git a/cappuccino-sdk/incl/cocos2dx/platform/CCFileUtils.h b/cappuccino-sdk/incl/cocos2dx/platform/CCFileUtils.h deleted file mode 100644 index 779d74a..0000000 --- a/cappuccino-sdk/incl/cocos2dx/platform/CCFileUtils.h +++ /dev/null @@ -1,445 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CC_FILEUTILS_H__ -#define __CC_FILEUTILS_H__ - -#include -#include -#include -#include "CCPlatformMacros.h" -#include "ccTypes.h" -#include "ccTypeInfo.h" - -NS_CC_BEGIN - -class CCDictionary; -class CCArray; -/** - * @addtogroup platform - * @{ - */ - -//! @brief Helper class to handle file operations -class CC_DLL CCFileUtils : public TypeInfo -{ - friend class CCArray; - friend class CCDictionary; -public: - /** - * Returns an unique ID for this class. - * @note It's only used for JSBindings now. - * @return The unique ID for this class. - * @js NA - * @lua NA - */ - virtual long getClassTypeInfo() { - static const long id = cocos2d::getHashCodeByString(typeid(cocos2d::CCFileUtils).name()); - return id; - } - - /** - * Gets the instance of CCFileUtils. - * @js getInstance - */ - static CCFileUtils* sharedFileUtils(); - - /** - * Destroys the instance of CCFileUtils. - */ - static void purgeFileUtils(); - - /** - * The destructor of CCFileUtils. - * @js NA - * @lua NA - */ - virtual ~CCFileUtils(); - - /** - * Purges the file searching cache. - * - * @note It should be invoked after the resources were updated. - * For instance, in the CocosPlayer sample, every time you run application from CocosBuilder, - * All the resources will be downloaded to the writable folder, before new js app launchs, - * this method should be invoked to clean the file search cache. - */ - virtual void purgeCachedEntries(); - - /** - * Gets resource file data - * - * @param[in] pszFileName The resource file name which contains the path. - * @param[in] pszMode The read mode of the file. - * @param[out] pSize If the file read operation succeeds, it will be the data size, otherwise 0. - * @return Upon success, a pointer to the data is returned, otherwise NULL. - * @warning Recall: you are responsible for calling delete[] on any Non-NULL pointer returned. - * @js NA - */ - virtual unsigned char* getFileData(const char* pszFileName, const char* pszMode, unsigned long * pSize); - - /** - * Gets resource file data from a zip file. - * - * @param[in] pszFileName The resource file name which contains the relative path of the zip file. - * @param[out] pSize If the file read operation succeeds, it will be the data size, otherwise 0. - * @return Upon success, a pointer to the data is returned, otherwise NULL. - * @warning Recall: you are responsible for calling delete[] on any Non-NULL pointer returned. - * @js NA - */ - virtual unsigned char* getFileDataFromZip(const char* pszZipFilePath, const char* pszFileName, unsigned long * pSize); - - - /** Returns the fullpath for a given filename. - - First it will try to get a new filename from the "filenameLookup" dictionary. - If a new filename can't be found on the dictionary, it will use the original filename. - Then it will try to obtain the full path of the filename using the CCFileUtils search rules: resolutions, and search paths. - The file search is based on the array element order of search paths and resolution directories. - - For instance: - - We set two elements("/mnt/sdcard/", "internal_dir/") to search paths vector by setSearchPaths, - and set three elements("resources-ipadhd/", "resources-ipad/", "resources-iphonehd") - to resolutions vector by setSearchResolutionsOrder. The "internal_dir" is relative to "Resources/". - - If we have a file named 'sprite.png', the mapping in fileLookup dictionary contains `key: sprite.png -> value: sprite.pvr.gz`. - Firstly, it will replace 'sprite.png' with 'sprite.pvr.gz', then searching the file sprite.pvr.gz as follows: - - /mnt/sdcard/resources-ipadhd/sprite.pvr.gz (if not found, search next) - /mnt/sdcard/resources-ipad/sprite.pvr.gz (if not found, search next) - /mnt/sdcard/resources-iphonehd/sprite.pvr.gz (if not found, search next) - /mnt/sdcard/sprite.pvr.gz (if not found, search next) - internal_dir/resources-ipadhd/sprite.pvr.gz (if not found, search next) - internal_dir/resources-ipad/sprite.pvr.gz (if not found, search next) - internal_dir/resources-iphonehd/sprite.pvr.gz (if not found, search next) - internal_dir/sprite.pvr.gz (if not found, return "sprite.png") - - If the filename contains relative path like "gamescene/uilayer/sprite.png", - and the mapping in fileLookup dictionary contains `key: gamescene/uilayer/sprite.png -> value: gamescene/uilayer/sprite.pvr.gz`. - The file search order will be: - - /mnt/sdcard/gamescene/uilayer/resources-ipadhd/sprite.pvr.gz (if not found, search next) - /mnt/sdcard/gamescene/uilayer/resources-ipad/sprite.pvr.gz (if not found, search next) - /mnt/sdcard/gamescene/uilayer/resources-iphonehd/sprite.pvr.gz (if not found, search next) - /mnt/sdcard/gamescene/uilayer/sprite.pvr.gz (if not found, search next) - internal_dir/gamescene/uilayer/resources-ipadhd/sprite.pvr.gz (if not found, search next) - internal_dir/gamescene/uilayer/resources-ipad/sprite.pvr.gz (if not found, search next) - internal_dir/gamescene/uilayer/resources-iphonehd/sprite.pvr.gz (if not found, search next) - internal_dir/gamescene/uilayer/sprite.pvr.gz (if not found, return "gamescene/uilayer/sprite.png") - - If the new file can't be found on the file system, it will return the parameter pszFileName directly. - - This method was added to simplify multiplatform support. Whether you are using cocos2d-js or any cross-compilation toolchain like StellaSDK or Apportable, - you might need to load different resources for a given file in the different platforms. - - @since v2.1 - */ - virtual std::string fullPathForFilename(const char* pszFileName, bool); - - /** - * Loads the filenameLookup dictionary from the contents of a filename. - * - * @note The plist file name should follow the format below: - * - * @code - * - * - * - * - * filenames - * - * sounds/click.wav - * sounds/click.caf - * sounds/endgame.wav - * sounds/endgame.caf - * sounds/gem-0.wav - * sounds/gem-0.caf - * - * metadata - * - * version - * 1 - * - * - * - * @endcode - * @param filename The plist file name. - * - * @since v2.1 - * @loadFilenameLookup - */ - virtual void loadFilenameLookupDictionaryFromFile(const char* filename); - - /** - * Sets the filenameLookup dictionary. - * - * @param pFilenameLookupDict The dictionary for replacing filename. - * @since v2.1 - * @lua NA - */ - virtual void setFilenameLookupDictionary(CCDictionary* pFilenameLookupDict); - - /** - * Gets full path from a file name and the path of the reletive file. - * @param pszFilename The file name. - * @param pszRelativeFile The path of the relative file. - * @return The full path. - * e.g. pszFilename: hello.png, pszRelativeFile: /User/path1/path2/hello.plist - * Return: /User/path1/path2/hello.pvr (If there a a key(hello.png)-value(hello.pvr) in FilenameLookup dictionary. ) - * - */ - virtual const char* fullPathFromRelativeFile(const char *pszFilename, const char *pszRelativeFile); - - /** - * Sets the array that contains the search order of the resources. - * - * @param searchResolutionsOrder The source array that contains the search order of the resources. - * @see getSearchResolutionsOrder(void), fullPathForFilename(const char*). - * @since v2.1 - * @js NA - * @lua NA - */ - virtual void setSearchResolutionsOrder(const std::vector& searchResolutionsOrder); - - /** - * Append search order of the resources. - * - * @see setSearchResolutionsOrder(), fullPathForFilename(). - * @since v2.1 - */ - virtual void addSearchResolutionsOrder(const char* order); - - /** - * Gets the array that contains the search order of the resources. - * - * @see setSearchResolutionsOrder(const std::vector&), fullPathForFilename(const char*). - * @since v2.1 - * @js NA - * @lua NA - */ - virtual const std::vector& getSearchResolutionsOrder(); - - /** - * Sets the array of search paths. - * - * You can use this array to modify the search path of the resources. - * If you want to use "themes" or search resources in the "cache", you can do it easily by adding new entries in this array. - * - * @note This method could access relative path and absolute path. - * If the relative path was passed to the vector, CCFileUtils will add the default resource directory before the relative path. - * For instance: - * On Android, the default resource root path is "assets/". - * If "/mnt/sdcard/" and "resources-large" were set to the search paths vector, - * "resources-large" will be converted to "assets/resources-large" since it was a relative path. - * - * @param searchPaths The array contains search paths. - * @see fullPathForFilename(const char*) - * @since v2.1 - * @js NA - * @lua NA - */ - virtual void setSearchPaths(const std::vector& searchPaths); - - /** - * Adds a path to search paths. - * - * @since v2.2 - */ - virtual void addSearchPath(const char* path); - - /** - * Removes a path from search paths. - * - * @since v2.2 - * @lua NA - */ - virtual void removeSearchPath(const char *path); - - /** - * Removes all paths. - * - * @since v2.2 - * @lua NA - */ - void removeAllPaths(); - - /** - * Gets the array of search paths. - * - * @return The array of search paths. - * @see fullPathForFilename(const char*). - * @js NA - * @lua NA - */ - virtual const std::vector& getSearchPaths(); - - /** - * Gets the writable path. - * @return The path that can be write/read a file in - * @lua NA - */ - virtual std::string getWritablePath() = 0; - - /** - * Checks whether a file exists. - * - * @note If a relative path was passed in, it will be inserted a default root path at the beginning. - * @param strFilePath The path of the file, it could be a relative or absolute path. - * @return true if the file exists, otherwise it will return false. - * @lua NA - */ - virtual bool isFileExist(const std::string& strFilePath) = 0; - - /** - * Checks whether the path is an absolute path. - * - * @note On Android, if the parameter passed in is relative to "assets/", this method will treat it as an absolute path. - * Also on Blackberry, path starts with "app/native/Resources/" is treated as an absolute path. - * - * @param strPath The path that needs to be checked. - * @return true if it's an absolute path, otherwise it will return false. - * @lua NA - */ - virtual bool isAbsolutePath(const std::string& strPath); - - - /** - * Sets/Gets whether to pop-up a message box when failed to load an image. - */ - virtual void setPopupNotify(bool bNotify); - virtual bool isPopupNotify(); - -protected: - /** - * The default constructor. - */ - CCFileUtils(); - - /** - * Initializes the instance of CCFileUtils. It will set m_searchPathArray and m_searchResolutionsOrderArray to default values. - * - * @note When you are porting Cocos2d-x to a new platform, you may need to take care of this method. - * You could assign a default value to m_strDefaultResRootPath in the subclass of CCFileUtils(e.g. CCFileUtilsAndroid). Then invoke the CCFileUtils::init(). - * @return true if successed, otherwise it returns false. - * - */ - virtual bool init(); - - /** - * Gets the new filename from the filename lookup dictionary. - * @param pszFileName The original filename. - * @return The new filename after searching in the filename lookup dictionary. - * If the original filename wasn't in the dictionary, it will return the original filename. - */ - virtual std::string getNewFilename(const char* pszFileName); - - /** - * Gets full path for filename, resolution directory and search path. - * - * @param filename The file name. - * @param resolutionDirectory The resolution directory. - * @param searchPath The search path. - * @return The full path of the file. It will return an empty string if the full path of the file doesn't exist. - */ - virtual std::string getPathForFilename(const std::string& filename, const std::string& resolutionDirectory, const std::string& searchPath); - - /** - * Gets full path for the directory and the filename. - * - * @note Only iOS and Mac need to override this method since they are using - * `[[NSBundle mainBundle] pathForResource: ofType: inDirectory:]` to make a full path. - * Other platforms will use the default implementation of this method. - * @param strDirectory The directory contains the file we are looking for. - * @param strFilename The name of the file. - * @return The full path of the file, if the file can't be found, it will return an empty string. - */ - virtual std::string getFullPathForDirectoryAndFilename(const std::string& strDirectory, const std::string& strFilename); - - /** - * Creates a dictionary by the contents of a file. - * @note This method is used internally. - */ - virtual CCDictionary* createCCDictionaryWithContentsOfFile(const std::string& filename); - - /** - * Write a dictionary to a plist file. - * @note This method is used internally. - */ - virtual bool writeToFile(CCDictionary *dict, const std::string& fullPath); - - /** - * Creates an array by the contents of a file. - * @note This method is used internally. - */ - virtual CCArray* createCCArrayWithContentsOfFile(const std::string& filename); - - /** Dictionary used to lookup filenames based on a key. - * It is used internally by the following methods: - * - * std::string fullPathForFilename(const char*); - * - * @since v2.1 - */ - CCDictionary* m_pFilenameLookupDict; - - /** - * The vector contains resolution folders. - * The lower index of the element in this vector, the higher priority for this resolution directory. - */ - std::vector m_searchResolutionsOrderArray; - - /** - * The vector contains search paths. - * The lower index of the element in this vector, the higher priority for this search path. - */ - std::vector m_searchPathArray; - - /** - * The default root path of resources. - * If the default root path of resources needs to be changed, do it in the `init` method of CCFileUtils's subclass. - * For instance: - * On Android, the default root path of resources will be assigned with "assets/" in CCFileUtilsAndroid::init(). - * Similarly on Blackberry, we assign "app/native/Resources/" to this variable in CCFileUtilsBlackberry::init(). - */ - std::string m_strDefaultResRootPath; - - /** - * The full path cache. When a file is found, it will be added into this cache. - * This variable is used for improving the performance of file search. - */ - std::map m_fullPathCache; - - /** - * The singleton pointer of CCFileUtils. - */ - static CCFileUtils* s_sharedFileUtils; - -}; - -// end of platform group -/// @} - -NS_CC_END - -#endif // __CC_FILEUTILS_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/platform/CCImage.h b/cappuccino-sdk/incl/cocos2dx/platform/CCImage.h deleted file mode 100644 index 75f686b..0000000 --- a/cappuccino-sdk/incl/cocos2dx/platform/CCImage.h +++ /dev/null @@ -1,211 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_IMAGE_H__ -#define __CC_IMAGE_H__ - -#include "cocoa/CCObject.h" - -NS_CC_BEGIN - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) -class CCFreeTypeFont; -#endif - -/** - * @addtogroup platform - * @{ - */ - -class CC_DLL CCImage : public CCObject -{ -public: - /** - @js ctor - */ - CCImage(); - /** - * @js NA - * @lua NA - */ - ~CCImage(); - - typedef enum - { - kFmtJpg = 0, - kFmtPng, - kFmtTiff, - kFmtWebp, - kFmtRawData, - kFmtUnKnown - }EImageFormat; - - typedef enum - { - kAlignCenter = 0x33, ///< Horizontal center and vertical center. - kAlignTop = 0x13, ///< Horizontal center and vertical top. - kAlignTopRight = 0x12, ///< Horizontal right and vertical top. - kAlignRight = 0x32, ///< Horizontal right and vertical center. - kAlignBottomRight = 0x22, ///< Horizontal right and vertical bottom. - kAlignBottom = 0x23, ///< Horizontal center and vertical bottom. - kAlignBottomLeft = 0x21, ///< Horizontal left and vertical bottom. - kAlignLeft = 0x31, ///< Horizontal left and vertical center. - kAlignTopLeft = 0x11, ///< Horizontal left and vertical top. - }ETextAlign; - - /** - @brief Load the image from the specified path. - @param strPath the absolute file path. - @param imageType the type of image, currently only supporting two types. - @return true if loaded correctly. - */ - bool initWithImageFile(const char * strPath, EImageFormat imageType = kFmtPng); - - /* - @brief The same result as with initWithImageFile, but thread safe. It is caused by - loadImage() in CCTextureCache.cpp. - @param fullpath full path of the file. - @param imageType the type of image, currently only supporting two types. - @return true if loaded correctly. - */ - bool initWithImageFileThreadSafe(const char *fullpath, EImageFormat imageType = kFmtPng); - - /** - @brief Load image from stream buffer. - - @warning kFmtRawData only supports RGBA8888. - @param pBuffer stream buffer which holds the image data. - @param nLength data length expressed in (number of) bytes. - @param nWidth, nHeight, nBitsPerComponent are used for kFmtRawData. - @return true if loaded correctly. - @js NA - */ - bool initWithImageData(void * pData, - int nDataLen, - EImageFormat eFmt = kFmtUnKnown, - int nWidth = 0, - int nHeight = 0, - int nBitsPerComponent = 8); - - /** - @brief Create image with specified string. - @param pText the text the image will show (cannot be nil). - @param nWidth the image width, if 0, the width will match the text's width. - @param nHeight the image height, if 0, the height will match the text's height. - @param eAlignMask the test Alignment - @param pFontName the name of the font used to draw the text. If nil, use the default system font. - @param nSize the font size, if 0, use the system default size. - @js NA - */ - bool initWithString( - const char * pText, - int nWidth = 0, - int nHeight = 0, - ETextAlign eAlignMask = kAlignCenter, - const char * pFontName = 0, - int nSize = 0); - - #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) - /** - * @js NA - * @lua NA - */ - bool initWithStringShadowStroke( - const char * pText, - int nWidth = 0, - int nHeight = 0, - ETextAlign eAlignMask = kAlignCenter, - const char * pFontName = 0, - int nSize = 0, - float textTintR = 1, - float textTintG = 1, - float textTintB = 1, - bool shadow = false, - float shadowOffsetX = 0.0, - float shadowOffsetY = 0.0, - float shadowOpacity = 0.0, - float shadowBlur = 0.0, - bool stroke = false, - float strokeR = 1, - float strokeG = 1, - float strokeB = 1, - float strokeSize = 1 - - ); - - #endif - - - unsigned char * getData() { return m_pData; } - int getDataLen() { return m_nWidth * m_nHeight; } - - - bool hasAlpha() { return m_bHasAlpha; } - bool isPremultipliedAlpha() { return m_bPreMulti; } - - - /** - @brief Save CCImage data to the specified file, with specified format. - @param pszFilePath the file's absolute path, including file suffix. - @param bIsToRGB whether the image is saved as RGB format. - */ - bool saveToFile(const char *pszFilePath, bool bIsToRGB = true); - - CC_SYNTHESIZE_READONLY(unsigned short, m_nWidth, Width); - CC_SYNTHESIZE_READONLY(unsigned short, m_nHeight, Height); - CC_SYNTHESIZE_READONLY(int, m_nBitsPerComponent, BitsPerComponent); - -protected: - bool _initWithJpgData(void *pData, int nDatalen); - bool _initWithPngData(void *pData, int nDatalen); - bool _initWithTiffData(void *pData, int nDataLen); - bool _initWithWebpData(void *pData, int nDataLen); - // @warning kFmtRawData only support RGBA8888 - bool _initWithRawData(void *pData, int nDatalen, int nWidth, int nHeight, int nBitsPerComponent, bool bPreMulti); - - bool _saveImageToPNG(const char *pszFilePath, bool bIsToRGB = true); - bool _saveImageToJPG(const char *pszFilePath); - - unsigned char *m_pData; - bool m_bHasAlpha; - bool m_bPreMulti; - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - CCFreeTypeFont* m_ft; -#endif - -private: - // noncopyable - CCImage(const CCImage& rImg); - CCImage & operator=(const CCImage&); - - -}; - -// end of platform group -/// @} - -NS_CC_END - -#endif // __CC_IMAGE_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/platform/CCImageCommon_cpp.h b/cappuccino-sdk/incl/cocos2dx/platform/CCImageCommon_cpp.h deleted file mode 100644 index 9bd2182..0000000 --- a/cappuccino-sdk/incl/cocos2dx/platform/CCImageCommon_cpp.h +++ /dev/null @@ -1,986 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_PLATFORM_IMAGE_CPP__ -#error "CCFileUtilsCommon_cpp.h can only be included for CCFileUtils.cpp in platform/win32(android,...)" -#endif /* __CC_PLATFORM_IMAGE_CPP__ */ - -#include "CCImage.h" -#include "CCCommon.h" -#include "CCStdC.h" -#include "CCFileUtils.h" -#include "png.h" -#include "jpeglib.h" -#include "tiffio.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) -#include "CCFreeTypeFont.h" -#endif - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) -#include "platform/android/CCFileUtilsAndroid.h" -#endif - -#include -#include - -#ifdef EMSCRIPTEN -#include -#include -#endif // EMSCRIPTEN - -NS_CC_BEGIN - -// premultiply alpha, or the effect will wrong when want to use other pixel format in CCTexture2D, -// such as RGB888, RGB5A1 -#define CC_RGB_PREMULTIPLY_ALPHA(vr, vg, vb, va) \ - (unsigned)(((unsigned)((unsigned char)(vr) * ((unsigned char)(va) + 1)) >> 8) | \ - ((unsigned)((unsigned char)(vg) * ((unsigned char)(va) + 1) >> 8) << 8) | \ - ((unsigned)((unsigned char)(vb) * ((unsigned char)(va) + 1) >> 8) << 16) | \ - ((unsigned)(unsigned char)(va) << 24)) - -// on ios, we should use platform/ios/CCImage_ios.mm instead - -typedef struct -{ - unsigned char* data; - int size; - int offset; -}tImageSource; - -static void pngReadCallback(png_structp png_ptr, png_bytep data, png_size_t length) -{ - tImageSource* isource = (tImageSource*)png_get_io_ptr(png_ptr); - - if((int)(isource->offset + length) <= isource->size) - { - memcpy(data, isource->data+isource->offset, length); - isource->offset += length; - } - else - { - png_error(png_ptr, "pngReaderCallback failed"); - } -} - -////////////////////////////////////////////////////////////////////////// -// Implement CCImage -////////////////////////////////////////////////////////////////////////// - -CCImage::CCImage() -: m_nWidth(0) -, m_nHeight(0) -, m_nBitsPerComponent(0) -, m_pData(0) -, m_bHasAlpha(false) -, m_bPreMulti(false) -{ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - m_ft = nullptr; -#endif -} - -CCImage::~CCImage() -{ - CC_SAFE_DELETE_ARRAY(m_pData); -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - CC_SAFE_DELETE(m_ft); -#endif -} - -bool CCImage::initWithImageFile(const char * strPath, EImageFormat eImgFmt/* = eFmtPng*/) -{ - bool bRet = false; - -#ifdef EMSCRIPTEN - // Emscripten includes a re-implementation of SDL that uses HTML5 canvas - // operations underneath. Consequently, loading images via IMG_Load (an SDL - // API) will be a lot faster than running libpng et al as compiled with - // Emscripten. - SDL_Surface *iSurf = IMG_Load(strPath); - - int size = 4 * (iSurf->w * iSurf->h); - bRet = _initWithRawData((void*)iSurf->pixels, size, iSurf->w, iSurf->h, 8, true); - - unsigned int *tmp = (unsigned int *)m_pData; - int nrPixels = iSurf->w * iSurf->h; - for(int i = 0; i < nrPixels; i++) - { - unsigned char *p = m_pData + i * 4; - tmp[i] = CC_RGB_PREMULTIPLY_ALPHA( p[0], p[1], p[2], p[3] ); - } - - SDL_FreeSurface(iSurf); -#else - unsigned long nSize = 0; - std::string fullPath = CCFileUtils::sharedFileUtils()->fullPathForFilename(strPath); - unsigned char* pBuffer = CCFileUtils::sharedFileUtils()->getFileData(fullPath.c_str(), "rb", &nSize); - if (pBuffer != NULL && nSize > 0) - { - bRet = initWithImageData(pBuffer, nSize, eImgFmt); - } - CC_SAFE_DELETE_ARRAY(pBuffer); -#endif // EMSCRIPTEN - - return bRet; -} - -bool CCImage::initWithImageFileThreadSafe(const char *fullpath, EImageFormat imageType) -{ - bool bRet = false; - unsigned long nSize = 0; -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) - CCFileUtilsAndroid *fileUitls = (CCFileUtilsAndroid*)CCFileUtils::sharedFileUtils(); - unsigned char *pBuffer = fileUitls->getFileDataForAsync(fullpath, "rb", &nSize); -#else - unsigned char *pBuffer = CCFileUtils::sharedFileUtils()->getFileData(fullpath, "rb", &nSize); -#endif - if (pBuffer != NULL && nSize > 0) - { - bRet = initWithImageData(pBuffer, nSize, imageType); - } - CC_SAFE_DELETE_ARRAY(pBuffer); - return bRet; -} - -bool CCImage::initWithImageData(void * pData, - int nDataLen, - EImageFormat eFmt/* = eSrcFmtPng*/, - int nWidth/* = 0*/, - int nHeight/* = 0*/, - int nBitsPerComponent/* = 8*/) -{ - bool bRet = false; - do - { - CC_BREAK_IF(! pData || nDataLen <= 0); - - if (kFmtPng == eFmt) - { - bRet = _initWithPngData(pData, nDataLen); - break; - } - else if (kFmtJpg == eFmt) - { - bRet = _initWithJpgData(pData, nDataLen); - break; - } - else if (kFmtTiff == eFmt) - { - bRet = _initWithTiffData(pData, nDataLen); - break; - } -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) && (CC_TARGET_PLATFORM != CC_PLATFORM_WP8) - else if (kFmtWebp == eFmt) - { - bRet = _initWithWebpData(pData, nDataLen); - break; - } -#endif - else if (kFmtRawData == eFmt) - { - bRet = _initWithRawData(pData, nDataLen, nWidth, nHeight, nBitsPerComponent, false); - break; - } - else - { - // if it is a png file buffer. - if (nDataLen > 8) - { - unsigned char* pHead = (unsigned char*)pData; - if ( pHead[0] == 0x89 - && pHead[1] == 0x50 - && pHead[2] == 0x4E - && pHead[3] == 0x47 - && pHead[4] == 0x0D - && pHead[5] == 0x0A - && pHead[6] == 0x1A - && pHead[7] == 0x0A) - { - bRet = _initWithPngData(pData, nDataLen); - break; - } - } - - // if it is a tiff file buffer. - if (nDataLen > 2) - { - unsigned char* pHead = (unsigned char*)pData; - if ( (pHead[0] == 0x49 && pHead[1] == 0x49) - || (pHead[0] == 0x4d && pHead[1] == 0x4d) - ) - { - bRet = _initWithTiffData(pData, nDataLen); - break; - } - } - - // if it is a jpeg file buffer. - if (nDataLen > 2) - { - unsigned char* pHead = (unsigned char*)pData; - if ( pHead[0] == 0xff - && pHead[1] == 0xd8) - { - bRet = _initWithJpgData(pData, nDataLen); - break; - } - } - } - } while (0); - return bRet; -} - -/* - * ERROR HANDLING: - * - * The JPEG library's standard error handler (jerror.c) is divided into - * several "methods" which you can override individually. This lets you - * adjust the behavior without duplicating a lot of code, which you might - * have to update with each future release. - * - * We override the "error_exit" method so that control is returned to the - * library's caller when a fatal error occurs, rather than calling exit() - * as the standard error_exit method does. - * - * We use C's setjmp/longjmp facility to return control. This means that the - * routine which calls the JPEG library must first execute a setjmp() call to - * establish the return point. We want the replacement error_exit to do a - * longjmp(). But we need to make the setjmp buffer accessible to the - * error_exit routine. To do this, we make a private extension of the - * standard JPEG error handler object. (If we were using C++, we'd say we - * were making a subclass of the regular error handler.) - * - * Here's the extended error handler struct: - */ - -struct my_error_mgr { - struct jpeg_error_mgr pub; /* "public" fields */ - - jmp_buf setjmp_buffer; /* for return to caller */ -}; - -typedef struct my_error_mgr * my_error_ptr; - -/* - * Here's the routine that will replace the standard error_exit method: - */ - -METHODDEF(void) -my_error_exit (j_common_ptr cinfo) -{ - /* cinfo->err really points to a my_error_mgr struct, so coerce pointer */ - my_error_ptr myerr = (my_error_ptr) cinfo->err; - - /* Always display the message. */ - /* We could postpone this until after returning, if we chose. */ - (*cinfo->err->output_message) (cinfo); - - /* Return control to the setjmp point */ - longjmp(myerr->setjmp_buffer, 1); -} - -bool CCImage::_initWithJpgData(void * data, int nSize) -{ - /* these are standard libjpeg structures for reading(decompression) */ - struct jpeg_decompress_struct cinfo; - /* We use our private extension JPEG error handler. - * Note that this struct must live as long as the main JPEG parameter - * struct, to avoid dangling-pointer problems. - */ - struct my_error_mgr jerr; - /* libjpeg data structure for storing one row, that is, scanline of an image */ - JSAMPROW row_pointer[1] = {0}; - unsigned long location = 0; - unsigned int i = 0; - - bool bRet = false; - do - { - /* We set up the normal JPEG error routines, then override error_exit. */ - cinfo.err = jpeg_std_error(&jerr.pub); - jerr.pub.error_exit = my_error_exit; - /* Establish the setjmp return context for my_error_exit to use. */ - if (setjmp(jerr.setjmp_buffer)) { - /* If we get here, the JPEG code has signaled an error. - * We need to clean up the JPEG object, close the input file, and return. - */ - CCLog("%d", bRet); - jpeg_destroy_decompress(&cinfo); - break; - } - - /* setup decompression process and source, then read JPEG header */ - jpeg_create_decompress( &cinfo ); - - jpeg_mem_src( &cinfo, (unsigned char *) data, nSize ); - - /* reading the image header which contains image information */ -#if (JPEG_LIB_VERSION >= 90) - // libjpeg 0.9 adds stricter types. - jpeg_read_header( &cinfo, TRUE ); -#else - jpeg_read_header( &cinfo, true ); -#endif - - // we only support RGB or grayscale - if (cinfo.jpeg_color_space != JCS_RGB) - { - if (cinfo.jpeg_color_space == JCS_GRAYSCALE || cinfo.jpeg_color_space == JCS_YCbCr) - { - cinfo.out_color_space = JCS_RGB; - } - } - else - { - break; - } - - /* Start decompression jpeg here */ - jpeg_start_decompress( &cinfo ); - - /* init image info */ - m_nWidth = (short)(cinfo.output_width); - m_nHeight = (short)(cinfo.output_height); - m_bHasAlpha = false; - m_bPreMulti = false; - m_nBitsPerComponent = 8; - row_pointer[0] = new unsigned char[cinfo.output_width*cinfo.output_components]; - CC_BREAK_IF(! row_pointer[0]); - - m_pData = new unsigned char[cinfo.output_width*cinfo.output_height*cinfo.output_components]; - CC_BREAK_IF(! m_pData); - - /* now actually read the jpeg into the raw buffer */ - /* read one scan line at a time */ - while( cinfo.output_scanline < cinfo.output_height ) - { - jpeg_read_scanlines( &cinfo, row_pointer, 1 ); - for( i=0; i0) - { - n=0x80000000UL; - if ((uint64)n>mb) - n=(unsigned long)mb; - - - if((int)(isource->offset + n) <= isource->size) - { - memcpy(ma, isource->data+isource->offset, n); - isource->offset += n; - o = n; - } - else - { - return 0; - } - - ma+=o; - mb-=o; - p+=o; - if (o!=n) - { - break; - } - } - return p; -} - -static tmsize_t _tiffWriteProc(thandle_t fd, void* buf, tmsize_t size) -{ - CC_UNUSED_PARAM(fd); - CC_UNUSED_PARAM(buf); - CC_UNUSED_PARAM(size); - return 0; -} - - -static uint64 _tiffSeekProc(thandle_t fd, uint64 off, int whence) -{ - tImageSource* isource = (tImageSource*)fd; - uint64 ret = -1; - do - { - if (whence == SEEK_SET) - { - CC_BREAK_IF(off >= (uint64)isource->size); - ret = isource->offset = (uint32)off; - } - else if (whence == SEEK_CUR) - { - CC_BREAK_IF(isource->offset + off >= (uint64)isource->size); - ret = isource->offset += (uint32)off; - } - else if (whence == SEEK_END) - { - CC_BREAK_IF(off >= (uint64)isource->size); - ret = isource->offset = (uint32)(isource->size-1 - off); - } - else - { - CC_BREAK_IF(off >= (uint64)isource->size); - ret = isource->offset = (uint32)off; - } - } while (0); - - return ret; -} - -static uint64 _tiffSizeProc(thandle_t fd) -{ - tImageSource* pImageSrc = (tImageSource*)fd; - return pImageSrc->size; -} - -static int _tiffCloseProc(thandle_t fd) -{ - CC_UNUSED_PARAM(fd); - return 0; -} - -static int _tiffMapProc(thandle_t fd, void** pbase, toff_t* psize) -{ - CC_UNUSED_PARAM(fd); - CC_UNUSED_PARAM(pbase); - CC_UNUSED_PARAM(psize); - return 0; -} - -static void _tiffUnmapProc(thandle_t fd, void* base, toff_t size) -{ - CC_UNUSED_PARAM(fd); - CC_UNUSED_PARAM(base); - CC_UNUSED_PARAM(size); -} - -bool CCImage::_initWithTiffData(void* pData, int nDataLen) -{ - bool bRet = false; - do - { - // set the read call back function - tImageSource imageSource; - imageSource.data = (unsigned char*)pData; - imageSource.size = nDataLen; - imageSource.offset = 0; - - TIFF* tif = TIFFClientOpen("file.tif", "r", (thandle_t)&imageSource, - _tiffReadProc, _tiffWriteProc, - _tiffSeekProc, _tiffCloseProc, _tiffSizeProc, - _tiffMapProc, - _tiffUnmapProc); - - CC_BREAK_IF(NULL == tif); - - uint32 w = 0, h = 0; - uint16 bitsPerSample = 0, samplePerPixel = 0, planarConfig = 0; - size_t npixels = 0; - - TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w); - TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h); - TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bitsPerSample); - TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &samplePerPixel); - TIFFGetField(tif, TIFFTAG_PLANARCONFIG, &planarConfig); - - npixels = w * h; - - m_bHasAlpha = true; - m_nWidth = w; - m_nHeight = h; - m_nBitsPerComponent = 8; - - m_pData = new unsigned char[npixels * sizeof (uint32)]; - - uint32* raster = (uint32*) _TIFFmalloc(npixels * sizeof (uint32)); - if (raster != NULL) - { - if (TIFFReadRGBAImageOriented(tif, w, h, raster, ORIENTATION_TOPLEFT, 0)) - { - /* the raster data is pre-multiplied by the alpha component - after invoking TIFFReadRGBAImageOriented - unsigned char* src = (unsigned char*)raster; - unsigned int* tmp = (unsigned int*)m_pData; - - for(int j = 0; j < m_nWidth * m_nHeight * 4; j += 4) - { - *tmp++ = CC_RGB_PREMULTIPLY_ALPHA( src[j], src[j + 1], - src[j + 2], src[j + 3] ); - } - */ - m_bPreMulti = true; - - memcpy(m_pData, raster, npixels*sizeof (uint32)); - } - - _TIFFfree(raster); - } - - - TIFFClose(tif); - - bRet = true; - } while (0); - return bRet; -} - -bool CCImage::_initWithRawData(void * pData, int nDatalen, int nWidth, int nHeight, int nBitsPerComponent, bool bPreMulti) -{ - bool bRet = false; - do - { - CC_BREAK_IF(0 == nWidth || 0 == nHeight); - - m_nBitsPerComponent = nBitsPerComponent; - m_nHeight = (short)nHeight; - m_nWidth = (short)nWidth; - m_bHasAlpha = true; - m_bPreMulti = bPreMulti; - - // only RGBA8888 supported - int nBytesPerComponent = 4; - int nSize = nHeight * nWidth * nBytesPerComponent; - m_pData = new unsigned char[nSize]; - CC_BREAK_IF(! m_pData); - memcpy(m_pData, pData, nSize); - - bRet = true; - } while (0); - - return bRet; -} - -bool CCImage::saveToFile(const char *pszFilePath, bool bIsToRGB) -{ - bool bRet = false; - - do - { - CC_BREAK_IF(NULL == pszFilePath); - - std::string strFilePath(pszFilePath); - CC_BREAK_IF(strFilePath.size() <= 4); - - std::string strLowerCasePath(strFilePath); - for (unsigned int i = 0; i < strLowerCasePath.length(); ++i) - { - strLowerCasePath[i] = tolower(strFilePath[i]); - } - - if (std::string::npos != strLowerCasePath.find(".png")) - { - CC_BREAK_IF(!_saveImageToPNG(pszFilePath, bIsToRGB)); - } - else if (std::string::npos != strLowerCasePath.find(".jpg")) - { - CC_BREAK_IF(!_saveImageToJPG(pszFilePath)); - } - else - { - break; - } - - bRet = true; - } while (0); - - return bRet; -} - -bool CCImage::_saveImageToPNG(const char * pszFilePath, bool bIsToRGB) -{ - bool bRet = false; - do - { - CC_BREAK_IF(NULL == pszFilePath); - - FILE *fp; - png_structp png_ptr; - png_infop info_ptr; - png_colorp palette; - png_bytep *row_pointers; - - fp = fopen(pszFilePath, "wb"); - CC_BREAK_IF(NULL == fp); - - png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); - - if (NULL == png_ptr) - { - fclose(fp); - break; - } - - info_ptr = png_create_info_struct(png_ptr); - if (NULL == info_ptr) - { - fclose(fp); - png_destroy_write_struct(&png_ptr, NULL); - break; - } -#if (CC_TARGET_PLATFORM != CC_PLATFORM_BADA && CC_TARGET_PLATFORM != CC_PLATFORM_NACL) - if (setjmp(png_jmpbuf(png_ptr))) - { - fclose(fp); - png_destroy_write_struct(&png_ptr, &info_ptr); - break; - } -#endif - png_init_io(png_ptr, fp); - - if (!bIsToRGB && m_bHasAlpha) - { - png_set_IHDR(png_ptr, info_ptr, m_nWidth, m_nHeight, 8, PNG_COLOR_TYPE_RGB_ALPHA, - PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); - } - else - { - png_set_IHDR(png_ptr, info_ptr, m_nWidth, m_nHeight, 8, PNG_COLOR_TYPE_RGB, - PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE); - } - - palette = (png_colorp)png_malloc(png_ptr, PNG_MAX_PALETTE_LENGTH * sizeof (png_color)); - png_set_PLTE(png_ptr, info_ptr, palette, PNG_MAX_PALETTE_LENGTH); - - png_write_info(png_ptr, info_ptr); - - png_set_packing(png_ptr); - - row_pointers = (png_bytep *)malloc(m_nHeight * sizeof(png_bytep)); - if(row_pointers == NULL) - { - fclose(fp); - png_destroy_write_struct(&png_ptr, &info_ptr); - break; - } - - if (!m_bHasAlpha) - { - for (int i = 0; i < (int)m_nHeight; i++) - { - row_pointers[i] = (png_bytep)m_pData + i * m_nWidth * 3; - } - - png_write_image(png_ptr, row_pointers); - - free(row_pointers); - row_pointers = NULL; - } - else - { - if (bIsToRGB) - { - unsigned char *pTempData = new unsigned char[m_nWidth * m_nHeight * 3]; - if (NULL == pTempData) - { - fclose(fp); - png_destroy_write_struct(&png_ptr, &info_ptr); - break; - } - - for (int i = 0; i < m_nHeight; ++i) - { - for (int j = 0; j < m_nWidth; ++j) - { - pTempData[(i * m_nWidth + j) * 3] = m_pData[(i * m_nWidth + j) * 4]; - pTempData[(i * m_nWidth + j) * 3 + 1] = m_pData[(i * m_nWidth + j) * 4 + 1]; - pTempData[(i * m_nWidth + j) * 3 + 2] = m_pData[(i * m_nWidth + j) * 4 + 2]; - } - } - - for (int i = 0; i < (int)m_nHeight; i++) - { - row_pointers[i] = (png_bytep)pTempData + i * m_nWidth * 3; - } - - png_write_image(png_ptr, row_pointers); - - free(row_pointers); - row_pointers = NULL; - - CC_SAFE_DELETE_ARRAY(pTempData); - } - else - { - for (int i = 0; i < (int)m_nHeight; i++) - { - row_pointers[i] = (png_bytep)m_pData + i * m_nWidth * 4; - } - - png_write_image(png_ptr, row_pointers); - - free(row_pointers); - row_pointers = NULL; - } - } - - png_write_end(png_ptr, info_ptr); - - png_free(png_ptr, palette); - palette = NULL; - - png_destroy_write_struct(&png_ptr, &info_ptr); - - fclose(fp); - - bRet = true; - } while (0); - return bRet; -} -bool CCImage::_saveImageToJPG(const char * pszFilePath) -{ - bool bRet = false; - do - { - CC_BREAK_IF(NULL == pszFilePath); - - struct jpeg_compress_struct cinfo; - struct jpeg_error_mgr jerr; - FILE * outfile; /* target file */ - JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */ - int row_stride; /* physical row width in image buffer */ - - cinfo.err = jpeg_std_error(&jerr); - /* Now we can initialize the JPEG compression object. */ - jpeg_create_compress(&cinfo); - - CC_BREAK_IF((outfile = fopen(pszFilePath, "wb")) == NULL); - - jpeg_stdio_dest(&cinfo, outfile); - - cinfo.image_width = m_nWidth; /* image width and height, in pixels */ - cinfo.image_height = m_nHeight; - cinfo.input_components = 3; /* # of color components per pixel */ - cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ - - jpeg_set_defaults(&cinfo); - - jpeg_start_compress(&cinfo, TRUE); - - row_stride = m_nWidth * 3; /* JSAMPLEs per row in image_buffer */ - - if (m_bHasAlpha) - { - unsigned char *pTempData = new unsigned char[m_nWidth * m_nHeight * 3]; - if (NULL == pTempData) - { - jpeg_finish_compress(&cinfo); - jpeg_destroy_compress(&cinfo); - fclose(outfile); - break; - } - - for (int i = 0; i < m_nHeight; ++i) - { - for (int j = 0; j < m_nWidth; ++j) - - { - pTempData[(i * m_nWidth + j) * 3] = m_pData[(i * m_nWidth + j) * 4]; - pTempData[(i * m_nWidth + j) * 3 + 1] = m_pData[(i * m_nWidth + j) * 4 + 1]; - pTempData[(i * m_nWidth + j) * 3 + 2] = m_pData[(i * m_nWidth + j) * 4 + 2]; - } - } - - while (cinfo.next_scanline < cinfo.image_height) { - row_pointer[0] = & pTempData[cinfo.next_scanline * row_stride]; - (void) jpeg_write_scanlines(&cinfo, row_pointer, 1); - } - - CC_SAFE_DELETE_ARRAY(pTempData); - } - else - { - while (cinfo.next_scanline < cinfo.image_height) { - row_pointer[0] = & m_pData[cinfo.next_scanline * row_stride]; - (void) jpeg_write_scanlines(&cinfo, row_pointer, 1); - } - } - - jpeg_finish_compress(&cinfo); - fclose(outfile); - jpeg_destroy_compress(&cinfo); - - bRet = true; - } while (0); - return bRet; -} - -NS_CC_END - diff --git a/cappuccino-sdk/incl/cocos2dx/platform/CCPlatformConfig.h b/cappuccino-sdk/incl/cocos2dx/platform/CCPlatformConfig.h deleted file mode 100644 index 8ae9f6d..0000000 --- a/cappuccino-sdk/incl/cocos2dx/platform/CCPlatformConfig.h +++ /dev/null @@ -1,148 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org -Copyright (c) Microsoft Open Technologies, Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_PLATFORM_CONFIG_H__ -#define __CC_PLATFORM_CONFIG_H__ - -/** -Config of cocos2d-x project, per target platform. -*/ - -////////////////////////////////////////////////////////////////////////// -// pre configure -////////////////////////////////////////////////////////////////////////// - -// define supported target platform macro which CC uses. -#define CC_PLATFORM_UNKNOWN 0 -#define CC_PLATFORM_IOS 1 -#define CC_PLATFORM_ANDROID 2 -#define CC_PLATFORM_WIN32 3 -#define CC_PLATFORM_MARMALADE 4 -#define CC_PLATFORM_LINUX 5 -#define CC_PLATFORM_BADA 6 -#define CC_PLATFORM_BLACKBERRY 7 -#define CC_PLATFORM_MAC 8 -#define CC_PLATFORM_NACL 9 -#define CC_PLATFORM_EMSCRIPTEN 10 -#define CC_PLATFORM_TIZEN 11 -#define CC_PLATFORM_WINRT 12 -#define CC_PLATFORM_WP8 13 - -// Determine target platform by compile environment macro. -#define CC_TARGET_PLATFORM CC_PLATFORM_UNKNOWN - -// mac -#if defined(CC_TARGET_OS_MAC) -#undef CC_TARGET_PLATFORM -#define CC_TARGET_PLATFORM CC_PLATFORM_MAC -#endif - -// iphone -#if defined(CC_TARGET_OS_IPHONE) - #undef CC_TARGET_PLATFORM - #define CC_TARGET_PLATFORM CC_PLATFORM_IOS -#endif - -// android -#if defined(ANDROID) - #undef CC_TARGET_PLATFORM - #define CC_TARGET_PLATFORM CC_PLATFORM_ANDROID -#endif - -// WinRT (Windows Store App) -#if defined(WINRT) && defined(_WINRT) - #undef CC_TARGET_PLATFORM - #define CC_TARGET_PLATFORM CC_PLATFORM_WINRT -#endif - -// WP8 (Windows Phone 8 App) -#if defined(WP8) && defined(_WP8) - #undef CC_TARGET_PLATFORM - #define CC_TARGET_PLATFORM CC_PLATFORM_WP8 -#endif - -// win32 -#if defined(WIN32) && defined(_WINDOWS) - #undef CC_TARGET_PLATFORM - #define CC_TARGET_PLATFORM CC_PLATFORM_WIN32 -#endif - -// linux -#if defined(LINUX) - #undef CC_TARGET_PLATFORM - #define CC_TARGET_PLATFORM CC_PLATFORM_LINUX -#endif - -// marmalade -#if defined(MARMALADE) -#undef CC_TARGET_PLATFORM -#define CC_TARGET_PLATFORM CC_PLATFORM_MARMALADE -#endif - -// bada -#if defined(SHP) -#undef CC_TARGET_PLATFORM -#define CC_TARGET_PLATFORM CC_PLATFORM_BADA -#endif - -// qnx -#if defined(__QNX__) - #undef CC_TARGET_PLATFORM - #define CC_TARGET_PLATFORM CC_PLATFORM_BLACKBERRY -#endif - -// native client -#if defined(__native_client__) - #undef CC_TARGET_PLATFORM - #define CC_TARGET_PLATFORM CC_PLATFORM_NACL -#endif - -// Emscripten -#if defined(EMSCRIPTEN) - #undef CC_TARGET_PLATFORM - #define CC_TARGET_PLATFORM CC_PLATFORM_EMSCRIPTEN -#endif - -// tizen -#if defined(TIZEN) - #undef CC_TARGET_PLATFORM - #define CC_TARGET_PLATFORM CC_PLATFORM_TIZEN -#endif - -////////////////////////////////////////////////////////////////////////// -// post configure -////////////////////////////////////////////////////////////////////////// - -// check user set platform -#if ! CC_TARGET_PLATFORM - #error "Cannot recognize the target platform; are you targeting an unsupported platform?" -#endif - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) -#pragma warning (disable:4127) -#endif // CC_PLATFORM_WIN32 - -#endif // __CC_PLATFORM_CONFIG_H__ - diff --git a/cappuccino-sdk/incl/cocos2dx/platform/CCPlatformMacros.h b/cappuccino-sdk/incl/cocos2dx/platform/CCPlatformMacros.h deleted file mode 100644 index 8c0d949..0000000 --- a/cappuccino-sdk/incl/cocos2dx/platform/CCPlatformMacros.h +++ /dev/null @@ -1,327 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ -#ifndef __CC_PLATFORM_MACROS_H__ -#define __CC_PLATFORM_MACROS_H__ - -/** - * define some platform specific macros - */ -#include "ccConfig.h" -#include "CCPlatformConfig.h" -#include "CCPlatformDefine.h" -#define CC_FORMAT_PRINTF(formatPos, argPos) -/** - * define a create function for a specific type, such as CCLayer - * @__TYPE__ class type to add create(), such as CCLayer - */ -#define CREATE_FUNC(__TYPE__) \ -static __TYPE__* create() \ -{ \ - __TYPE__ *pRet = new __TYPE__(); \ - if (pRet && pRet->init()) \ - { \ - pRet->autorelease(); \ - return pRet; \ - } \ - else \ - { \ - delete pRet; \ - pRet = NULL; \ - return NULL; \ - } \ -} - -/** - * define a node function for a specific type, such as CCLayer - * @__TYPE__ class type to add node(), such as CCLayer - * @deprecated: This interface will be deprecated sooner or later. - */ -#define NODE_FUNC(__TYPE__) \ -CC_DEPRECATED_ATTRIBUTE static __TYPE__* node() \ -{ \ - __TYPE__ *pRet = new __TYPE__(); \ - if (pRet && pRet->init()) \ - { \ - pRet->autorelease(); \ - return pRet; \ - } \ - else \ - { \ - delete pRet; \ - pRet = NULL; \ - return NULL; \ - } \ -} - -/** @def CC_ENABLE_CACHE_TEXTURE_DATA -Enable it if you want to cache the texture data. -Basically, it's only enabled for Emscripten. - -It's new in cocos2d-x since v0.99.5 -*/ -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_EMSCRIPTEN) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - #define CC_ENABLE_CACHE_TEXTURE_DATA 1 -#else - #define CC_ENABLE_CACHE_TEXTURE_DATA 0 -#endif - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_EMSCRIPTEN) - /* Application will crash in glDrawElements function on some win32 computers and some android devices. - Indices should be bound again while drawing to avoid this bug. - */ - #define CC_REBIND_INDICES_BUFFER 1 -#else - #define CC_REBIND_INDICES_BUFFER 0 -#endif - -// generic macros - -// namespace cocos2d {} -#ifdef __cplusplus - #define NS_CC_BEGIN namespace cocos2d { - #define NS_CC_END } - #define USING_NS_CC using namespace cocos2d -#else - #define NS_CC_BEGIN - #define NS_CC_END - #define USING_NS_CC -#endif - -/** CC_PROPERTY_READONLY is used to declare a protected variable. - We can use getter to read the variable. - @param varType : the type of variable. - @param varName : variable name. - @param funName : "get + funName" is the name of the getter. - @warning : The getter is a public virtual function, you should rewrite it first. - The variables and methods declared after CC_PROPERTY_READONLY are all public. - If you need protected or private, please declare. - */ -#define CC_PROPERTY_READONLY(varType, varName, funName)\ -protected: varType varName;\ -public: virtual varType get##funName(void); - -#define CC_PROPERTY_READONLY_PASS_BY_REF(varType, varName, funName)\ -protected: varType varName;\ -public: virtual const varType& get##funName(void); - -/** CC_PROPERTY is used to declare a protected variable. - We can use getter to read the variable, and use the setter to change the variable. - @param varType : the type of variable. - @param varName : variable name. - @param funName : "get + funName" is the name of the getter. - "set + funName" is the name of the setter. - @warning : The getter and setter are public virtual functions, you should rewrite them first. - The variables and methods declared after CC_PROPERTY are all public. - If you need protected or private, please declare. - */ -#define CC_PROPERTY(varType, varName, funName)\ -protected: varType varName;\ -public: virtual varType get##funName(void);\ -public: virtual void set##funName(varType var); - -//Andre Modification: -#define CC_PROPERTY_NOVIRTUAL(varType, varName, funName)\ -protected: varType varName;\ -public: varType get##funName(void);\ -public: void set##funName(varType var); - -//Andre Modification: -#define CC_PROPERTY_NOVIRTUAL_CONST(varType, varName, funName)\ -protected: varType varName;\ -public: varType get##funName(void) const;\ -public: void set##funName(varType var); - -//Andre Modification (Note from the future, this does the exact same thing as CC_SYNTHESIZE_RETAIN): -#define CC_PROPERTY_CONST(varType, varName, funName)\ -protected: varType varName;\ -public: virtual varType get##funName(void) const;\ -public: virtual void set##funName(varType var); - -#define CC_PROPERTY_PASS_BY_REF(varType, varName, funName)\ -protected: varType varName;\ -public: virtual const varType& get##funName(void);\ -public: virtual void set##funName(const varType& var); - -/** CC_SYNTHESIZE_READONLY is used to declare a protected variable. - We can use getter to read the variable. - @param varType : the type of variable. - @param varName : variable name. - @param funName : "get + funName" is the name of the getter. - @warning : The getter is a public inline function. - The variables and methods declared after CC_SYNTHESIZE_READONLY are all public. - If you need protected or private, please declare. - */ -#define CC_SYNTHESIZE_READONLY(varType, varName, funName)\ -protected: varType varName;\ -public: virtual varType get##funName(void) const { return varName; } - -#define CC_SYNTHESIZE_READONLY_PASS_BY_REF(varType, varName, funName)\ -protected: varType varName;\ -public: virtual const varType& get##funName(void) const { return varName; } - -/** CC_SYNTHESIZE is used to declare a protected variable. - We can use getter to read the variable, and use the setter to change the variable. - @param varType : the type of variable. - @param varName : variable name. - @param funName : "get + funName" is the name of the getter. - "set + funName" is the name of the setter. - @warning : The getter and setter are public inline functions. - The variables and methods declared after CC_SYNTHESIZE are all public. - If you need protected or private, please declare. - */ -#define CC_SYNTHESIZE(varType, varName, funName)\ -protected: varType varName;\ -public: virtual varType get##funName(void) const { return varName; }\ -public: virtual void set##funName(varType var){ varName = var; } - -#define CC_SYNTHESIZE_PASS_BY_REF(varType, varName, funName)\ -protected: varType varName;\ -public: virtual const varType& get##funName(void) const { return varName; }\ -public: virtual void set##funName(const varType& var){ varName = var; } - -#define CC_SYNTHESIZE_RETAIN(varType, varName, funName) \ -private: varType varName; \ -public: virtual varType get##funName(void) const { return varName; } \ -public: virtual void set##funName(varType var) \ -{ \ - if (varName != var) \ - { \ - CC_SAFE_RETAIN(var); \ - CC_SAFE_RELEASE(varName); \ - varName = var; \ - } \ -} - -//ROBTOP DEVIRTUALIZATION MACROS - -#define ROB_CC_SYNTHESIZE_READONLY(varType, varName, funName)\ -protected: varType varName;\ -public: varType get##funName(void) const { return varName; } - -#define ROB_CC_SYNTHESIZE(varType, varName, funName)\ -protected: varType varName;\ -public: varType get##funName(void) const { return varName; }\ -public: void set##funName(varType var){ varName = var; } - -#define ROB_CC_PROPERTY_READONLY(varType, varName, funName)\ -protected: varType varName;\ -public: varType get##funName(void); - -#define ROB_CC_SYNTHESIZE_RETAIN(varType, varName, funName) \ -private: varType varName; \ -public: varType get##funName(void) const { return varName; } \ -public: void set##funName(varType var); \ - -//END OF ROBTOP FUNCTION - -#define CC_SAFE_DELETE(p) do { if(p) { delete (p); (p) = 0; } } while(0) -#define CC_SAFE_DELETE_ARRAY(p) do { if(p) { delete[] (p); (p) = 0; } } while(0) -#define CC_SAFE_FREE(p) do { if(p) { free(p); (p) = 0; } } while(0) -#define CC_SAFE_RELEASE(p) do { if(p) { (p)->release(); } } while(0) -#define CC_SAFE_RELEASE_NULL(p) do { if(p) { (p)->release(); (p) = 0; } } while(0) -#define CC_SAFE_RETAIN(p) do { if(p) { (p)->retain(); } } while(0) -#define CC_BREAK_IF(cond) if(cond) break - -#define __CCLOGWITHFUNCTION(s, ...) \ - CCLog("%s : %s",__FUNCTION__, CCString::createWithFormat(s, ##__VA_ARGS__)->getCString()) - -// cocos2d debug -#if !defined(COCOS2D_DEBUG) || COCOS2D_DEBUG == 0 -#define CCLOG(...) do {} while (0) -#define CCLOGINFO(...) do {} while (0) -#define CCLOGERROR(...) do {} while (0) -#define CCLOGWARN(...) do {} while (0) - -#elif COCOS2D_DEBUG == 1 -#define CCLOG(format, ...) cocos2d::CCLog(format, ##__VA_ARGS__) -#define CCLOGERROR(format,...) cocos2d::CCLog(format, ##__VA_ARGS__) -#define CCLOGINFO(format,...) do {} while (0) -#define CCLOGWARN(...) __CCLOGWITHFUNCTION(__VA_ARGS__) - -#elif COCOS2D_DEBUG > 1 -#define CCLOG(format, ...) cocos2d::CCLog(format, ##__VA_ARGS__) -#define CCLOGERROR(format,...) cocos2d::CCLog(format, ##__VA_ARGS__) -#define CCLOGINFO(format,...) cocos2d::CCLog(format, ##__VA_ARGS__) -#define CCLOGWARN(...) __CCLOGWITHFUNCTION(__VA_ARGS__) -#endif // COCOS2D_DEBUG - -// Lua engine debug -#if !defined(COCOS2D_DEBUG) || COCOS2D_DEBUG == 0 || CC_LUA_ENGINE_DEBUG == 0 -#define LUALOG(...) -#else -#define LUALOG(format, ...) cocos2d::CCLog(format, ##__VA_ARGS__) -#endif // Lua engine debug - -#if defined(__GNUC__) && ((__GNUC__ >= 5) || ((__GNUG__ == 4) && (__GNUC_MINOR__ >= 4))) \ - || (defined(__clang__) && (__clang_major__ >= 3)) -#define CC_DISABLE_COPY(Class) \ -private: \ - Class(const Class &) = delete; \ - Class &operator =(const Class &) = delete; -#else -#define CC_DISABLE_COPY(Class) \ -private: \ - Class(const Class &); \ - Class &operator =(const Class &); -#endif - -/* - * only certain compilers support __attribute__((deprecated)) - */ -#if defined(__GNUC__) && ((__GNUC__ >= 4) || ((__GNUC__ == 3) && (__GNUC_MINOR__ >= 1))) - #define CC_DEPRECATED_ATTRIBUTE __attribute__((deprecated)) -#elif _MSC_VER >= 1400 //vs 2005 or higher - #define CC_DEPRECATED_ATTRIBUTE __declspec(deprecated) -#else - #define CC_DEPRECATED_ATTRIBUTE -#endif - -/* - * only certain compiler support __attribute__((format)) - * formatPos - 1-based position of format string argument - * argPos - 1-based position of first format-dependent argument - */ -#if defined(__GNUC__) && (__GNUC__ >= 4) -#define CC_FORMAT_PRINTF(formatPos, argPos) __attribute__((__format__(printf, formatPos, argPos))) -#elif defined(__has_attribute) - #if __has_attribute(format) - #define CC_FORMAT_PRINTF(formatPos, argPos) __attribute__((__format__(printf, formatPos, argPos))) - #endif // __has_attribute(format) -#else -#define CC_FORMAT_PRINTF(formatPos, argPos) -#endif - -#if defined(_MSC_VER) -#define CC_FORMAT_PRINTF_SIZE_T "%08lX" -#else -#define CC_FORMAT_PRINTF_SIZE_T "%08zX" -#endif - -#ifdef __GNUC__ -#define CC_UNUSED __attribute__ ((unused)) -#else -#define CC_UNUSED -#endif - -#endif // __CC_PLATFORM_MACROS_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/platform/CCSAXParser.h b/cappuccino-sdk/incl/cocos2dx/platform/CCSAXParser.h deleted file mode 100644 index 341e94b..0000000 --- a/cappuccino-sdk/incl/cocos2dx/platform/CCSAXParser.h +++ /dev/null @@ -1,78 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010 cocos2d-x.org http://cocos2d-x.org - Copyright (c) 2010 МакÑим ÐкÑенов - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCSAXPARSER_H__ -#define __CCSAXPARSER_H__ - -#include "CCPlatformConfig.h" -#include "CCCommon.h" - -NS_CC_BEGIN - -/** - * @addtogroup platform - * @{ - */ - -typedef unsigned char CC_XML_CHAR; - -/** - * @js NA - * @lua NA - */ -class CC_DLL CCSAXDelegator -{ -public: - virtual void startElement(void *ctx, const char *name, const char **atts) = 0; - virtual void endElement(void *ctx, const char *name) = 0; - virtual void textHandler(void *ctx, const char *s, int len) = 0; -}; - -/** - * @js NA - * @lua NA - */ -class CC_DLL CCSAXParser -{ - CCSAXDelegator* m_pDelegator; -public: - - CCSAXParser(); - ~CCSAXParser(void); - - bool init(const char *pszEncoding); - bool parse(const char* pXMLData, unsigned int uDataLength); - bool parse(const char *pszFile); - void setDelegator(CCSAXDelegator* pDelegator); - - static void startElement(void *ctx, const CC_XML_CHAR *name, const CC_XML_CHAR **atts); - static void endElement(void *ctx, const CC_XML_CHAR *name); - static void textHandler(void *ctx, const CC_XML_CHAR *name, int len); -}; - -// end of platform group -/// @} - -NS_CC_END - -#endif //__CCSAXPARSER_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/platform/CCThread.h b/cappuccino-sdk/incl/cocos2dx/platform/CCThread.h deleted file mode 100644 index 4a7e42e..0000000 --- a/cappuccino-sdk/incl/cocos2dx/platform/CCThread.h +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_PLATFORM_THREAD_H__ -#define __CC_PLATFORM_THREAD_H__ - -#include "CCCommon.h" -#include "CCPlatformMacros.h" - -NS_CC_BEGIN - -/** - * @addtogroup platform - * @{ - */ - -/* On iOS, should create autorelease pool when create a new thread - * and release it when the thread end. - * @js NA - * @lua NA - */ -class CC_DLL CCThread -{ -public: - CCThread() : m_pAutoreasePool(0) {} - ~CCThread(); - - void createAutoreleasePool(); - -private: - void *m_pAutoreasePool; -}; - -// end of platform group -/// @} - -NS_CC_END - -#endif // __CC_PLATFORM_THREAD_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/platform/platform.h b/cappuccino-sdk/incl/cocos2dx/platform/platform.h deleted file mode 100644 index 6a77ef4..0000000 --- a/cappuccino-sdk/incl/cocos2dx/platform/platform.h +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __PLATFORM_H__ -#define __PLATFORM_H__ - -#include "CCThread.h" -#include "CCPlatformMacros.h" - -NS_CC_BEGIN - -/** - * @addtogroup platform - * @{ - */ - -struct CC_DLL cc_timeval -{ -#ifdef __native_client__ - time_t tv_sec; // seconds -#else - long tv_sec; // seconds -#endif - int tv_usec; // microSeconds -}; - -class CC_DLL CCTime -{ -public: - static int gettimeofdayCocos2d(struct cc_timeval *tp, void *tzp); - static double timersubCocos2d(struct cc_timeval *start, struct cc_timeval *end); -}; - -// end of platform group -/// @} - -NS_CC_END - -#endif // __PLATFORM_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/proj.win32/cocos2d.vcxproj b/cappuccino-sdk/incl/cocos2dx/proj.win32/cocos2d.vcxproj deleted file mode 100644 index e4195b3..0000000 --- a/cappuccino-sdk/incl/cocos2dx/proj.win32/cocos2d.vcxproj +++ /dev/null @@ -1,441 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - libcocos2d - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} - cocos2d-x.win32 - Win32Proj - - - - DynamicLibrary - Unicode - v100 - v110 - v110_xp - v120 - v120_xp - - - DynamicLibrary - Unicode - v100 - v110 - v110_xp - v120 - v120_xp - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration).win32\ - $(Configuration).win32\ - false - $(SolutionDir)$(Configuration).win32\ - $(Configuration).win32\ - false - AllRules.ruleset - - - AllRules.ruleset - - - - - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) - - - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) - - - - - - - - Disabled - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(ProjectDir)..;$(ProjectDir)..\platform\win32;$(ProjectDir)..\platform\third_party\win32\iconv;$(ProjectDir)..\platform\third_party\win32\zlib;$(ProjectDir)..\platform\third_party\win32\libpng;$(ProjectDir)..\platform\third_party\win32\libjpeg;$(ProjectDir)..\platform\third_party\win32\libtiff;$(ProjectDir)..\platform\third_party\win32\libwebp;$(ProjectDir)..\platform\third_party\win32\pthread;$(ProjectDir)..\platform\third_party\win32\OGLES;..\include;$(ProjectDir)..\kazmath\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;COCOS2D_DEBUG=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - 4267;4251;4244;%(DisableSpecificWarnings) - - - if not exist "$(OutDir)" mkdir "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\platform\third_party\win32\libraries\*.*" "$(OutDir)" - - - - opengl32.lib;glew32.lib;libzlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;libwebp.lib;libiconv.lib;pthreadVCE2.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).dll - $(OutDir);%(AdditionalLibraryDirectories) - false - ;%(IgnoreSpecificDefaultLibraries) - true - Windows - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - - - - - - - - - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(ProjectDir)..;$(ProjectDir)..\platform\win32;$(ProjectDir)..\platform\third_party\win32\iconv;$(ProjectDir)..\platform\third_party\win32\zlib;$(ProjectDir)..\platform\third_party\win32\libpng;$(ProjectDir)..\platform\third_party\win32\libjpeg;$(ProjectDir)..\platform\third_party\win32\libtiff;$(ProjectDir)..\platform\third_party\win32\libwebp;$(ProjectDir)..\platform\third_party\win32\pthread;$(ProjectDir)..\platform\third_party\win32\OGLES;..\include;$(ProjectDir)..\kazmath\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;COCOS2DXWIN32_EXPORTS;GL_GLEXT_PROTOTYPES;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - 4267;4251;4244;%(DisableSpecificWarnings) - - - if not exist "$(OutDir)" mkdir "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\platform\third_party\win32\libraries\*.*" "$(OutDir)" - - - - opengl32.lib;glew32.lib;libzlib.lib;libpng.lib;libjpeg.lib;libtiff.lib;libwebp.lib;libiconv.lib;pthreadVCE2.lib;%(AdditionalDependencies) - $(OutDir)$(ProjectName).dll - $(OutDir);%(AdditionalLibraryDirectories) - ;%(IgnoreSpecificDefaultLibraries) - true - Windows - true - true - $(TargetDir)$(TargetName).lib - MachineX86 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/cappuccino-sdk/incl/cocos2dx/proj.win32/cocos2d.vcxproj.filters b/cappuccino-sdk/incl/cocos2dx/proj.win32/cocos2d.vcxproj.filters deleted file mode 100644 index 75fc5ae..0000000 --- a/cappuccino-sdk/incl/cocos2dx/proj.win32/cocos2d.vcxproj.filters +++ /dev/null @@ -1,956 +0,0 @@ - - - - - {cc64f5ad-2234-494c-9c51-b7a20c8887aa} - - - {aec8225f-81a7-4213-b97b-7004d5535398} - - - {736cf4ab-e0d6-40ba-912a-b062d28d318a} - - - {1c7c61b8-3d36-4ba0-a87c-457eb4c782d0} - - - {0b3a64bd-79fa-476a-a461-6b97e5072453} - - - {e455af5e-da09-4f41-b79f-df4dd311820d} - - - {206bd96b-f80e-4722-8675-d7c6ff9b3639} - - - {075492ba-08bc-404c-92da-32029797a600} - - - {41abe422-1602-4fe0-ac1c-6b04a14c1abb} - - - {8bf0f517-2ac3-4fc3-a1ad-999d9ea103cd} - - - {926fc31c-8742-4984-9940-c972dd02fc8a} - - - {9428f8e6-4ce3-4596-b8af-14d70b7c5b5d} - - - {755e5282-111e-46a5-9169-7c12b37f5ffc} - - - {d94bbf20-8de9-49a7-ae20-6a1140cf633b} - - - {4a64789e-cc8d-4f84-a869-e6dae2e0d58c} - - - {bb98a889-9a48-4e31-af2f-117f14da388a} - - - {fdea327e-b905-47db-8c33-b70d7866166b} - - - {46c8d130-b8b5-47f5-a063-ca700e1c32cc} - - - {f2671200-b2d8-4d2e-9728-06719cf6f835} - - - {eaa16c9b-dfbc-4a37-8e3e-e961d9ca1d1a} - - - {3c91932f-7667-4049-b9bd-caac4c8eab15} - - - {535c04b0-fe2b-44c9-9a8c-9029e2b6de5c} - - - {5b082c5c-d396-43ca-b3b1-997d0f6247d0} - - - {7751500e-ac9e-4604-a96d-670b30b7d8bd} - - - {b38113b1-3d59-4f6e-ac5a-f43921f6ed09} - - - {569c49c9-27eb-456e-a3f4-9f403e28a3a1} - - - {191b3e94-47dc-4054-b1cb-bf145d281521} - - - {a91a4cc0-41e6-43e9-80c0-2c9101924386} - - - {e278b354-1e41-4e92-95b3-7f661ba67140} - - - {163895ae-8a8e-46bf-bdf2-98bb2c1347fc} - - - {1179d205-d065-49f0-8457-bc4c3f1d0cb3} - - - {cc25bb83-527d-4218-8d68-ebf963ce7698} - - - {c45b97e8-fa1f-4e58-8ec5-d46371c2dd26} - - - {485f1c18-d463-48d0-bcaa-a10e32aa3332} - - - - - base_nodes - - - base_nodes - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - effects - - - effects - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - label_nodes - - - label_nodes - - - label_nodes - - - layers_scenes_transitions_nodes - - - layers_scenes_transitions_nodes - - - layers_scenes_transitions_nodes - - - layers_scenes_transitions_nodes - - - layers_scenes_transitions_nodes - - - menu_nodes - - - menu_nodes - - - misc_nodes - - - misc_nodes - - - misc_nodes - - - particle_nodes - - - particle_nodes - - - particle_nodes - - - particle_nodes - - - platform - - - platform - - - platform - - - platform - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - sprite_nodes - - - sprite_nodes - - - sprite_nodes - - - sprite_nodes - - - sprite_nodes - - - sprite_nodes - - - support - - - support - - - support - - - support - - - support - - - support - - - support - - - support\data_support - - - support\image_support - - - support\zip_support - - - support\zip_support - - - support\zip_support - - - textures - - - textures - - - textures - - - textures - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - touch_dispatcher - - - touch_dispatcher - - - touch_dispatcher - - - keypad_dispatcher - - - keypad_dispatcher - - - text_input_node - - - text_input_node - - - script_support - - - kazmath\src - - - kazmath\src - - - kazmath\src - - - kazmath\src - - - kazmath\src - - - kazmath\src - - - kazmath\src - - - kazmath\src - - - kazmath\src - - - kazmath\src - - - kazmath\src - - - kazmath\src\GL - - - kazmath\src\GL - - - - - - - - draw_nodes - - - draw_nodes - - - misc_nodes - - - shaders - - - shaders - - - shaders - - - shaders - - - platform\win32 - - - platform - - - platform - - - platform\win32 - - - support - - - support\user_default - - - support\tinyxml2 - - - cocoa - - - - textures - - - support\component - - - support\component - - - - - base_nodes - - - base_nodes - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - effects - - - effects - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - actions - - - include - - - include - - - include - - - include - - - include - - - include - - - label_nodes - - - label_nodes - - - label_nodes - - - layers_scenes_transitions_nodes - - - layers_scenes_transitions_nodes - - - layers_scenes_transitions_nodes - - - layers_scenes_transitions_nodes - - - layers_scenes_transitions_nodes - - - menu_nodes - - - menu_nodes - - - misc_nodes - - - misc_nodes - - - misc_nodes - - - particle_nodes - - - particle_nodes - - - particle_nodes - - - particle_nodes - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - platform\win32 - - - sprite_nodes - - - sprite_nodes - - - sprite_nodes - - - sprite_nodes - - - sprite_nodes - - - sprite_nodes - - - support - - - support - - - support - - - support - - - support - - - support - - - support - - - support\data_support - - - support\data_support - - - support\data_support - - - support\image_support - - - support\zip_support - - - support\zip_support - - - support\zip_support - - - textures - - - textures - - - textures - - - textures - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - tilemap_parallax_nodes - - - touch_dispatcher - - - touch_dispatcher - - - touch_dispatcher - - - touch_dispatcher - - - keypad_dispatcher - - - keypad_dispatcher - - - text_input_node - - - text_input_node - - - text_input_node - - - script_support - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath - - - kazmath\include\kazmath\GL - - - kazmath\include\kazmath\GL - - - - - - - draw_nodes - - - draw_nodes - - - misc_nodes - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - shaders - - - platform\win32 - - - support - - - support\user_default - - - support\tinyxml2 - - - cocoa - - - cocoa - - - cocoa - - - cocoa - - - textures - - - - support\component - - - support\component - - - \ No newline at end of file diff --git a/cappuccino-sdk/incl/cocos2dx/script_support/CCScriptSupport.h b/cappuccino-sdk/incl/cocos2dx/script_support/CCScriptSupport.h deleted file mode 100644 index 988d297..0000000 --- a/cappuccino-sdk/incl/cocos2dx/script_support/CCScriptSupport.h +++ /dev/null @@ -1,298 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __SCRIPT_SUPPORT_H__ -#define __SCRIPT_SUPPORT_H__ - -#include "platform/CCCommon.h" -#include "CCAccelerometer.h" -#include "touch_dispatcher/CCTouch.h" -#include "cocoa/CCSet.h" -#include "CCAccelerometer.h" -#include -#include -#include - -typedef struct lua_State lua_State; - -NS_CC_BEGIN - -class CCTimer; -class CCLayer; -class CCMenuItem; -class CCNotificationCenter; -class CCCallFunc; -class CCAcceleration; - -enum ccScriptType { - kScriptTypeNone = 0, - kScriptTypeLua, - kScriptTypeJavascript -}; -/** - * @js NA - * @lua NA - */ -class CCScriptHandlerEntry : public CCObject -{ -public: - static CCScriptHandlerEntry* create(int nHandler); - ~CCScriptHandlerEntry(void); - - int getHandler(void) { - return m_nHandler; - } - - int getEntryId(void) { - return m_nEntryId; - } - -protected: - CCScriptHandlerEntry(int nHandler) - : m_nHandler(nHandler) - { - static int newEntryId = 0; - newEntryId++; - m_nEntryId = newEntryId; - } - - int m_nHandler; - int m_nEntryId; -}; - -/** - * @addtogroup script_support - * @{ - * @js NA - * @lua NA - */ - -class CCSchedulerScriptHandlerEntry : public CCScriptHandlerEntry -{ -public: - // nHandler return by tolua_ref_function(), called from LuaCocos2d.cpp - static CCSchedulerScriptHandlerEntry* create(int nHandler, float fInterval, bool bPaused); - ~CCSchedulerScriptHandlerEntry(void); - - cocos2d::CCTimer* getTimer(void) { - return m_pTimer; - } - - bool isPaused(void) { - return m_bPaused; - } - - void markedForDeletion(void) { - m_bMarkedForDeletion = true; - } - - bool isMarkedForDeletion(void) { - return m_bMarkedForDeletion; - } - -private: - CCSchedulerScriptHandlerEntry(int nHandler) - : CCScriptHandlerEntry(nHandler) - , m_pTimer(NULL) - , m_bPaused(false) - , m_bMarkedForDeletion(false) - { - } - bool init(float fInterval, bool bPaused); - - cocos2d::CCTimer* m_pTimer; - bool m_bPaused; - bool m_bMarkedForDeletion; -}; - - -/** - * @js NA - * @lua NA - */ -class CCTouchScriptHandlerEntry : public CCScriptHandlerEntry -{ -public: - static CCTouchScriptHandlerEntry* create(int nHandler, bool bIsMultiTouches, int nPriority, bool bSwallowsTouches); - ~CCTouchScriptHandlerEntry(void); - - bool isMultiTouches(void) { - return m_bIsMultiTouches; - } - - int getPriority(void) { - return m_nPriority; - } - - bool getSwallowsTouches(void) { - return m_bSwallowsTouches; - } - -private: - CCTouchScriptHandlerEntry(int nHandler) - : CCScriptHandlerEntry(nHandler) - , m_bIsMultiTouches(false) - , m_nPriority(0) - , m_bSwallowsTouches(false) - { - } - bool init(bool bIsMultiTouches, int nPriority, bool bSwallowsTouches); - - bool m_bIsMultiTouches; - int m_nPriority; - bool m_bSwallowsTouches; -}; - - -// Don't make CCScriptEngineProtocol inherits from CCObject since setScriptEngine is invoked only once in AppDelegate.cpp, -// It will affect the lifecycle of ScriptCore instance, the autorelease pool will be destroyed before destructing ScriptCore. -// So a crash will appear on Win32 if you click the close button. -/** - * @js NA - * @lua NA - */ -class CC_DLL CCScriptEngineProtocol -{ -public: - virtual ~CCScriptEngineProtocol() {}; - - /** Get script type */ - virtual ccScriptType getScriptType() { return kScriptTypeNone; }; - - /** Remove script object. */ - virtual void removeScriptObjectByCCObject(CCObject* pObj) = 0; - - /** Remove script function handler, only CCLuaEngine class need to implement this function. */ - virtual void removeScriptHandler(int nHandler) {}; - - /** Reallocate script function handler, only CCLuaEngine class need to implement this function. */ - virtual int reallocateScriptHandler(int nHandler) { return -1;} - - /** - @brief Execute script code contained in the given string. - @param codes holding the valid script code that should be executed. - @return 0 if the string is executed correctly. - @return other if the string is executed wrongly. - */ - virtual int executeString(const char* codes) = 0; - - /** - @brief Execute a script file. - @param filename String object holding the filename of the script file that is to be executed - */ - virtual int executeScriptFile(const char* filename) = 0; - - /** - @brief Execute a scripted global function. - @brief The function should not take any parameters and should return an integer. - @param functionName String object holding the name of the function, in the global script environment, that is to be executed. - @return The integer value returned from the script function. - */ - virtual int executeGlobalFunction(const char* functionName) = 0; - - /** - @brief Execute a node event function - @param pNode which node produce this event - @param nAction kCCNodeOnEnter,kCCNodeOnExit,kCCMenuItemActivated,kCCNodeOnEnterTransitionDidFinish,kCCNodeOnExitTransitionDidStart - @return The integer value returned from the script function. - */ - virtual int executeNodeEvent(CCNode* pNode, int nAction) = 0; - - virtual int executeMenuItemEvent(CCMenuItem* pMenuItem) = 0; - /** Execute a notification event function */ - virtual int executeNotificationEvent(CCNotificationCenter* pNotificationCenter, const char* pszName) = 0; - - /** execute a callfun event */ - virtual int executeCallFuncActionEvent(CCCallFunc* pAction, CCObject* pTarget = NULL) = 0; - /** execute a schedule function */ - virtual int executeSchedule(int nHandler, float dt, CCNode* pNode = NULL) = 0; - - /** functions for executing touch event */ - virtual int executeLayerTouchesEvent(CCLayer* pLayer, int eventType, CCSet *pTouches) = 0; - virtual int executeLayerTouchEvent(CCLayer* pLayer, int eventType, CCTouch *pTouch) = 0; - - /** functions for keypad event */ - virtual int executeLayerKeypadEvent(CCLayer* pLayer, int eventType) = 0; - - /** execute a accelerometer event */ - virtual int executeAccelerometerEvent(CCLayer* pLayer, CCAcceleration* pAccelerationValue) = 0; - - /** function for common event */ - virtual int executeEvent(int nHandler, const char* pEventName, CCObject* pEventSource = NULL, const char* pEventSourceClassName = NULL) = 0; - - /** function for c++ call back lua funtion */ - virtual int executeEventWithArgs(int nHandler, CCArray* pArgs) { return 0; } - - /** called by CCAssert to allow scripting engine to handle failed assertions - * @return true if the assert was handled by the script engine, false otherwise. - */ - virtual bool handleAssert(const char *msg) = 0; - - /** - * - */ - enum ConfigType - { - NONE, - COCOSTUDIO, - }; - virtual bool parseConfig(ConfigType type, const std::string& str) = 0; -}; - -/** - CCScriptEngineManager is a singleton which holds an object instance of CCScriptEngineProtocl - It helps cocos2d-x and the user code to find back LuaEngine object - @since v0.99.5-x-0.8.5 - @js NA - @lua NA - */ -class CC_DLL CCScriptEngineManager -{ -public: - ~CCScriptEngineManager(void); - - CCScriptEngineProtocol* getScriptEngine(void) { - return m_pScriptEngine; - } - void setScriptEngine(CCScriptEngineProtocol *pScriptEngine); - void removeScriptEngine(void); - - static CCScriptEngineManager* sharedManager(void); - static void purgeSharedManager(void); - -private: - CCScriptEngineManager(void) - : m_pScriptEngine(NULL) - { - } - - CCScriptEngineProtocol *m_pScriptEngine; -}; - -// end of script_support group -/// @} - -NS_CC_END - -#endif // __SCRIPT_SUPPORT_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/CCGLProgram.h b/cappuccino-sdk/incl/cocos2dx/shaders/CCGLProgram.h deleted file mode 100644 index cb4aacd..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/CCGLProgram.h +++ /dev/null @@ -1,298 +0,0 @@ -/**************************************************************************** -Copyright 2012 cocos2d-x.org -Copyright 2011 Jeff Lamarche -Copyright 2012 Goffredo Marocchi -Copyright 2012 Ricardo Quesada - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCGLPROGRAM_H__ -#define __CCGLPROGRAM_H__ - -#include "ccMacros.h" -#include "cocoa/CCObject.h" - -#include "CCGL.h" - -NS_CC_BEGIN - -/** - * @addtogroup shaders - * @{ - */ - -enum { - kCCVertexAttrib_Position, - kCCVertexAttrib_Color, - kCCVertexAttrib_TexCoords, - - kCCVertexAttrib_MAX, -}; - -enum { - kCCUniformPMatrix, - kCCUniformMVMatrix, - kCCUniformMVPMatrix, - kCCUniformTime, - kCCUniformSinTime, - kCCUniformCosTime, - kCCUniformRandom01, - kCCUniformSampler, - - kCCUniform_MAX, -}; - -#define kCCShader_PositionTextureColor "ShaderPositionTextureColor" -#define kCCShader_PositionTextureColorAlphaTest "ShaderPositionTextureColorAlphaTest" -#define kCCShader_PositionColor "ShaderPositionColor" -#define kCCShader_PositionTexture "ShaderPositionTexture" -#define kCCShader_PositionTexture_uColor "ShaderPositionTexture_uColor" -#define kCCShader_PositionTextureA8Color "ShaderPositionTextureA8Color" -#define kCCShader_Position_uColor "ShaderPosition_uColor" -#define kCCShader_PositionLengthTexureColor "ShaderPositionLengthTextureColor" -#define kCCShader_ControlSwitch "Shader_ControlSwitch" - -// uniform names -#define kCCUniformPMatrix_s "CC_PMatrix" -#define kCCUniformMVMatrix_s "CC_MVMatrix" -#define kCCUniformMVPMatrix_s "CC_MVPMatrix" -#define kCCUniformTime_s "CC_Time" -#define kCCUniformSinTime_s "CC_SinTime" -#define kCCUniformCosTime_s "CC_CosTime" -#define kCCUniformRandom01_s "CC_Random01" -#define kCCUniformSampler_s "CC_Texture0" -#define kCCUniformAlphaTestValue "CC_alpha_value" - -// Attribute names -#define kCCAttributeNameColor "a_color" -#define kCCAttributeNamePosition "a_position" -#define kCCAttributeNameTexCoord "a_texCoord" - -struct _hashUniformEntry; - -typedef void (*GLInfoFunction)(GLuint program, GLenum pname, GLint* params); -typedef void (*GLLogFunction) (GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog); - -/** CCGLProgram - Class that implements a glProgram - - - @since v2.0.0 - */ -class CC_DLL CCGLProgram : public CCObject -{ -public: - /** - * @js ctor - * @lua NA - */ - CCGLProgram(); - /** - * @js NA - * @lua NA - */ - virtual ~CCGLProgram(); - /** Initializes the CCGLProgram with a vertex and fragment with bytes array - * @js initWithString - * @lua NA - */ - bool initWithVertexShaderByteArray(const GLchar* vShaderByteArray, const GLchar* fShaderByteArray); - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - /** Initializes the CCGLProgram with precompiled shader program */ - bool initWithPrecompiledProgramByteArray(const GLchar* vShaderByteArray, const GLchar* fShaderByteArray); -#endif - /** Initializes the CCGLProgram with a vertex and fragment with contents of filenames - * @js init - * @lua NA - */ - bool initWithVertexShaderFilename(const char* vShaderFilename, const char* fShaderFilename); - /** It will add a new attribute to the shader - * @lua NA - */ - void addAttribute(const char* attributeName, GLuint index); - /** links the glProgram - * @lua NA - */ - bool link(); - /** it will call glUseProgram() - * @lua NA - */ - void use(); -/** It will create 4 uniforms: - - kCCUniformPMatrix - - kCCUniformMVMatrix - - kCCUniformMVPMatrix - - kCCUniformSampler - - And it will bind "kCCUniformSampler" to 0 - * @lua NA - */ - void updateUniforms(); - - /** calls retrieves the named uniform location for this shader program. - * @lua NA - */ - GLint getUniformLocationForName(const char* name); - - /** calls glUniform1i only if the values are different than the previous call for this same shader program. - * @js setUniformLocationI32 - * @lua NA - */ - void setUniformLocationWith1i(GLint location, GLint i1); - - /** calls glUniform2i only if the values are different than the previous call for this same shader program. - * @lua NA - */ - void setUniformLocationWith2i(GLint location, GLint i1, GLint i2); - - /** calls glUniform3i only if the values are different than the previous call for this same shader program. - * @lua NA - */ - void setUniformLocationWith3i(GLint location, GLint i1, GLint i2, GLint i3); - - /** calls glUniform4i only if the values are different than the previous call for this same shader program. - * @lua NA - */ - void setUniformLocationWith4i(GLint location, GLint i1, GLint i2, GLint i3, GLint i4); - - /** calls glUniform2iv only if the values are different than the previous call for this same shader program. - * @lua NA - */ - void setUniformLocationWith2iv(GLint location, GLint* ints, unsigned int numberOfArrays); - - /** calls glUniform3iv only if the values are different than the previous call for this same shader program. - * @lua NA - */ - void setUniformLocationWith3iv(GLint location, GLint* ints, unsigned int numberOfArrays); - - /** calls glUniform4iv only if the values are different than the previous call for this same shader program. - * @lua NA - */ - - void setUniformLocationWith4iv(GLint location, GLint* ints, unsigned int numberOfArrays); - - /** calls glUniform1f only if the values are different than the previous call for this same shader program. - * @js setUniformLocationF32 - * @lua NA - */ - void setUniformLocationWith1f(GLint location, GLfloat f1); - - /** calls glUniform2f only if the values are different than the previous call for this same shader program. - * @js setUniformLocationF32 - * @lua NA - */ - void setUniformLocationWith2f(GLint location, GLfloat f1, GLfloat f2); - - /** calls glUniform3f only if the values are different than the previous call for this same shader program. - * @js setUniformLocationF32 - * @lua NA - */ - void setUniformLocationWith3f(GLint location, GLfloat f1, GLfloat f2, GLfloat f3); - - /** calls glUniform4f only if the values are different than the previous call for this same shader program. - * @js setUniformLocationF32 - * @lua NA - */ - void setUniformLocationWith4f(GLint location, GLfloat f1, GLfloat f2, GLfloat f3, GLfloat f4); - - /** calls glUniform2fv only if the values are different than the previous call for this same shader program. - * @js NA - * @lua NA - */ - void setUniformLocationWith2fv(GLint location, GLfloat* floats, unsigned int numberOfArrays); - - /** calls glUniform3fv only if the values are different than the previous call for this same shader program. - * @js NA - * @lua NA - */ - void setUniformLocationWith3fv(GLint location, GLfloat* floats, unsigned int numberOfArrays); - - /** calls glUniform4fv only if the values are different than the previous call for this same shader program. - * @js NA - * @lua NA - */ - void setUniformLocationWith4fv(GLint location, GLfloat* floats, unsigned int numberOfArrays); - - /** calls glUniformMatrix4fv only if the values are different than the previous call for this same shader program. - * @js NA - * @lua NA - */ - void setUniformLocationWithMatrix4fv(GLint location, GLfloat* matrixArray, unsigned int numberOfMatrices); - - /** will update the builtin uniforms if they are different than the previous call for this same shader program. - * @lua NA - */ - void setUniformsForBuiltins(); - - /** returns the vertexShader error log - * @js getVertexShaderLog - * @lua NA - */ - const char* vertexShaderLog(); - /** returns the fragmentShader error log - * @js getFragmentShaderLog - * @lua NA - */ - const char* fragmentShaderLog(); - /** returns the program error log - * @js getProgramLog - * @lua NA - */ - const char* programLog(); - - /** reload all shaders, this function is designed for android - * when opengl context lost, so don't call it. - * @lua NA - */ - void reset(); - /** - * @lua NA - */ - inline const GLuint getProgram() { return m_uProgram; } - -private: - bool updateUniformLocation(GLint location, GLvoid* data, unsigned int bytes); - const char* description(); - bool compileShader(GLuint * shader, GLenum type, const GLchar* source); - const char* logForOpenGLObject(GLuint object, GLInfoFunction infoFunc, GLLogFunction logFunc); - -private: - GLuint m_uProgram; - GLuint m_uVertShader; - GLuint m_uFragShader; - GLint m_uUniforms[kCCUniform_MAX]; - struct _hashUniformEntry* m_pHashForUniforms; - bool m_bUsesTime; - bool m_hasShaderCompiler; - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) - std::string m_shaderId; -#endif -}; - -// end of shaders group -/// @} - -NS_CC_END - -#endif /* __CCGLPROGRAM_H__ */ diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/CCShaderCache.h b/cappuccino-sdk/incl/cocos2dx/shaders/CCShaderCache.h deleted file mode 100644 index 707034b..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/CCShaderCache.h +++ /dev/null @@ -1,94 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2011 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCSHADERCACHE_H__ -#define __CCSHADERCACHE_H__ - -#include "cocoa/CCDictionary.h" - -NS_CC_BEGIN - -class CCGLProgram; - -/** - * @addtogroup shaders - * @{ - */ - -/** CCShaderCache - Singleton that stores manages GL shaders - @since v2.0 - */ -class CC_DLL CCShaderCache : public CCObject -{ -public: - /** - * @js ctor - */ - CCShaderCache(); - /** - * @js NA - * @lua NA - */ - virtual ~CCShaderCache(); - /** returns the shared instance - * @js getInstance - */ - static CCShaderCache* sharedShaderCache(); - - /** purges the cache. It releases the retained instance. */ - static void purgeSharedShaderCache(); - - /** loads the default shaders */ - void loadDefaultShaders(); - - /** reload the default shaders */ - void reloadDefaultShaders(); - - - - /** returns a GL program for a given key - * @js getProgram - */ - CCGLProgram * programForKey(const char* key); - - /** adds a CCGLProgram to the cache for a given name */ - void addProgram(CCGLProgram* program, const char* key); - -private: - bool init(); - void loadDefaultShader(CCGLProgram *program, int type); - - CCDictionary* m_pPrograms; - -}; - -// end of shaders group -/// @} - -NS_CC_END - -#endif /* __CCSHADERCACHE_H__ */ diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/ccGLStateCache.h b/cappuccino-sdk/incl/cocos2dx/shaders/ccGLStateCache.h deleted file mode 100644 index 2d3c22a..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/ccGLStateCache.h +++ /dev/null @@ -1,161 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2011 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCGLSTATE_H__ -#define __CCGLSTATE_H__ - -#include "CCGL.h" -#include "platform/CCPlatformMacros.h" - -NS_CC_BEGIN - -/** - * @addtogroup shaders - * @{ - */ - -class CCGLProgram; - -/** vertex attrib flags */ -enum { - kCCVertexAttribFlag_None = 0, - - kCCVertexAttribFlag_Position = 1 << 0, - kCCVertexAttribFlag_Color = 1 << 1, - kCCVertexAttribFlag_TexCoords = 1 << 2, - - kCCVertexAttribFlag_PosColorTex = ( kCCVertexAttribFlag_Position | kCCVertexAttribFlag_Color | kCCVertexAttribFlag_TexCoords ), -}; - -/** GL server side states */ -typedef enum { -// CC_GL_SCISSOR_TEST = 1 << 0, -// CC_GL_STENCIL_TEST = 1 << 1, -// CC_GL_DEPTH_TEST = 1 << 2, -// CC_GL_BLEND = 1 << 3, -// CC_GL_DITHER = 1 << 4, - -// CC_GL_ALL = ( CC_GL_SCISSOR_TEST | CC_GL_STENCIL_TEST | CC_GL_DEPTH_TEST | CC_GL_BLEND | CC_GL_DITHER ), -// CC_GL_ALL = ( CC_GL_BLEND ), - CC_GL_ALL = 0, - -} ccGLServerState; - -/** @file ccGLStateCache.h -*/ - -/** Invalidates the GL state cache. - If CC_ENABLE_GL_STATE_CACHE it will reset the GL state cache. - @since v2.0.0 - */ -void CC_DLL ccGLInvalidateStateCache(void); - -/** Uses the GL program in case program is different than the current one. - If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glUseProgram() directly. - @since v2.0.0 - */ -void CC_DLL ccGLUseProgram(GLuint program); - -/** Deletes the GL program. If it is the one that is being used, it invalidates it. - If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glDeleteProgram() directly. - @since v2.0.0 - */ -void CC_DLL ccGLDeleteProgram(GLuint program); - -/** Uses a blending function in case it not already used. - If CC_ENABLE_GL_STATE_CACHE is disabled, it will the glBlendFunc() directly. - @since v2.0.0 - */ -void CC_DLL ccGLBlendFunc(GLenum sfactor, GLenum dfactor); - -/** Resets the blending mode back to the cached state in case you used glBlendFuncSeparate() or glBlendEquation(). - If CC_ENABLE_GL_STATE_CACHE is disabled, it will just set the default blending mode using GL_FUNC_ADD. - @since v2.0.0 - */ -void CC_DLL ccGLBlendResetToCache(void); - -/** sets the projection matrix as dirty - @since v2.0.0 - */ -void CC_DLL ccSetProjectionMatrixDirty(void); - -/** Will enable the vertex attribs that are passed as flags. - Possible flags: - - * kCCVertexAttribFlag_Position - * kCCVertexAttribFlag_Color - * kCCVertexAttribFlag_TexCoords - - These flags can be ORed. The flags that are not present, will be disabled. - - @since v2.0.0 - */ -void CC_DLL ccGLEnableVertexAttribs(unsigned int flags); - -/** If the texture is not already bound to texture unit 0, it binds it. - If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindTexture() directly. - @since v2.0.0 - */ -void CC_DLL ccGLBindTexture2D(GLuint textureId); - - -/** If the texture is not already bound to a given unit, it binds it. - If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindTexture() directly. - @since v2.1.0 - */ -void CC_DLL ccGLBindTexture2DN(GLuint textureUnit, GLuint textureId); - -/** It will delete a given texture. If the texture was bound, it will invalidate the cached. - If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glDeleteTextures() directly. - @since v2.0.0 - */ -void CC_DLL ccGLDeleteTexture(GLuint textureId); - -/** It will delete a given texture. If the texture was bound, it will invalidate the cached for the given texture unit. - If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glDeleteTextures() directly. - @since v2.1.0 - */ -void CC_DLL ccGLDeleteTextureN(GLuint textureUnit, GLuint textureId); - -/** If the vertex array is not already bound, it binds it. - If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glBindVertexArray() directly. - @since v2.0.0 - */ -void CC_DLL ccGLBindVAO(GLuint vaoId); - -/** It will enable / disable the server side GL states. - If CC_ENABLE_GL_STATE_CACHE is disabled, it will call glEnable() directly. - @since v2.0.0 - */ -void CC_DLL ccGLEnable( ccGLServerState flags ); - -// end of shaders group -/// @} - -NS_CC_END - - -#endif /* __CCGLSTATE_H__ */ diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/ccShaderEx_SwitchMask_frag.h b/cappuccino-sdk/incl/cocos2dx/shaders/ccShaderEx_SwitchMask_frag.h deleted file mode 100644 index 174eb3d..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/ccShaderEx_SwitchMask_frag.h +++ /dev/null @@ -1,18 +0,0 @@ -" \n\ -#ifdef GL_ES \n\ -precision lowp float; \n\ -#endif \n\ - \n\ -varying vec4 v_fragmentColor; \n\ -varying vec2 v_texCoord; \n\ -uniform sampler2D u_texture; \n\ -uniform sampler2D u_mask; \n\ - \n\ -void main() \n\ -{ \n\ - vec4 texColor = texture2D(u_texture, v_texCoord); \n\ - vec4 maskColor = texture2D(u_mask, v_texCoord); \n\ - vec4 finalColor = vec4(texColor.r, texColor.g, texColor.b, maskColor.a * texColor.a); \n\ - gl_FragColor = v_fragmentColor * finalColor; \n\ -} \n\ -"; diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionColorLengthTexture_frag.h b/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionColorLengthTexture_frag.h deleted file mode 100644 index 803664a..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionColorLengthTexture_frag.h +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (c) 2012 Scott Lembcke and Howling Moon Software - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -" \n\ -#ifdef GL_ES \n\ -// #extension GL_OES_standard_derivatives : enable \n\ - \n\ -varying mediump vec4 v_color; \n\ -varying mediump vec2 v_texcoord; \n\ -#else \n\ -varying vec4 v_color; \n\ -varying vec2 v_texcoord; \n\ -#endif \n\ - \n\ -void main() \n\ -{ \n\ -// #if defined GL_OES_standard_derivatives \n\ - // gl_FragColor = v_color*smoothstep(0.0, length(fwidth(v_texcoord)), 1.0 - length(v_texcoord)); \n\ -// #else \n\ - gl_FragColor = v_color*step(0.0, 1.0 - length(v_texcoord)); \n\ -// #endif \n\ -} \n\ -"; diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionColorLengthTexture_vert.h b/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionColorLengthTexture_vert.h deleted file mode 100644 index 3a8e96d..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionColorLengthTexture_vert.h +++ /dev/null @@ -1,47 +0,0 @@ -/* Copyright (c) 2012 Scott Lembcke and Howling Moon Software - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -" \n\ -#ifdef GL_ES \n\ -attribute mediump vec4 a_position; \n\ -attribute mediump vec2 a_texcoord; \n\ -attribute mediump vec4 a_color; \n\ - \n\ -varying mediump vec4 v_color; \n\ -varying mediump vec2 v_texcoord; \n\ - \n\ -#else \n\ -attribute vec4 a_position; \n\ -attribute vec2 a_texcoord; \n\ -attribute vec4 a_color; \n\ - \n\ -varying vec4 v_color; \n\ -varying vec2 v_texcoord; \n\ -#endif \n\ - \n\ -void main() \n\ -{ \n\ - v_color = vec4(a_color.rgb * a_color.a, a_color.a); \n\ - v_texcoord = a_texcoord; \n\ - \n\ - gl_Position = CC_MVPMatrix * a_position; \n\ -} \n\ -"; diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionColor_frag.h b/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionColor_frag.h deleted file mode 100644 index 910903d..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionColor_frag.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2011 Ricardo Quesada - * Copyright (c) 2012 Zynga Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -" \n\ -#ifdef GL_ES \n\ -precision lowp float; \n\ -#endif \n\ - \n\ -varying vec4 v_fragmentColor; \n\ - \n\ -void main() \n\ -{ \n\ - gl_FragColor = v_fragmentColor; \n\ -} \n\ -"; diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionColor_vert.h b/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionColor_vert.h deleted file mode 100644 index 633f338..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionColor_vert.h +++ /dev/null @@ -1,40 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2011 Ricardo Quesada - * Copyright (c) 2012 Zynga Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -" \n\ -attribute vec4 a_position; \n\ -attribute vec4 a_color; \n\ -#ifdef GL_ES \n\ -varying lowp vec4 v_fragmentColor; \n\ -#else \n\ -varying vec4 v_fragmentColor; \n\ -#endif \n\ - \n\ -void main() \n\ -{ \n\ - gl_Position = CC_MVPMatrix * a_position; \n\ - v_fragmentColor = a_color; \n\ -} \n\ -"; diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureA8Color_frag.h b/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureA8Color_frag.h deleted file mode 100644 index 6a8fb85..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureA8Color_frag.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2011 Ricardo Quesada - * Copyright (c) 2012 Zynga Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -" \n\ -#ifdef GL_ES \n\ -precision lowp float; \n\ -#endif \n\ - \n\ -varying vec4 v_fragmentColor; \n\ -varying vec2 v_texCoord; \n\ -uniform sampler2D CC_Texture0; \n\ - \n\ -void main() \n\ -{ \n\ - gl_FragColor = vec4( v_fragmentColor.rgb, // RGB from uniform \n\ - v_fragmentColor.a * texture2D(CC_Texture0, v_texCoord).a // A from texture & uniform \n\ - ); \n\ -} \n\ -"; diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureA8Color_vert.h b/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureA8Color_vert.h deleted file mode 100644 index bb29e7d..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureA8Color_vert.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2011 Ricardo Quesada - * Copyright (c) 2012 Zynga Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -" \n\ -attribute vec4 a_position; \n\ -attribute vec2 a_texCoord; \n\ -attribute vec4 a_color; \n\ - \n\ -#ifdef GL_ES \n\ -varying lowp vec4 v_fragmentColor; \n\ -varying mediump vec2 v_texCoord; \n\ -#else \n\ -varying vec4 v_fragmentColor; \n\ -varying vec2 v_texCoord; \n\ -#endif \n\ - \n\ -void main() \n\ -{ \n\ - gl_Position = CC_MVPMatrix * a_position; \n\ - v_fragmentColor = a_color; \n\ - v_texCoord = a_texCoord; \n\ -} \n\ -"; diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureColorAlphaTest_frag.h b/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureColorAlphaTest_frag.h deleted file mode 100644 index fe321ba..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureColorAlphaTest_frag.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2011 Brian Chapados - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -" \n\ -#ifdef GL_ES \n\ -precision lowp float; \n\ -#endif \n\ - \n\ -varying vec4 v_fragmentColor; \n\ -varying vec2 v_texCoord; \n\ -uniform sampler2D CC_Texture0; \n\ -uniform float CC_alpha_value; \n\ - \n\ -void main() \n\ -{ \n\ - vec4 texColor = texture2D(CC_Texture0, v_texCoord); \n\ - \n\ - // mimic: glAlphaFunc(GL_GREATER) \n\ - // pass if ( incoming_pixel >= CC_alpha_value ) => fail if incoming_pixel < CC_alpha_value \n\ - \n\ - if ( texColor.a <= CC_alpha_value ) \n\ - discard; \n\ - \n\ - gl_FragColor = texColor * v_fragmentColor; \n\ -} \n\ -"; diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureColor_frag.h b/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureColor_frag.h deleted file mode 100644 index df5527e..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureColor_frag.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2011 Ricardo Quesada - * Copyright (c) 2012 Zynga Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -" \n\ -#ifdef GL_ES \n\ -precision lowp float; \n\ -#endif \n\ - \n\ -varying vec4 v_fragmentColor; \n\ -varying vec2 v_texCoord; \n\ -uniform sampler2D CC_Texture0; \n\ - \n\ -void main() \n\ -{ \n\ - gl_FragColor = v_fragmentColor * texture2D(CC_Texture0, v_texCoord); \n\ -} \n\ -"; diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureColor_vert.h b/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureColor_vert.h deleted file mode 100644 index bb29e7d..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTextureColor_vert.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2011 Ricardo Quesada - * Copyright (c) 2012 Zynga Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -" \n\ -attribute vec4 a_position; \n\ -attribute vec2 a_texCoord; \n\ -attribute vec4 a_color; \n\ - \n\ -#ifdef GL_ES \n\ -varying lowp vec4 v_fragmentColor; \n\ -varying mediump vec2 v_texCoord; \n\ -#else \n\ -varying vec4 v_fragmentColor; \n\ -varying vec2 v_texCoord; \n\ -#endif \n\ - \n\ -void main() \n\ -{ \n\ - gl_Position = CC_MVPMatrix * a_position; \n\ - v_fragmentColor = a_color; \n\ - v_texCoord = a_texCoord; \n\ -} \n\ -"; diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTexture_frag.h b/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTexture_frag.h deleted file mode 100644 index 93a8f0e..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTexture_frag.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2011 Ricardo Quesada - * Copyright (c) 2012 Zynga Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -" \n\ -#ifdef GL_ES \n\ -precision lowp float; \n\ -#endif \n\ - \n\ -varying vec2 v_texCoord; \n\ -uniform sampler2D CC_Texture0; \n\ - \n\ -void main() \n\ -{ \n\ - gl_FragColor = texture2D(CC_Texture0, v_texCoord); \n\ -} \n\ -"; diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTexture_uColor_frag.h b/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTexture_uColor_frag.h deleted file mode 100644 index a97d250..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTexture_uColor_frag.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2011 Ricardo Quesada - * Copyright (c) 2012 Zynga Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -" \n\ -#ifdef GL_ES \n\ -precision lowp float; \n\ -#endif \n\ - \n\ -uniform vec4 u_color; \n\ - \n\ -varying vec2 v_texCoord; \n\ - \n\ -uniform sampler2D CC_Texture0; \n\ - \n\ -void main() \n\ -{ \n\ - gl_FragColor = texture2D(CC_Texture0, v_texCoord) * u_color; \n\ -} \n\ -"; diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTexture_uColor_vert.h b/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTexture_uColor_vert.h deleted file mode 100644 index 9d2bfd3..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTexture_uColor_vert.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2011 Ricardo Quesada - * Copyright (c) 2012 Zynga Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -" \n\ -attribute vec4 a_position; \n\ -attribute vec2 a_texCoord; \n\ - \n\ -#ifdef GL_ES \n\ -varying mediump vec2 v_texCoord; \n\ -#else \n\ -varying vec2 v_texCoord; \n\ -#endif \n\ - \n\ -void main() \n\ -{ \n\ - gl_Position = CC_MVPMatrix * a_position; \n\ - v_texCoord = a_texCoord; \n\ -} \n\ -"; diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTexture_vert.h b/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTexture_vert.h deleted file mode 100644 index 1278ab0..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_PositionTexture_vert.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2011 Ricardo Quesada - * Copyright (c) 2012 Zynga Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -" \n\ -attribute vec4 a_position; \n\ -attribute vec2 a_texCoord; \n\ - \n\ -#ifdef GL_ES \n\ -varying mediump vec2 v_texCoord; \n\ -#else \n\ -varying vec2 v_texCoord; \n\ -#endif \n\ - \n\ -void main() \n\ -{ \n\ - gl_Position = CC_MVPMatrix * a_position; \n\ - v_texCoord = a_texCoord; \n\ -} \n\ -"; diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_Position_uColor_frag.h b/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_Position_uColor_frag.h deleted file mode 100644 index d882c88..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_Position_uColor_frag.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2011 Ricardo Quesada - * Copyright (c) 2012 Zynga Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -" \n\ -#ifdef GL_ES \n\ -precision lowp float; \n\ -#endif \n\ - \n\ -varying vec4 v_fragmentColor; \n\ - \n\ -void main() \n\ -{ \n\ - gl_FragColor = v_fragmentColor; \n\ -} \n\ -"; diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_Position_uColor_vert.h b/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_Position_uColor_vert.h deleted file mode 100644 index c50e38b..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/ccShader_Position_uColor_vert.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2011 Ricardo Quesada - * Copyright (c) 2012 Zynga Inc. - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - -" \n\ -attribute vec4 a_position; \n\ -uniform vec4 u_color; \n\ -uniform float u_pointSize; \n\ - \n\ -#ifdef GL_ES \n\ -varying lowp vec4 v_fragmentColor; \n\ -#else \n\ -varying vec4 v_fragmentColor; \n\ -#endif \n\ - \n\ -void main() \n\ -{ \n\ - gl_Position = CC_MVPMatrix * a_position; \n\ - gl_PointSize = u_pointSize; \n\ - v_fragmentColor = u_color; \n\ -} \n\ -"; diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/ccShaders.h b/cappuccino-sdk/incl/cocos2dx/shaders/ccShaders.h deleted file mode 100644 index f0bcfd4..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/ccShaders.h +++ /dev/null @@ -1,68 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCSHADER_H__ -#define __CCSHADER_H__ - -#include "CCGL.h" -#include "platform/CCPlatformMacros.h" - -NS_CC_BEGIN - -/** - * @addtogroup shaders - * @{ - */ - -extern CC_DLL const GLchar * ccPosition_uColor_frag; -extern CC_DLL const GLchar * ccPosition_uColor_vert; - -extern CC_DLL const GLchar * ccPositionColor_frag; -extern CC_DLL const GLchar * ccPositionColor_vert; - -extern CC_DLL const GLchar * ccPositionTexture_frag; -extern CC_DLL const GLchar * ccPositionTexture_vert; - -extern CC_DLL const GLchar * ccPositionTextureA8Color_frag; -extern CC_DLL const GLchar * ccPositionTextureA8Color_vert; - -extern CC_DLL const GLchar * ccPositionTextureColor_frag; -extern CC_DLL const GLchar * ccPositionTextureColor_vert; - -extern CC_DLL const GLchar * ccPositionTextureColorAlphaTest_frag; - -extern CC_DLL const GLchar * ccPositionTexture_uColor_frag; -extern CC_DLL const GLchar * ccPositionTexture_uColor_vert; - -extern CC_DLL const GLchar * ccPositionColorLengthTexture_frag; -extern CC_DLL const GLchar * ccPositionColorLengthTexture_vert; - -extern CC_DLL const GLchar * ccExSwitchMask_frag; - -// end of shaders group -/// @} - -NS_CC_END - -#endif /* __CCSHADER_H__ */ diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/precompiled/winrt/precompiledshaders.h.REMOVED.git-id b/cappuccino-sdk/incl/cocos2dx/shaders/precompiled/winrt/precompiledshaders.h.REMOVED.git-id deleted file mode 100644 index 49e81b0..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/precompiled/winrt/precompiledshaders.h.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -741cd46d8e38e67400dde7cc64fba1a34421ab15 \ No newline at end of file diff --git a/cappuccino-sdk/incl/cocos2dx/shaders/precompiled/wp8/precompiledshaders.h.REMOVED.git-id b/cappuccino-sdk/incl/cocos2dx/shaders/precompiled/wp8/precompiledshaders.h.REMOVED.git-id deleted file mode 100644 index 5ea4bfe..0000000 --- a/cappuccino-sdk/incl/cocos2dx/shaders/precompiled/wp8/precompiledshaders.h.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -e8f8f1e54ee6515c3c0bbe8515db16961add174f \ No newline at end of file diff --git a/cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCAnimation.h b/cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCAnimation.h deleted file mode 100644 index 52f5496..0000000 --- a/cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCAnimation.h +++ /dev/null @@ -1,203 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CC_ANIMATION_H__ -#define __CC_ANIMATION_H__ - -#include "platform/CCPlatformConfig.h" -#include "cocoa/CCObject.h" -#include "cocoa/CCArray.h" -#include "cocoa/CCDictionary.h" -#include "cocoa/CCGeometry.h" -#include "CCSpriteFrame.h" -#include - -NS_CC_BEGIN - -class CCTexture2D; -class CCSpriteFrame; - -/** - * @addtogroup sprite_nodes - * @{ - */ - -/** CCAnimationFrame - A frame of the animation. It contains information like: - - sprite frame name - - # of delay units. - - offset - - @since v2.0 - */ -class CC_DLL CCAnimationFrame : public CCObject -{ -public: - /** - * @js ctor - */ - CCAnimationFrame(); - /** - * @js NA - * @lua NA - */ - virtual ~CCAnimationFrame(); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - /** initializes the animation frame with a spriteframe, number of delay units and a notification user info */ - bool initWithSpriteFrame(CCSpriteFrame* spriteFrame, float delayUnits, CCDictionary* userInfo); - - /** CCSpriteFrameName to be used */ //Robtop Modification: Dropped virtualness - //CC_SYNTHESIZE_RETAIN(CCSpriteFrame*, m_pSpriteFrame, SpriteFrame) - - /** how many units of time the frame takes */ - //Robtop Modification: Dropped virtualness: original CC_SYNTHESIZE - //CC_PROPERTY_NOVIRTUAL(float, m_fDelayUnits, DelayUnits) - - /** A CCAnimationFrameDisplayedNotification notification will be broadcast when the frame is displayed with this dictionary as UserInfo. If UserInfo is nil, then no notification will be broadcast. */ - //Robtop Modification: Dropped virtualness - //CC_SYNTHESIZE_RETAIN(CCDictionary*, m_pUserInfo, UserInfo) - - CCSpriteFrame* getSpriteFrame(void)const; - void setSpriteFrame(CCSpriteFrame*); - - float getDelayUnits(void)const; - void setDelayUnits(float); - - CCDictionary* getUserInfo(void)const; - void setUserInfo(CCDictionary*); -}; - - - - -/** A CCAnimation object is used to perform animations on the CCSprite objects. - -The CCAnimation object contains CCAnimationFrame objects, and a possible delay between the frames. -You can animate a CCAnimation object by using the CCAnimate action. Example: - -[sprite runAction:[CCAnimate actionWithAnimation:animation]]; - -*/ -class CC_DLL CCAnimation : public CCObject -{ -public: - /** - * @js ctor - */ - CCAnimation(); - /** - * @js NA - * @lua NA - */ - ~CCAnimation(void); -public: - /** Creates an animation - @since v0.99.5 - */ - static CCAnimation* create(void); - - /* Creates an animation with an array of CCSpriteFrame and a delay between frames in seconds. - The frames will be added with one "delay unit". - @since v0.99.5 - @js create - */ - static CCAnimation* createWithSpriteFrames(CCArray* arrayOfSpriteFrameNames, float delay = 0.0f); - - /* Creates an animation with an array of CCAnimationFrame, the delay per units in seconds and and how many times it should be executed. - @since v2.0 - */ - static CCAnimation* create(CCArray *arrayOfAnimationFrameNames, float delayPerUnit, unsigned int loops); - static CCAnimation* create(CCArray *arrayOfAnimationFrameNames, float delayPerUnit) { - return CCAnimation::create(arrayOfAnimationFrameNames, delayPerUnit, 1); - } - - /** Adds a CCSpriteFrame to a CCAnimation. - The frame will be added with one "delay unit". - */ - void addSpriteFrame(CCSpriteFrame *pFrame); - - /** Adds a frame with an image filename. Internally it will create a CCSpriteFrame and it will add it. - The frame will be added with one "delay unit". - Added to facilitate the migration from v0.8 to v0.9. - * @js addSpriteFrameWithFile - */ - void addSpriteFrameWithFileName(const char *pszFileName); - - /** Adds a frame with a texture and a rect. Internally it will create a CCSpriteFrame and it will add it. - The frame will be added with one "delay unit". - Added to facilitate the migration from v0.8 to v0.9. - */ - void addSpriteFrameWithTexture(CCTexture2D* pobTexture, const CCRect& rect); - /** - * @lua NA - */ - bool init(); - - /** Initializes a CCAnimation with frames and a delay between frames - @since v0.99.5 - @lua NA - */ - bool initWithSpriteFrames(CCArray *pFrames, float delay = 0.0f); - - /** Initializes a CCAnimation with CCAnimationFrame - @since v2.0 - @lua NA - */ - bool initWithAnimationFrames(CCArray* arrayOfAnimationFrames, float delayPerUnit, unsigned int loops); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - - /** total Delay units of the CCAnimation. */ - ROB_CC_SYNTHESIZE_READONLY(float, m_fTotalDelayUnits, TotalDelayUnits) - - /** Delay in seconds of the "delay unit" */ - ROB_CC_SYNTHESIZE(float, m_fDelayPerUnit, DelayPerUnit) - - /** duration in seconds of the whole animation. It is the result of totalDelayUnits * delayPerUnit */ - CC_PROPERTY_READONLY(float, m_fDuration, Duration) - - /** array of CCAnimationFrames */ - ROB_CC_SYNTHESIZE_RETAIN(CCArray*, m_pFrames, Frames) - - /** whether or not it shall restore the original frame when the animation finishes */ - ROB_CC_SYNTHESIZE(bool, m_bRestoreOriginalFrame, RestoreOriginalFrame) - - /** how many times the animation is going to loop. 0 means animation is not animated. 1, animation is executed one time, ... */ - ROB_CC_SYNTHESIZE(unsigned int, m_uLoops, Loops) -}; - -// end of sprite_nodes group -/// @} - -NS_CC_END - -#endif // __CC_ANIMATION_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCAnimationCache.h b/cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCAnimationCache.h deleted file mode 100644 index 9722397..0000000 --- a/cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCAnimationCache.h +++ /dev/null @@ -1,116 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CC_ANIMATION_CACHE_H__ -#define __CC_ANIMATION_CACHE_H__ - -#include "cocoa/CCObject.h" -#include "cocoa/CCDictionary.h" - -#include - -NS_CC_BEGIN - -class CCAnimation; - -/** - * @addtogroup sprite_nodes - * @{ - */ - -/** Singleton that manages the Animations. -It saves in a cache the animations. You should use this class if you want to save your animations in a cache. - -Before v0.99.5, the recommend way was to save them on the CCSprite. Since v0.99.5, you should use this class instead. - -@since v0.99.5 -*/ -class CC_DLL CCAnimationCache : public CCObject -{ -public: - /** - * @js ctor - */ - CCAnimationCache(); - /** - * @js NA - * @lua NA - */ - ~CCAnimationCache(); - /** Returns the shared instance of the Animation cache - * @js getInstance - */ - static CCAnimationCache* sharedAnimationCache(void); - - /** Purges the cache. It releases all the CCAnimation objects and the shared instance. - */ - static void purgeSharedAnimationCache(void); - - /** Adds a CCAnimation with a name. - */ - void addAnimation(CCAnimation *animation, const char * name); - - /** Deletes a CCAnimation from the cache. - *@js removeAnimation - */ - void removeAnimationByName(const char* name); - - /** Returns a CCAnimation that was previously added. - If the name is not found it will return nil. - You should retain the returned copy if you are going to use it. - @js getAnimation - */ - CCAnimation* animationByName(const char* name); - - /** Adds an animation from an NSDictionary - Make sure that the frames were previously loaded in the CCSpriteFrameCache. - @param plist The path of the relative file,it use to find the plist path for load SpriteFrames. - @since v1.1 - */ - void addAnimationsWithDictionary(CCDictionary* dictionary,const char* plist = NULL); - - /** Adds an animation from a plist file. - Make sure that the frames were previously loaded in the CCSpriteFrameCache. - @since v1.1 - @js addAnimations - */ - void addAnimationsWithFile(const char* plist); - - bool init(void); - -private: - void parseVersion1(CCDictionary* animations); - void parseVersion2(CCDictionary* animations); -private: - CCDictionary* m_pAnimations; - static CCAnimationCache* s_pSharedAnimationCache; -}; - -// end of sprite_nodes group -/// @} - -NS_CC_END - -#endif // __CC_ANIMATION_CACHE_H__ \ No newline at end of file diff --git a/cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCSprite.h b/cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCSprite.h deleted file mode 100644 index ab3c2fa..0000000 --- a/cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCSprite.h +++ /dev/null @@ -1,595 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __SPITE_NODE_CCSPRITE_H__ -#define __SPITE_NODE_CCSPRITE_H__ - -#include "base_nodes/CCNode.h" -#include "CCProtocols.h" -#include "textures/CCTextureAtlas.h" -#include "ccTypes.h" -#include "cocoa/CCDictionary.h" -#include -#ifdef EMSCRIPTEN -#include "base_nodes/CCGLBufferedNode.h" -#endif // EMSCRIPTEN - -NS_CC_BEGIN - -class CCSpriteBatchNode; -class CCSpriteFrame; -class CCAnimation; -class CCRect; -class CCPoint; -class CCSize; -class CCTexture2D; -struct transformValues_; - -/** - * @addtogroup sprite_nodes - * @{ - */ - -#define CCSpriteIndexNotInitialized 0xffffffff /// CCSprite invalid index on the CCSpriteBatchNode - - -/** - * CCSprite is a 2d image ( http://en.wikipedia.org/wiki/Sprite_(computer_graphics) ) - * - * CCSprite can be created with an image, or with a sub-rectangle of an image. - * - * If the parent or any of its ancestors is a CCSpriteBatchNode then the following features/limitations are valid - * - Features when the parent is a CCBatchNode: - * - MUCH faster rendering, specially if the CCSpriteBatchNode has many children. All the children will be drawn in a single batch. - * - * - Limitations - * - Camera is not supported yet (eg: CCOrbitCamera action doesn't work) - * - GridBase actions are not supported (eg: CCLens, CCRipple, CCTwirl) - * - The Alias/Antialias property belongs to CCSpriteBatchNode, so you can't individually set the aliased property. - * - The Blending function property belongs to CCSpriteBatchNode, so you can't individually set the blending function property. - * - Parallax scroller is not supported, but can be simulated with a "proxy" sprite. - * - * If the parent is an standard CCNode, then CCSprite behaves like any other CCNode: - * - It supports blending functions - * - It supports aliasing / antialiasing - * - But the rendering will be slower: 1 draw per children. - * - * The default anchorPoint in CCSprite is (0.5, 0.5). - */ -class CC_DLL CCSprite : public CCNodeRGBA, public CCTextureProtocol -#ifdef EMSCRIPTEN -, public CCGLBufferedNode -#endif // EMSCRIPTEN -{ -public: - /// @{ - /// @name Creators - - /** - * Creates an empty sprite without texture. You can call setTexture method subsequently. - * - * @return An empty sprite object that is marked as autoreleased. - */ - static CCSprite* create(); - - /** - * Creates a sprite with an image filename. - * - * After creation, the rect of sprite will be the size of the image, - * and the offset will be (0,0). - * - * @param pszFileName The string which indicates a path to image file, e.g., "scene1/monster.png". - * @return A valid sprite object that is marked as autoreleased. - */ - static CCSprite* create(const char *pszFileName); - - /** - * Creates a sprite with an image filename and a rect. - * - * @param pszFileName The string wich indicates a path to image file, e.g., "scene1/monster.png" - * @param rect Only the contents inside rect of pszFileName's texture will be applied for this sprite. - * @return A valid sprite object that is marked as autoreleased. - */ - static CCSprite* create(const char *pszFileName, const CCRect& rect); - - /** - * Creates a sprite with an exsiting texture contained in a CCTexture2D object - * After creation, the rect will be the size of the texture, and the offset will be (0,0). - * - * @param pTexture A pointer to a CCTexture2D object. - * @return A valid sprite object that is marked as autoreleased. - */ - static CCSprite* createWithTexture(CCTexture2D *pTexture); - - /** - * Creates a sprite with a texture and a rect. - * - * After creation, the offset will be (0,0). - * - * @param pTexture A pointer to an existing CCTexture2D object. - * You can use a CCTexture2D object for many sprites. - * @param rect Only the contents inside the rect of this texture will be applied for this sprite. - * @return A valid sprite object that is marked as autoreleased. - */ - static CCSprite* createWithTexture(CCTexture2D *pTexture, const CCRect& rect); - - /** - * Creates a sprite with an sprite frame. - * - * @param pSpriteFrame A sprite frame which involves a texture and a rect - * @return A valid sprite object that is marked as autoreleased. - */ - static CCSprite* createWithSpriteFrame(CCSpriteFrame *pSpriteFrame); - - /** - * Creates a sprite with an sprite frame name. - * - * A CCSpriteFrame will be fetched from the CCSpriteFrameCache by pszSpriteFrameName param. - * If the CCSpriteFrame doesn't exist it will raise an exception. - * - * @param pszSpriteFrameName A null terminated string which indicates the sprite frame name. - * @return A valid sprite object that is marked as autoreleased. - */ - static CCSprite* createWithSpriteFrameName(const char *pszSpriteFrameName); - - /// @} end of creators group - - - - /// @{ - /// @name Initializers - - /** - * Default constructor - * @js ctor - */ - CCSprite(void); - - /** - * Default destructor - * @js NA - * @lua NA - */ - virtual ~CCSprite(void); - - /** - * Initializes an empty sprite with nothing init. - */ - virtual bool init(void); - - /** - * Initializes a sprite with a texture. - * - * After initialization, the rect used will be the size of the texture, and the offset will be (0,0). - * - * @param pTexture A pointer to an existing CCTexture2D object. - * You can use a CCTexture2D object for many sprites. - * @return true if the sprite is initialized properly, false otherwise. - */ - virtual bool initWithTexture(CCTexture2D *pTexture); - - /** - * Initializes a sprite with a texture and a rect. - * - * After initialization, the offset will be (0,0). - * - * @param pTexture A pointer to an exisiting CCTexture2D object. - * You can use a CCTexture2D object for many sprites. - * @param rect Only the contents inside rect of this texture will be applied for this sprite. - * @return true if the sprite is initialized properly, false otherwise. - */ - virtual bool initWithTexture(CCTexture2D *pTexture, const CCRect& rect); - - /** - * Initializes a sprite with a texture and a rect in points, optionally rotated. - * - * After initialization, the offset will be (0,0). - * @note This is the designated initializer. - * - * @param pTexture A CCTexture2D object whose texture will be applied to this sprite. - * @param rect A rectangle assigned the contents of texture. - * @param rotated Whether or not the texture rectangle is rotated. - * @return true if the sprite is initialized properly, false otherwise. - */ - virtual bool initWithTexture(CCTexture2D *pTexture, const CCRect& rect, bool rotated); - - /** - * Initializes a sprite with an SpriteFrame. The texture and rect in SpriteFrame will be applied on this sprite - * - * @param pSpriteFrame A CCSpriteFrame object. It should includes a valid texture and a rect - * @return true if the sprite is initialized properly, false otherwise. - */ - virtual bool initWithSpriteFrame(CCSpriteFrame *pSpriteFrame); - - /** - * Initializes a sprite with an sprite frame name. - * - * A CCSpriteFrame will be fetched from the CCSpriteFrameCache by name. - * If the CCSpriteFrame doesn't exist it will raise an exception. - * - * @param pszSpriteFrameName A key string that can fected a volid CCSpriteFrame from CCSpriteFrameCache - * @return true if the sprite is initialized properly, false otherwise. - */ - virtual bool initWithSpriteFrameName(const char *pszSpriteFrameName); - - /** - * Initializes a sprite with an image filename. - * - * This method will find pszFilename from local file system, load its content to CCTexture2D, - * then use CCTexture2D to create a sprite. - * After initialization, the rect used will be the size of the image. The offset will be (0,0). - * - * @param pszFilename The path to an image file in local file system - * @return true if the sprite is initialized properly, false otherwise. - * @js init - */ - virtual bool initWithFile(const char *pszFilename); - - /** - * Initializes a sprite with an image filename, and a rect. - * - * This method will find pszFilename from local file system, load its content to CCTexture2D, - * then use CCTexture2D to create a sprite. - * After initialization, the offset will be (0,0). - * - * @param pszFilename The path to an image file in local file system. - * @param rect The rectangle assigned the content area from texture. - * @return true if the sprite is initialized properly, false otherwise. - * @js init - */ - virtual bool initWithFile(const char *pszFilename, const CCRect& rect); - - /// @} end of initializers - - /// @{ - /// @name Functions inherited from CCTextureProtocol - virtual void setTexture(CCTexture2D *texture); - virtual CCTexture2D* getTexture(void); - inline void setBlendFunc(ccBlendFunc blendFunc) { m_sBlendFunc = blendFunc; } - /** - * @js NA - */ - inline ccBlendFunc getBlendFunc(void) { return m_sBlendFunc; } - /// @} - - //Robtop Modification - virtual void setChildColor(const _ccColor3B&); - virtual void setChildOpacity(unsigned char); - - /// @{ - /// @name Functions inherited from CCNode - virtual void setScaleX(float fScaleX); - virtual void setScaleY(float fScaleY); - /** - * @lua NA - */ - virtual void setPosition(const CCPoint& pos); - virtual void setRotation(float fRotation); - virtual void setRotationX(float fRotationX); - virtual void setRotationY(float fRotationY); - virtual void setSkewX(float sx); - virtual void setSkewY(float sy); - virtual void removeChild(CCNode* pChild, bool bCleanup); - virtual void removeAllChildrenWithCleanup(bool bCleanup); - virtual void reorderChild(CCNode *pChild, int zOrder); - virtual void addChild(CCNode *pChild); - virtual void addChild(CCNode *pChild, int zOrder); - virtual void addChild(CCNode *pChild, int zOrder, int tag); - virtual void sortAllChildren(); - virtual void setScale(float fScale); - virtual void setVertexZ(float fVertexZ); - virtual void setAnchorPoint(const CCPoint& anchor); - virtual void ignoreAnchorPointForPosition(bool value); - virtual void setVisible(bool bVisible); - virtual void draw(void); - /// @} - - /// @{ - /// @name Functions inherited from CCNodeRGBA - virtual void setColor(const ccColor3B& color3); - virtual void updateDisplayedColor(const ccColor3B& parentColor); - virtual void setOpacity(GLubyte opacity); - virtual void setOpacityModifyRGB(bool modify); - virtual bool isOpacityModifyRGB(void); - virtual void updateDisplayedOpacity(GLubyte parentOpacity); - /// @} - - - /// @{ - /// @name BatchNode methods - - /** - * Updates the quad according the rotation, position, scale values. - */ - virtual void updateTransform(void); - - /** - * Returns the batch node object if this sprite is rendered by CCSpriteBatchNode - * - * @return The CCSpriteBatchNode object if this sprite is rendered by CCSpriteBatchNode, - * NULL if the sprite isn't used batch node. - */ - virtual CCSpriteBatchNode* getBatchNode(void); - /** - * Sets the batch node to sprite - * @warning This method is not recommended for game developers. Sample code for using batch node - * @code - * CCSpriteBatchNode *batch = CCSpriteBatchNode::create("Images/grossini_dance_atlas.png", 15); - * CCSprite *sprite = CCSprite::createWithTexture(batch->getTexture(), CCRectMake(0, 0, 57, 57)); - * batch->addChild(sprite); - * layer->addChild(batch); - * @endcode - */ - virtual void setBatchNode(CCSpriteBatchNode *pobSpriteBatchNode); - - /// @} end of BatchNode methods - - //Robtop Modification: - virtual void refreshTextureRect(void); - - /// @{ - /// @name Texture methods - - /** - * Updates the texture rect of the CCSprite in points. - * It will call setTextureRect:rotated:untrimmedSize with rotated = NO, and utrimmedSize = rect.size. - */ - virtual void setTextureRect(const CCRect& rect); - - /** - * Sets the texture rect, rectRotated and untrimmed size of the CCSprite in points. - * It will update the texture coordinates and the vertex rectangle. - */ - virtual void setTextureRect(const CCRect& rect, bool rotated, const CCSize& untrimmedSize); - - /** - * Sets the vertex rect. - * It will be called internally by setTextureRect. - * Useful if you want to create 2x images from SD images in Retina Display. - * Do not call it manually. Use setTextureRect instead. - */ - virtual void setVertexRect(const CCRect& rect); - - /// @} end of texture methods - - - - /// @{ - /// @name Frames methods - - /** - * Sets a new display frame to the CCSprite. - */ - virtual void setDisplayFrame(CCSpriteFrame *pNewFrame); - - /** - * Returns whether or not a CCSpriteFrame is being displayed - */ - virtual bool isFrameDisplayed(CCSpriteFrame *pFrame); - - /** - * Returns the current displayed frame. - * @js NA - */ - virtual CCSpriteFrame* displayFrame(void); - - /// @} End of frames methods - - - /// @{ - /// @name Animation methods - /** - * Changes the display frame with animation name and index. - * The animation name will be get from the CCAnimationCache - */ - virtual void setDisplayFrameWithAnimationName(const char *animationName, int frameIndex); - /// @} - - - /// @{ - /// @name Sprite Properties' setter/getters - - /** - * Whether or not the Sprite needs to be updated in the Atlas. - * - * @return true if the sprite needs to be updated in the Atlas, false otherwise. - */ - inline virtual bool isDirty(void) { return m_bDirty; } - - /** - * Makes the Sprite to be updated in the Atlas. - */ - inline virtual void setDirty(bool bDirty) { m_bDirty = bDirty; } - - /** - * Returns the quad (tex coords, vertex coords and color) information. - * @js NA - */ - inline ccV3F_C4B_T2F_Quad getQuad(void) { return m_sQuad; } - - /** - * Returns whether or not the texture rectangle is rotated. - */ - inline bool isTextureRectRotated(void) { return m_bRectRotated; } - - /** - * Returns the index used on the TextureAtlas. - */ - inline unsigned int getAtlasIndex(void) { return m_uAtlasIndex; } - - /** - * Sets the index used on the TextureAtlas. - * @warning Don't modify this value unless you know what you are doing - */ - inline void setAtlasIndex(unsigned int uAtlasIndex) { m_uAtlasIndex = uAtlasIndex; } - - /** - * Returns the rect of the CCSprite in points - */ - inline const CCRect& getTextureRect(void) { return m_obRect; } - - /** - * Gets the weak reference of the CCTextureAtlas when the sprite is rendered using via CCSpriteBatchNode - */ - inline CCTextureAtlas* getTextureAtlas(void) { return m_pobTextureAtlas; } - - /** - * Sets the weak reference of the CCTextureAtlas when the sprite is rendered using via CCSpriteBatchNode - */ - inline void setTextureAtlas(CCTextureAtlas *pobTextureAtlas) { m_pobTextureAtlas = pobTextureAtlas; } - - /** - * Gets the offset position of the sprite. Calculated automatically by editors like Zwoptex. - */ - inline const CCPoint& getOffsetPosition(void) { return m_obOffsetPosition; } - - - /** - * Returns the flag which indicates whether the sprite is flipped horizontally or not. - * - * It only flips the texture of the sprite, and not the texture of the sprite's children. - * Also, flipping the texture doesn't alter the anchorPoint. - * If you want to flip the anchorPoint too, and/or to flip the children too use: - * sprite->setScaleX(sprite->getScaleX() * -1); - * - * @return true if the sprite is flipped horizaontally, false otherwise. - * @js isFlippedX - */ - bool isFlipX(void); - /** - * Sets whether the sprite should be flipped horizontally or not. - * - * @param bFlipX true if the sprite should be flipped horizaontally, false otherwise. - */ - void setFlipX(bool bFlipX); - - /** - * Return the flag which indicates whether the sprite is flipped vertically or not. - * - * It only flips the texture of the sprite, and not the texture of the sprite's children. - * Also, flipping the texture doesn't alter the anchorPoint. - * If you want to flip the anchorPoint too, and/or to flip the children too use: - * sprite->setScaleY(sprite->getScaleY() * -1); - * - * @return true if the sprite is flipped vertically, flase otherwise. - * @js isFlippedY - */ - bool isFlipY(void); - /** - * Sets whether the sprite should be flipped vertically or not. - * - * @param bFlipY true if the sprite should be flipped vertically, flase otherwise. - */ - void setFlipY(bool bFlipY); - - /// @} End of Sprite properties getter/setters - - //Robtop Modification: - float getBlVertexMod(void)const; - float getBrVertexMod(void)const; - bool getDontDraw(void)const; - float getTlVertexMod(void)const; - float getTrVertexMod(void)const; - CCPoint const& getUnflippedOffsetPosition(void); - void setBlVertexMod(float); - void setBrVertexMod(float); - void setDontDraw(bool); - void setTlVertexMod(float); - void setTrVertexMod(float); - - - -protected: - void updateColor(void); - //Robtop Modification - virtual void setTextureCoords(const CCRect& rect); - virtual void updateBlendFunc(void); - virtual void setReorderChildDirtyRecursively(void); - virtual void setDirtyRecursively(bool bValue); - - // - // Data used when the sprite is rendered using a CCSpriteSheet - // - CCTextureAtlas* m_pobTextureAtlas; /// CCSpriteBatchNode texture atlas (weak reference) - unsigned int m_uAtlasIndex; /// Absolute (real) Index on the SpriteSheet - CCSpriteBatchNode* m_pobBatchNode; /// Used batch node (weak reference) - - bool m_bDirty; /// Whether the sprite needs to be updated - bool m_bRecursiveDirty; /// Whether all of the sprite's children needs to be updated - bool m_bHasChildren; /// Whether the sprite contains children - bool m_bShouldBeHidden; /// should not be drawn because one of the ancestors is not visible - CCAffineTransform m_transformToBatch; - - // - // Data used when the sprite is self-rendered - // - ccBlendFunc m_sBlendFunc; /// It's required for CCTextureProtocol inheritance - CCTexture2D* m_pobTexture; /// CCTexture2D object that is used to render the sprite - - // - // Shared data - // - - // texture - CCRect m_obRect; /// Retangle of CCTexture2D - bool m_bRectRotated; /// Whether the texture is rotated - - // Offset Position (used by Zwoptex) - CCPoint m_obOffsetPosition; - CCPoint m_obUnflippedOffsetPositionFromCenter; - - // vertex coords, texture coords and color info - ccV3F_C4B_T2F_Quad m_sQuad; - - // opacity and RGB protocol - bool m_bOpacityModifyRGB; - - // image is flipped - bool m_bFlipX; /// Whether the sprite is flipped horizaontally or not. - bool m_bFlipY; /// Whether the sprite is flipped vertically or not. //1BAh - - //Robtop Modifications: - bool m_bUnknown; //0x1BB - uint32_t m_uUnknown0; //0x1BC - uint32_t m_uUnknown1; //0x1C0 - uint32_t m_uUnknown2; //0x1C4 - uint32_t m_uUnknown3; //0x1C8 - uint32_t m_uUnknown4; //0x1CC - uint32_t m_uUnknown5; //0x1D0 - uint32_t m_uUnknown6; //0x1D4 - uint32_t m_uUnknown8; //0x1D8 - uint8_t m_uUnknown9; //0x1DC - uint32_t m_uUnknownA; //0x1E0 - -}; - - -// end of sprite_nodes group -/// @} - -NS_CC_END - -#endif // __SPITE_NODE_CCSPRITE_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCSpriteBatchNode.h b/cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCSpriteBatchNode.h deleted file mode 100644 index c71a670..0000000 --- a/cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCSpriteBatchNode.h +++ /dev/null @@ -1,202 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2009-2010 Ricardo Quesada -Copyright (C) 2009 Matt Oswald -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_SPRITE_BATCH_NODE_H__ -#define __CC_SPRITE_BATCH_NODE_H__ - -#include "base_nodes/CCNode.h" -#include "CCProtocols.h" -#include "textures/CCTextureAtlas.h" -#include "ccMacros.h" -#include "cocoa/CCArray.h" - -NS_CC_BEGIN - -/** - * @addtogroup sprite_nodes - * @{ - */ - -#define kDefaultSpriteBatchCapacity 29 - -class CCSprite; - -/** CCSpriteBatchNode is like a batch node: if it contains children, it will draw them in 1 single OpenGL call -* (often known as "batch draw"). -* -* A CCSpriteBatchNode can reference one and only one texture (one image file, one texture atlas). -* Only the CCSprites that are contained in that texture can be added to the CCSpriteBatchNode. -* All CCSprites added to a CCSpriteBatchNode are drawn in one OpenGL ES draw call. -* If the CCSprites are not added to a CCSpriteBatchNode then an OpenGL ES draw call will be needed for each one, which is less efficient. -* -* -* Limitations: -* - The only object that is accepted as child (or grandchild, grand-grandchild, etc...) is CCSprite or any subclass of CCSprite. eg: particles, labels and layer can't be added to a CCSpriteBatchNode. -* - Either all its children are Aliased or Antialiased. It can't be a mix. This is because "alias" is a property of the texture, and all the sprites share the same texture. -* -* @since v0.7.1 -*/ -class CC_DLL CCSpriteBatchNode : public CCNode, public CCTextureProtocol -{ -public: - /** - * @js ctor - */ - CCSpriteBatchNode(); - /** - * @js NA - * @lua NA - */ - ~CCSpriteBatchNode(); - - // property - - // retain - inline CCTextureAtlas* getTextureAtlas(void) { return m_pobTextureAtlas; } - inline void setTextureAtlas(CCTextureAtlas* textureAtlas) - { - if (textureAtlas != m_pobTextureAtlas) - { - CC_SAFE_RETAIN(textureAtlas); - CC_SAFE_RELEASE(m_pobTextureAtlas); - m_pobTextureAtlas = textureAtlas; - } - } - - inline CCArray* getDescendants(void) { return m_pobDescendants; } - - /** creates a CCSpriteBatchNode with a texture2d and capacity of children. - The capacity will be increased in 33% in runtime if it run out of space. - */ - static CCSpriteBatchNode* createWithTexture(CCTexture2D* tex, unsigned int capacity); - static CCSpriteBatchNode* createWithTexture(CCTexture2D* tex) { - return CCSpriteBatchNode::createWithTexture(tex, kDefaultSpriteBatchCapacity); - } - - /** creates a CCSpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and capacity of children. - The capacity will be increased in 33% in runtime if it run out of space. - The file will be loaded using the TextureMgr. - */ - static CCSpriteBatchNode* create(const char* fileImage, unsigned int capacity); - static CCSpriteBatchNode* create(const char* fileImage) { - return CCSpriteBatchNode::create(fileImage, kDefaultSpriteBatchCapacity); - } - - /** initializes a CCSpriteBatchNode with a texture2d and capacity of children. - The capacity will be increased in 33% in runtime if it run out of space. - */ - bool initWithTexture(CCTexture2D *tex, unsigned int capacity); - /** initializes a CCSpriteBatchNode with a file image (.png, .jpeg, .pvr, etc) and a capacity of children. - The capacity will be increased in 33% in runtime if it run out of space. - The file will be loaded using the TextureMgr. - */ - bool initWithFile(const char* fileImage, unsigned int capacity); - bool init(); - - void increaseAtlasCapacity(); - - /** removes a child given a certain index. It will also cleanup the running actions depending on the cleanup parameter. - @warning Removing a child from a CCSpriteBatchNode is very slow - */ - void removeChildAtIndex(unsigned int index, bool doCleanup); - - void insertChild(CCSprite *child, unsigned int index); - void appendChild(CCSprite* sprite); - void removeSpriteFromAtlas(CCSprite *sprite); - - unsigned int rebuildIndexInOrder(CCSprite *parent, unsigned int index); - unsigned int highestAtlasIndexInChild(CCSprite *sprite); - unsigned int lowestAtlasIndexInChild(CCSprite *sprite); - unsigned int atlasIndexForChild(CCSprite *sprite, int z); - /* Sprites use this to start sortChildren, don't call this manually */ - void reorderBatch(bool reorder); - // CCTextureProtocol - virtual CCTexture2D* getTexture(void); - virtual void setTexture(CCTexture2D *texture); - virtual void setBlendFunc(ccBlendFunc blendFunc); - /** - * @js NA - */ - virtual ccBlendFunc getBlendFunc(void); - - virtual void visit(void); - virtual void addChild(CCNode * child); - virtual void addChild(CCNode * child, int zOrder); - virtual void addChild(CCNode * child, int zOrder, int tag); - virtual void reorderChild(CCNode * child, int zOrder); - - virtual void removeChild(CCNode* child, bool cleanup); - virtual void removeAllChildrenWithCleanup(bool cleanup); - virtual void sortAllChildren(); - virtual void draw(void); - -protected: - /** Inserts a quad at a certain index into the texture atlas. The CCSprite won't be added into the children array. - This method should be called only when you are dealing with very big AtlasSrite and when most of the CCSprite won't be updated. - For example: a tile map (CCTMXMap) or a label with lots of characters (CCLabelBMFont) - */ - void insertQuadFromSprite(CCSprite *sprite, unsigned int index); - /** Updates a quad at a certain index into the texture atlas. The CCSprite won't be added into the children array. - This method should be called only when you are dealing with very big AtlasSrite and when most of the CCSprite won't be updated. - For example: a tile map (CCTMXMap) or a label with lots of characters (CCLabelBMFont) - */ - void updateQuadFromSprite(CCSprite *sprite, unsigned int index); - /* This is the opposite of "addQuadFromSprite. - It add the sprite to the children and descendants array, but it doesn't update add it to the texture atlas - */ - CCSpriteBatchNode * addSpriteWithoutQuad(CCSprite*child, unsigned int z, int aTag); - - //Robtop Modification: - bool getManualSortChildren(void)const; - int getAtlasCapacity(void); - int getUsedAtlasCapacity(void); - void increaseAtlasCapacity(unsigned int); - void manualSortAllChildren(void); - void setManualSortChildren(bool); - -private: - void updateAtlasIndex(CCSprite* sprite, int* curIndex); - void swap(int oldIndex, int newIndex); - void updateBlendFunc(); - -protected: - CCTextureAtlas *m_pobTextureAtlas; - ccBlendFunc m_blendFunc; - - // all descendants: children, gran children, etc... - CCArray* m_pobDescendants; - //Robtop Modification: - bool m_bManualSortChildren; - bool m_bManualSortAllChildren; -}; - -// end of sprite_nodes group -/// @} - -NS_CC_END - -#endif // __CC_SPRITE_BATCH_NODE_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCSpriteFrame.h b/cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCSpriteFrame.h deleted file mode 100644 index 0b17023..0000000 --- a/cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCSpriteFrame.h +++ /dev/null @@ -1,167 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2011 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __SPRITE_CCSPRITE_FRAME_H__ -#define __SPRITE_CCSPRITE_FRAME_H__ - -#include "base_nodes/CCNode.h" -#include "CCProtocols.h" -#include "cocoa/CCObject.h" -#include "cocoa/CCGeometry.h" - -NS_CC_BEGIN - -class CCTexture2D; -class CCZone; - -/** - * @addtogroup sprite_nodes - * @{ - */ - -/** @brief A CCSpriteFrame has: - - texture: A CCTexture2D that will be used by the CCSprite - - rectangle: A rectangle of the texture - - - You can modify the frame of a CCSprite by doing: - - CCSpriteFrame *frame = CCSpriteFrame::frameWithTexture(texture, rect, offset); - sprite->setDisplayFrame(frame); - */ -class CC_DLL CCSpriteFrame : public CCObject -{ -public: - // attributes - - inline const CCRect& getRectInPixels(void) { return m_obRectInPixels; } - void setRectInPixels(const CCRect& rectInPixels); - - inline bool isRotated(void) { return m_bRotated; } - inline void setRotated(bool bRotated) { m_bRotated = bRotated; } - - /** get rect of the frame */ - inline const CCRect& getRect(void) { return m_obRect; } - /** set rect of the frame */ - void setRect(const CCRect& rect); - - /** get offset of the frame */ - const CCPoint& getOffsetInPixels(void); - /** set offset of the frame */ - void setOffsetInPixels(const CCPoint& offsetInPixels); - - /** get original size of the trimmed image */ - inline const CCSize& getOriginalSizeInPixels(void) { return m_obOriginalSizeInPixels; } - /** set original size of the trimmed image */ - inline void setOriginalSizeInPixels(const CCSize& sizeInPixels) { m_obOriginalSizeInPixels = sizeInPixels; } - - /** get original size of the trimmed image */ - inline const CCSize& getOriginalSize(void) { return m_obOriginalSize; } - /** set original size of the trimmed image */ - inline void setOriginalSize(const CCSize& sizeInPixels) { m_obOriginalSize = sizeInPixels; } - - /** get texture of the frame */ - CCTexture2D* getTexture(void); - /** set texture of the frame, the texture is retained */ - void setTexture(CCTexture2D* pobTexture); - - const CCPoint& getOffset(void); - void setOffset(const CCPoint& offsets); - -public: - /** - * @js NA - * @lua NA - */ - ~CCSpriteFrame(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone *pZone); - - /** Create a CCSpriteFrame with a texture filename, rect in points. - It is assumed that the frame was not trimmed. - */ - static CCSpriteFrame* create(const char* filename, const CCRect& rect); - - /** Create a CCSpriteFrame with a texture filename, rect, rotated, offset and originalSize in pixels. - The originalSize is the size in pixels of the frame before being trimmed. - */ - static CCSpriteFrame* create(const char* filename, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize); - - /** Create a CCSpriteFrame with a texture, rect in points. - It is assumed that the frame was not trimmed. - */ - static CCSpriteFrame* createWithTexture(CCTexture2D* pobTexture, const CCRect& rect); - - /** Create a CCSpriteFrame with a texture, rect, rotated, offset and originalSize in pixels. - The originalSize is the size in points of the frame before being trimmed. - */ - static CCSpriteFrame* createWithTexture(CCTexture2D* pobTexture, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize); - -public: - /** Initializes a CCSpriteFrame with a texture, rect in points. - It is assumed that the frame was not trimmed. - */ - bool initWithTexture(CCTexture2D* pobTexture, const CCRect& rect); - - /** Initializes a CCSpriteFrame with a texture filename, rect in points; - It is assumed that the frame was not trimmed. - */ - bool initWithTextureFilename(const char* filename, const CCRect& rect); - - /** Initializes a CCSpriteFrame with a texture, rect, rotated, offset and originalSize in pixels. - The originalSize is the size in points of the frame before being trimmed. - */ - bool initWithTexture(CCTexture2D* pobTexture, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize); - - /** Initializes a CCSpriteFrame with a texture, rect, rotated, offset and originalSize in pixels. - The originalSize is the size in pixels of the frame before being trimmed. - - @since v1.1 - */ - bool initWithTextureFilename(const char* filename, const CCRect& rect, bool rotated, const CCPoint& offset, const CCSize& originalSize); - - -protected: - CCPoint m_obOffset; - CCSize m_obOriginalSize; - CCRect m_obRectInPixels; - bool m_bRotated; - CCRect m_obRect; - CCPoint m_obOffsetInPixels; - CCSize m_obOriginalSizeInPixels; - CCTexture2D *m_pobTexture; - std::string m_strTextureFilename; -}; - -// end of sprite_nodes group -/// @} - -NS_CC_END - -#endif //__SPRITE_CCSPRITE_FRAME_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCSpriteFrameCache.h b/cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCSpriteFrameCache.h deleted file mode 100644 index 1657dae..0000000 --- a/cappuccino-sdk/incl/cocos2dx/sprite_nodes/CCSpriteFrameCache.h +++ /dev/null @@ -1,170 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2009 Jason Booth -Copyright (c) 2009 Robert J Payne -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __SPRITE_CCSPRITE_FRAME_CACHE_H__ -#define __SPRITE_CCSPRITE_FRAME_CACHE_H__ - -/* - * To create sprite frames and texture atlas, use this tool: - * http://zwoptex.zwopple.com/ - */ - -#include "sprite_nodes/CCSpriteFrame.h" -#include "textures/CCTexture2D.h" -#include "cocoa/CCObject.h" -#include -#include - -NS_CC_BEGIN - -class CCDictionary; -class CCArray; -class CCSprite; - -/** - * @addtogroup sprite_nodes - * @{ - */ - -/** @brief Singleton that handles the loading of the sprite frames. - It saves in a cache the sprite frames. - @since v0.9 - */ -class CC_DLL CCSpriteFrameCache : public CCObject -{ -protected: - // MARMALADE: Made this protected not private, as deriving from this class is pretty useful - /** - * @js ctor - */ - CCSpriteFrameCache(void) : m_pSpriteFrames(NULL), m_pSpriteFramesAliases(NULL){} -public: - bool init(void); - /** - * @js NA - * @lua NA - */ - ~CCSpriteFrameCache(void); - -private: - /*Adds multiple Sprite Frames with a dictionary. The texture will be associated with the created sprite frames. - */ - void addSpriteFramesWithDictionary(CCDictionary* pobDictionary, CCTexture2D *pobTexture); -public: - /** Adds multiple Sprite Frames from a plist file. - * A texture will be loaded automatically. The texture name will composed by replacing the .plist suffix with .png - * If you want to use another texture, you should use the addSpriteFramesWithFile:texture method. - * @js addSpriteFrames - */ - void addSpriteFramesWithFile(const char *pszPlist); - - /** Adds multiple Sprite Frames from a plist file. The texture will be associated with the created sprite frames. - @since v0.99.5 - @js addSpriteFrames - */ - void addSpriteFramesWithFile(const char* plist, const char* textureFileName); - - /** Adds multiple Sprite Frames from a plist file. The texture will be associated with the created sprite frames. - * @js addSpriteFrames - */ - void addSpriteFramesWithFile(const char *pszPlist, CCTexture2D *pobTexture); - - /** Adds an sprite frame with a given name. - If the name already exists, then the contents of the old name will be replaced with the new one. - */ - void addSpriteFrame(CCSpriteFrame *pobFrame, const char *pszFrameName); - - /** Purges the dictionary of loaded sprite frames. - * Call this method if you receive the "Memory Warning". - * In the short term: it will free some resources preventing your app from being killed. - * In the medium term: it will allocate more resources. - * In the long term: it will be the same. - */ - void removeSpriteFrames(void); - - /** Removes unused sprite frames. - * Sprite Frames that have a retain count of 1 will be deleted. - * It is convenient to call this method after when starting a new Scene. - */ - void removeUnusedSpriteFrames(void); - - /** Deletes an sprite frame from the sprite frame cache. - * @js getSpriteFrame - */ - void removeSpriteFrameByName(const char *pszName); - - /** Removes multiple Sprite Frames from a plist file. - * Sprite Frames stored in this file will be removed. - * It is convenient to call this method when a specific texture needs to be removed. - * @since v0.99.5 - */ - void removeSpriteFramesFromFile(const char* plist); - -private: - /** Removes multiple Sprite Frames from CCDictionary. - * @since v0.99.5 - */ - void removeSpriteFramesFromDictionary(CCDictionary* dictionary); -public: - /** Removes all Sprite Frames associated with the specified textures. - * It is convenient to call this method when a specific texture needs to be removed. - * @since v0.995. - */ - void removeSpriteFramesFromTexture(CCTexture2D* texture); - - /** Returns an Sprite Frame that was previously added. - If the name is not found it will return nil. - You should retain the returned copy if you are going to use it. - @js getSpriteFrame - */ - CCSpriteFrame* spriteFrameByName(const char *pszName); - -public: - /** Returns the shared instance of the Sprite Frame cache - * @js getInstance - */ - static CCSpriteFrameCache* sharedSpriteFrameCache(void); - - /** Purges the cache. It releases all the Sprite Frames and the retained instance. */ - static void purgeSharedSpriteFrameCache(void); - -private: - // MARMALADE: Made this protected not private, as deriving from this class is pretty useful -// CCSpriteFrameCache(void) : m_pSpriteFrames(NULL), m_pSpriteFramesAliases(NULL){} -protected: - CCDictionary* m_pSpriteFrames; - CCDictionary* m_pSpriteFramesAliases; - std::set* m_pLoadedFileNames; -}; - -// end of sprite_nodes group -/// @} - -NS_CC_END - -#endif // __SPRITE_CCSPRITE_FRAME_CACHE_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/support/CCNotificationCenter.h b/cappuccino-sdk/incl/cocos2dx/support/CCNotificationCenter.h deleted file mode 100644 index 3ba8248..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/CCNotificationCenter.h +++ /dev/null @@ -1,149 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2011 Erawppa -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCNOTIFICATIONCENTER_H__ -#define __CCNOTIFICATIONCENTER_H__ - -#include "cocoa/CCObject.h" -#include "cocoa/CCArray.h" - -NS_CC_BEGIN -/** - * @js NA - */ -class CC_DLL CCNotificationCenter : public CCObject -{ -public: - /** CCNotificationCenter constructor */ - CCNotificationCenter(); - - /** CCNotificationCenter destructor */ - ~CCNotificationCenter(); - - /** Gets the single instance of CCNotificationCenter. */ - static CCNotificationCenter *sharedNotificationCenter(void); - - /** Destroys the single instance of CCNotificationCenter. */ - static void purgeNotificationCenter(void); - - /** @brief Adds an observer for the specified target. - * @param target The target which wants to observe notification events. - * @param selector The callback function which will be invoked when the specified notification event was posted. - * @param name The name of this notification. - * @param obj The extra parameter which will be passed to the callback function. - */ - void addObserver(CCObject *target, - SEL_CallFuncO selector, - const char *name, - CCObject *obj); - - /** @brief Removes the observer by the specified target and name. - * @param target The target of this notification. - * @param name The name of this notification. - */ - void removeObserver(CCObject *target,const char *name); - - /** @brief Removes all notifications registered by this target - * @param target The target of this notification. - * @returns the number of observers removed - */ - int removeAllObservers(CCObject *target); - - /** @brief Registers one hander for script binding. - * @note Only supports Lua Binding now. - * @param handler The lua handler. - */ - void registerScriptObserver(CCObject *target,int handler,const char* name); - - /** Unregisters script observer */ - void unregisterScriptObserver(CCObject *target,const char* name); - - /** @brief Posts one notification event by name. - * @param name The name of this notification. - */ - void postNotification(const char *name); - - /** @brief Posts one notification event by name. - * @param name The name of this notification. - * @param object The extra parameter. - */ - void postNotification(const char *name, CCObject *object); - - /** @brief Gets script handler. - * @note Only supports Lua Binding now. - * @return The script handle. - */ - inline int getScriptHandler() { return m_scriptHandler; }; - - /** @brief Gets observer script handler. - * @param name The name of this notification. - * @return The observer script handle. - */ - int getObserverHandlerByName(const char* name); -private: - // internal functions - - // Check whether the observer exists by the specified target and name. - bool observerExisted(CCObject *target,const char *name); - - // variables - // - CCArray *m_observers; - int m_scriptHandler; -}; - -/** - * @js NA - * @lua NA - */ -class CC_DLL CCNotificationObserver : public CCObject -{ -public: - /** @brief CCNotificationObserver constructor - * @param target The target which wants to observer notification events. - * @param selector The callback function which will be invoked when the specified notification event was posted. - * @param name The name of this notification. - * @param obj The extra parameter which will be passed to the callback function. - */ - CCNotificationObserver(CCObject *target, - SEL_CallFuncO selector, - const char *name, - CCObject *obj); - - /** CCNotificationObserver destructor function */ - ~CCNotificationObserver(); - - /** Invokes the callback function of this observer */ - void performSelector(CCObject *obj); -private: - CC_PROPERTY_READONLY(CCObject *, m_target, Target); - CC_PROPERTY_READONLY(SEL_CallFuncO, m_selector, Selector); - CC_PROPERTY_READONLY(char *, m_name, Name); - CC_PROPERTY_READONLY(CCObject *, m_object, Object); - CC_PROPERTY(int, m_nHandler,Handler); -}; - -NS_CC_END - -#endif//__CCNOTIFICATIONCENTER_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/support/CCPointExtension.h b/cappuccino-sdk/incl/cocos2dx/support/CCPointExtension.h deleted file mode 100644 index 5bf0e51..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/CCPointExtension.h +++ /dev/null @@ -1,343 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2007 Scott Lembcke -Copyright (c) 2010 Lam Pham - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __SUPPORT_CGPOINTEXTENSION_H__ -#define __SUPPORT_CGPOINTEXTENSION_H__ - -/** - @file - CCPoint extensions based on Chipmunk's cpVect file. - These extensions work both with CCPoint and cpVect. - - The "ccp" prefix means: "CoCos2d Point" - - Examples: - - ccpAdd( ccp(1,1), ccp(2,2) ); // preferred cocos2d way - - ccpAdd( CCPointMake(1,1), CCPointMake(2,2) ); // also ok but more verbose - - - cpvadd( cpv(1,1), cpv(2,2) ); // way of the chipmunk - - ccpAdd( cpv(1,1), cpv(2,2) ); // mixing chipmunk and cocos2d (avoid) - - cpvadd( CCPointMake(1,1), CCPointMake(2,2) ); // mixing chipmunk and CG (avoid) - */ - -#include "cocoa/CCGeometry.h" -#include - -NS_CC_BEGIN - -/** - * @addtogroup data_structures - * @{ - */ - -/** Helper macro that creates a CCPoint - @return CCPoint - @since v0.7.2 - */ -#define ccp(__X__,__Y__) cocos2d::CCPointMake((float)(__X__), (float)(__Y__)) - -/** Returns opposite of point. - @return CCPoint - @since v0.7.2 - */ -static inline CCPoint -ccpNeg(const CCPoint& v) -{ - return -v; -} - -/** Calculates sum of two points. - @return CCPoint - @since v0.7.2 - */ -static inline CCPoint -ccpAdd(const CCPoint& v1, const CCPoint& v2) -{ - return v1 + v2; -} - -/** Calculates difference of two points. - @return CCPoint - @since v0.7.2 - */ -static inline CCPoint -ccpSub(const CCPoint& v1, const CCPoint& v2) -{ - return v1 - v2; -} - -/** Returns point multiplied by given factor. - @return CCPoint - @since v0.7.2 - */ -static inline CCPoint -ccpMult(const CCPoint& v, const float s) -{ - return v * s; -} - -/** Calculates midpoint between two points. - @return CCPoint - @since v0.7.2 - */ -static inline CCPoint -ccpMidpoint(const CCPoint& v1, const CCPoint& v2) -{ - return (v1 + v2) / 2.f; -} - -/** Calculates dot product of two points. - @return float - @since v0.7.2 - */ -static inline float -ccpDot(const CCPoint& v1, const CCPoint& v2) -{ - return v1.dot(v2); -} - -/** Calculates cross product of two points. - @return float - @since v0.7.2 - */ -static inline float -ccpCross(const CCPoint& v1, const CCPoint& v2) -{ - return v1.cross(v2); -} - -/** Calculates perpendicular of v, rotated 90 degrees counter-clockwise -- cross(v, perp(v)) >= 0 - @return CCPoint - @since v0.7.2 - */ -static inline CCPoint -ccpPerp(const CCPoint& v) -{ - return v.getPerp(); -} - -/** Calculates perpendicular of v, rotated 90 degrees clockwise -- cross(v, rperp(v)) <= 0 - @return CCPoint - @since v0.7.2 - */ -static inline CCPoint -ccpRPerp(const CCPoint& v) -{ - return v.getRPerp(); -} - -/** Calculates the projection of v1 over v2. - @return CCPoint - @since v0.7.2 - */ -static inline CCPoint -ccpProject(const CCPoint& v1, const CCPoint& v2) -{ - return v1.project(v2); -} - -/** Rotates two points. - @return CCPoint - @since v0.7.2 - */ -static inline CCPoint -ccpRotate(const CCPoint& v1, const CCPoint& v2) -{ - return v1.rotate(v2); -} - -/** Unrotates two points. - @return CCPoint - @since v0.7.2 - */ -static inline CCPoint -ccpUnrotate(const CCPoint& v1, const CCPoint& v2) -{ - return v1.unrotate(v2); -} - -/** Calculates the square length of a CCPoint (not calling sqrt() ) - @return float - @since v0.7.2 - */ -static inline float -ccpLengthSQ(const CCPoint& v) -{ - return v.getLengthSq(); -} - - -/** Calculates the square distance between two points (not calling sqrt() ) - @return float - @since v1.1 -*/ -static inline float -ccpDistanceSQ(const CCPoint p1, const CCPoint p2) -{ - return (p1 - p2).getLengthSq(); -} - - -/** Calculates distance between point an origin - @return float - @since v0.7.2 - */ -float CC_DLL ccpLength(const CCPoint& v); - -/** Calculates the distance between two points - @return float - @since v0.7.2 - */ -float CC_DLL ccpDistance(const CCPoint& v1, const CCPoint& v2); - -/** Returns point multiplied to a length of 1. - @return CCPoint - @since v0.7.2 - */ -CCPoint CC_DLL ccpNormalize(const CCPoint& v); - -/** Converts radians to a normalized vector. - @return CCPoint - @since v0.7.2 - */ -CCPoint CC_DLL ccpForAngle(const float a); - -/** Converts a vector to radians. - @return float - @since v0.7.2 - */ -float CC_DLL ccpToAngle(const CCPoint& v); - - -/** Clamp a value between from and to. - @since v0.99.1 - */ -float CC_DLL clampf(float value, float min_inclusive, float max_inclusive); - -/** Clamp a point between from and to. - @since v0.99.1 - */ -CCPoint CC_DLL ccpClamp(const CCPoint& p, const CCPoint& from, const CCPoint& to); - -/** Quickly convert CCSize to a CCPoint - @since v0.99.1 - */ -CCPoint CC_DLL ccpFromSize(const CCSize& s); - -/** Run a math operation function on each point component - * absf, fllorf, ceilf, roundf - * any function that has the signature: float func(float); - * For example: let's try to take the floor of x,y - * ccpCompOp(p,floorf); - @since v0.99.1 - */ -CCPoint CC_DLL ccpCompOp(const CCPoint& p, float (*opFunc)(float)); - -/** Linear Interpolation between two points a and b - @returns - alpha == 0 ? a - alpha == 1 ? b - otherwise a value between a..b - @since v0.99.1 - */ -CCPoint CC_DLL ccpLerp(const CCPoint& a, const CCPoint& b, float alpha); - - -/** @returns if points have fuzzy equality which means equal with some degree of variance. - @since v0.99.1 - */ -bool CC_DLL ccpFuzzyEqual(const CCPoint& a, const CCPoint& b, float variance); - - -/** Multiplies a and b components, a.x*b.x, a.y*b.y - @returns a component-wise multiplication - @since v0.99.1 - */ -CCPoint CC_DLL ccpCompMult(const CCPoint& a, const CCPoint& b); - -/** @returns the signed angle in radians between two vector directions - @since v0.99.1 - */ -float CC_DLL ccpAngleSigned(const CCPoint& a, const CCPoint& b); - -/** @returns the angle in radians between two vector directions - @since v0.99.1 -*/ -float CC_DLL ccpAngle(const CCPoint& a, const CCPoint& b); - -/** Rotates a point counter clockwise by the angle around a pivot - @param v is the point to rotate - @param pivot is the pivot, naturally - @param angle is the angle of rotation cw in radians - @returns the rotated point - @since v0.99.1 - */ -CCPoint CC_DLL ccpRotateByAngle(const CCPoint& v, const CCPoint& pivot, float angle); - -/** A general line-line intersection test - @param p1 - is the startpoint for the first line P1 = (p1 - p2) - @param p2 - is the endpoint for the first line P1 = (p1 - p2) - @param p3 - is the startpoint for the second line P2 = (p3 - p4) - @param p4 - is the endpoint for the second line P2 = (p3 - p4) - @param s - is the range for a hitpoint in P1 (pa = p1 + s*(p2 - p1)) - @param t - is the range for a hitpoint in P3 (pa = p2 + t*(p4 - p3)) - @return bool - indicating successful intersection of a line - note that to truly test intersection for segments we have to make - sure that s & t lie within [0..1] and for rays, make sure s & t > 0 - the hit point is p3 + t * (p4 - p3); - the hit point also is p1 + s * (p2 - p1); - @since v0.99.1 - */ -bool CC_DLL ccpLineIntersect(const CCPoint& p1, const CCPoint& p2, - const CCPoint& p3, const CCPoint& p4, - float *s, float *t); - -/* -ccpSegmentIntersect returns YES if Segment A-B intersects with segment C-D -@since v1.0.0 -*/ -bool CC_DLL ccpSegmentIntersect(const CCPoint& A, const CCPoint& B, const CCPoint& C, const CCPoint& D); - -/* -ccpIntersectPoint returns the intersection point of line A-B, C-D -@since v1.0.0 -*/ -CCPoint CC_DLL ccpIntersectPoint(const CCPoint& A, const CCPoint& B, const CCPoint& C, const CCPoint& D); - -// end of data_structures group -/// @} - -NS_CC_END - -#endif // __SUPPORT_CGPOINTEXTENSION_H__ - diff --git a/cappuccino-sdk/incl/cocos2dx/support/CCProfiling.h b/cappuccino-sdk/incl/cocos2dx/support/CCProfiling.h deleted file mode 100644 index 98b8d3c..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/CCProfiling.h +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2010 Stuart Carnie - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __SUPPORT_CCPROFILING_H__ -#define __SUPPORT_CCPROFILING_H__ - -#include "ccConfig.h" -#include "cocoa/CCObject.h" -#include "platform/platform.h" -#include "cocoa/CCDictionary.h" -#include - -NS_CC_BEGIN - -/** - * @addtogroup global - * @{ - */ - -class CCProfilingTimer; - -/** CCProfiler - cocos2d builtin profiler. - - To use it, enable set the CC_ENABLE_PROFILERS=1 in the ccConfig.h file - *@js NA - *@lua NA - */ - -class CC_DLL CCProfiler : public CCObject -{ -public: - ~CCProfiler(void); - /** display the timers */ - void displayTimers(void); - bool init(void); - -public: - static CCProfiler* sharedProfiler(void); - /** Creates and adds a new timer */ - CCProfilingTimer* createAndAddTimerWithName(const char* timerName); - /** releases a timer */ - void releaseTimer(const char* timerName); - /** releases all timers */ - void releaseAllTimers(); - - CCDictionary* m_pActiveTimers; -}; -/** - *@js NA - *@lua NA - */ -class CCProfilingTimer : public CCObject -{ -public: - CCProfilingTimer(); - ~CCProfilingTimer(); - bool initWithName(const char* timerName); - const char* description(void); - struct cc_timeval* getStartTime(void) { return &m_sStartTime; }; - /** resets the timer properties */ - void reset(); - - std::string m_NameStr; - int numberOfCalls; - int m_dAverageTime1; - int m_dAverageTime2; - long long totalTime; - int minTime; - int maxTime; - struct cc_timeval m_sStartTime; -}; - -extern CC_DLL void CCProfilingBeginTimingBlock(const char *timerName); -extern CC_DLL void CCProfilingEndTimingBlock(const char *timerName); -extern CC_DLL void CCProfilingResetTimingBlock(const char *timerName); - -/* - * cocos2d profiling categories - * used to enable / disable profilers with granularity - */ - -extern bool kCCProfilerCategorySprite; -extern bool kCCProfilerCategoryBatchSprite; -extern bool kCCProfilerCategoryParticles; - -// end of global group -/// @} - -NS_CC_END - -#endif // __SUPPORT_CCPROFILING_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/support/CCVertex.h b/cappuccino-sdk/incl/cocos2dx/support/CCVertex.h deleted file mode 100644 index 2ce4446..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/CCVertex.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2011 ForzeField Studios S.L - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ -#ifndef __CCVERTEX_H__ -#define __CCVERTEX_H__ - -#include "ccTypes.h" - -NS_CC_BEGIN - -/** - * @addtogroup data_structures - * @{ - */ - -/** @file CCVertex.h */ - -/** converts a line to a polygon */ -void CC_DLL ccVertexLineToPolygon(CCPoint *points, float stroke, ccVertex2F *vertices, unsigned int offset, unsigned int nuPoints); - -/** returns whether or not the line intersects */ -bool CC_DLL ccVertexLineIntersect(float Ax, float Ay, - float Bx, float By, - float Cx, float Cy, - float Dx, float Dy, float *T); - -// end of data_structures group -/// @} - -NS_CC_END - -#endif /* __CCVERTEX_H__ */ - diff --git a/cappuccino-sdk/incl/cocos2dx/support/TransformUtils.h b/cappuccino-sdk/incl/cocos2dx/support/TransformUtils.h deleted file mode 100644 index 94b742e..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/TransformUtils.h +++ /dev/null @@ -1,41 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2009 Valentin Milea - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __SUPPORT_TRANSFORM_UTILS_H__ -#define __SUPPORT_TRANSFORM_UTILS_H__ - -// todo: -// when in MAC or windows, it includes -#include "CCGL.h" - -namespace cocos2d { - -struct CCAffineTransform; - -void CGAffineToGL(const CCAffineTransform *t, GLfloat *m); -void GLToCGAffine(const GLfloat *m, CCAffineTransform *t); -}//namespace cocos2d - -#endif // __SUPPORT_TRANSFORM_UTILS_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/support/base64.h b/cappuccino-sdk/incl/cocos2dx/support/base64.h deleted file mode 100644 index 8aa696d..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/base64.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __SUPPORT_BASE64_H__ -#define __SUPPORT_BASE64_H__ - -#ifdef __cplusplus -extern "C" { -#endif - -namespace cocos2d { - -/** @file - base64 helper functions - */ - -/** - * Decodes a 64base encoded memory. The decoded memory is - * expected to be freed by the caller. - * - * @returns the length of the out buffer - * - @since v0.8.1 - */ -int base64Decode(unsigned char *in, unsigned int inLength, unsigned char **out); - -}//namespace cocos2d - -#ifdef __cplusplus -} -#endif - -#endif // __SUPPORT_BASE64_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/support/ccUTF8.h b/cappuccino-sdk/incl/cocos2dx/support/ccUTF8.h deleted file mode 100644 index 87c7a46..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/ccUTF8.h +++ /dev/null @@ -1,97 +0,0 @@ -// -// ccUTF8.h -// cocos2dx -// -// Created by James Chen on 2/27/13. -// - -#ifndef __cocos2dx__ccUTF8__ -#define __cocos2dx__ccUTF8__ - -#include "platform/CCPlatformMacros.h" -#include - -NS_CC_BEGIN - -CC_DLL int cc_wcslen(const unsigned short* str); - -CC_DLL void cc_utf8_trim_ws(std::vector* str); - -/* - * @ch is the unicode character whitespace? - * - * Reference: http://en.wikipedia.org/wiki/Whitespace_character#Unicode - * - * Return value: weather the character is a whitespace character. - * */ -CC_DLL bool isspace_unicode(unsigned short ch); - -/* - * cc_utf8_strlen: - * @p: pointer to the start of a UTF-8 encoded string. - * @max: the maximum number of bytes to examine. If @max - * is less than 0, then the string is assumed to be - * null-terminated. If @max is 0, @p will not be examined and - * may be %NULL. - * - * Returns the length of the string in characters. - * - * Return value: the length of the string in characters - **/ -CC_DLL long -cc_utf8_strlen (const char * p, int max); - -/* - * @str: the string to search through. - * @c: the character to not look for. - * - * Return value: the index of the last character that is not c. - * */ -CC_DLL unsigned int cc_utf8_find_last_not_char(std::vector str, unsigned short c); - -CC_DLL std::vector cc_utf16_vec_from_utf16_str(const unsigned short* str); - -/* - * cc_utf8_to_utf16: - * @str_old: pointer to the start of a C string. - * - * Creates a utf8 string from a cstring. - * - * Return value: the newly created utf8 string. - * */ -CC_DLL unsigned short* cc_utf8_to_utf16(const char* str_old, int length = -1, int* rUtf16Size = NULL); - -/** - * cc_utf16_to_utf8: - * @str: a UTF-16 encoded string - * @len: the maximum length of @str to use. If @len < 0, then - * the string is terminated with a 0 character. - * @items_read: location to store number of words read, or %NULL. - * If %NULL, then %G_CONVERT_ERROR_PARTIAL_INPUT will be - * returned in case @str contains a trailing partial - * character. If an error occurs then the index of the - * invalid input is stored here. - * @items_written: location to store number of bytes written, or %NULL. - * The value stored here does not include the trailing - * 0 byte. - * @error: location to store the error occuring, or %NULL to ignore - * errors. Any of the errors in #GConvertError other than - * %G_CONVERT_ERROR_NO_CONVERSION may occur. - * - * Convert a string from UTF-16 to UTF-8. The result will be - * terminated with a 0 byte. - * - * Return value: a pointer to a newly allocated UTF-8 string. - * This value must be freed with free(). If an - * error occurs, %NULL will be returned and - * @error set. - **/ -CC_DLL char * -cc_utf16_to_utf8 (const unsigned short *str, - long len, - long *items_read, - long *items_written); - -NS_CC_END - -#endif /* defined(__cocos2dx__ccUTF8__) */ diff --git a/cappuccino-sdk/incl/cocos2dx/support/ccUtils.h b/cappuccino-sdk/incl/cocos2dx/support/ccUtils.h deleted file mode 100644 index 347ea0d..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/ccUtils.h +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __SUPPORT_CC_UTILS_H__ -#define __SUPPORT_CC_UTILS_H__ - -/** @file ccUtils.h -Misc free functions -*/ - -namespace cocos2d { -/* -ccNextPOT function is licensed under the same license that is used in CCTexture2D.m. -*/ - -/** returns the Next Power of Two value. - -Examples: -- If "value" is 15, it will return 16. -- If "value" is 16, it will return 16. -- If "value" is 17, it will return 32. - -@since v0.99.5 -*/ - -unsigned long ccNextPOT( unsigned long value ); - -} - -#endif // __SUPPORT_CC_UTILS_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/support/component/CCComponent.h b/cappuccino-sdk/incl/cocos2dx/support/component/CCComponent.h deleted file mode 100644 index 349279f..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/component/CCComponent.h +++ /dev/null @@ -1,74 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_FRAMEWORK_COMPONENT_H__ -#define __CC_FRAMEWORK_COMPONENT_H__ - -#include "cocoa/CCObject.h" -#include - -NS_CC_BEGIN - -class CC_DLL CCComponent : public CCObject -{ -protected: - CCComponent(void); -public: - /** - * @js NA - * @lua NA - */ - virtual ~CCComponent(void); - virtual bool init(); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - /** - * @js NA - * @lua NA - */ - virtual void onExit(); - virtual void update(float delta); - virtual bool serialize(void* r); - virtual bool isEnabled() const; - virtual void setEnabled(bool b); - static CCComponent* create(void); - - const char* getName() const; - void setName(const char *pName); - - void setOwner(CCNode *pOwner); - CCNode* getOwner() const; - -protected: - CCNode *m_pOwner; - std::string m_strName; - bool m_bEnabled; -}; - -NS_CC_END - -#endif // __FUNDATION__CCCOMPONENT_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/support/component/CCComponentContainer.h b/cappuccino-sdk/incl/cocos2dx/support/component/CCComponentContainer.h deleted file mode 100644 index 2aa7483..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/component/CCComponentContainer.h +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_FRAMEWORK_COMCONTAINER_H__ -#define __CC_FRAMEWORK_COMCONTAINER_H__ - -#include "cocoa/CCDictionary.h" - -NS_CC_BEGIN - -class CCComponent; -class CCNode; -/** - * @js NA - * @lua NA - */ -class CC_DLL CCComponentContainer -{ -protected: - CCComponentContainer(CCNode *pNode); - -public: - virtual ~CCComponentContainer(void); - virtual CCComponent* get(const char *pName) const; - virtual bool add(CCComponent *pCom); - virtual bool remove(const char *pName); - virtual bool remove(CCComponent *pCom); - virtual void removeAll(); - virtual void visit(float fDelta); -public: - bool isEmpty() const; - -private: - void alloc(void); - -private: - CCDictionary *m_pComponents; ///< Dictionary of components - CCNode *m_pOwner; - - friend class CCNode; -}; - -NS_CC_END - -#endif // __FUNDATION__CCCOMPONENT_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/support/data_support/ccCArray.h b/cappuccino-sdk/incl/cocos2dx/support/data_support/ccCArray.h deleted file mode 100644 index b462318..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/data_support/ccCArray.h +++ /dev/null @@ -1,209 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2007 Scott Lembcke - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -/** - @file - based on Chipmunk cpArray. - ccArray is a faster alternative to NSMutableArray, it does pretty much the - same thing (stores NSObjects and retains/releases them appropriately). It's - faster because: - - it uses a plain C interface so it doesn't incur Objective-c messaging overhead - - it assumes you know what you're doing, so it doesn't spend time on safety checks - (index out of bounds, required capacity etc.) - - comparisons are done using pointer equality instead of isEqual - - There are 2 kind of functions: - - ccArray functions that manipulates objective-c objects (retain and release are performed) - - ccCArray functions that manipulates values like if they were standard C structures (no retain/release is performed) - */ - -#ifndef CC_ARRAY_H -#define CC_ARRAY_H - -#include "ccMacros.h" -#include "cocoa/CCObject.h" - -#include -#include -#include - -NS_CC_BEGIN - -#define CC_INVALID_INDEX 0xffffffff - -// Easy integration -#define CCARRAYDATA_FOREACH(__array__, __object__) \ -__object__=__array__->arr[0]; for(unsigned int i=0, num=__array__->num; iarr[i]) \ - - -typedef struct _ccArray { - unsigned int num, max; - CCObject** arr; -} ccArray; - -/** Allocates and initializes a new array with specified capacity */ -ccArray* ccArrayNew(unsigned int capacity); - -/** Frees array after removing all remaining objects. Silently ignores nil arr. */ -void ccArrayFree(ccArray*& arr); - -/** Doubles array capacity */ -void ccArrayDoubleCapacity(ccArray *arr); - -/** Increases array capacity such that max >= num + extra. */ -void ccArrayEnsureExtraCapacity(ccArray *arr, unsigned int extra); - -/** shrinks the array so the memory footprint corresponds with the number of items */ -void ccArrayShrink(ccArray *arr); - -/** Returns index of first occurrence of object, NSNotFound if object not found. */ -unsigned int ccArrayGetIndexOfObject(ccArray *arr, CCObject* object); - -/** Returns a Boolean value that indicates whether object is present in array. */ -bool ccArrayContainsObject(ccArray *arr, CCObject* object); - -/** Appends an object. Behavior undefined if array doesn't have enough capacity. */ -void ccArrayAppendObject(ccArray *arr, CCObject* object); - -/** Appends an object. Capacity of arr is increased if needed. */ -void ccArrayAppendObjectWithResize(ccArray *arr, CCObject* object); - -/** Appends objects from plusArr to arr. - Behavior undefined if arr doesn't have enough capacity. */ -void ccArrayAppendArray(ccArray *arr, ccArray *plusArr); - -/** Appends objects from plusArr to arr. Capacity of arr is increased if needed. */ -void ccArrayAppendArrayWithResize(ccArray *arr, ccArray *plusArr); - -/** Inserts an object at index */ -void ccArrayInsertObjectAtIndex(ccArray *arr, CCObject* object, unsigned int index); - -/** Swaps two objects */ -void ccArraySwapObjectsAtIndexes(ccArray *arr, unsigned int index1, unsigned int index2); - -/** Removes all objects from arr */ -void ccArrayRemoveAllObjects(ccArray *arr); - -/** Removes object at specified index and pushes back all subsequent objects. - Behavior undefined if index outside [0, num-1]. */ -void ccArrayRemoveObjectAtIndex(ccArray *arr, unsigned int index, bool bReleaseObj = true); - -/** Removes object at specified index and fills the gap with the last object, - thereby avoiding the need to push back subsequent objects. - Behavior undefined if index outside [0, num-1]. */ -void ccArrayFastRemoveObjectAtIndex(ccArray *arr, unsigned int index); - -void ccArrayFastRemoveObject(ccArray *arr, CCObject* object); - -/** Searches for the first occurrence of object and removes it. If object is not - found the function has no effect. */ -void ccArrayRemoveObject(ccArray *arr, CCObject* object, bool bReleaseObj = true); - -/** Removes from arr all objects in minusArr. For each object in minusArr, the - first matching instance in arr will be removed. */ -void ccArrayRemoveArray(ccArray *arr, ccArray *minusArr); - -/** Removes from arr all objects in minusArr. For each object in minusArr, all - matching instances in arr will be removed. */ -void ccArrayFullRemoveArray(ccArray *arr, ccArray *minusArr); - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) -// #pragma mark - -// #pragma mark ccCArray for Values (c structures) -#endif - -typedef struct _ccCArray { - unsigned int num, max; - void** arr; -} ccCArray; - -/** Allocates and initializes a new C array with specified capacity */ -ccCArray* ccCArrayNew(unsigned int capacity); - -/** Frees C array after removing all remaining values. Silently ignores nil arr. */ -void ccCArrayFree(ccCArray *arr); - -/** Doubles C array capacity */ -void ccCArrayDoubleCapacity(ccCArray *arr); - -/** Increases array capacity such that max >= num + extra. */ -void ccCArrayEnsureExtraCapacity(ccCArray *arr, unsigned int extra); - -/** Returns index of first occurrence of value, NSNotFound if value not found. */ -unsigned int ccCArrayGetIndexOfValue(ccCArray *arr, void* value); - -/** Returns a Boolean value that indicates whether value is present in the C array. */ -bool ccCArrayContainsValue(ccCArray *arr, void* value); - -/** Inserts a value at a certain position. Behavior undefined if array doesn't have enough capacity */ -void ccCArrayInsertValueAtIndex( ccCArray *arr, void* value, unsigned int index); - -/** Appends an value. Behavior undefined if array doesn't have enough capacity. */ -void ccCArrayAppendValue(ccCArray *arr, void* value); - -/** Appends an value. Capacity of arr is increased if needed. */ -void ccCArrayAppendValueWithResize(ccCArray *arr, void* value); - -/** Appends values from plusArr to arr. Behavior undefined if arr doesn't have - enough capacity. */ -void ccCArrayAppendArray(ccCArray *arr, ccCArray *plusArr); - -/** Appends values from plusArr to arr. Capacity of arr is increased if needed. */ -void ccCArrayAppendArrayWithResize(ccCArray *arr, ccCArray *plusArr); - -/** Removes all values from arr */ -void ccCArrayRemoveAllValues(ccCArray *arr); - -/** Removes value at specified index and pushes back all subsequent values. - Behavior undefined if index outside [0, num-1]. - @since v0.99.4 - */ -void ccCArrayRemoveValueAtIndex(ccCArray *arr, unsigned int index); - -/** Removes value at specified index and fills the gap with the last value, - thereby avoiding the need to push back subsequent values. - Behavior undefined if index outside [0, num-1]. - @since v0.99.4 - */ -void ccCArrayFastRemoveValueAtIndex(ccCArray *arr, unsigned int index); - -/** Searches for the first occurrence of value and removes it. If value is not found the function has no effect. - @since v0.99.4 - */ -void ccCArrayRemoveValue(ccCArray *arr, void* value); - -/** Removes from arr all values in minusArr. For each Value in minusArr, the first matching instance in arr will be removed. - @since v0.99.4 - */ -void ccCArrayRemoveArray(ccCArray *arr, ccCArray *minusArr); - -/** Removes from arr all values in minusArr. For each value in minusArr, all matching instances in arr will be removed. - @since v0.99.4 - */ -void ccCArrayFullRemoveArray(ccCArray *arr, ccCArray *minusArr); - -NS_CC_END - -#endif // CC_ARRAY_H diff --git a/cappuccino-sdk/incl/cocos2dx/support/data_support/uthash.h b/cappuccino-sdk/incl/cocos2dx/support/data_support/uthash.h deleted file mode 100644 index 909cb0a..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/data_support/uthash.h +++ /dev/null @@ -1,940 +0,0 @@ -/* -Copyright (c) 2003-2013, Troy D. Hanson http://troydhanson.github.com/uthash/ -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef UTHASH_H -#define UTHASH_H - -#include /* memcmp,strlen */ -#include /* ptrdiff_t */ -#include /* exit() */ - -/* These macros use decltype or the earlier __typeof GNU extension. - As decltype is only available in newer compilers (VS2010 or gcc 4.3+ - when compiling c++ source) this code uses whatever method is needed - or, for VS2008 where neither is available, uses casting workarounds. */ -#ifdef _MSC_VER /* MS compiler */ -#if _MSC_VER >= 1600 && defined(__cplusplus) /* VS2010 or newer in C++ mode */ -#define DECLTYPE(x) (decltype(x)) -#else /* VS2008 or older (or VS2010 in C mode) */ -#define NO_DECLTYPE -#define DECLTYPE(x) -#endif -#else /* GNU, Sun and other compilers */ -#define DECLTYPE(x) (__typeof(x)) -#endif - -#ifdef NO_DECLTYPE -#define DECLTYPE_ASSIGN(dst,src) \ -do { \ - char **_da_dst = (char**)(&(dst)); \ - *_da_dst = (char*)(src); \ -} while(0) -#else -#define DECLTYPE_ASSIGN(dst,src) \ -do { \ - (dst) = DECLTYPE(dst)(src); \ -} while(0) -#endif - -/* a number of the hash function use uint32_t which isn't defined on win32 */ -#ifdef _MSC_VER -typedef unsigned int uint32_t; -typedef unsigned char uint8_t; -#else -#include /* uint32_t */ -#endif - -#define UTHASH_VERSION 1.9.8 - -#ifndef uthash_fatal -#define uthash_fatal(msg) exit(-1) /* fatal error (out of memory,etc) */ -#endif -#ifndef uthash_malloc -#define uthash_malloc(sz) malloc(sz) /* malloc fcn */ -#endif -#ifndef uthash_free -#define uthash_free(ptr,sz) free(ptr) /* free fcn */ -#endif - -#ifndef uthash_noexpand_fyi -#define uthash_noexpand_fyi(tbl) /* can be defined to log noexpand */ -#endif -#ifndef uthash_expand_fyi -#define uthash_expand_fyi(tbl) /* can be defined to log expands */ -#endif - -/* initial number of buckets */ -#define HASH_INITIAL_NUM_BUCKETS 32 /* initial number of buckets */ -#define HASH_INITIAL_NUM_BUCKETS_LOG2 5 /* lg2 of initial number of buckets */ -#define HASH_BKT_CAPACITY_THRESH 10 /* expand when bucket count reaches */ - -/* calculate the element whose hash handle address is hhe */ -#define ELMT_FROM_HH(tbl,hhp) ((void*)(((char*)(hhp)) - ((tbl)->hho))) - -#define HASH_FIND(hh,head,keyptr,keylen,out) \ -do { \ - unsigned _hf_bkt,_hf_hashv; \ - out=NULL; \ - if (head) { \ - HASH_FCN(keyptr,keylen, (head)->hh.tbl->num_buckets, _hf_hashv, _hf_bkt); \ - if (HASH_BLOOM_TEST((head)->hh.tbl, _hf_hashv)) { \ - HASH_FIND_IN_BKT((head)->hh.tbl, hh, (head)->hh.tbl->buckets[ _hf_bkt ], \ - keyptr,keylen,out); \ - } \ - } \ -} while (0) - -#ifdef HASH_BLOOM -#define HASH_BLOOM_BITLEN (1ULL << HASH_BLOOM) -#define HASH_BLOOM_BYTELEN (HASH_BLOOM_BITLEN/8) + ((HASH_BLOOM_BITLEN%8) ? 1:0) -#define HASH_BLOOM_MAKE(tbl) \ -do { \ - (tbl)->bloom_nbits = HASH_BLOOM; \ - (tbl)->bloom_bv = (uint8_t*)uthash_malloc(HASH_BLOOM_BYTELEN); \ - if (!((tbl)->bloom_bv)) { uthash_fatal( "out of memory"); } \ - memset((tbl)->bloom_bv, 0, HASH_BLOOM_BYTELEN); \ - (tbl)->bloom_sig = HASH_BLOOM_SIGNATURE; \ -} while (0) - -#define HASH_BLOOM_FREE(tbl) \ -do { \ - uthash_free((tbl)->bloom_bv, HASH_BLOOM_BYTELEN); \ -} while (0) - -#define HASH_BLOOM_BITSET(bv,idx) (bv[(idx)/8] |= (1U << ((idx)%8))) -#define HASH_BLOOM_BITTEST(bv,idx) (bv[(idx)/8] & (1U << ((idx)%8))) - -#define HASH_BLOOM_ADD(tbl,hashv) \ - HASH_BLOOM_BITSET((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1))) - -#define HASH_BLOOM_TEST(tbl,hashv) \ - HASH_BLOOM_BITTEST((tbl)->bloom_bv, (hashv & (uint32_t)((1ULL << (tbl)->bloom_nbits) - 1))) - -#else -#define HASH_BLOOM_MAKE(tbl) -#define HASH_BLOOM_FREE(tbl) -#define HASH_BLOOM_ADD(tbl,hashv) -#define HASH_BLOOM_TEST(tbl,hashv) (1) -#define HASH_BLOOM_BYTELEN 0 -#endif - -#define HASH_MAKE_TABLE(hh,head) \ -do { \ - (head)->hh.tbl = (UT_hash_table*)uthash_malloc( \ - sizeof(UT_hash_table)); \ - if (!((head)->hh.tbl)) { uthash_fatal( "out of memory"); } \ - memset((head)->hh.tbl, 0, sizeof(UT_hash_table)); \ - (head)->hh.tbl->tail = &((head)->hh); \ - (head)->hh.tbl->num_buckets = HASH_INITIAL_NUM_BUCKETS; \ - (head)->hh.tbl->log2_num_buckets = HASH_INITIAL_NUM_BUCKETS_LOG2; \ - (head)->hh.tbl->hho = (char*)(&(head)->hh) - (char*)(head); \ - (head)->hh.tbl->buckets = (UT_hash_bucket*)uthash_malloc( \ - HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \ - if (! (head)->hh.tbl->buckets) { uthash_fatal( "out of memory"); } \ - memset((head)->hh.tbl->buckets, 0, \ - HASH_INITIAL_NUM_BUCKETS*sizeof(struct UT_hash_bucket)); \ - HASH_BLOOM_MAKE((head)->hh.tbl); \ - (head)->hh.tbl->signature = HASH_SIGNATURE; \ -} while(0) - -#define HASH_ADD(hh,head,fieldname,keylen_in,add) \ - HASH_ADD_KEYPTR(hh,head,&((add)->fieldname),keylen_in,add) - -#define HASH_REPLACE(hh,head,fieldname,keylen_in,add,replaced) \ -do { \ - replaced=NULL; \ - HASH_FIND(hh,head,&((add)->fieldname),keylen_in,replaced); \ - if (replaced!=NULL) { \ - HASH_DELETE(hh,head,replaced); \ - }; \ - HASH_ADD(hh,head,fieldname,keylen_in,add); \ -} while(0) - -#define HASH_ADD_KEYPTR(hh,head,keyptr,keylen_in,add) \ -do { \ - unsigned _ha_bkt; \ - (add)->hh.next = NULL; \ - (add)->hh.key = (char*)keyptr; \ - (add)->hh.keylen = (unsigned)keylen_in; \ - if (!(head)) { \ - head = (add); \ - (head)->hh.prev = NULL; \ - HASH_MAKE_TABLE(hh,head); \ - } else { \ - (head)->hh.tbl->tail->next = (add); \ - (add)->hh.prev = ELMT_FROM_HH((head)->hh.tbl, (head)->hh.tbl->tail); \ - (head)->hh.tbl->tail = &((add)->hh); \ - } \ - (head)->hh.tbl->num_items++; \ - (add)->hh.tbl = (head)->hh.tbl; \ - HASH_FCN(keyptr,keylen_in, (head)->hh.tbl->num_buckets, \ - (add)->hh.hashv, _ha_bkt); \ - HASH_ADD_TO_BKT((head)->hh.tbl->buckets[_ha_bkt],&(add)->hh); \ - HASH_BLOOM_ADD((head)->hh.tbl,(add)->hh.hashv); \ - HASH_EMIT_KEY(hh,head,keyptr,keylen_in); \ - HASH_FSCK(hh,head); \ -} while(0) - -#define HASH_TO_BKT( hashv, num_bkts, bkt ) \ -do { \ - bkt = ((hashv) & ((num_bkts) - 1)); \ -} while(0) - -/* delete "delptr" from the hash table. - * "the usual" patch-up process for the app-order doubly-linked-list. - * The use of _hd_hh_del below deserves special explanation. - * These used to be expressed using (delptr) but that led to a bug - * if someone used the same symbol for the head and deletee, like - * HASH_DELETE(hh,users,users); - * We want that to work, but by changing the head (users) below - * we were forfeiting our ability to further refer to the deletee (users) - * in the patch-up process. Solution: use scratch space to - * copy the deletee pointer, then the latter references are via that - * scratch pointer rather than through the repointed (users) symbol. - */ -#define HASH_DELETE(hh,head,delptr) \ -do { \ - unsigned _hd_bkt; \ - struct UT_hash_handle *_hd_hh_del; \ - if ( ((delptr)->hh.prev == NULL) && ((delptr)->hh.next == NULL) ) { \ - uthash_free((head)->hh.tbl->buckets, \ - (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \ - HASH_BLOOM_FREE((head)->hh.tbl); \ - uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \ - head = NULL; \ - } else { \ - _hd_hh_del = &((delptr)->hh); \ - if ((delptr) == ELMT_FROM_HH((head)->hh.tbl,(head)->hh.tbl->tail)) { \ - (head)->hh.tbl->tail = \ - (UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \ - (head)->hh.tbl->hho); \ - } \ - if ((delptr)->hh.prev) { \ - ((UT_hash_handle*)((ptrdiff_t)((delptr)->hh.prev) + \ - (head)->hh.tbl->hho))->next = (delptr)->hh.next; \ - } else { \ - DECLTYPE_ASSIGN(head,(delptr)->hh.next); \ - } \ - if (_hd_hh_del->next) { \ - ((UT_hash_handle*)((ptrdiff_t)_hd_hh_del->next + \ - (head)->hh.tbl->hho))->prev = \ - _hd_hh_del->prev; \ - } \ - HASH_TO_BKT( _hd_hh_del->hashv, (head)->hh.tbl->num_buckets, _hd_bkt); \ - HASH_DEL_IN_BKT(hh,(head)->hh.tbl->buckets[_hd_bkt], _hd_hh_del); \ - (head)->hh.tbl->num_items--; \ - } \ - HASH_FSCK(hh,head); \ -} while (0) - - -/* convenience forms of HASH_FIND/HASH_ADD/HASH_DEL */ -#define HASH_FIND_STR(head,findstr,out) \ - HASH_FIND(hh,head,findstr,strlen(findstr),out) -#define HASH_ADD_STR(head,strfield,add) \ - HASH_ADD(hh,head,strfield,strlen(add->strfield),add) -#define HASH_REPLACE_STR(head,strfield,add,replaced) \ - HASH_REPLACE(hh,head,strfield,strlen(add->strfield),add,replaced) -#define HASH_FIND_INT(head,findint,out) \ - HASH_FIND(hh,head,findint,sizeof(int),out) -#define HASH_ADD_INT(head,intfield,add) \ - HASH_ADD(hh,head,intfield,sizeof(int),add) -#define HASH_REPLACE_INT(head,intfield,add,replaced) \ - HASH_REPLACE(hh,head,intfield,sizeof(int),add,replaced) -#define HASH_FIND_PTR(head,findptr,out) \ - HASH_FIND(hh,head,findptr,sizeof(void *),out) -#define HASH_ADD_PTR(head,ptrfield,add) \ - HASH_ADD(hh,head,ptrfield,sizeof(void *),add) -#define HASH_REPLACE_PTR(head,ptrfield,add) \ - HASH_REPLACE(hh,head,ptrfield,sizeof(void *),add,replaced) -#define HASH_DEL(head,delptr) \ - HASH_DELETE(hh,head,delptr) - -/* HASH_FSCK checks hash integrity on every add/delete when HASH_DEBUG is defined. - * This is for uthash developer only; it compiles away if HASH_DEBUG isn't defined. - */ -#ifdef HASH_DEBUG -#define HASH_OOPS(...) do { fprintf(stderr,__VA_ARGS__); exit(-1); } while (0) -#define HASH_FSCK(hh,head) \ -do { \ - unsigned _bkt_i; \ - unsigned _count, _bkt_count; \ - char *_prev; \ - struct UT_hash_handle *_thh; \ - if (head) { \ - _count = 0; \ - for( _bkt_i = 0; _bkt_i < (head)->hh.tbl->num_buckets; _bkt_i++) { \ - _bkt_count = 0; \ - _thh = (head)->hh.tbl->buckets[_bkt_i].hh_head; \ - _prev = NULL; \ - while (_thh) { \ - if (_prev != (char*)(_thh->hh_prev)) { \ - HASH_OOPS("invalid hh_prev %p, actual %p\n", \ - _thh->hh_prev, _prev ); \ - } \ - _bkt_count++; \ - _prev = (char*)(_thh); \ - _thh = _thh->hh_next; \ - } \ - _count += _bkt_count; \ - if ((head)->hh.tbl->buckets[_bkt_i].count != _bkt_count) { \ - HASH_OOPS("invalid bucket count %d, actual %d\n", \ - (head)->hh.tbl->buckets[_bkt_i].count, _bkt_count); \ - } \ - } \ - if (_count != (head)->hh.tbl->num_items) { \ - HASH_OOPS("invalid hh item count %d, actual %d\n", \ - (head)->hh.tbl->num_items, _count ); \ - } \ - /* traverse hh in app order; check next/prev integrity, count */ \ - _count = 0; \ - _prev = NULL; \ - _thh = &(head)->hh; \ - while (_thh) { \ - _count++; \ - if (_prev !=(char*)(_thh->prev)) { \ - HASH_OOPS("invalid prev %p, actual %p\n", \ - _thh->prev, _prev ); \ - } \ - _prev = (char*)ELMT_FROM_HH((head)->hh.tbl, _thh); \ - _thh = ( _thh->next ? (UT_hash_handle*)((char*)(_thh->next) + \ - (head)->hh.tbl->hho) : NULL ); \ - } \ - if (_count != (head)->hh.tbl->num_items) { \ - HASH_OOPS("invalid app item count %d, actual %d\n", \ - (head)->hh.tbl->num_items, _count ); \ - } \ - } \ -} while (0) -#else -#define HASH_FSCK(hh,head) -#endif - -/* When compiled with -DHASH_EMIT_KEYS, length-prefixed keys are emitted to - * the descriptor to which this macro is defined for tuning the hash function. - * The app can #include to get the prototype for write(2). */ -#ifdef HASH_EMIT_KEYS -#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) \ -do { \ - unsigned _klen = fieldlen; \ - write(HASH_EMIT_KEYS, &_klen, sizeof(_klen)); \ - write(HASH_EMIT_KEYS, keyptr, fieldlen); \ -} while (0) -#else -#define HASH_EMIT_KEY(hh,head,keyptr,fieldlen) -#endif - -/* default to Jenkin's hash unless overridden e.g. DHASH_FUNCTION=HASH_SAX */ -#ifdef HASH_FUNCTION -#define HASH_FCN HASH_FUNCTION -#else -#define HASH_FCN HASH_JEN -#endif - -/* The Bernstein hash function, used in Perl prior to v5.6 */ -#define HASH_BER(key,keylen,num_bkts,hashv,bkt) \ -do { \ - unsigned _hb_keylen=keylen; \ - char *_hb_key=(char*)(key); \ - (hashv) = 0; \ - while (_hb_keylen--) { (hashv) = ((hashv) * 33) + *_hb_key++; } \ - bkt = (hashv) & (num_bkts-1); \ -} while (0) - - -/* SAX/FNV/OAT/JEN hash functions are macro variants of those listed at - * http://eternallyconfuzzled.com/tuts/algorithms/jsw_tut_hashing.aspx */ -#define HASH_SAX(key,keylen,num_bkts,hashv,bkt) \ -do { \ - unsigned _sx_i; \ - char *_hs_key=(char*)(key); \ - hashv = 0; \ - for(_sx_i=0; _sx_i < keylen; _sx_i++) \ - hashv ^= (hashv << 5) + (hashv >> 2) + _hs_key[_sx_i]; \ - bkt = hashv & (num_bkts-1); \ -} while (0) - -#define HASH_FNV(key,keylen,num_bkts,hashv,bkt) \ -do { \ - unsigned _fn_i; \ - char *_hf_key=(char*)(key); \ - hashv = 2166136261UL; \ - for(_fn_i=0; _fn_i < keylen; _fn_i++) \ - hashv = (hashv * 16777619) ^ _hf_key[_fn_i]; \ - bkt = hashv & (num_bkts-1); \ -} while(0) - -#define HASH_OAT(key,keylen,num_bkts,hashv,bkt) \ -do { \ - unsigned _ho_i; \ - char *_ho_key=(char*)(key); \ - hashv = 0; \ - for(_ho_i=0; _ho_i < keylen; _ho_i++) { \ - hashv += _ho_key[_ho_i]; \ - hashv += (hashv << 10); \ - hashv ^= (hashv >> 6); \ - } \ - hashv += (hashv << 3); \ - hashv ^= (hashv >> 11); \ - hashv += (hashv << 15); \ - bkt = hashv & (num_bkts-1); \ -} while(0) - -#define HASH_JEN_MIX(a,b,c) \ -do { \ - a -= b; a -= c; a ^= ( c >> 13 ); \ - b -= c; b -= a; b ^= ( a << 8 ); \ - c -= a; c -= b; c ^= ( b >> 13 ); \ - a -= b; a -= c; a ^= ( c >> 12 ); \ - b -= c; b -= a; b ^= ( a << 16 ); \ - c -= a; c -= b; c ^= ( b >> 5 ); \ - a -= b; a -= c; a ^= ( c >> 3 ); \ - b -= c; b -= a; b ^= ( a << 10 ); \ - c -= a; c -= b; c ^= ( b >> 15 ); \ -} while (0) - -#define HASH_JEN(key,keylen,num_bkts,hashv,bkt) \ -do { \ - unsigned _hj_i,_hj_j,_hj_k; \ - unsigned char *_hj_key=(unsigned char*)(key); \ - hashv = 0xfeedbeef; \ - _hj_i = _hj_j = 0x9e3779b9; \ - _hj_k = (unsigned)keylen; \ - while (_hj_k >= 12) { \ - _hj_i += (_hj_key[0] + ( (unsigned)_hj_key[1] << 8 ) \ - + ( (unsigned)_hj_key[2] << 16 ) \ - + ( (unsigned)_hj_key[3] << 24 ) ); \ - _hj_j += (_hj_key[4] + ( (unsigned)_hj_key[5] << 8 ) \ - + ( (unsigned)_hj_key[6] << 16 ) \ - + ( (unsigned)_hj_key[7] << 24 ) ); \ - hashv += (_hj_key[8] + ( (unsigned)_hj_key[9] << 8 ) \ - + ( (unsigned)_hj_key[10] << 16 ) \ - + ( (unsigned)_hj_key[11] << 24 ) ); \ - \ - HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ - \ - _hj_key += 12; \ - _hj_k -= 12; \ - } \ - hashv += keylen; \ - switch ( _hj_k ) { \ - case 11: hashv += ( (unsigned)_hj_key[10] << 24 ); \ - case 10: hashv += ( (unsigned)_hj_key[9] << 16 ); \ - case 9: hashv += ( (unsigned)_hj_key[8] << 8 ); \ - case 8: _hj_j += ( (unsigned)_hj_key[7] << 24 ); \ - case 7: _hj_j += ( (unsigned)_hj_key[6] << 16 ); \ - case 6: _hj_j += ( (unsigned)_hj_key[5] << 8 ); \ - case 5: _hj_j += _hj_key[4]; \ - case 4: _hj_i += ( (unsigned)_hj_key[3] << 24 ); \ - case 3: _hj_i += ( (unsigned)_hj_key[2] << 16 ); \ - case 2: _hj_i += ( (unsigned)_hj_key[1] << 8 ); \ - case 1: _hj_i += _hj_key[0]; \ - } \ - HASH_JEN_MIX(_hj_i, _hj_j, hashv); \ - bkt = hashv & (num_bkts-1); \ -} while(0) - -/* The Paul Hsieh hash function */ -#undef get16bits -#if (defined(__GNUC__) && defined(__i386__)) || defined(__WATCOMC__) \ - || defined(_MSC_VER) || defined (__BORLANDC__) || defined (__TURBOC__) -#define get16bits(d) (*((const uint16_t *) (d))) -#endif - -#if !defined (get16bits) -#define get16bits(d) ((((uint32_t)(((const uint8_t *)(d))[1])) << 8) \ - +(uint32_t)(((const uint8_t *)(d))[0]) ) -#endif -#define HASH_SFH(key,keylen,num_bkts,hashv,bkt) \ -do { \ - unsigned char *_sfh_key=(unsigned char*)(key); \ - uint32_t _sfh_tmp, _sfh_len = keylen; \ - \ - int _sfh_rem = _sfh_len & 3; \ - _sfh_len >>= 2; \ - hashv = 0xcafebabe; \ - \ - /* Main loop */ \ - for (;_sfh_len > 0; _sfh_len--) { \ - hashv += get16bits (_sfh_key); \ - _sfh_tmp = (uint32_t)(get16bits (_sfh_key+2)) << 11 ^ hashv; \ - hashv = (hashv << 16) ^ _sfh_tmp; \ - _sfh_key += 2*sizeof (uint16_t); \ - hashv += hashv >> 11; \ - } \ - \ - /* Handle end cases */ \ - switch (_sfh_rem) { \ - case 3: hashv += get16bits (_sfh_key); \ - hashv ^= hashv << 16; \ - hashv ^= (uint32_t)(_sfh_key[sizeof (uint16_t)] << 18); \ - hashv += hashv >> 11; \ - break; \ - case 2: hashv += get16bits (_sfh_key); \ - hashv ^= hashv << 11; \ - hashv += hashv >> 17; \ - break; \ - case 1: hashv += *_sfh_key; \ - hashv ^= hashv << 10; \ - hashv += hashv >> 1; \ - } \ - \ - /* Force "avalanching" of final 127 bits */ \ - hashv ^= hashv << 3; \ - hashv += hashv >> 5; \ - hashv ^= hashv << 4; \ - hashv += hashv >> 17; \ - hashv ^= hashv << 25; \ - hashv += hashv >> 6; \ - bkt = hashv & (num_bkts-1); \ -} while(0) - -#ifdef HASH_USING_NO_STRICT_ALIASING -/* The MurmurHash exploits some CPU's (x86,x86_64) tolerance for unaligned reads. - * For other types of CPU's (e.g. Sparc) an unaligned read causes a bus error. - * MurmurHash uses the faster approach only on CPU's where we know it's safe. - * - * Note the preprocessor built-in defines can be emitted using: - * - * gcc -m64 -dM -E - < /dev/null (on gcc) - * cc -## a.c (where a.c is a simple test file) (Sun Studio) - */ -#if (defined(__i386__) || defined(__x86_64__) || defined(_M_IX86)) -#define MUR_GETBLOCK(p,i) p[i] -#else /* non intel */ -#define MUR_PLUS0_ALIGNED(p) (((unsigned long)p & 0x3) == 0) -#define MUR_PLUS1_ALIGNED(p) (((unsigned long)p & 0x3) == 1) -#define MUR_PLUS2_ALIGNED(p) (((unsigned long)p & 0x3) == 2) -#define MUR_PLUS3_ALIGNED(p) (((unsigned long)p & 0x3) == 3) -#define WP(p) ((uint32_t*)((unsigned long)(p) & ~3UL)) -#if (defined(__BIG_ENDIAN__) || defined(SPARC) || defined(__ppc__) || defined(__ppc64__)) -#define MUR_THREE_ONE(p) ((((*WP(p))&0x00ffffff) << 8) | (((*(WP(p)+1))&0xff000000) >> 24)) -#define MUR_TWO_TWO(p) ((((*WP(p))&0x0000ffff) <<16) | (((*(WP(p)+1))&0xffff0000) >> 16)) -#define MUR_ONE_THREE(p) ((((*WP(p))&0x000000ff) <<24) | (((*(WP(p)+1))&0xffffff00) >> 8)) -#else /* assume little endian non-intel */ -#define MUR_THREE_ONE(p) ((((*WP(p))&0xffffff00) >> 8) | (((*(WP(p)+1))&0x000000ff) << 24)) -#define MUR_TWO_TWO(p) ((((*WP(p))&0xffff0000) >>16) | (((*(WP(p)+1))&0x0000ffff) << 16)) -#define MUR_ONE_THREE(p) ((((*WP(p))&0xff000000) >>24) | (((*(WP(p)+1))&0x00ffffff) << 8)) -#endif -#define MUR_GETBLOCK(p,i) (MUR_PLUS0_ALIGNED(p) ? ((p)[i]) : \ - (MUR_PLUS1_ALIGNED(p) ? MUR_THREE_ONE(p) : \ - (MUR_PLUS2_ALIGNED(p) ? MUR_TWO_TWO(p) : \ - MUR_ONE_THREE(p)))) -#endif -#define MUR_ROTL32(x,r) (((x) << (r)) | ((x) >> (32 - (r)))) -#define MUR_FMIX(_h) \ -do { \ - _h ^= _h >> 16; \ - _h *= 0x85ebca6b; \ - _h ^= _h >> 13; \ - _h *= 0xc2b2ae35l; \ - _h ^= _h >> 16; \ -} while(0) - -#define HASH_MUR(key,keylen,num_bkts,hashv,bkt) \ -do { \ - const uint8_t *_mur_data = (const uint8_t*)(key); \ - const int _mur_nblocks = (keylen) / 4; \ - uint32_t _mur_h1 = 0xf88D5353; \ - uint32_t _mur_c1 = 0xcc9e2d51; \ - uint32_t _mur_c2 = 0x1b873593; \ - uint32_t _mur_k1 = 0; \ - const uint8_t *_mur_tail; \ - const uint32_t *_mur_blocks = (const uint32_t*)(_mur_data+_mur_nblocks*4); \ - int _mur_i; \ - for(_mur_i = -_mur_nblocks; _mur_i; _mur_i++) { \ - _mur_k1 = MUR_GETBLOCK(_mur_blocks,_mur_i); \ - _mur_k1 *= _mur_c1; \ - _mur_k1 = MUR_ROTL32(_mur_k1,15); \ - _mur_k1 *= _mur_c2; \ - \ - _mur_h1 ^= _mur_k1; \ - _mur_h1 = MUR_ROTL32(_mur_h1,13); \ - _mur_h1 = _mur_h1*5+0xe6546b64; \ - } \ - _mur_tail = (const uint8_t*)(_mur_data + _mur_nblocks*4); \ - _mur_k1=0; \ - switch((keylen) & 3) { \ - case 3: _mur_k1 ^= _mur_tail[2] << 16; \ - case 2: _mur_k1 ^= _mur_tail[1] << 8; \ - case 1: _mur_k1 ^= _mur_tail[0]; \ - _mur_k1 *= _mur_c1; \ - _mur_k1 = MUR_ROTL32(_mur_k1,15); \ - _mur_k1 *= _mur_c2; \ - _mur_h1 ^= _mur_k1; \ - } \ - _mur_h1 ^= (keylen); \ - MUR_FMIX(_mur_h1); \ - hashv = _mur_h1; \ - bkt = hashv & (num_bkts-1); \ -} while(0) -#endif /* HASH_USING_NO_STRICT_ALIASING */ - -/* key comparison function; return 0 if keys equal */ -#define HASH_KEYCMP(a,b,len) memcmp(a,b,len) - -/* iterate over items in a known bucket to find desired item */ -#define HASH_FIND_IN_BKT(tbl,hh,head,keyptr,keylen_in,out) \ -do { \ - if (head.hh_head) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,head.hh_head)); \ - else out=NULL; \ - while (out) { \ - if ((out)->hh.keylen == keylen_in) { \ - if ((HASH_KEYCMP((out)->hh.key,keyptr,keylen_in)) == 0) break; \ - } \ - if ((out)->hh.hh_next) DECLTYPE_ASSIGN(out,ELMT_FROM_HH(tbl,(out)->hh.hh_next)); \ - else out = NULL; \ - } \ -} while(0) - -/* add an item to a bucket */ -#define HASH_ADD_TO_BKT(head,addhh) \ -do { \ - head.count++; \ - (addhh)->hh_next = head.hh_head; \ - (addhh)->hh_prev = NULL; \ - if (head.hh_head) { (head).hh_head->hh_prev = (addhh); } \ - (head).hh_head=addhh; \ - if (head.count >= ((head.expand_mult+1) * HASH_BKT_CAPACITY_THRESH) \ - && (addhh)->tbl->noexpand != 1) { \ - HASH_EXPAND_BUCKETS((addhh)->tbl); \ - } \ -} while(0) - -/* remove an item from a given bucket */ -#define HASH_DEL_IN_BKT(hh,head,hh_del) \ - (head).count--; \ - if ((head).hh_head == hh_del) { \ - (head).hh_head = hh_del->hh_next; \ - } \ - if (hh_del->hh_prev) { \ - hh_del->hh_prev->hh_next = hh_del->hh_next; \ - } \ - if (hh_del->hh_next) { \ - hh_del->hh_next->hh_prev = hh_del->hh_prev; \ - } - -/* Bucket expansion has the effect of doubling the number of buckets - * and redistributing the items into the new buckets. Ideally the - * items will distribute more or less evenly into the new buckets - * (the extent to which this is true is a measure of the quality of - * the hash function as it applies to the key domain). - * - * With the items distributed into more buckets, the chain length - * (item count) in each bucket is reduced. Thus by expanding buckets - * the hash keeps a bound on the chain length. This bounded chain - * length is the essence of how a hash provides constant time lookup. - * - * The calculation of tbl->ideal_chain_maxlen below deserves some - * explanation. First, keep in mind that we're calculating the ideal - * maximum chain length based on the *new* (doubled) bucket count. - * In fractions this is just n/b (n=number of items,b=new num buckets). - * Since the ideal chain length is an integer, we want to calculate - * ceil(n/b). We don't depend on floating point arithmetic in this - * hash, so to calculate ceil(n/b) with integers we could write - * - * ceil(n/b) = (n/b) + ((n%b)?1:0) - * - * and in fact a previous version of this hash did just that. - * But now we have improved things a bit by recognizing that b is - * always a power of two. We keep its base 2 log handy (call it lb), - * so now we can write this with a bit shift and logical AND: - * - * ceil(n/b) = (n>>lb) + ( (n & (b-1)) ? 1:0) - * - */ -#define HASH_EXPAND_BUCKETS(tbl) \ -do { \ - unsigned _he_bkt; \ - unsigned _he_bkt_i; \ - struct UT_hash_handle *_he_thh, *_he_hh_nxt; \ - UT_hash_bucket *_he_new_buckets, *_he_newbkt; \ - _he_new_buckets = (UT_hash_bucket*)uthash_malloc( \ - 2 * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \ - if (!_he_new_buckets) { uthash_fatal( "out of memory"); } \ - memset(_he_new_buckets, 0, \ - 2 * tbl->num_buckets * sizeof(struct UT_hash_bucket)); \ - tbl->ideal_chain_maxlen = \ - (tbl->num_items >> (tbl->log2_num_buckets+1)) + \ - ((tbl->num_items & ((tbl->num_buckets*2)-1)) ? 1 : 0); \ - tbl->nonideal_items = 0; \ - for(_he_bkt_i = 0; _he_bkt_i < tbl->num_buckets; _he_bkt_i++) \ - { \ - _he_thh = tbl->buckets[ _he_bkt_i ].hh_head; \ - while (_he_thh) { \ - _he_hh_nxt = _he_thh->hh_next; \ - HASH_TO_BKT( _he_thh->hashv, tbl->num_buckets*2, _he_bkt); \ - _he_newbkt = &(_he_new_buckets[ _he_bkt ]); \ - if (++(_he_newbkt->count) > tbl->ideal_chain_maxlen) { \ - tbl->nonideal_items++; \ - _he_newbkt->expand_mult = _he_newbkt->count / \ - tbl->ideal_chain_maxlen; \ - } \ - _he_thh->hh_prev = NULL; \ - _he_thh->hh_next = _he_newbkt->hh_head; \ - if (_he_newbkt->hh_head) _he_newbkt->hh_head->hh_prev = \ - _he_thh; \ - _he_newbkt->hh_head = _he_thh; \ - _he_thh = _he_hh_nxt; \ - } \ - } \ - uthash_free( tbl->buckets, tbl->num_buckets*sizeof(struct UT_hash_bucket) ); \ - tbl->num_buckets *= 2; \ - tbl->log2_num_buckets++; \ - tbl->buckets = _he_new_buckets; \ - tbl->ineff_expands = (tbl->nonideal_items > (tbl->num_items >> 1)) ? \ - (tbl->ineff_expands+1) : 0; \ - if (tbl->ineff_expands > 1) { \ - tbl->noexpand=1; \ - uthash_noexpand_fyi(tbl); \ - } \ - uthash_expand_fyi(tbl); \ -} while(0) - - -/* This is an adaptation of Simon Tatham's O(n log(n)) mergesort */ -/* Note that HASH_SORT assumes the hash handle name to be hh. - * HASH_SRT was added to allow the hash handle name to be passed in. */ -#define HASH_SORT(head,cmpfcn) HASH_SRT(hh,head,cmpfcn) -#define HASH_SRT(hh,head,cmpfcn) \ -do { \ - unsigned _hs_i; \ - unsigned _hs_looping,_hs_nmerges,_hs_insize,_hs_psize,_hs_qsize; \ - struct UT_hash_handle *_hs_p, *_hs_q, *_hs_e, *_hs_list, *_hs_tail; \ - if (head) { \ - _hs_insize = 1; \ - _hs_looping = 1; \ - _hs_list = &((head)->hh); \ - while (_hs_looping) { \ - _hs_p = _hs_list; \ - _hs_list = NULL; \ - _hs_tail = NULL; \ - _hs_nmerges = 0; \ - while (_hs_p) { \ - _hs_nmerges++; \ - _hs_q = _hs_p; \ - _hs_psize = 0; \ - for ( _hs_i = 0; _hs_i < _hs_insize; _hs_i++ ) { \ - _hs_psize++; \ - _hs_q = (UT_hash_handle*)((_hs_q->next) ? \ - ((void*)((char*)(_hs_q->next) + \ - (head)->hh.tbl->hho)) : NULL); \ - if (! (_hs_q) ) break; \ - } \ - _hs_qsize = _hs_insize; \ - while ((_hs_psize > 0) || ((_hs_qsize > 0) && _hs_q )) { \ - if (_hs_psize == 0) { \ - _hs_e = _hs_q; \ - _hs_q = (UT_hash_handle*)((_hs_q->next) ? \ - ((void*)((char*)(_hs_q->next) + \ - (head)->hh.tbl->hho)) : NULL); \ - _hs_qsize--; \ - } else if ( (_hs_qsize == 0) || !(_hs_q) ) { \ - _hs_e = _hs_p; \ - _hs_p = (UT_hash_handle*)((_hs_p->next) ? \ - ((void*)((char*)(_hs_p->next) + \ - (head)->hh.tbl->hho)) : NULL); \ - _hs_psize--; \ - } else if (( \ - cmpfcn(DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_p)), \ - DECLTYPE(head)(ELMT_FROM_HH((head)->hh.tbl,_hs_q))) \ - ) <= 0) { \ - _hs_e = _hs_p; \ - _hs_p = (UT_hash_handle*)((_hs_p->next) ? \ - ((void*)((char*)(_hs_p->next) + \ - (head)->hh.tbl->hho)) : NULL); \ - _hs_psize--; \ - } else { \ - _hs_e = _hs_q; \ - _hs_q = (UT_hash_handle*)((_hs_q->next) ? \ - ((void*)((char*)(_hs_q->next) + \ - (head)->hh.tbl->hho)) : NULL); \ - _hs_qsize--; \ - } \ - if ( _hs_tail ) { \ - _hs_tail->next = ((_hs_e) ? \ - ELMT_FROM_HH((head)->hh.tbl,_hs_e) : NULL); \ - } else { \ - _hs_list = _hs_e; \ - } \ - _hs_e->prev = ((_hs_tail) ? \ - ELMT_FROM_HH((head)->hh.tbl,_hs_tail) : NULL); \ - _hs_tail = _hs_e; \ - } \ - _hs_p = _hs_q; \ - } \ - _hs_tail->next = NULL; \ - if ( _hs_nmerges <= 1 ) { \ - _hs_looping=0; \ - (head)->hh.tbl->tail = _hs_tail; \ - DECLTYPE_ASSIGN(head,ELMT_FROM_HH((head)->hh.tbl, _hs_list)); \ - } \ - _hs_insize *= 2; \ - } \ - HASH_FSCK(hh,head); \ - } \ -} while (0) - -/* This function selects items from one hash into another hash. - * The end result is that the selected items have dual presence - * in both hashes. There is no copy of the items made; rather - * they are added into the new hash through a secondary hash - * hash handle that must be present in the structure. */ -#define HASH_SELECT(hh_dst, dst, hh_src, src, cond) \ -do { \ - unsigned _src_bkt, _dst_bkt; \ - void *_last_elt=NULL, *_elt; \ - UT_hash_handle *_src_hh, *_dst_hh, *_last_elt_hh=NULL; \ - ptrdiff_t _dst_hho = ((char*)(&(dst)->hh_dst) - (char*)(dst)); \ - if (src) { \ - for(_src_bkt=0; _src_bkt < (src)->hh_src.tbl->num_buckets; _src_bkt++) { \ - for(_src_hh = (src)->hh_src.tbl->buckets[_src_bkt].hh_head; \ - _src_hh; \ - _src_hh = _src_hh->hh_next) { \ - _elt = ELMT_FROM_HH((src)->hh_src.tbl, _src_hh); \ - if (cond(_elt)) { \ - _dst_hh = (UT_hash_handle*)(((char*)_elt) + _dst_hho); \ - _dst_hh->key = _src_hh->key; \ - _dst_hh->keylen = _src_hh->keylen; \ - _dst_hh->hashv = _src_hh->hashv; \ - _dst_hh->prev = _last_elt; \ - _dst_hh->next = NULL; \ - if (_last_elt_hh) { _last_elt_hh->next = _elt; } \ - if (!dst) { \ - DECLTYPE_ASSIGN(dst,_elt); \ - HASH_MAKE_TABLE(hh_dst,dst); \ - } else { \ - _dst_hh->tbl = (dst)->hh_dst.tbl; \ - } \ - HASH_TO_BKT(_dst_hh->hashv, _dst_hh->tbl->num_buckets, _dst_bkt); \ - HASH_ADD_TO_BKT(_dst_hh->tbl->buckets[_dst_bkt],_dst_hh); \ - (dst)->hh_dst.tbl->num_items++; \ - _last_elt = _elt; \ - _last_elt_hh = _dst_hh; \ - } \ - } \ - } \ - } \ - HASH_FSCK(hh_dst,dst); \ -} while (0) - -#define HASH_CLEAR(hh,head) \ -do { \ - if (head) { \ - uthash_free((head)->hh.tbl->buckets, \ - (head)->hh.tbl->num_buckets*sizeof(struct UT_hash_bucket)); \ - HASH_BLOOM_FREE((head)->hh.tbl); \ - uthash_free((head)->hh.tbl, sizeof(UT_hash_table)); \ - (head)=NULL; \ - } \ -} while(0) - -#define HASH_OVERHEAD(hh,head) \ - (size_t)((((head)->hh.tbl->num_items * sizeof(UT_hash_handle)) + \ - ((head)->hh.tbl->num_buckets * sizeof(UT_hash_bucket)) + \ - (sizeof(UT_hash_table)) + \ - (HASH_BLOOM_BYTELEN))) - -#ifdef NO_DECLTYPE -#define HASH_ITER(hh,head,el,tmp) \ -for((el)=(head), (*(char**)(&(tmp)))=(char*)((head)?(head)->hh.next:NULL); \ - el; (el)=(tmp),(*(char**)(&(tmp)))=(char*)((tmp)?(tmp)->hh.next:NULL)) -#else -#define HASH_ITER(hh,head,el,tmp) \ -for((el)=(head),(tmp)=DECLTYPE(el)((head)?(head)->hh.next:NULL); \ - el; (el)=(tmp),(tmp)=DECLTYPE(el)((tmp)?(tmp)->hh.next:NULL)) -#endif - -/* obtain a count of items in the hash */ -#define HASH_COUNT(head) HASH_CNT(hh,head) -#define HASH_CNT(hh,head) ((head)?((head)->hh.tbl->num_items):0) - -typedef struct UT_hash_bucket { - struct UT_hash_handle *hh_head; - unsigned count; - - /* expand_mult is normally set to 0. In this situation, the max chain length - * threshold is enforced at its default value, HASH_BKT_CAPACITY_THRESH. (If - * the bucket's chain exceeds this length, bucket expansion is triggered). - * However, setting expand_mult to a non-zero value delays bucket expansion - * (that would be triggered by additions to this particular bucket) - * until its chain length reaches a *multiple* of HASH_BKT_CAPACITY_THRESH. - * (The multiplier is simply expand_mult+1). The whole idea of this - * multiplier is to reduce bucket expansions, since they are expensive, in - * situations where we know that a particular bucket tends to be overused. - * It is better to let its chain length grow to a longer yet-still-bounded - * value, than to do an O(n) bucket expansion too often. - */ - unsigned expand_mult; - -} UT_hash_bucket; - -/* random signature used only to find hash tables in external analysis */ -#define HASH_SIGNATURE 0xa0111fe1 -#define HASH_BLOOM_SIGNATURE 0xb12220f2 - -typedef struct UT_hash_table { - UT_hash_bucket *buckets; - unsigned num_buckets, log2_num_buckets; - unsigned num_items; - struct UT_hash_handle *tail; /* tail hh in app order, for fast append */ - ptrdiff_t hho; /* hash handle offset (byte pos of hash handle in element */ - - /* in an ideal situation (all buckets used equally), no bucket would have - * more than ceil(#items/#buckets) items. that's the ideal chain length. */ - unsigned ideal_chain_maxlen; - - /* nonideal_items is the number of items in the hash whose chain position - * exceeds the ideal chain maxlen. these items pay the penalty for an uneven - * hash distribution; reaching them in a chain traversal takes >ideal steps */ - unsigned nonideal_items; - - /* ineffective expands occur when a bucket doubling was performed, but - * afterward, more than half the items in the hash had nonideal chain - * positions. If this happens on two consecutive expansions we inhibit any - * further expansion, as it's not helping; this happens when the hash - * function isn't a good fit for the key domain. When expansion is inhibited - * the hash will still work, albeit no longer in constant time. */ - unsigned ineff_expands, noexpand; - - uint32_t signature; /* used only to find hash tables in external analysis */ -#ifdef HASH_BLOOM - uint32_t bloom_sig; /* used only to test bloom exists in external analysis */ - uint8_t *bloom_bv; - char bloom_nbits; -#endif - -} UT_hash_table; - -typedef struct UT_hash_handle { - struct UT_hash_table *tbl; - void *prev; /* prev element in app order */ - void *next; /* next element in app order */ - struct UT_hash_handle *hh_prev; /* previous hh in bucket order */ - struct UT_hash_handle *hh_next; /* next hh in bucket order */ - void *key; /* ptr to enclosing struct's key */ - unsigned keylen; /* enclosing struct's key len */ - unsigned hashv; /* result of hash-fcn(key) */ -} UT_hash_handle; - -#endif /* UTHASH_H */ diff --git a/cappuccino-sdk/incl/cocos2dx/support/data_support/utlist.h b/cappuccino-sdk/incl/cocos2dx/support/data_support/utlist.h deleted file mode 100644 index 6bccec7..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/data_support/utlist.h +++ /dev/null @@ -1,728 +0,0 @@ -/* -Copyright (c) 2007-2013, Troy D. Hanson http://troydhanson.github.com/uthash/ -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS -IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED -TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A -PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER -OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -*/ - -#ifndef UTLIST_H -#define UTLIST_H - -#define UTLIST_VERSION 1.9.8 - -#include - -/* - * This file contains macros to manipulate singly and doubly-linked lists. - * - * 1. LL_ macros: singly-linked lists. - * 2. DL_ macros: doubly-linked lists. - * 3. CDL_ macros: circular doubly-linked lists. - * - * To use singly-linked lists, your structure must have a "next" pointer. - * To use doubly-linked lists, your structure must "prev" and "next" pointers. - * Either way, the pointer to the head of the list must be initialized to NULL. - * - * ----------------.EXAMPLE ------------------------- - * struct item { - * int id; - * struct item *prev, *next; - * } - * - * struct item *list = NULL: - * - * int main() { - * struct item *item; - * ... allocate and populate item ... - * DL_APPEND(list, item); - * } - * -------------------------------------------------- - * - * For doubly-linked lists, the append and delete macros are O(1) - * For singly-linked lists, append and delete are O(n) but prepend is O(1) - * The sort macro is O(n log(n)) for all types of single/double/circular lists. - */ - -/* These macros use decltype or the earlier __typeof GNU extension. - As decltype is only available in newer compilers (VS2010 or gcc 4.3+ - when compiling c++ code), this code uses whatever method is needed - or, for VS2008 where neither is available, uses casting workarounds. */ -#ifdef _MSC_VER /* MS compiler */ -#if _MSC_VER >= 1600 && defined(__cplusplus) /* VS2010 or newer in C++ mode */ -#define LDECLTYPE(x) decltype(x) -#else /* VS2008 or older (or VS2010 in C mode) */ -#define NO_DECLTYPE -#define LDECLTYPE(x) char* -#endif -#else /* GNU, Sun and other compilers */ -#define LDECLTYPE(x) __typeof(x) -#endif - -/* for VS2008 we use some workarounds to get around the lack of decltype, - * namely, we always reassign our tmp variable to the list head if we need - * to dereference its prev/next pointers, and save/restore the real head.*/ -#ifdef NO_DECLTYPE -#define _SV(elt,list) _tmp = (char*)(list); {char **_alias = (char**)&(list); *_alias = (elt); } -#define _NEXT(elt,list,next) ((char*)((list)->next)) -#define _NEXTASGN(elt,list,to,next) { char **_alias = (char**)&((list)->next); *_alias=(char*)(to); } -/* #define _PREV(elt,list,prev) ((char*)((list)->prev)) */ -#define _PREVASGN(elt,list,to,prev) { char **_alias = (char**)&((list)->prev); *_alias=(char*)(to); } -#define _RS(list) { char **_alias = (char**)&(list); *_alias=_tmp; } -#define _CASTASGN(a,b) { char **_alias = (char**)&(a); *_alias=(char*)(b); } -#else -#define _SV(elt,list) -#define _NEXT(elt,list,next) ((elt)->next) -#define _NEXTASGN(elt,list,to,next) ((elt)->next)=(to) -/* #define _PREV(elt,list,prev) ((elt)->prev) */ -#define _PREVASGN(elt,list,to,prev) ((elt)->prev)=(to) -#define _RS(list) -#define _CASTASGN(a,b) (a)=(b) -#endif - -/****************************************************************************** - * The sort macro is an adaptation of Simon Tatham's O(n log(n)) mergesort * - * Unwieldy variable names used here to avoid shadowing passed-in variables. * - *****************************************************************************/ -#define LL_SORT(list, cmp) \ - LL_SORT2(list, cmp, next) - -#define LL_SORT2(list, cmp, next) \ -do { \ - LDECLTYPE(list) _ls_p; \ - LDECLTYPE(list) _ls_q; \ - LDECLTYPE(list) _ls_e; \ - LDECLTYPE(list) _ls_tail; \ - int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping; \ - if (list) { \ - _ls_insize = 1; \ - _ls_looping = 1; \ - while (_ls_looping) { \ - _CASTASGN(_ls_p,list); \ - list = NULL; \ - _ls_tail = NULL; \ - _ls_nmerges = 0; \ - while (_ls_p) { \ - _ls_nmerges++; \ - _ls_q = _ls_p; \ - _ls_psize = 0; \ - for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) { \ - _ls_psize++; \ - _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list,next); _RS(list); \ - if (!_ls_q) break; \ - } \ - _ls_qsize = _ls_insize; \ - while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) { \ - if (_ls_psize == 0) { \ - _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \ - _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \ - } else if (_ls_qsize == 0 || !_ls_q) { \ - _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \ - _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \ - } else if (cmp(_ls_p,_ls_q) <= 0) { \ - _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \ - _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \ - } else { \ - _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \ - _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \ - } \ - if (_ls_tail) { \ - _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e,next); _RS(list); \ - } else { \ - _CASTASGN(list,_ls_e); \ - } \ - _ls_tail = _ls_e; \ - } \ - _ls_p = _ls_q; \ - } \ - if (_ls_tail) { \ - _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,NULL,next); _RS(list); \ - } \ - if (_ls_nmerges <= 1) { \ - _ls_looping=0; \ - } \ - _ls_insize *= 2; \ - } \ - } \ -} while (0) - - -#define DL_SORT(list, cmp) \ - DL_SORT2(list, cmp, prev, next) - -#define DL_SORT2(list, cmp, prev, next) \ -do { \ - LDECLTYPE(list) _ls_p; \ - LDECLTYPE(list) _ls_q; \ - LDECLTYPE(list) _ls_e; \ - LDECLTYPE(list) _ls_tail; \ - int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping; \ - if (list) { \ - _ls_insize = 1; \ - _ls_looping = 1; \ - while (_ls_looping) { \ - _CASTASGN(_ls_p,list); \ - list = NULL; \ - _ls_tail = NULL; \ - _ls_nmerges = 0; \ - while (_ls_p) { \ - _ls_nmerges++; \ - _ls_q = _ls_p; \ - _ls_psize = 0; \ - for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) { \ - _ls_psize++; \ - _SV(_ls_q,list); _ls_q = _NEXT(_ls_q,list,next); _RS(list); \ - if (!_ls_q) break; \ - } \ - _ls_qsize = _ls_insize; \ - while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) { \ - if (_ls_psize == 0) { \ - _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \ - _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \ - } else if (_ls_qsize == 0 || !_ls_q) { \ - _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \ - _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \ - } else if (cmp(_ls_p,_ls_q) <= 0) { \ - _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \ - _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \ - } else { \ - _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \ - _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \ - } \ - if (_ls_tail) { \ - _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e,next); _RS(list); \ - } else { \ - _CASTASGN(list,_ls_e); \ - } \ - _SV(_ls_e,list); _PREVASGN(_ls_e,list,_ls_tail,prev); _RS(list); \ - _ls_tail = _ls_e; \ - } \ - _ls_p = _ls_q; \ - } \ - _CASTASGN(list->prev, _ls_tail); \ - _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,NULL,next); _RS(list); \ - if (_ls_nmerges <= 1) { \ - _ls_looping=0; \ - } \ - _ls_insize *= 2; \ - } \ - } \ -} while (0) - -#define CDL_SORT(list, cmp) \ - CDL_SORT2(list, cmp, prev, next) - -#define CDL_SORT2(list, cmp, prev, next) \ -do { \ - LDECLTYPE(list) _ls_p; \ - LDECLTYPE(list) _ls_q; \ - LDECLTYPE(list) _ls_e; \ - LDECLTYPE(list) _ls_tail; \ - LDECLTYPE(list) _ls_oldhead; \ - LDECLTYPE(list) _tmp; \ - int _ls_insize, _ls_nmerges, _ls_psize, _ls_qsize, _ls_i, _ls_looping; \ - if (list) { \ - _ls_insize = 1; \ - _ls_looping = 1; \ - while (_ls_looping) { \ - _CASTASGN(_ls_p,list); \ - _CASTASGN(_ls_oldhead,list); \ - list = NULL; \ - _ls_tail = NULL; \ - _ls_nmerges = 0; \ - while (_ls_p) { \ - _ls_nmerges++; \ - _ls_q = _ls_p; \ - _ls_psize = 0; \ - for (_ls_i = 0; _ls_i < _ls_insize; _ls_i++) { \ - _ls_psize++; \ - _SV(_ls_q,list); \ - if (_NEXT(_ls_q,list,next) == _ls_oldhead) { \ - _ls_q = NULL; \ - } else { \ - _ls_q = _NEXT(_ls_q,list,next); \ - } \ - _RS(list); \ - if (!_ls_q) break; \ - } \ - _ls_qsize = _ls_insize; \ - while (_ls_psize > 0 || (_ls_qsize > 0 && _ls_q)) { \ - if (_ls_psize == 0) { \ - _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \ - _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \ - if (_ls_q == _ls_oldhead) { _ls_q = NULL; } \ - } else if (_ls_qsize == 0 || !_ls_q) { \ - _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \ - _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \ - if (_ls_p == _ls_oldhead) { _ls_p = NULL; } \ - } else if (cmp(_ls_p,_ls_q) <= 0) { \ - _ls_e = _ls_p; _SV(_ls_p,list); _ls_p = \ - _NEXT(_ls_p,list,next); _RS(list); _ls_psize--; \ - if (_ls_p == _ls_oldhead) { _ls_p = NULL; } \ - } else { \ - _ls_e = _ls_q; _SV(_ls_q,list); _ls_q = \ - _NEXT(_ls_q,list,next); _RS(list); _ls_qsize--; \ - if (_ls_q == _ls_oldhead) { _ls_q = NULL; } \ - } \ - if (_ls_tail) { \ - _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_ls_e,next); _RS(list); \ - } else { \ - _CASTASGN(list,_ls_e); \ - } \ - _SV(_ls_e,list); _PREVASGN(_ls_e,list,_ls_tail,prev); _RS(list); \ - _ls_tail = _ls_e; \ - } \ - _ls_p = _ls_q; \ - } \ - _CASTASGN(list->prev,_ls_tail); \ - _CASTASGN(_tmp,list); \ - _SV(_ls_tail,list); _NEXTASGN(_ls_tail,list,_tmp,next); _RS(list); \ - if (_ls_nmerges <= 1) { \ - _ls_looping=0; \ - } \ - _ls_insize *= 2; \ - } \ - } \ -} while (0) - -/****************************************************************************** - * singly linked list macros (non-circular) * - *****************************************************************************/ -#define LL_PREPEND(head,add) \ - LL_PREPEND2(head,add,next) - -#define LL_PREPEND2(head,add,next) \ -do { \ - (add)->next = head; \ - head = add; \ -} while (0) - -#define LL_CONCAT(head1,head2) \ - LL_CONCAT2(head1,head2,next) - -#define LL_CONCAT2(head1,head2,next) \ -do { \ - LDECLTYPE(head1) _tmp; \ - if (head1) { \ - _tmp = head1; \ - while (_tmp->next) { _tmp = _tmp->next; } \ - _tmp->next=(head2); \ - } else { \ - (head1)=(head2); \ - } \ -} while (0) - -#define LL_APPEND(head,add) \ - LL_APPEND2(head,add,next) - -#define LL_APPEND2(head,add,next) \ -do { \ - LDECLTYPE(head) _tmp; \ - (add)->next=NULL; \ - if (head) { \ - _tmp = head; \ - while (_tmp->next) { _tmp = _tmp->next; } \ - _tmp->next=(add); \ - } else { \ - (head)=(add); \ - } \ -} while (0) - -#define LL_DELETE(head,del) \ - LL_DELETE2(head,del,next) - -#define LL_DELETE2(head,del,next) \ -do { \ - LDECLTYPE(head) _tmp; \ - if ((head) == (del)) { \ - (head)=(head)->next; \ - } else { \ - _tmp = head; \ - while (_tmp->next && (_tmp->next != (del))) { \ - _tmp = _tmp->next; \ - } \ - if (_tmp->next) { \ - _tmp->next = ((del)->next); \ - } \ - } \ -} while (0) - -/* Here are VS2008 replacements for LL_APPEND and LL_DELETE */ -#define LL_APPEND_VS2008(head,add) \ - LL_APPEND2_VS2008(head,add,next) - -#define LL_APPEND2_VS2008(head,add,next) \ -do { \ - if (head) { \ - (add)->next = head; /* use add->next as a temp variable */ \ - while ((add)->next->next) { (add)->next = (add)->next->next; } \ - (add)->next->next=(add); \ - } else { \ - (head)=(add); \ - } \ - (add)->next=NULL; \ -} while (0) - -#define LL_DELETE_VS2008(head,del) \ - LL_DELETE2_VS2008(head,del,next) - -#define LL_DELETE2_VS2008(head,del,next) \ -do { \ - if ((head) == (del)) { \ - (head)=(head)->next; \ - } else { \ - char *_tmp = (char*)(head); \ - while ((head)->next && ((head)->next != (del))) { \ - head = (head)->next; \ - } \ - if ((head)->next) { \ - (head)->next = ((del)->next); \ - } \ - { \ - char **_head_alias = (char**)&(head); \ - *_head_alias = _tmp; \ - } \ - } \ -} while (0) -#ifdef NO_DECLTYPE -#undef LL_APPEND -#define LL_APPEND LL_APPEND_VS2008 -#undef LL_DELETE -#define LL_DELETE LL_DELETE_VS2008 -#undef LL_DELETE2 -#define LL_DELETE2_VS2008 -#undef LL_APPEND2 -#define LL_APPEND2 LL_APPEND2_VS2008 -#undef LL_CONCAT /* no LL_CONCAT_VS2008 */ -#undef DL_CONCAT /* no DL_CONCAT_VS2008 */ -#endif -/* end VS2008 replacements */ - -#define LL_FOREACH(head,el) \ - LL_FOREACH2(head,el,next) - -#define LL_FOREACH2(head,el,next) \ - for(el=head;el;el=(el)->next) - -#define LL_FOREACH_SAFE(head,el,tmp) \ - LL_FOREACH_SAFE2(head,el,tmp,next) - -#define LL_FOREACH_SAFE2(head,el,tmp,next) \ - for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp) - -#define LL_SEARCH_SCALAR(head,out,field,val) \ - LL_SEARCH_SCALAR2(head,out,field,val,next) - -#define LL_SEARCH_SCALAR2(head,out,field,val,next) \ -do { \ - LL_FOREACH2(head,out,next) { \ - if ((out)->field == (val)) break; \ - } \ -} while(0) - -#define LL_SEARCH(head,out,elt,cmp) \ - LL_SEARCH2(head,out,elt,cmp,next) - -#define LL_SEARCH2(head,out,elt,cmp,next) \ -do { \ - LL_FOREACH2(head,out,next) { \ - if ((cmp(out,elt))==0) break; \ - } \ -} while(0) - -#define LL_REPLACE_ELEM(head, el, add) \ -do { \ - LDECLTYPE(head) _tmp; \ - assert(head != NULL); \ - assert(el != NULL); \ - assert(add != NULL); \ - (add)->next = (el)->next; \ - if ((head) == (el)) { \ - (head) = (add); \ - } else { \ - _tmp = head; \ - while (_tmp->next && (_tmp->next != (el))) { \ - _tmp = _tmp->next; \ - } \ - if (_tmp->next) { \ - _tmp->next = (add); \ - } \ - } \ -} while (0) - -#define LL_PREPEND_ELEM(head, el, add) \ -do { \ - LDECLTYPE(head) _tmp; \ - assert(head != NULL); \ - assert(el != NULL); \ - assert(add != NULL); \ - (add)->next = (el); \ - if ((head) == (el)) { \ - (head) = (add); \ - } else { \ - _tmp = head; \ - while (_tmp->next && (_tmp->next != (el))) { \ - _tmp = _tmp->next; \ - } \ - if (_tmp->next) { \ - _tmp->next = (add); \ - } \ - } \ -} while (0) \ - - -/****************************************************************************** - * doubly linked list macros (non-circular) * - *****************************************************************************/ -#define DL_PREPEND(head,add) \ - DL_PREPEND2(head,add,prev,next) - -#define DL_PREPEND2(head,add,prev,next) \ -do { \ - (add)->next = head; \ - if (head) { \ - (add)->prev = (head)->prev; \ - (head)->prev = (add); \ - } else { \ - (add)->prev = (add); \ - } \ - (head) = (add); \ -} while (0) - -#define DL_APPEND(head,add) \ - DL_APPEND2(head,add,prev,next) - -#define DL_APPEND2(head,add,prev,next) \ -do { \ - if (head) { \ - (add)->prev = (head)->prev; \ - (head)->prev->next = (add); \ - (head)->prev = (add); \ - (add)->next = NULL; \ - } else { \ - (head)=(add); \ - (head)->prev = (head); \ - (head)->next = NULL; \ - } \ -} while (0) - -#define DL_CONCAT(head1,head2) \ - DL_CONCAT2(head1,head2,prev,next) - -#define DL_CONCAT2(head1,head2,prev,next) \ -do { \ - LDECLTYPE(head1) _tmp; \ - if (head2) { \ - if (head1) { \ - _tmp = (head2)->prev; \ - (head2)->prev = (head1)->prev; \ - (head1)->prev->next = (head2); \ - (head1)->prev = _tmp; \ - } else { \ - (head1)=(head2); \ - } \ - } \ -} while (0) - -#define DL_DELETE(head,del) \ - DL_DELETE2(head,del,prev,next) - -#define DL_DELETE2(head,del,prev,next) \ -do { \ - assert((del)->prev != NULL); \ - if ((del)->prev == (del)) { \ - (head)=NULL; \ - } else if ((del)==(head)) { \ - (del)->next->prev = (del)->prev; \ - (head) = (del)->next; \ - } else { \ - (del)->prev->next = (del)->next; \ - if ((del)->next) { \ - (del)->next->prev = (del)->prev; \ - } else { \ - (head)->prev = (del)->prev; \ - } \ - } \ -} while (0) - - -#define DL_FOREACH(head,el) \ - DL_FOREACH2(head,el,next) - -#define DL_FOREACH2(head,el,next) \ - for(el=head;el;el=(el)->next) - -/* this version is safe for deleting the elements during iteration */ -#define DL_FOREACH_SAFE(head,el,tmp) \ - DL_FOREACH_SAFE2(head,el,tmp,next) - -#define DL_FOREACH_SAFE2(head,el,tmp,next) \ - for((el)=(head);(el) && (tmp = (el)->next, 1); (el) = tmp) - -/* these are identical to their singly-linked list counterparts */ -#define DL_SEARCH_SCALAR LL_SEARCH_SCALAR -#define DL_SEARCH LL_SEARCH -#define DL_SEARCH_SCALAR2 LL_SEARCH_SCALAR2 -#define DL_SEARCH2 LL_SEARCH2 - -#define DL_REPLACE_ELEM(head, el, add) \ -do { \ - assert(head != NULL); \ - assert(el != NULL); \ - assert(add != NULL); \ - if ((head) == (el)) { \ - (head) = (add); \ - (add)->next = (el)->next; \ - if ((el)->next == NULL) { \ - (add)->prev = (add); \ - } else { \ - (add)->prev = (el)->prev; \ - (add)->next->prev = (add); \ - } \ - } else { \ - (add)->next = (el)->next; \ - (add)->prev = (el)->prev; \ - (add)->prev->next = (add); \ - if ((el)->next == NULL) { \ - (head)->prev = (add); \ - } else { \ - (add)->next->prev = (add); \ - } \ - } \ -} while (0) - -#define DL_PREPEND_ELEM(head, el, add) \ -do { \ - assert(head != NULL); \ - assert(el != NULL); \ - assert(add != NULL); \ - (add)->next = (el); \ - (add)->prev = (el)->prev; \ - (el)->prev = (add); \ - if ((head) == (el)) { \ - (head) = (add); \ - } else { \ - (add)->prev->next = (add); \ - } \ -} while (0) \ - - -/****************************************************************************** - * circular doubly linked list macros * - *****************************************************************************/ -#define CDL_PREPEND(head,add) \ - CDL_PREPEND2(head,add,prev,next) - -#define CDL_PREPEND2(head,add,prev,next) \ -do { \ - if (head) { \ - (add)->prev = (head)->prev; \ - (add)->next = (head); \ - (head)->prev = (add); \ - (add)->prev->next = (add); \ - } else { \ - (add)->prev = (add); \ - (add)->next = (add); \ - } \ -(head)=(add); \ -} while (0) - -#define CDL_DELETE(head,del) \ - CDL_DELETE2(head,del,prev,next) - -#define CDL_DELETE2(head,del,prev,next) \ -do { \ - if ( ((head)==(del)) && ((head)->next == (head))) { \ - (head) = 0L; \ - } else { \ - (del)->next->prev = (del)->prev; \ - (del)->prev->next = (del)->next; \ - if ((del) == (head)) (head)=(del)->next; \ - } \ -} while (0) - -#define CDL_FOREACH(head,el) \ - CDL_FOREACH2(head,el,next) - -#define CDL_FOREACH2(head,el,next) \ - for(el=head;el;el=((el)->next==head ? 0L : (el)->next)) - -#define CDL_FOREACH_SAFE(head,el,tmp1,tmp2) \ - CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next) - -#define CDL_FOREACH_SAFE2(head,el,tmp1,tmp2,prev,next) \ - for((el)=(head), ((tmp1)=(head)?((head)->prev):NULL); \ - (el) && ((tmp2)=(el)->next, 1); \ - ((el) = (((el)==(tmp1)) ? 0L : (tmp2)))) - -#define CDL_SEARCH_SCALAR(head,out,field,val) \ - CDL_SEARCH_SCALAR2(head,out,field,val,next) - -#define CDL_SEARCH_SCALAR2(head,out,field,val,next) \ -do { \ - CDL_FOREACH2(head,out,next) { \ - if ((out)->field == (val)) break; \ - } \ -} while(0) - -#define CDL_SEARCH(head,out,elt,cmp) \ - CDL_SEARCH2(head,out,elt,cmp,next) - -#define CDL_SEARCH2(head,out,elt,cmp,next) \ -do { \ - CDL_FOREACH2(head,out,next) { \ - if ((cmp(out,elt))==0) break; \ - } \ -} while(0) - -#define CDL_REPLACE_ELEM(head, el, add) \ -do { \ - assert(head != NULL); \ - assert(el != NULL); \ - assert(add != NULL); \ - if ((el)->next == (el)) { \ - (add)->next = (add); \ - (add)->prev = (add); \ - (head) = (add); \ - } else { \ - (add)->next = (el)->next; \ - (add)->prev = (el)->prev; \ - (add)->next->prev = (add); \ - (add)->prev->next = (add); \ - if ((head) == (el)) { \ - (head) = (add); \ - } \ - } \ -} while (0) - -#define CDL_PREPEND_ELEM(head, el, add) \ -do { \ - assert(head != NULL); \ - assert(el != NULL); \ - assert(add != NULL); \ - (add)->next = (el); \ - (add)->prev = (el)->prev; \ - (el)->prev = (add); \ - (add)->prev->next = (add); \ - if ((head) == (el)) { \ - (head) = (add); \ - } \ -} while (0) \ - -#endif /* UTLIST_H */ - diff --git a/cappuccino-sdk/incl/cocos2dx/support/image_support/TGAlib.h b/cappuccino-sdk/incl/cocos2dx/support/image_support/TGAlib.h deleted file mode 100644 index 141b6a2..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/image_support/TGAlib.h +++ /dev/null @@ -1,72 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __SUPPORT_DATA_SUPPORT_TGALIB_H__ -#define __SUPPORT_DATA_SUPPORT_TGALIB_H__ - -namespace cocos2d { - -enum { - TGA_OK, - TGA_ERROR_FILE_OPEN, - TGA_ERROR_READING_FILE, - TGA_ERROR_INDEXED_COLOR, - TGA_ERROR_MEMORY, - TGA_ERROR_COMPRESSED_FILE, -}; - -/** TGA format */ -typedef struct sImageTGA { - int status; - unsigned char type, pixelDepth; - - /** map width */ - signed short width; - - /** map height */ - signed short height; - - /** raw data */ - unsigned char *imageData; - int flipped; -} tImageTGA; - -/// load the image header fields. We only keep those that matter! -bool tgaLoadHeader(unsigned char *Buffer, unsigned long bufSize, tImageTGA *psInfo); - -/// loads the image pixels. You shouldn't call this function directly -bool tgaLoadImageData(unsigned char *Buffer, unsigned long bufSize, tImageTGA *psInfo); - -/// this is the function to call when we want to load an image -tImageTGA * tgaLoad(const char *pszFilename); - -// /converts RGB to grayscale -void tgaRGBtogreyscale(tImageTGA *psInfo); - -/// releases the memory used for the image -void tgaDestroy(tImageTGA *psInfo); - -}//namespace cocos2d - -#endif // __SUPPORT_DATA_SUPPORT_TGALIB_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/support/tinyxml2/tinyxml2.h b/cappuccino-sdk/incl/cocos2dx/support/tinyxml2/tinyxml2.h deleted file mode 100644 index eeffa10..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/tinyxml2/tinyxml2.h +++ /dev/null @@ -1,1914 +0,0 @@ -/* -Original code by Lee Thomason (www.grinninglizard.com) - -This software is provided 'as-is', without any express or implied -warranty. In no event will the authors be held liable for any -damages arising from the use of this software. - -Permission is granted to anyone to use this software for any -purpose, including commercial applications, and to alter it and -redistribute it freely, subject to the following restrictions: - -1. The origin of this software must not be misrepresented; you must -not claim that you wrote the original software. If you use this -software in a product, an acknowledgment in the product documentation -would be appreciated but is not required. - -2. Altered source versions must be plainly marked as such, and -must not be misrepresented as being the original software. - -3. This notice may not be removed or altered from any source -distribution. -*/ - -#ifndef TINYXML2_INCLUDED -#define TINYXML2_INCLUDED - -#include "platform/CCPlatformConfig.h" -#include "platform/CCPlatformMacros.h" - -#if defined(ANDROID_NDK) || defined(__BORLANDC__) || (CC_TARGET_PLATFORM == CC_PLATFORM_BLACKBERRY) -# include -# include -# include -# include -# include -# include -#else -# include -# include -# include -# include -# include -# include -#endif - -/* - TODO: intern strings instead of allocation. -*/ -/* - gcc: - g++ -Wall -DDEBUG tinyxml2.cpp xmltest.cpp -o gccxmltest.exe - - Formatting, Artistic Style: - AStyle.exe --style=1tbs --indent-switches --break-closing-brackets --indent-preprocessor tinyxml2.cpp tinyxml2.h -*/ - -#if defined( _DEBUG ) || defined( DEBUG ) || defined (__DEBUG__) -# ifndef DEBUG -# define DEBUG -# endif -#endif - - -#if defined(DEBUG) -# if defined(_MSC_VER) -# define TIXMLASSERT( x ) if ( !(x)) { __debugbreak(); } //if ( !(x)) WinDebugBreak() -# elif defined (ANDROID_NDK) -# include -# define TIXMLASSERT( x ) if ( !(x)) { __android_log_assert( "assert", "grinliz", "ASSERT in '%s' at %d.", __FILE__, __LINE__ ); } -# else -# include -# define TIXMLASSERT assert -# endif -# else -# define TIXMLASSERT( x ) {} -#endif - - -#if (defined(_MSC_VER) && (_MSC_VER >= 1400 ) && (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)) -// Microsoft visual studio, version 2005 and higher. -/*int _snprintf_s( - char *buffer, - size_t sizeOfBuffer, - size_t count, - const char *format [, - argument] ... -);*/ -inline int TIXML_SNPRINTF( char* buffer, size_t size, const char* format, ... ) -{ - va_list va; - va_start( va, format ); - int result = vsnprintf_s( buffer, size, _TRUNCATE, format, va ); - va_end( va ); - return result; -} -#define TIXML_SSCANF sscanf_s -#else -// GCC version 3 and higher -//#warning( "Using sn* functions." ) -#define TIXML_SNPRINTF snprintf -#define TIXML_SSCANF sscanf -#endif - -static const int TIXML2_MAJOR_VERSION = 1; -static const int TIXML2_MINOR_VERSION = 0; -static const int TIXML2_PATCH_VERSION = 9; - -namespace tinyxml2 -{ -class XMLDocument; -class XMLElement; -class XMLAttribute; -class XMLComment; -class XMLNode; -class XMLText; -class XMLDeclaration; -class XMLUnknown; - -class XMLPrinter; - -/* - A class that wraps strings. Normally stores the start and end - pointers into the XML file itself, and will apply normalization - and entity translation if actually read. Can also store (and memory - manage) a traditional char[] -*/ -class CC_DLL StrPair -{ -public: - enum { - NEEDS_ENTITY_PROCESSING = 0x01, - NEEDS_NEWLINE_NORMALIZATION = 0x02, - COLLAPSE_WHITESPACE = 0x04, - - TEXT_ELEMENT = NEEDS_ENTITY_PROCESSING | NEEDS_NEWLINE_NORMALIZATION, - TEXT_ELEMENT_LEAVE_ENTITIES = NEEDS_NEWLINE_NORMALIZATION, - ATTRIBUTE_NAME = 0, - ATTRIBUTE_VALUE = NEEDS_ENTITY_PROCESSING | NEEDS_NEWLINE_NORMALIZATION, - ATTRIBUTE_VALUE_LEAVE_ENTITIES = NEEDS_NEWLINE_NORMALIZATION, - COMMENT = NEEDS_NEWLINE_NORMALIZATION - }; - - StrPair() : _flags( 0 ), _start( 0 ), _end( 0 ) {} - ~StrPair(); - - void Set( char* start, char* end, int flags ) { - Reset(); - _start = start; - _end = end; - _flags = flags | NEEDS_FLUSH; - } - - const char* GetStr(); - - bool Empty() const { - return _start == _end; - } - - void SetInternedStr( const char* str ) { - Reset(); - _start = const_cast(str); - } - - void SetStr( const char* str, int flags=0 ); - - char* ParseText( char* in, const char* endTag, int strFlags ); - char* ParseName( char* in ); - -private: - void Reset(); - void CollapseWhitespace(); - - enum { - NEEDS_FLUSH = 0x100, - NEEDS_DELETE = 0x200 - }; - - // After parsing, if *end != 0, it can be set to zero. - int _flags; - char* _start; - char* _end; -}; - - -/* - A dynamic array of Plain Old Data. Doesn't support constructors, etc. - Has a small initial memory pool, so that low or no usage will not - cause a call to new/delete -*/ -template -class CC_DLL DynArray -{ -public: - DynArray< T, INIT >() { - _mem = _pool; - _allocated = INIT; - _size = 0; - } - - ~DynArray() { - if ( _mem != _pool ) { - delete [] _mem; - } - } - - void Push( T t ) { - EnsureCapacity( _size+1 ); - _mem[_size++] = t; - } - - T* PushArr( int count ) { - EnsureCapacity( _size+count ); - T* ret = &_mem[_size]; - _size += count; - return ret; - } - - T Pop() { - return _mem[--_size]; - } - - void PopArr( int count ) { - TIXMLASSERT( _size >= count ); - _size -= count; - } - - bool Empty() const { - return _size == 0; - } - - T& operator[](int i) { - TIXMLASSERT( i>= 0 && i < _size ); - return _mem[i]; - } - - const T& operator[](int i) const { - TIXMLASSERT( i>= 0 && i < _size ); - return _mem[i]; - } - - int Size() const { - return _size; - } - - int Capacity() const { - return _allocated; - } - - const T* Mem() const { - return _mem; - } - - T* Mem() { - return _mem; - } - -private: - void EnsureCapacity( int cap ) { - if ( cap > _allocated ) { - int newAllocated = cap * 2; - T* newMem = new T[newAllocated]; - memcpy( newMem, _mem, sizeof(T)*_size ); // warning: not using constructors, only works for PODs - if ( _mem != _pool ) { - delete [] _mem; - } - _mem = newMem; - _allocated = newAllocated; - } - } - - T* _mem; - T _pool[INIT]; - int _allocated; // objects allocated - int _size; // number objects in use -}; - - -/* - Parent virtual class of a pool for fast allocation - and deallocation of objects. -*/ -class CC_DLL MemPool -{ -public: - MemPool() {} - virtual ~MemPool() {} - - virtual int ItemSize() const = 0; - virtual void* Alloc() = 0; - virtual void Free( void* ) = 0; - virtual void SetTracked() = 0; -}; - - -/* - Template child class to create pools of the correct type. -*/ -template< int SIZE > -class CC_DLL MemPoolT : public MemPool -{ -public: - MemPoolT() : _root(0), _currentAllocs(0), _nAllocs(0), _maxAllocs(0), _nUntracked(0) {} - ~MemPoolT() { - // Delete the blocks. - for( int i=0; i<_blockPtrs.Size(); ++i ) { - delete _blockPtrs[i]; - } - } - - virtual int ItemSize() const { - return SIZE; - } - int CurrentAllocs() const { - return _currentAllocs; - } - - virtual void* Alloc() { - if ( !_root ) { - // Need a new block. - Block* block = new Block(); - _blockPtrs.Push( block ); - - for( int i=0; ichunk[i].next = &block->chunk[i+1]; - } - block->chunk[COUNT-1].next = 0; - _root = block->chunk; - } - void* result = _root; - _root = _root->next; - - ++_currentAllocs; - if ( _currentAllocs > _maxAllocs ) { - _maxAllocs = _currentAllocs; - } - _nAllocs++; - _nUntracked++; - return result; - } - virtual void Free( void* mem ) { - if ( !mem ) { - return; - } - --_currentAllocs; - Chunk* chunk = (Chunk*)mem; -#ifdef DEBUG - memset( chunk, 0xfe, sizeof(Chunk) ); -#endif - chunk->next = _root; - _root = chunk; - } - void Trace( const char* name ) { - printf( "Mempool %s watermark=%d [%dk] current=%d size=%d nAlloc=%d blocks=%d\n", - name, _maxAllocs, _maxAllocs*SIZE/1024, _currentAllocs, SIZE, _nAllocs, _blockPtrs.Size() ); - } - - void SetTracked() { - _nUntracked--; - } - - int Untracked() const { - return _nUntracked; - } - - enum { COUNT = 1024/SIZE }; // Some compilers do not accept to use COUNT in private part if COUNT is private - -private: - union Chunk { - Chunk* next; - char mem[SIZE]; - }; - struct Block { - Chunk chunk[COUNT]; - }; - DynArray< Block*, 10 > _blockPtrs; - Chunk* _root; - - int _currentAllocs; - int _nAllocs; - int _maxAllocs; - int _nUntracked; -}; - - - -/** - Implements the interface to the "Visitor pattern" (see the Accept() method.) - If you call the Accept() method, it requires being passed a XMLVisitor - class to handle callbacks. For nodes that contain other nodes (Document, Element) - you will get called with a VisitEnter/VisitExit pair. Nodes that are always leafs - are simply called with Visit(). - - If you return 'true' from a Visit method, recursive parsing will continue. If you return - false, no children of this node or its sibilings will be visited. - - All flavors of Visit methods have a default implementation that returns 'true' (continue - visiting). You need to only override methods that are interesting to you. - - Generally Accept() is called on the TiXmlDocument, although all nodes support visiting. - - You should never change the document from a callback. - - @sa XMLNode::Accept() -*/ -class CC_DLL XMLVisitor -{ -public: - virtual ~XMLVisitor() {} - - /// Visit a document. - virtual bool VisitEnter( const XMLDocument& /*doc*/ ) { - return true; - } - /// Visit a document. - virtual bool VisitExit( const XMLDocument& /*doc*/ ) { - return true; - } - - /// Visit an element. - virtual bool VisitEnter( const XMLElement& /*element*/, const XMLAttribute* /*firstAttribute*/ ) { - return true; - } - /// Visit an element. - virtual bool VisitExit( const XMLElement& /*element*/ ) { - return true; - } - - /// Visit a declaration. - virtual bool Visit( const XMLDeclaration& /*declaration*/ ) { - return true; - } - /// Visit a text node. - virtual bool Visit( const XMLText& /*text*/ ) { - return true; - } - /// Visit a comment node. - virtual bool Visit( const XMLComment& /*comment*/ ) { - return true; - } - /// Visit an unknown node. - virtual bool Visit( const XMLUnknown& /*unknown*/ ) { - return true; - } -}; - - -/* - Utility functionality. -*/ -class CC_DLL XMLUtil -{ -public: - // Anything in the high order range of UTF-8 is assumed to not be whitespace. This isn't - // correct, but simple, and usually works. - static const char* SkipWhiteSpace( const char* p ) { - while( !IsUTF8Continuation(*p) && isspace( *reinterpret_cast(p) ) ) { - ++p; - } - return p; - } - static char* SkipWhiteSpace( char* p ) { - while( !IsUTF8Continuation(*p) && isspace( *reinterpret_cast(p) ) ) { - ++p; - } - return p; - } - static bool IsWhiteSpace( char p ) { - return !IsUTF8Continuation(p) && isspace( static_cast(p) ); - } - - inline static bool StringEqual( const char* p, const char* q, int nChar=INT_MAX ) { - int n = 0; - if ( p == q ) { - return true; - } - while( *p && *q && *p == *q && n(const_cast(this)->FirstChildElement( value )); - } - - /// Get the last child node, or null if none exists. - const XMLNode* LastChild() const { - return _lastChild; - } - - XMLNode* LastChild() { - return const_cast(const_cast(this)->LastChild() ); - } - - /** Get the last child element or optionally the last child - element with the specified name. - */ - const XMLElement* LastChildElement( const char* value=0 ) const; - - XMLElement* LastChildElement( const char* value=0 ) { - return const_cast(const_cast(this)->LastChildElement(value) ); - } - - /// Get the previous (left) sibling node of this node. - const XMLNode* PreviousSibling() const { - return _prev; - } - - XMLNode* PreviousSibling() { - return _prev; - } - - /// Get the previous (left) sibling element of this node, with an opitionally supplied name. - const XMLElement* PreviousSiblingElement( const char* value=0 ) const ; - - XMLElement* PreviousSiblingElement( const char* value=0 ) { - return const_cast(const_cast(this)->PreviousSiblingElement( value ) ); - } - - /// Get the next (right) sibling node of this node. - const XMLNode* NextSibling() const { - return _next; - } - - XMLNode* NextSibling() { - return _next; - } - - /// Get the next (right) sibling element of this node, with an opitionally supplied name. - const XMLElement* NextSiblingElement( const char* value=0 ) const; - - XMLElement* NextSiblingElement( const char* value=0 ) { - return const_cast(const_cast(this)->NextSiblingElement( value ) ); - } - - /** - Add a child node as the last (right) child. - */ - XMLNode* InsertEndChild( XMLNode* addThis ); - - XMLNode* LinkEndChild( XMLNode* addThis ) { - return InsertEndChild( addThis ); - } - /** - Add a child node as the first (left) child. - */ - XMLNode* InsertFirstChild( XMLNode* addThis ); - /** - Add a node after the specified child node. - */ - XMLNode* InsertAfterChild( XMLNode* afterThis, XMLNode* addThis ); - - /** - Delete all the children of this node. - */ - void DeleteChildren(); - - /** - Delete a child of this node. - */ - void DeleteChild( XMLNode* node ); - - /** - Make a copy of this node, but not its children. - You may pass in a Document pointer that will be - the owner of the new Node. If the 'document' is - null, then the node returned will be allocated - from the current Document. (this->GetDocument()) - - Note: if called on a XMLDocument, this will return null. - */ - virtual XMLNode* ShallowClone( XMLDocument* document ) const = 0; - - /** - Test if 2 nodes are the same, but don't test children. - The 2 nodes do not need to be in the same Document. - - Note: if called on a XMLDocument, this will return false. - */ - virtual bool ShallowEqual( const XMLNode* compare ) const = 0; - - /** Accept a hierarchical visit of the nodes in the TinyXML DOM. Every node in the - XML tree will be conditionally visited and the host will be called back - via the TiXmlVisitor interface. - - This is essentially a SAX interface for TinyXML. (Note however it doesn't re-parse - the XML for the callbacks, so the performance of TinyXML is unchanged by using this - interface versus any other.) - - The interface has been based on ideas from: - - - http://www.saxproject.org/ - - http://c2.com/cgi/wiki?HierarchicalVisitorPattern - - Which are both good references for "visiting". - - An example of using Accept(): - @verbatim - TiXmlPrinter printer; - tinyxmlDoc.Accept( &printer ); - const char* xmlcstr = printer.CStr(); - @endverbatim - */ - virtual bool Accept( XMLVisitor* visitor ) const = 0; - - // internal - virtual char* ParseDeep( char*, StrPair* ); - -protected: - XMLNode( XMLDocument* ); - virtual ~XMLNode(); - XMLNode( const XMLNode& ); // not supported - XMLNode& operator=( const XMLNode& ); // not supported - - XMLDocument* _document; - XMLNode* _parent; - mutable StrPair _value; - - XMLNode* _firstChild; - XMLNode* _lastChild; - - XMLNode* _prev; - XMLNode* _next; - -private: - MemPool* _memPool; - void Unlink( XMLNode* child ); -}; - - -/** XML text. - - Note that a text node can have child element nodes, for example: - @verbatim - This is bold - @endverbatim - - A text node can have 2 ways to output the next. "normal" output - and CDATA. It will default to the mode it was parsed from the XML file and - you generally want to leave it alone, but you can change the output mode with - SetCDATA() and query it with CDATA(). -*/ -class CC_DLL XMLText : public XMLNode -{ - friend class XMLBase; - friend class XMLDocument; -public: - virtual bool Accept( XMLVisitor* visitor ) const; - - virtual XMLText* ToText() { - return this; - } - virtual const XMLText* ToText() const { - return this; - } - - /// Declare whether this should be CDATA or standard text. - void SetCData( bool isCData ) { - _isCData = isCData; - } - /// Returns true if this is a CDATA text element. - bool CData() const { - return _isCData; - } - - char* ParseDeep( char*, StrPair* endTag ); - virtual XMLNode* ShallowClone( XMLDocument* document ) const; - virtual bool ShallowEqual( const XMLNode* compare ) const; - -protected: - XMLText( XMLDocument* doc ) : XMLNode( doc ), _isCData( false ) {} - virtual ~XMLText() {} - XMLText( const XMLText& ); // not supported - XMLText& operator=( const XMLText& ); // not supported - -private: - bool _isCData; -}; - - -/** An XML Comment. */ -class CC_DLL XMLComment : public XMLNode -{ - friend class XMLDocument; -public: - virtual XMLComment* ToComment() { - return this; - } - virtual const XMLComment* ToComment() const { - return this; - } - - virtual bool Accept( XMLVisitor* visitor ) const; - - char* ParseDeep( char*, StrPair* endTag ); - virtual XMLNode* ShallowClone( XMLDocument* document ) const; - virtual bool ShallowEqual( const XMLNode* compare ) const; - -protected: - XMLComment( XMLDocument* doc ); - virtual ~XMLComment(); - XMLComment( const XMLComment& ); // not supported - XMLComment& operator=( const XMLComment& ); // not supported - -private: -}; - - -/** In correct XML the declaration is the first entry in the file. - @verbatim - - @endverbatim - - TinyXML2 will happily read or write files without a declaration, - however. - - The text of the declaration isn't interpreted. It is parsed - and written as a string. -*/ -class CC_DLL XMLDeclaration : public XMLNode -{ - friend class XMLDocument; -public: - virtual XMLDeclaration* ToDeclaration() { - return this; - } - virtual const XMLDeclaration* ToDeclaration() const { - return this; - } - - virtual bool Accept( XMLVisitor* visitor ) const; - - char* ParseDeep( char*, StrPair* endTag ); - virtual XMLNode* ShallowClone( XMLDocument* document ) const; - virtual bool ShallowEqual( const XMLNode* compare ) const; - -protected: - XMLDeclaration( XMLDocument* doc ); - virtual ~XMLDeclaration(); - XMLDeclaration( const XMLDeclaration& ); // not supported - XMLDeclaration& operator=( const XMLDeclaration& ); // not supported -}; - - -/** Any tag that tinyXml doesn't recognize is saved as an - unknown. It is a tag of text, but should not be modified. - It will be written back to the XML, unchanged, when the file - is saved. - - DTD tags get thrown into TiXmlUnknowns. -*/ -class CC_DLL XMLUnknown : public XMLNode -{ - friend class XMLDocument; -public: - virtual XMLUnknown* ToUnknown() { - return this; - } - virtual const XMLUnknown* ToUnknown() const { - return this; - } - - virtual bool Accept( XMLVisitor* visitor ) const; - - char* ParseDeep( char*, StrPair* endTag ); - virtual XMLNode* ShallowClone( XMLDocument* document ) const; - virtual bool ShallowEqual( const XMLNode* compare ) const; - -protected: - XMLUnknown( XMLDocument* doc ); - virtual ~XMLUnknown(); - XMLUnknown( const XMLUnknown& ); // not supported - XMLUnknown& operator=( const XMLUnknown& ); // not supported -}; - - -enum XMLError { - XML_NO_ERROR = 0, - XML_SUCCESS = 0, - - XML_NO_ATTRIBUTE, - XML_WRONG_ATTRIBUTE_TYPE, - - XML_ERROR_FILE_NOT_FOUND, - XML_ERROR_FILE_COULD_NOT_BE_OPENED, - XML_ERROR_FILE_READ_ERROR, - XML_ERROR_ELEMENT_MISMATCH, - XML_ERROR_PARSING_ELEMENT, - XML_ERROR_PARSING_ATTRIBUTE, - XML_ERROR_IDENTIFYING_TAG, - XML_ERROR_PARSING_TEXT, - XML_ERROR_PARSING_CDATA, - XML_ERROR_PARSING_COMMENT, - XML_ERROR_PARSING_DECLARATION, - XML_ERROR_PARSING_UNKNOWN, - XML_ERROR_EMPTY_DOCUMENT, - XML_ERROR_MISMATCHED_ELEMENT, - XML_ERROR_PARSING, - - XML_CAN_NOT_CONVERT_TEXT, - XML_NO_TEXT_NODE -}; - - -/** An attribute is a name-value pair. Elements have an arbitrary - number of attributes, each with a unique name. - - @note The attributes are not XMLNodes. You may only query the - Next() attribute in a list. -*/ -class CC_DLL XMLAttribute -{ - friend class XMLElement; -public: - /// The name of the attribute. - const char* Name() const { - return _name.GetStr(); - } - /// The value of the attribute. - const char* Value() const { - return _value.GetStr(); - } - /// The next attribute in the list. - const XMLAttribute* Next() const { - return _next; - } - - /** IntAttribute interprets the attribute as an integer, and returns the value. - If the value isn't an integer, 0 will be returned. There is no error checking; - use QueryIntAttribute() if you need error checking. - */ - int IntValue() const { - int i=0; - QueryIntValue( &i ); - return i; - } - /// Query as an unsigned integer. See IntAttribute() - unsigned UnsignedValue() const { - unsigned i=0; - QueryUnsignedValue( &i ); - return i; - } - /// Query as a boolean. See IntAttribute() - bool BoolValue() const { - bool b=false; - QueryBoolValue( &b ); - return b; - } - /// Query as a double. See IntAttribute() - double DoubleValue() const { - double d=0; - QueryDoubleValue( &d ); - return d; - } - /// Query as a float. See IntAttribute() - float FloatValue() const { - float f=0; - QueryFloatValue( &f ); - return f; - } - - /** QueryIntAttribute interprets the attribute as an integer, and returns the value - in the provided paremeter. The function will return XML_NO_ERROR on success, - and XML_WRONG_ATTRIBUTE_TYPE if the conversion is not successful. - */ - XMLError QueryIntValue( int* value ) const; - /// See QueryIntAttribute - XMLError QueryUnsignedValue( unsigned int* value ) const; - /// See QueryIntAttribute - XMLError QueryBoolValue( bool* value ) const; - /// See QueryIntAttribute - XMLError QueryDoubleValue( double* value ) const; - /// See QueryIntAttribute - XMLError QueryFloatValue( float* value ) const; - - /// Set the attribute to a string value. - void SetAttribute( const char* value ); - /// Set the attribute to value. - void SetAttribute( int value ); - /// Set the attribute to value. - void SetAttribute( unsigned value ); - /// Set the attribute to value. - void SetAttribute( bool value ); - /// Set the attribute to value. - void SetAttribute( double value ); - /// Set the attribute to value. - void SetAttribute( float value ); - -private: - enum { BUF_SIZE = 200 }; - - XMLAttribute() : _next( 0 ) {} - virtual ~XMLAttribute() {} - - XMLAttribute( const XMLAttribute& ); // not supported - void operator=( const XMLAttribute& ); // not supported - void SetName( const char* name ); - - char* ParseDeep( char* p, bool processEntities ); - - mutable StrPair _name; - mutable StrPair _value; - XMLAttribute* _next; - MemPool* _memPool; -}; - - -/** The element is a container class. It has a value, the element name, - and can contain other elements, text, comments, and unknowns. - Elements also contain an arbitrary number of attributes. -*/ -class CC_DLL XMLElement : public XMLNode -{ - friend class XMLBase; - friend class XMLDocument; -public: - /// Get the name of an element (which is the Value() of the node.) - const char* Name() const { - return Value(); - } - /// Set the name of the element. - void SetName( const char* str, bool staticMem=false ) { - SetValue( str, staticMem ); - } - - virtual XMLElement* ToElement() { - return this; - } - virtual const XMLElement* ToElement() const { - return this; - } - virtual bool Accept( XMLVisitor* visitor ) const; - - /** Given an attribute name, Attribute() returns the value - for the attribute of that name, or null if none - exists. For example: - - @verbatim - const char* value = ele->Attribute( "foo" ); - @endverbatim - - The 'value' parameter is normally null. However, if specified, - the attribute will only be returned if the 'name' and 'value' - match. This allow you to write code: - - @verbatim - if ( ele->Attribute( "foo", "bar" ) ) callFooIsBar(); - @endverbatim - - rather than: - @verbatim - if ( ele->Attribute( "foo" ) ) { - if ( strcmp( ele->Attribute( "foo" ), "bar" ) == 0 ) callFooIsBar(); - } - @endverbatim - */ - const char* Attribute( const char* name, const char* value=0 ) const; - - /** Given an attribute name, IntAttribute() returns the value - of the attribute interpreted as an integer. 0 will be - returned if there is an error. For a method with error - checking, see QueryIntAttribute() - */ - int IntAttribute( const char* name ) const { - int i=0; - QueryIntAttribute( name, &i ); - return i; - } - /// See IntAttribute() - unsigned UnsignedAttribute( const char* name ) const { - unsigned i=0; - QueryUnsignedAttribute( name, &i ); - return i; - } - /// See IntAttribute() - bool BoolAttribute( const char* name ) const { - bool b=false; - QueryBoolAttribute( name, &b ); - return b; - } - /// See IntAttribute() - double DoubleAttribute( const char* name ) const { - double d=0; - QueryDoubleAttribute( name, &d ); - return d; - } - /// See IntAttribute() - float FloatAttribute( const char* name ) const { - float f=0; - QueryFloatAttribute( name, &f ); - return f; - } - - /** Given an attribute name, QueryIntAttribute() returns - XML_NO_ERROR, XML_WRONG_ATTRIBUTE_TYPE if the conversion - can't be performed, or XML_NO_ATTRIBUTE if the attribute - doesn't exist. If successful, the result of the conversion - will be written to 'value'. If not successful, nothing will - be written to 'value'. This allows you to provide default - value: - - @verbatim - int value = 10; - QueryIntAttribute( "foo", &value ); // if "foo" isn't found, value will still be 10 - @endverbatim - */ - XMLError QueryIntAttribute( const char* name, int* value ) const { - const XMLAttribute* a = FindAttribute( name ); - if ( !a ) { - return XML_NO_ATTRIBUTE; - } - return a->QueryIntValue( value ); - } - /// See QueryIntAttribute() - XMLError QueryUnsignedAttribute( const char* name, unsigned int* value ) const { - const XMLAttribute* a = FindAttribute( name ); - if ( !a ) { - return XML_NO_ATTRIBUTE; - } - return a->QueryUnsignedValue( value ); - } - /// See QueryIntAttribute() - XMLError QueryBoolAttribute( const char* name, bool* value ) const { - const XMLAttribute* a = FindAttribute( name ); - if ( !a ) { - return XML_NO_ATTRIBUTE; - } - return a->QueryBoolValue( value ); - } - /// See QueryIntAttribute() - XMLError QueryDoubleAttribute( const char* name, double* value ) const { - const XMLAttribute* a = FindAttribute( name ); - if ( !a ) { - return XML_NO_ATTRIBUTE; - } - return a->QueryDoubleValue( value ); - } - /// See QueryIntAttribute() - XMLError QueryFloatAttribute( const char* name, float* value ) const { - const XMLAttribute* a = FindAttribute( name ); - if ( !a ) { - return XML_NO_ATTRIBUTE; - } - return a->QueryFloatValue( value ); - } - - /// Sets the named attribute to value. - void SetAttribute( const char* name, const char* value ) { - XMLAttribute* a = FindOrCreateAttribute( name ); - a->SetAttribute( value ); - } - /// Sets the named attribute to value. - void SetAttribute( const char* name, int value ) { - XMLAttribute* a = FindOrCreateAttribute( name ); - a->SetAttribute( value ); - } - /// Sets the named attribute to value. - void SetAttribute( const char* name, unsigned value ) { - XMLAttribute* a = FindOrCreateAttribute( name ); - a->SetAttribute( value ); - } - /// Sets the named attribute to value. - void SetAttribute( const char* name, bool value ) { - XMLAttribute* a = FindOrCreateAttribute( name ); - a->SetAttribute( value ); - } - /// Sets the named attribute to value. - void SetAttribute( const char* name, double value ) { - XMLAttribute* a = FindOrCreateAttribute( name ); - a->SetAttribute( value ); - } - - /** - Delete an attribute. - */ - void DeleteAttribute( const char* name ); - - /// Return the first attribute in the list. - const XMLAttribute* FirstAttribute() const { - return _rootAttribute; - } - /// Query a specific attribute in the list. - const XMLAttribute* FindAttribute( const char* name ) const; - - /** Convenience function for easy access to the text inside an element. Although easy - and concise, GetText() is limited compared to getting the TiXmlText child - and accessing it directly. - - If the first child of 'this' is a TiXmlText, the GetText() - returns the character string of the Text node, else null is returned. - - This is a convenient method for getting the text of simple contained text: - @verbatim - This is text - const char* str = fooElement->GetText(); - @endverbatim - - 'str' will be a pointer to "This is text". - - Note that this function can be misleading. If the element foo was created from - this XML: - @verbatim - This is text - @endverbatim - - then the value of str would be null. The first child node isn't a text node, it is - another element. From this XML: - @verbatim - This is text - @endverbatim - GetText() will return "This is ". - */ - const char* GetText() const; - - /** - Convenience method to query the value of a child text node. This is probably best - shown by example. Given you have a document is this form: - @verbatim - - 1 - 1.4 - - @endverbatim - - The QueryIntText() and similar functions provide a safe and easier way to get to the - "value" of x and y. - - @verbatim - int x = 0; - float y = 0; // types of x and y are contrived for example - const XMLElement* xElement = pointElement->FirstChildElement( "x" ); - const XMLElement* yElement = pointElement->FirstChildElement( "y" ); - xElement->QueryIntText( &x ); - yElement->QueryFloatText( &y ); - @endverbatim - - @returns XML_SUCCESS (0) on success, XML_CAN_NOT_CONVERT_TEXT if the text cannot be converted - to the requested type, and XML_NO_TEXT_NODE if there is no child text to query. - - */ - XMLError QueryIntText( int* ival ) const; - /// See QueryIntText() - XMLError QueryUnsignedText( unsigned* uval ) const; - /// See QueryIntText() - XMLError QueryBoolText( bool* bval ) const; - /// See QueryIntText() - XMLError QueryDoubleText( double* dval ) const; - /// See QueryIntText() - XMLError QueryFloatText( float* fval ) const; - - // internal: - enum { - OPEN, // - CLOSED, // - CLOSING // - }; - int ClosingType() const { - return _closingType; - } - char* ParseDeep( char* p, StrPair* endTag ); - virtual XMLNode* ShallowClone( XMLDocument* document ) const; - virtual bool ShallowEqual( const XMLNode* compare ) const; - -private: - XMLElement( XMLDocument* doc ); - virtual ~XMLElement(); - XMLElement( const XMLElement& ); // not supported - void operator=( const XMLElement& ); // not supported - - XMLAttribute* FindAttribute( const char* name ); - XMLAttribute* FindOrCreateAttribute( const char* name ); - //void LinkAttribute( XMLAttribute* attrib ); - char* ParseAttributes( char* p ); - - int _closingType; - // The attribute list is ordered; there is no 'lastAttribute' - // because the list needs to be scanned for dupes before adding - // a new attribute. - XMLAttribute* _rootAttribute; -}; - - -enum Whitespace { - PRESERVE_WHITESPACE, - COLLAPSE_WHITESPACE -}; - - -/** A Document binds together all the functionality. - It can be saved, loaded, and printed to the screen. - All Nodes are connected and allocated to a Document. - If the Document is deleted, all its Nodes are also deleted. -*/ -class CC_DLL XMLDocument : public XMLNode -{ - friend class XMLElement; -public: - /// constructor - XMLDocument( bool processEntities = true, Whitespace = PRESERVE_WHITESPACE ); - ~XMLDocument(); - - virtual XMLDocument* ToDocument() { - return this; - } - virtual const XMLDocument* ToDocument() const { - return this; - } - - /** - Parse an XML file from a character string. - Returns XML_NO_ERROR (0) on success, or - an errorID. - - You may optionally pass in the 'nBytes', which is - the number of bytes which will be parsed. If not - specified, TinyXML will assume 'xml' points to a - null terminated string. - */ - XMLError Parse( const char* xml, size_t nBytes=(size_t)(-1) ); - - /** - Load an XML file from disk. - Returns XML_NO_ERROR (0) on success, or - an errorID. - */ - XMLError LoadFile( const char* filename ); - - /** - Load an XML file from disk. You are responsible - for providing and closing the FILE*. - - Returns XML_NO_ERROR (0) on success, or - an errorID. - */ - XMLError LoadFile( FILE* ); - - /** - Save the XML file to disk. - Returns XML_NO_ERROR (0) on success, or - an errorID. - */ - XMLError SaveFile( const char* filename, bool compact = false ); - - /** - Save the XML file to disk. You are responsible - for providing and closing the FILE*. - - Returns XML_NO_ERROR (0) on success, or - an errorID. - */ - XMLError SaveFile( FILE* fp, bool compact = false ); - - bool ProcessEntities() const { - return _processEntities; - } - Whitespace WhitespaceMode() const { - return _whitespace; - } - - /** - Returns true if this document has a leading Byte Order Mark of UTF8. - */ - bool HasBOM() const { - return _writeBOM; - } - /** Sets whether to write the BOM when writing the file. - */ - void SetBOM( bool useBOM ) { - _writeBOM = useBOM; - } - - /** Return the root element of DOM. Equivalent to FirstChildElement(). - To get the first node, use FirstChild(). - */ - XMLElement* RootElement() { - return FirstChildElement(); - } - const XMLElement* RootElement() const { - return FirstChildElement(); - } - - /** Print the Document. If the Printer is not provided, it will - print to stdout. If you provide Printer, this can print to a file: - @verbatim - XMLPrinter printer( fp ); - doc.Print( &printer ); - @endverbatim - - Or you can use a printer to print to memory: - @verbatim - XMLPrinter printer; - doc->Print( &printer ); - // printer.CStr() has a const char* to the XML - @endverbatim - */ - void Print( XMLPrinter* streamer=0 ); - virtual bool Accept( XMLVisitor* visitor ) const; - - /** - Create a new Element associated with - this Document. The memory for the Element - is managed by the Document. - */ - XMLElement* NewElement( const char* name ); - /** - Create a new Comment associated with - this Document. The memory for the Comment - is managed by the Document. - */ - XMLComment* NewComment( const char* comment ); - /** - Create a new Text associated with - this Document. The memory for the Text - is managed by the Document. - */ - XMLText* NewText( const char* text ); - /** - Create a new Declaration associated with - this Document. The memory for the object - is managed by the Document. - - If the 'text' param is null, the standard - declaration is used.: - @verbatim - - @endverbatim - */ - XMLDeclaration* NewDeclaration( const char* text=0 ); - /** - Create a new Unknown associated with - this Document. The memory forthe object - is managed by the Document. - */ - XMLUnknown* NewUnknown( const char* text ); - - /** - Delete a node associated with this document. - It will be unlinked from the DOM. - */ - void DeleteNode( XMLNode* node ) { - node->_parent->DeleteChild( node ); - } - - void SetError( XMLError error, const char* str1, const char* str2 ); - - /// Return true if there was an error parsing the document. - bool Error() const { - return _errorID != XML_NO_ERROR; - } - /// Return the errorID. - XMLError ErrorID() const { - return _errorID; - } - /// Return a possibly helpful diagnostic location or string. - const char* GetErrorStr1() const { - return _errorStr1; - } - /// Return a possibly helpful secondary diagnostic location or string. - const char* GetErrorStr2() const { - return _errorStr2; - } - /// If there is an error, print it to stdout. - void PrintError() const; - - // internal - char* Identify( char* p, XMLNode** node ); - - virtual XMLNode* ShallowClone( XMLDocument* /*document*/ ) const { - return 0; - } - virtual bool ShallowEqual( const XMLNode* /*compare*/ ) const { - return false; - } - -private: - XMLDocument( const XMLDocument& ); // not supported - void operator=( const XMLDocument& ); // not supported - void InitDocument(); - - bool _writeBOM; - bool _processEntities; - XMLError _errorID; - Whitespace _whitespace; - const char* _errorStr1; - const char* _errorStr2; - char* _charBuffer; - - MemPoolT< sizeof(XMLElement) > _elementPool; - MemPoolT< sizeof(XMLAttribute) > _attributePool; - MemPoolT< sizeof(XMLText) > _textPool; - MemPoolT< sizeof(XMLComment) > _commentPool; -}; - - -/** - A XMLHandle is a class that wraps a node pointer with null checks; this is - an incredibly useful thing. Note that XMLHandle is not part of the TinyXML - DOM structure. It is a separate utility class. - - Take an example: - @verbatim - - - - - - - @endverbatim - - Assuming you want the value of "attributeB" in the 2nd "Child" element, it's very - easy to write a *lot* of code that looks like: - - @verbatim - XMLElement* root = document.FirstChildElement( "Document" ); - if ( root ) - { - XMLElement* element = root->FirstChildElement( "Element" ); - if ( element ) - { - XMLElement* child = element->FirstChildElement( "Child" ); - if ( child ) - { - XMLElement* child2 = child->NextSiblingElement( "Child" ); - if ( child2 ) - { - // Finally do something useful. - @endverbatim - - And that doesn't even cover "else" cases. XMLHandle addresses the verbosity - of such code. A XMLHandle checks for null pointers so it is perfectly safe - and correct to use: - - @verbatim - XMLHandle docHandle( &document ); - XMLElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).FirstChild().NextSibling().ToElement(); - if ( child2 ) - { - // do something useful - @endverbatim - - Which is MUCH more concise and useful. - - It is also safe to copy handles - internally they are nothing more than node pointers. - @verbatim - XMLHandle handleCopy = handle; - @endverbatim - - See also XMLConstHandle, which is the same as XMLHandle, but operates on const objects. -*/ -class CC_DLL XMLHandle -{ -public: - /// Create a handle from any node (at any depth of the tree.) This can be a null pointer. - XMLHandle( XMLNode* node ) { - _node = node; - } - /// Create a handle from a node. - XMLHandle( XMLNode& node ) { - _node = &node; - } - /// Copy constructor - XMLHandle( const XMLHandle& ref ) { - _node = ref._node; - } - /// Assignment - XMLHandle& operator=( const XMLHandle& ref ) { - _node = ref._node; - return *this; - } - - /// Get the first child of this handle. - XMLHandle FirstChild() { - return XMLHandle( _node ? _node->FirstChild() : 0 ); - } - /// Get the first child element of this handle. - XMLHandle FirstChildElement( const char* value=0 ) { - return XMLHandle( _node ? _node->FirstChildElement( value ) : 0 ); - } - /// Get the last child of this handle. - XMLHandle LastChild() { - return XMLHandle( _node ? _node->LastChild() : 0 ); - } - /// Get the last child element of this handle. - XMLHandle LastChildElement( const char* _value=0 ) { - return XMLHandle( _node ? _node->LastChildElement( _value ) : 0 ); - } - /// Get the previous sibling of this handle. - XMLHandle PreviousSibling() { - return XMLHandle( _node ? _node->PreviousSibling() : 0 ); - } - /// Get the previous sibling element of this handle. - XMLHandle PreviousSiblingElement( const char* _value=0 ) { - return XMLHandle( _node ? _node->PreviousSiblingElement( _value ) : 0 ); - } - /// Get the next sibling of this handle. - XMLHandle NextSibling() { - return XMLHandle( _node ? _node->NextSibling() : 0 ); - } - /// Get the next sibling element of this handle. - XMLHandle NextSiblingElement( const char* _value=0 ) { - return XMLHandle( _node ? _node->NextSiblingElement( _value ) : 0 ); - } - - /// Safe cast to XMLNode. This can return null. - XMLNode* ToNode() { - return _node; - } - /// Safe cast to XMLElement. This can return null. - XMLElement* ToElement() { - return ( ( _node && _node->ToElement() ) ? _node->ToElement() : 0 ); - } - /// Safe cast to XMLText. This can return null. - XMLText* ToText() { - return ( ( _node && _node->ToText() ) ? _node->ToText() : 0 ); - } - /// Safe cast to XMLUnknown. This can return null. - XMLUnknown* ToUnknown() { - return ( ( _node && _node->ToUnknown() ) ? _node->ToUnknown() : 0 ); - } - /// Safe cast to XMLDeclaration. This can return null. - XMLDeclaration* ToDeclaration() { - return ( ( _node && _node->ToDeclaration() ) ? _node->ToDeclaration() : 0 ); - } - -private: - XMLNode* _node; -}; - - -/** - A variant of the XMLHandle class for working with const XMLNodes and Documents. It is the - same in all regards, except for the 'const' qualifiers. See XMLHandle for API. -*/ -class CC_DLL XMLConstHandle -{ -public: - XMLConstHandle( const XMLNode* node ) { - _node = node; - } - XMLConstHandle( const XMLNode& node ) { - _node = &node; - } - XMLConstHandle( const XMLConstHandle& ref ) { - _node = ref._node; - } - - XMLConstHandle& operator=( const XMLConstHandle& ref ) { - _node = ref._node; - return *this; - } - - const XMLConstHandle FirstChild() const { - return XMLConstHandle( _node ? _node->FirstChild() : 0 ); - } - const XMLConstHandle FirstChildElement( const char* value=0 ) const { - return XMLConstHandle( _node ? _node->FirstChildElement( value ) : 0 ); - } - const XMLConstHandle LastChild() const { - return XMLConstHandle( _node ? _node->LastChild() : 0 ); - } - const XMLConstHandle LastChildElement( const char* _value=0 ) const { - return XMLConstHandle( _node ? _node->LastChildElement( _value ) : 0 ); - } - const XMLConstHandle PreviousSibling() const { - return XMLConstHandle( _node ? _node->PreviousSibling() : 0 ); - } - const XMLConstHandle PreviousSiblingElement( const char* _value=0 ) const { - return XMLConstHandle( _node ? _node->PreviousSiblingElement( _value ) : 0 ); - } - const XMLConstHandle NextSibling() const { - return XMLConstHandle( _node ? _node->NextSibling() : 0 ); - } - const XMLConstHandle NextSiblingElement( const char* _value=0 ) const { - return XMLConstHandle( _node ? _node->NextSiblingElement( _value ) : 0 ); - } - - - const XMLNode* ToNode() const { - return _node; - } - const XMLElement* ToElement() const { - return ( ( _node && _node->ToElement() ) ? _node->ToElement() : 0 ); - } - const XMLText* ToText() const { - return ( ( _node && _node->ToText() ) ? _node->ToText() : 0 ); - } - const XMLUnknown* ToUnknown() const { - return ( ( _node && _node->ToUnknown() ) ? _node->ToUnknown() : 0 ); - } - const XMLDeclaration* ToDeclaration() const { - return ( ( _node && _node->ToDeclaration() ) ? _node->ToDeclaration() : 0 ); - } - -private: - const XMLNode* _node; -}; - - -/** - Printing functionality. The XMLPrinter gives you more - options than the XMLDocument::Print() method. - - It can: - -# Print to memory. - -# Print to a file you provide. - -# Print XML without a XMLDocument. - - Print to Memory - - @verbatim - XMLPrinter printer; - doc->Print( &printer ); - SomeFunction( printer.CStr() ); - @endverbatim - - Print to a File - - You provide the file pointer. - @verbatim - XMLPrinter printer( fp ); - doc.Print( &printer ); - @endverbatim - - Print without a XMLDocument - - When loading, an XML parser is very useful. However, sometimes - when saving, it just gets in the way. The code is often set up - for streaming, and constructing the DOM is just overhead. - - The Printer supports the streaming case. The following code - prints out a trivially simple XML file without ever creating - an XML document. - - @verbatim - XMLPrinter printer( fp ); - printer.OpenElement( "foo" ); - printer.PushAttribute( "foo", "bar" ); - printer.CloseElement(); - @endverbatim -*/ -class CC_DLL XMLPrinter : public XMLVisitor -{ -public: - /** Construct the printer. If the FILE* is specified, - this will print to the FILE. Else it will print - to memory, and the result is available in CStr(). - If 'compact' is set to true, then output is created - with only required whitespace and newlines. - */ - XMLPrinter( FILE* file=0, bool compact = false ); - ~XMLPrinter() {} - - /** If streaming, write the BOM and declaration. */ - void PushHeader( bool writeBOM, bool writeDeclaration ); - /** If streaming, start writing an element. - The element must be closed with CloseElement() - */ - void OpenElement( const char* name ); - /// If streaming, add an attribute to an open element. - void PushAttribute( const char* name, const char* value ); - void PushAttribute( const char* name, int value ); - void PushAttribute( const char* name, unsigned value ); - void PushAttribute( const char* name, bool value ); - void PushAttribute( const char* name, double value ); - /// If streaming, close the Element. - void CloseElement(); - - /// Add a text node. - void PushText( const char* text, bool cdata=false ); - /// Add a text node from an integer. - void PushText( int value ); - /// Add a text node from an unsigned. - void PushText( unsigned value ); - /// Add a text node from a bool. - void PushText( bool value ); - /// Add a text node from a float. - void PushText( float value ); - /// Add a text node from a double. - void PushText( double value ); - - /// Add a comment - void PushComment( const char* comment ); - - void PushDeclaration( const char* value ); - void PushUnknown( const char* value ); - - virtual bool VisitEnter( const XMLDocument& /*doc*/ ); - virtual bool VisitExit( const XMLDocument& /*doc*/ ) { - return true; - } - - virtual bool VisitEnter( const XMLElement& element, const XMLAttribute* attribute ); - virtual bool VisitExit( const XMLElement& element ); - - virtual bool Visit( const XMLText& text ); - virtual bool Visit( const XMLComment& comment ); - virtual bool Visit( const XMLDeclaration& declaration ); - virtual bool Visit( const XMLUnknown& unknown ); - - /** - If in print to memory mode, return a pointer to - the XML file in memory. - */ - const char* CStr() const { - return _buffer.Mem(); - } - /** - If in print to memory mode, return the size - of the XML file in memory. (Note the size returned - includes the terminating null.) - */ - int CStrSize() const { - return _buffer.Size(); - } - -private: - void SealElement(); - void PrintSpace( int depth ); - void PrintString( const char*, bool restrictedEntitySet ); // prints out, after detecting entities. - void Print( const char* format, ... ); - - bool _elementJustOpened; - bool _firstElement; - FILE* _fp; - int _depth; - int _textDepth; - bool _processEntities; - bool _compactMode; - - enum { - ENTITY_RANGE = 64, - BUF_SIZE = 200 - }; - bool _entityFlag[ENTITY_RANGE]; - bool _restrictedEntityFlag[ENTITY_RANGE]; - - DynArray< const char*, 10 > _stack; - DynArray< char, 20 > _buffer; -#ifdef _MSC_VER - DynArray< char, 20 > _accumulator; -#endif -}; - - -} // tinyxml2 - - -#endif // TINYXML2_INCLUDED diff --git a/cappuccino-sdk/incl/cocos2dx/support/user_default/CCUserDefault.h b/cappuccino-sdk/incl/cocos2dx/support/user_default/CCUserDefault.h deleted file mode 100644 index 89684cd..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/user_default/CCUserDefault.h +++ /dev/null @@ -1,130 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __SUPPORT_CCUSERDEFAULT_H__ -#define __SUPPORT_CCUSERDEFAULT_H__ - -#include "platform/CCPlatformMacros.h" -#include - -NS_CC_BEGIN - -/** - * @addtogroup data_storage - * @{ - */ - -/** - * CCUserDefault acts as a tiny database. You can save and get base type values by it. - * For example, setBoolForKey("played", true) will add a bool value true into the database. - * Its key is "played". You can get the value of the key by getBoolForKey("played"). - * - * It supports the following base types: - * bool, int, float, double, string - */ -class CC_DLL CCUserDefault -{ -public: - ~CCUserDefault(); - - // get value methods - - /** - @brief Get bool value by key, if the key doesn't exist, a default value will return. - You can set the default value, or it is false. - */ - bool getBoolForKey(const char* pKey); - bool getBoolForKey(const char* pKey, bool defaultValue); - /** - @brief Get integer value by key, if the key doesn't exist, a default value will return. - You can set the default value, or it is 0. - */ - int getIntegerForKey(const char* pKey); - int getIntegerForKey(const char* pKey, int defaultValue); - /** - @brief Get float value by key, if the key doesn't exist, a default value will return. - You can set the default value, or it is 0.0f. - */ - float getFloatForKey(const char* pKey); - float getFloatForKey(const char* pKey, float defaultValue); - /** - @brief Get double value by key, if the key doesn't exist, a default value will return. - You can set the default value, or it is 0.0. - */ - double getDoubleForKey(const char* pKey); - double getDoubleForKey(const char* pKey, double defaultValue); - /** - @brief Get string value by key, if the key doesn't exist, a default value will return. - You can set the default value, or it is "". - */ - std::string getStringForKey(const char* pKey); - std::string getStringForKey(const char* pKey, const std::string & defaultValue); - - // set value methods - - /** - @brief Set bool value by key. - */ - void setBoolForKey(const char* pKey, bool value); - /** - @brief Set integer value by key. - */ - void setIntegerForKey(const char* pKey, int value); - /** - @brief Set float value by key. - */ - void setFloatForKey(const char* pKey, float value); - /** - @brief Set double value by key. - */ - void setDoubleForKey(const char* pKey, double value); - /** - @brief Set string value by key. - */ - void setStringForKey(const char* pKey, const std::string & value); - /** - @brief Save content to xml file - */ - void flush(); - - static CCUserDefault* sharedUserDefault(); - static void purgeSharedUserDefault(); - const static std::string& getXMLFilePath(); - static bool isXMLFileExist(); - -private: - CCUserDefault(); - static bool createXMLFile(); - static void initXMLFilePath(); - - static CCUserDefault* m_spUserDefault; - static std::string m_sFilePath; - static bool m_sbIsFilePathInitialized; -}; - -// end of data_storage group -/// @} - -NS_CC_END - -#endif // __SUPPORT_CCUSERDEFAULT_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/support/user_default/CCUserDefault.mm b/cappuccino-sdk/incl/cocos2dx/support/user_default/CCUserDefault.mm deleted file mode 100644 index 285c729..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/user_default/CCUserDefault.mm +++ /dev/null @@ -1,486 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#import "CCUserDefault.h" -#import -#import "platform/CCFileUtils.h" -#import "../tinyxml2/tinyxml2.h" -#import "platform/CCPlatformConfig.h" -#import "platform/CCPlatformMacros.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) - - -#define XML_FILE_NAME "UserDefault.xml" - -// root name of xml -#define USERDEFAULT_ROOT_NAME "userDefaultRoot" - -#define KEEP_COMPATABILITY - -using namespace std; - -NS_CC_BEGIN - -/** - * implements of CCUserDefault - */ - -CCUserDefault* CCUserDefault::m_spUserDefault = 0; -string CCUserDefault::m_sFilePath = string(""); -bool CCUserDefault::m_sbIsFilePathInitialized = false; - -#ifdef KEEP_COMPATABILITY -static tinyxml2::XMLElement* getXMLNodeForKey(const char* pKey, tinyxml2::XMLDocument **doc) -{ - tinyxml2::XMLElement* curNode = NULL; - tinyxml2::XMLElement* rootNode = NULL; - - if (! CCUserDefault::isXMLFileExist()) - { - return NULL; - } - - // check the key value - if (! pKey) - { - return NULL; - } - - do - { - tinyxml2::XMLDocument* xmlDoc = new tinyxml2::XMLDocument(); - *doc = xmlDoc; - unsigned long nSize; - const char* pXmlBuffer = (const char*)CCFileUtils::sharedFileUtils()->getFileData(CCUserDefault::sharedUserDefault()->getXMLFilePath().c_str(), "rb", &nSize); - //const char* pXmlBuffer = (const char*)data.getBuffer(); - if(NULL == pXmlBuffer) - { - NSLog(@"can not read xml file"); - break; - } - xmlDoc->Parse(pXmlBuffer); - delete[] pXmlBuffer; - // get root node - rootNode = xmlDoc->RootElement(); - if (NULL == rootNode) - { - NSLog(@"read root node error"); - break; - } - // find the node - curNode = rootNode->FirstChildElement(); - if (!curNode) - { - // There is not xml node, delete xml file. - remove(CCUserDefault::sharedUserDefault()->getXMLFilePath().c_str()); - - return NULL; - } - - while (NULL != curNode) - { - const char* nodeName = curNode->Value(); - if (!strcmp(nodeName, pKey)) - { - // delete the node - break; - } - - curNode = curNode->NextSiblingElement(); - } - } while (0); - - return curNode; -} - -static void deleteNode(tinyxml2::XMLDocument* doc, tinyxml2::XMLElement* node) -{ - if (node) - { - doc->DeleteNode(node); - doc->SaveFile(CCUserDefault::sharedUserDefault()->getXMLFilePath().c_str()); - delete doc; - } -} - -static void deleteNodeByKey(const char *pKey) -{ - tinyxml2::XMLDocument* doc = NULL; - tinyxml2::XMLElement* node = getXMLNodeForKey(pKey, &doc); - deleteNode(doc, node); -} -#endif - -/** - * If the user invoke delete CCUserDefault::sharedUserDefault(), should set m_spUserDefault - * to null to avoid error when he invoke CCUserDefault::sharedUserDefault() later. - */ -CCUserDefault::~CCUserDefault() -{ - CC_SAFE_DELETE(m_spUserDefault); - m_spUserDefault = NULL; -} - -CCUserDefault::CCUserDefault() -{ - m_spUserDefault = NULL; -} - -void CCUserDefault::purgeSharedUserDefault() -{ - m_spUserDefault = NULL; -} - -bool CCUserDefault::getBoolForKey(const char* pKey) -{ - return getBoolForKey(pKey, false); -} - -bool CCUserDefault::getBoolForKey(const char* pKey, bool defaultValue) -{ -#ifdef KEEP_COMPATABILITY - tinyxml2::XMLDocument* doc = NULL; - tinyxml2::XMLElement* node = getXMLNodeForKey(pKey, &doc); - if (node) - { - if (node->FirstChild()) - { - const char* value = (const char*)node->FirstChild()->Value(); - bool ret = (! strcmp(value, "true")); - - // set value in NSUserDefaults - setBoolForKey(pKey, ret); - flush(); - - // delete xmle node - deleteNode(doc, node); - - return ret; - } - else - { - // delete xmle node - deleteNode(doc, node); - } - } -#endif - - bool ret = defaultValue; - - NSNumber *value = [[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithUTF8String:pKey]]; - if (value) - { - ret = [value boolValue]; - } - - return ret; -} - -int CCUserDefault::getIntegerForKey(const char* pKey) -{ - return getIntegerForKey(pKey, 0); -} - -int CCUserDefault::getIntegerForKey(const char* pKey, int defaultValue) -{ -#ifdef KEEP_COMPATABILITY - tinyxml2::XMLDocument* doc = NULL; - tinyxml2::XMLElement* node = getXMLNodeForKey(pKey, &doc); - if (node) - { - if (node->FirstChild()) - { - int ret = atoi((const char*)node->FirstChild()->Value()); - - // set value in NSUserDefaults - setIntegerForKey(pKey, ret); - flush(); - - // delete xmle node - deleteNode(doc, node); - - return ret; - } - else - { - // delete xmle node - deleteNode(doc, node); - } - } -#endif - - int ret = defaultValue; - - NSNumber *value = [[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithUTF8String:pKey]]; - if (value) - { - ret = [value intValue]; - } - - return ret; -} - -float CCUserDefault::getFloatForKey(const char* pKey) -{ - return getFloatForKey(pKey, 0); -} - -float CCUserDefault::getFloatForKey(const char* pKey, float defaultValue) -{ -#ifdef KEEP_COMPATABILITY - tinyxml2::XMLDocument* doc = NULL; - tinyxml2::XMLElement* node = getXMLNodeForKey(pKey, &doc); - if (node) - { - if (node->FirstChild()) - { - float ret = atof((const char*)node->FirstChild()->Value()); - - // set value in NSUserDefaults - setFloatForKey(pKey, ret); - flush(); - - // delete xmle node - deleteNode(doc, node); - - return ret; - } - else - { - // delete xmle node - deleteNode(doc, node); - } - } -#endif - - float ret = defaultValue; - - NSNumber *value = [[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithUTF8String:pKey]]; - if (value) - { - ret = [value floatValue]; - } - - return ret; -} - -double CCUserDefault::getDoubleForKey(const char* pKey) -{ - return getDoubleForKey(pKey, 0); -} - -double CCUserDefault::getDoubleForKey(const char* pKey, double defaultValue) -{ -#ifdef KEEP_COMPATABILITY - tinyxml2::XMLDocument* doc = NULL; - tinyxml2::XMLElement* node = getXMLNodeForKey(pKey, &doc); - if (node) - { - if (node->FirstChild()) - { - double ret = atof((const char*)node->FirstChild()->Value()); - - // set value in NSUserDefaults - setDoubleForKey(pKey, ret); - flush(); - - // delete xmle node - deleteNode(doc, node); - - return ret; - } - else - { - // delete xmle node - deleteNode(doc, node); - } - } -#endif - - double ret = defaultValue; - - NSNumber *value = [[NSUserDefaults standardUserDefaults] objectForKey:[NSString stringWithUTF8String:pKey]]; - if (value) - { - ret = [value doubleValue]; - } - - return ret; -} - -std::string CCUserDefault::getStringForKey(const char* pKey) -{ - return getStringForKey(pKey, ""); -} - -string CCUserDefault::getStringForKey(const char* pKey, const std::string & defaultValue) -{ -#ifdef KEEP_COMPATABILITY - tinyxml2::XMLDocument* doc = NULL; - tinyxml2::XMLElement* node = getXMLNodeForKey(pKey, &doc); - if (node) - { - if (node->FirstChild()) - { - string ret = (const char*)node->FirstChild()->Value(); - - // set value in NSUserDefaults - setStringForKey(pKey, ret); - flush(); - - // delete xmle node - deleteNode(doc, node); - - return ret; - } - else - { - // delete xmle node - deleteNode(doc, node); - } - } -#endif - - NSString *str = [[NSUserDefaults standardUserDefaults] stringForKey:[NSString stringWithUTF8String:pKey]]; - if (! str) - { - return defaultValue; - } - else - { - return [str UTF8String]; - } -} - -void CCUserDefault::setBoolForKey(const char* pKey, bool value) -{ -#ifdef KEEP_COMPATABILITY - deleteNodeByKey(pKey); -#endif - - [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithBool:value] forKey:[NSString stringWithUTF8String:pKey]]; -} - -void CCUserDefault::setIntegerForKey(const char* pKey, int value) -{ -#ifdef KEEP_COMPATABILITY - deleteNodeByKey(pKey); -#endif - - [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithInt:value] forKey:[NSString stringWithUTF8String:pKey]]; -} - -void CCUserDefault::setFloatForKey(const char* pKey, float value) -{ -#ifdef KEEP_COMPATABILITY - deleteNodeByKey(pKey); -#endif - - [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithFloat:value] forKey:[NSString stringWithUTF8String:pKey]]; -} - -void CCUserDefault::setDoubleForKey(const char* pKey, double value) -{ -#ifdef KEEP_COMPATABILITY - deleteNodeByKey(pKey); -#endif - - [[NSUserDefaults standardUserDefaults] setObject:[NSNumber numberWithDouble:value] forKey:[NSString stringWithUTF8String:pKey]]; -} - -void CCUserDefault::setStringForKey(const char* pKey, const std::string & value) -{ -#ifdef KEEP_COMPATABILITY - deleteNodeByKey(pKey); -#endif - - [[NSUserDefaults standardUserDefaults] setObject:[NSString stringWithUTF8String:value.c_str()] forKey:[NSString stringWithUTF8String:pKey]]; -} - -CCUserDefault* CCUserDefault::sharedUserDefault() -{ -#ifdef KEEP_COMPATABILITY - initXMLFilePath(); -#endif - - if (! m_spUserDefault) - { - m_spUserDefault = new CCUserDefault(); - } - - return m_spUserDefault; -} - -bool CCUserDefault::isXMLFileExist() -{ - FILE *fp = fopen(m_sFilePath.c_str(), "r"); - bool bRet = false; - - if (fp) - { - bRet = true; - fclose(fp); - } - - return bRet; -} - -void CCUserDefault::initXMLFilePath() -{ -#ifdef KEEP_COMPATABILITY - if (! m_sbIsFilePathInitialized) - { - // xml file is stored in cache directory before 2.1.2 - NSArray *paths = NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES); - NSString *documentsDirectory = [paths objectAtIndex:0]; - m_sFilePath = [documentsDirectory UTF8String]; - m_sFilePath.append("/"); - - m_sFilePath += XML_FILE_NAME; - m_sbIsFilePathInitialized = true; - } -#endif -} - -// create new xml file -bool CCUserDefault::createXMLFile() -{ - return false; -} - -const string& CCUserDefault::getXMLFilePath() -{ - return m_sFilePath; -} - -void CCUserDefault::flush() -{ - [[NSUserDefaults standardUserDefaults] synchronize]; -} - - -NS_CC_END - -#endif // (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) diff --git a/cappuccino-sdk/incl/cocos2dx/support/zip_support/ZipUtils.h b/cappuccino-sdk/incl/cocos2dx/support/zip_support/ZipUtils.h deleted file mode 100644 index 1f7a91f..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/zip_support/ZipUtils.h +++ /dev/null @@ -1,233 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __SUPPORT_ZIPUTILS_H__ -#define __SUPPORT_ZIPUTILS_H__ - -#include -#include "CCPlatformDefine.h" -#include "platform/CCPlatformConfig.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) -#include "platform/android/CCFileUtilsAndroid.h" -#endif - -namespace cocos2d -{ - /* XXX: pragma pack ??? */ - /** @struct CCZHeader - */ - struct CCZHeader { - unsigned char sig[4]; // signature. Should be 'CCZ!' 4 bytes - unsigned short compression_type; // should 0 - unsigned short version; // should be 2 (although version type==1 is also supported) - unsigned int reserved; // Reserved for users. - unsigned int len; // size of the uncompressed file - }; - - enum { - CCZ_COMPRESSION_ZLIB, // zlib format. - CCZ_COMPRESSION_BZIP2, // bzip2 format (not supported yet) - CCZ_COMPRESSION_GZIP, // gzip format (not supported yet) - CCZ_COMPRESSION_NONE, // plain (not supported yet) - }; - - class CC_DLL ZipUtils - { - public: - /** - * Inflates either zlib or gzip deflated memory. The inflated memory is - * expected to be freed by the caller. - * - * It will allocate 256k for the destination buffer. If it is not enough it will multiply the previous buffer size per 2, until there is enough memory. - * @returns the length of the deflated buffer - * - @since v0.8.1 - */ - static int ccInflateMemory(unsigned char *in, unsigned int inLength, unsigned char **out); - - /** - * Inflates either zlib or gzip deflated memory. The inflated memory is - * expected to be freed by the caller. - * - * outLenghtHint is assumed to be the needed room to allocate the inflated buffer. - * - * @returns the length of the deflated buffer - * - @since v1.0.0 - */ - static int ccInflateMemoryWithHint(unsigned char *in, unsigned int inLength, unsigned char **out, unsigned int outLenghtHint); - - /** inflates a GZip file into memory - * - * @returns the length of the deflated buffer - * - * @since v0.99.5 - */ - static int ccInflateGZipFile(const char *filename, unsigned char **out); - - /** inflates a CCZ file into memory - * - * @returns the length of the deflated buffer - * - * @since v0.99.5 - */ - static int ccInflateCCZFile(const char *filename, unsigned char **out); - - /** Sets the pvr.ccz encryption key parts separately for added - * security. - * - * Example: If the key used to encrypt the pvr.ccz file is - * 0xaaaaaaaabbbbbbbbccccccccdddddddd you will call this function 4 - * different times, preferably from 4 different source files, as follows - * - * ZipUtils::ccSetPvrEncryptionKeyPart(0, 0xaaaaaaaa); - * ZipUtils::ccSetPvrEncryptionKeyPart(1, 0xbbbbbbbb); - * ZipUtils::ccSetPvrEncryptionKeyPart(2, 0xcccccccc); - * ZipUtils::ccSetPvrEncryptionKeyPart(3, 0xdddddddd); - * - * Splitting the key into 4 parts and calling the function - * from 4 different source files increases the difficulty to - * reverse engineer the encryption key. Be aware that encrpytion - * is *never* 100% secure and the key code can be cracked by - * knowledgable persons. - * - * IMPORTANT: Be sure to call ccSetPvrEncryptionKey or - * ccSetPvrEncryptionKeyPart with all of the key parts *before* loading - * the spritesheet or decryption will fail and the spritesheet - * will fail to load. - * - * @param index part of the key [0..3] - * @param value value of the key part - */ - static void ccSetPvrEncryptionKeyPart(int index, unsigned int value); - - /** Sets the pvr.ccz encryption key. - * - * Example: If the key used to encrypt the pvr.ccz file is - * 0xaaaaaaaabbbbbbbbccccccccdddddddd you will call this function with - * the key split into 4 parts as follows - * - * ZipUtils::ccSetPvrEncryptionKey(0xaaaaaaaa, 0xbbbbbbbb, 0xcccccccc, 0xdddddddd); - * - * Note that using this function makes it easier to reverse engineer and - * discover the complete key because the key parts are present in one - * function call. - * - * IMPORTANT: Be sure to call ccSetPvrEncryptionKey or - * ccSetPvrEncryptionKeyPart with all of the key parts *before* loading - * the spritesheet or decryption will fail and the spritesheet - * will fail to load. - * - * @param keyPart1 the key value part 1. - * @param keyPart2 the key value part 2. - * @param keyPart3 the key value part 3. - * @param keyPart4 the key value part 4. - */ - static void ccSetPvrEncryptionKey(unsigned int keyPart1, unsigned int keyPart2, unsigned int keyPart3, unsigned int keyPart4); - - private: - static int ccInflateMemoryWithHint(unsigned char *in, unsigned int inLength, unsigned char **out, unsigned int *outLength, - unsigned int outLenghtHint); - static inline void ccDecodeEncodedPvr (unsigned int *data, int len); - static inline unsigned int ccChecksumPvr(const unsigned int *data, int len); - - static unsigned int s_uEncryptedPvrKeyParts[4]; - static unsigned int s_uEncryptionKey[1024]; - static bool s_bEncryptionKeyIsValid; - }; - - // forward declaration - class ZipFilePrivate; - - /** - * Zip file - reader helper class. - * - * It will cache the file list of a particular zip file with positions inside an archive, - * so it would be much faster to read some particular files or to check their existance. - * - * @since v2.0.5 - */ - class ZipFile - { - public: -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) - friend class CCFileUtilsAndroid; -#endif - - /** - * Constructor, open zip file and store file list. - * - * @param zipFile Zip file name - * @param filter The first part of file names, which should be accessible. - * For example, "assets/". Other files will be missed. - * - * @since v2.0.5 - */ - ZipFile(const std::string &zipFile, const std::string &filter = std::string()); - virtual ~ZipFile(); - - /** - * Regenerate accessible file list based on a new filter string. - * - * @param filter New filter string (first part of files names) - * @return true whenever zip file is open successfully and it is possible to locate - * at least the first file, false otherwise - * - * @since v2.0.5 - */ - bool setFilter(const std::string &filter); - - /** - * Check does a file exists or not in zip file - * - * @param fileName File to be checked on existance - * @return true whenever file exists, false otherwise - * - * @since v2.0.5 - */ - bool fileExists(const std::string &fileName) const; - - /** - * Get resource file data from a zip file. - * @param fileName File name - * @param[out] pSize If the file read operation succeeds, it will be the data size, otherwise 0. - * @return Upon success, a pointer to the data is returned, otherwise NULL. - * @warning Recall: you are responsible for calling delete[] on any Non-NULL pointer returned. - * - * @since v2.0.5 - */ - unsigned char *getFileData(const std::string &fileName, unsigned long *pSize); - - private: - bool setFilter(const std::string &filer, ZipFilePrivate *data); - unsigned char *getFileData(const std::string &fileName, unsigned long *pSize, ZipFilePrivate *data); - - /** Internal data like zip file pointer / file list array and so on */ - ZipFilePrivate *_data; - /** Another data used not in main thread */ - ZipFilePrivate *_dataThread; - }; -} // end of namespace cocos2d -#endif // __SUPPORT_ZIPUTILS_H__ - diff --git a/cappuccino-sdk/incl/cocos2dx/support/zip_support/ioapi.h b/cappuccino-sdk/incl/cocos2dx/support/zip_support/ioapi.h deleted file mode 100644 index 48b65c9..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/zip_support/ioapi.h +++ /dev/null @@ -1,197 +0,0 @@ -/* ioapi.h -- IO base function header for compress/uncompress .zip - part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - - Modifications for Zip64 support - Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - - For more info read MiniZip_info.txt - - Changes - - Oct-2009 - Defined ZPOS64_T to fpos_t on windows and u_int64_t on linux. (might need to find a better why for this) - Oct-2009 - Change to fseeko64, ftello64 and fopen64 so large files would work on linux. - More if/def section may be needed to support other platforms - Oct-2009 - Defined fxxxx64 calls to normal fopen/ftell/fseek so they would compile on windows. - (but you should use iowin32.c for windows instead) - -*/ - -#ifndef _ZLIBIOAPI64_H -#define _ZLIBIOAPI64_H - -#include "platform/CCPlatformConfig.h" - -#if (!defined(_WIN32)) && (!defined(WIN32)) - - // Linux needs this to support file operation on files larger then 4+GB - // But might need better if/def to select just the platforms that needs them. - - #ifndef __USE_FILE_OFFSET64 - #define __USE_FILE_OFFSET64 - #endif - #ifndef __USE_LARGEFILE64 - #define __USE_LARGEFILE64 - #endif - #ifndef _LARGEFILE64_SOURCE - #define _LARGEFILE64_SOURCE - #endif - #ifndef _FILE_OFFSET_BIT - #define _FILE_OFFSET_BIT 64 - #endif -#endif - -#include -#include -#include "zlib.h" - -namespace cocos2d { - -#if defined(USE_FILE32API) -#define fopen64 fopen -#define ftello64 ftell -#define fseeko64 fseek -#else -#ifdef _MSC_VER - #define fopen64 fopen - #if (_MSC_VER >= 1400) && (!(defined(NO_MSCVER_FILE64_FUNC))) - #define ftello64 _ftelli64 - #define fseeko64 _fseeki64 - #else // old MSC - #define ftello64 ftell - #define fseeko64 fseek - #endif -#endif -#endif - -/* -#ifndef ZPOS64_T - #ifdef _WIN32 - #define ZPOS64_T fpos_t - #else - #include - #define ZPOS64_T uint64_t - #endif -#endif -*/ - -#ifdef HAVE_MINIZIP64_CONF_H -#include "mz64conf.h" -#endif - -/* a type chosen by DEFINE */ -#ifdef HAVE_64BIT_INT_CUSTOM -typedef 64BIT_INT_CUSTOM_TYPE ZPOS64_T; -#else -#ifdef HAS_STDINT_H -#include "stdint.h" -typedef uint64_t ZPOS64_T; -#else - - -#if defined(_MSC_VER) || defined(__BORLANDC__) -typedef unsigned __int64 ZPOS64_T; -#else -typedef unsigned long long int ZPOS64_T; -#endif -#endif -#endif - - - -#define ZLIB_FILEFUNC_SEEK_CUR (1) -#define ZLIB_FILEFUNC_SEEK_END (2) -#define ZLIB_FILEFUNC_SEEK_SET (0) - -#define ZLIB_FILEFUNC_MODE_READ (1) -#define ZLIB_FILEFUNC_MODE_WRITE (2) -#define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3) - -#define ZLIB_FILEFUNC_MODE_EXISTING (4) -#define ZLIB_FILEFUNC_MODE_CREATE (8) - - -#ifndef ZCALLBACK - #if (defined(WIN32) || defined(_WIN32) || defined (WINDOWS) || defined (_WINDOWS)) && defined(CALLBACK) && defined (USEWINDOWS_CALLBACK) - #define ZCALLBACK CALLBACK - #else - #define ZCALLBACK - #endif -#endif - - - - -typedef voidpf (ZCALLBACK *open_file_func) OF((voidpf opaque, const char* filename, int mode)); -typedef uLong (ZCALLBACK *read_file_func) OF((voidpf opaque, voidpf stream, void* buf, uLong size)); -typedef uLong (ZCALLBACK *write_file_func) OF((voidpf opaque, voidpf stream, const void* buf, uLong size)); -typedef int (ZCALLBACK *close_file_func) OF((voidpf opaque, voidpf stream)); -typedef int (ZCALLBACK *testerror_file_func) OF((voidpf opaque, voidpf stream)); - -typedef long (ZCALLBACK *tell_file_func) OF((voidpf opaque, voidpf stream)); -typedef long (ZCALLBACK *seek_file_func) OF((voidpf opaque, voidpf stream, uLong offset, int origin)); - - -/* here is the "old" 32 bits structure structure */ -typedef struct zlib_filefunc_def_s -{ - open_file_func zopen_file; - read_file_func zread_file; - write_file_func zwrite_file; - tell_file_func ztell_file; - seek_file_func zseek_file; - close_file_func zclose_file; - testerror_file_func zerror_file; - voidpf opaque; -} zlib_filefunc_def; - -typedef ZPOS64_T (ZCALLBACK *tell64_file_func) OF((voidpf opaque, voidpf stream)); -typedef long (ZCALLBACK *seek64_file_func) OF((voidpf opaque, voidpf stream, ZPOS64_T offset, int origin)); -typedef voidpf (ZCALLBACK *open64_file_func) OF((voidpf opaque, const void* filename, int mode)); - -typedef struct zlib_filefunc64_def_s -{ - open64_file_func zopen64_file; - read_file_func zread_file; - write_file_func zwrite_file; - tell64_file_func ztell64_file; - seek64_file_func zseek64_file; - close_file_func zclose_file; - testerror_file_func zerror_file; - voidpf opaque; -} zlib_filefunc64_def; - -void fill_fopen64_filefunc OF((zlib_filefunc64_def* pzlib_filefunc_def)); -void fill_fopen_filefunc OF((zlib_filefunc_def* pzlib_filefunc_def)); - -/* now internal definition, only for zip.c and unzip.h */ -typedef struct zlib_filefunc64_32_def_s -{ - zlib_filefunc64_def zfile_func64; - open_file_func zopen32_file; - tell_file_func ztell32_file; - seek_file_func zseek32_file; -} zlib_filefunc64_32_def; - - -#define ZREAD64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zread_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) -#define ZWRITE64(filefunc,filestream,buf,size) ((*((filefunc).zfile_func64.zwrite_file)) ((filefunc).zfile_func64.opaque,filestream,buf,size)) -//#define ZTELL64(filefunc,filestream) ((*((filefunc).ztell64_file)) ((filefunc).opaque,filestream)) -//#define ZSEEK64(filefunc,filestream,pos,mode) ((*((filefunc).zseek64_file)) ((filefunc).opaque,filestream,pos,mode)) -#define ZCLOSE64(filefunc,filestream) ((*((filefunc).zfile_func64.zclose_file)) ((filefunc).zfile_func64.opaque,filestream)) -#define ZERROR64(filefunc,filestream) ((*((filefunc).zfile_func64.zerror_file)) ((filefunc).zfile_func64.opaque,filestream)) - -voidpf call_zopen64 OF((const zlib_filefunc64_32_def* pfilefunc,const void*filename,int mode)); -long call_zseek64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream, ZPOS64_T offset, int origin)); -ZPOS64_T call_ztell64 OF((const zlib_filefunc64_32_def* pfilefunc,voidpf filestream)); - -void fill_zlib_filefunc64_32_def_from_filefunc32(zlib_filefunc64_32_def* p_filefunc64_32,const zlib_filefunc_def* p_filefunc32); - -#define ZOPEN64(filefunc,filename,mode) (call_zopen64((&(filefunc)),(filename),(mode))) -#define ZTELL64(filefunc,filestream) (call_ztell64((&(filefunc)),(filestream))) -#define ZSEEK64(filefunc,filestream,pos,mode) (call_zseek64((&(filefunc)),(filestream),(pos),(mode))) - -} // end of namespace cocos2d - -#endif diff --git a/cappuccino-sdk/incl/cocos2dx/support/zip_support/unzip.h b/cappuccino-sdk/incl/cocos2dx/support/zip_support/unzip.h deleted file mode 100644 index 54e73a5..0000000 --- a/cappuccino-sdk/incl/cocos2dx/support/zip_support/unzip.h +++ /dev/null @@ -1,455 +0,0 @@ -/* unzip.h -- IO for uncompress .zip files using zlib - Version 1.1, February 14h, 2010 - part of the MiniZip project - ( http://www.winimage.com/zLibDll/minizip.html ) - - Copyright (C) 1998-2010 Gilles Vollant (minizip) ( http://www.winimage.com/zLibDll/minizip.html ) - - Modifications of Unzip for Zip64 - Copyright (C) 2007-2008 Even Rouault - - Modifications for Zip64 support on both zip and unzip - Copyright (C) 2009-2010 Mathias Svensson ( http://result42.com ) - - For more info read MiniZip_info.txt - - --------------------------------------------------------------------------------- - - Condition of use and distribution are the same than zlib : - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - --------------------------------------------------------------------------------- - - Changes - - See header of unzip64.c - -*/ - -#ifndef _unz64_H -#define _unz64_H - -#include "CCPlatformDefine.h" - -#ifndef _ZLIB_H -#include "zlib.h" -#endif - -#ifndef _ZLIBIOAPI_H -#include "ioapi.h" -#endif - -#ifdef HAVE_BZIP2 -#include "bzlib.h" -#endif - -#define Z_BZIP2ED 12 - -#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP) -/* like the STRICT of WIN32, we define a pointer that cannot be converted - from (void*) without cast */ -typedef struct TagunzFile__ { int unused; } unzFile__; -typedef unzFile__ *unzFile; -#else -typedef voidp unzFile; -#endif - - -#define UNZ_OK (0) -#define UNZ_END_OF_LIST_OF_FILE (-100) -#define UNZ_ERRNO (Z_ERRNO) -#define UNZ_EOF (0) -#define UNZ_PARAMERROR (-102) -#define UNZ_BADZIPFILE (-103) -#define UNZ_INTERNALERROR (-104) -#define UNZ_CRCERROR (-105) - -namespace cocos2d { - -/* tm_unz contain date/time info */ -typedef struct tm_unz_s -{ - uInt tm_sec; /* seconds after the minute - [0,59] */ - uInt tm_min; /* minutes after the hour - [0,59] */ - uInt tm_hour; /* hours since midnight - [0,23] */ - uInt tm_mday; /* day of the month - [1,31] */ - uInt tm_mon; /* months since January - [0,11] */ - uInt tm_year; /* years - [1980..2044] */ -} tm_unz; - -/* unz_global_info structure contain global data about the ZIPfile - These data comes from the end of central dir */ -typedef struct unz_global_info64_s -{ - ZPOS64_T number_entry; /* total number of entries in - the central dir on this disk */ - uLong size_comment; /* size of the global comment of the zipfile */ -} unz_global_info64; - -typedef struct unz_global_info_s -{ - uLong number_entry; /* total number of entries in - the central dir on this disk */ - uLong size_comment; /* size of the global comment of the zipfile */ -} unz_global_info; - -/* unz_file_info contain information about a file in the zipfile */ -typedef struct unz_file_info64_s -{ - uLong version; /* version made by 2 bytes */ - uLong version_needed; /* version needed to extract 2 bytes */ - uLong flag; /* general purpose bit flag 2 bytes */ - uLong compression_method; /* compression method 2 bytes */ - uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ - uLong crc; /* crc-32 4 bytes */ - ZPOS64_T compressed_size; /* compressed size 8 bytes */ - ZPOS64_T uncompressed_size; /* uncompressed size 8 bytes */ - uLong size_filename; /* filename length 2 bytes */ - uLong size_file_extra; /* extra field length 2 bytes */ - uLong size_file_comment; /* file comment length 2 bytes */ - - uLong disk_num_start; /* disk number start 2 bytes */ - uLong internal_fa; /* internal file attributes 2 bytes */ - uLong external_fa; /* external file attributes 4 bytes */ - - tm_unz tmu_date; -} unz_file_info64; - -typedef struct unz_file_info_s -{ - uLong version; /* version made by 2 bytes */ - uLong version_needed; /* version needed to extract 2 bytes */ - uLong flag; /* general purpose bit flag 2 bytes */ - uLong compression_method; /* compression method 2 bytes */ - uLong dosDate; /* last mod file date in Dos fmt 4 bytes */ - uLong crc; /* crc-32 4 bytes */ - uLong compressed_size; /* compressed size 4 bytes */ - uLong uncompressed_size; /* uncompressed size 4 bytes */ - uLong size_filename; /* filename length 2 bytes */ - uLong size_file_extra; /* extra field length 2 bytes */ - uLong size_file_comment; /* file comment length 2 bytes */ - - uLong disk_num_start; /* disk number start 2 bytes */ - uLong internal_fa; /* internal file attributes 2 bytes */ - uLong external_fa; /* external file attributes 4 bytes */ - - tm_unz tmu_date; -} unz_file_info; - -int CC_DLL unzStringFileNameCompare OF ((const char* fileName1, - const char* fileName2, - int iCaseSensitivity)); -/* - Compare two filename (fileName1,fileName2). - If iCaseSenisivity = 1, comparison is case sensitivity (like strcmp) - If iCaseSenisivity = 2, comparison is not case sensitivity (like strcmpi - or strcasecmp) - If iCaseSenisivity = 0, case sensitivity is default of your operating system - (like 1 on Unix, 2 on Windows) -*/ - - -unzFile CC_DLL unzOpen OF((const char *path)); -unzFile CC_DLL unzOpen64 OF((const void *path)); -/* - Open a Zip file. path contain the full pathname (by example, - on a Windows XP computer "c:\\zlib\\zlib113.zip" or on an Unix computer - "zlib/zlib113.zip". - If the zipfile cannot be opened (file don't exist or in not valid), the - return value is NULL. - Else, the return value is a unzFile Handle, usable with other function - of this unzip package. - the "64" function take a const void* pointer, because the path is just the - value passed to the open64_file_func callback. - Under Windows, if UNICODE is defined, using fill_fopen64_filefunc, the path - is a pointer to a wide unicode string (LPCTSTR is LPCWSTR), so const char* - does not describe the reality -*/ - - -unzFile CC_DLL unzOpen2 OF((const char *path, - zlib_filefunc_def* pzlib_filefunc_def)); -/* - Open a Zip file, like unzOpen, but provide a set of file low level API - for read/write the zip file (see ioapi.h) -*/ - -unzFile CC_DLL unzOpen2_64 OF((const void *path, - zlib_filefunc64_def* pzlib_filefunc_def)); -/* - Open a Zip file, like unz64Open, but provide a set of file low level API - for read/write the zip file (see ioapi.h) -*/ - -int CC_DLL unzClose OF((unzFile file)); -/* - Close a ZipFile opened with unzipOpen. - If there is files inside the .Zip opened with unzOpenCurrentFile (see later), - these files MUST be closed with unzipCloseCurrentFile before call unzipClose. - return UNZ_OK if there is no problem. */ - -int CC_DLL unzGetGlobalInfo OF((unzFile file, - unz_global_info *pglobal_info)); - -int CC_DLL unzGetGlobalInfo64 OF((unzFile file, - unz_global_info64 *pglobal_info)); -/* - Write info about the ZipFile in the *pglobal_info structure. - No preparation of the structure is needed - return UNZ_OK if there is no problem. */ - - -int CC_DLL unzGetGlobalComment OF((unzFile file, - char *szComment, - uLong uSizeBuf)); -/* - Get the global comment string of the ZipFile, in the szComment buffer. - uSizeBuf is the size of the szComment buffer. - return the number of byte copied or an error code <0 -*/ - - -/***************************************************************************/ -/* Unzip package allow you browse the directory of the zipfile */ - -int CC_DLL unzGoToFirstFile OF((unzFile file)); - -/* - Set the current file of the zipfile to the first file. - return UNZ_OK if there is no problem -*/ - -int CC_DLL unzGoToFirstFile64 OF((unzFile file, - unz_file_info64 *pfile_info, - char *szFileName, - uLong fileNameBufferSize)); -/* - Set the current file of the zipfile to the first file - with retrieving an information about the file. - return UNZ_OK if there is no problem -*/ - -int CC_DLL unzGoToNextFile OF((unzFile file)); -/* - Set the current file of the zipfile to the next file. - return UNZ_OK if there is no problem - return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. -*/ - -int CC_DLL unzGoToNextFile64 OF((unzFile file, - unz_file_info64 *pfile_info, - char *szFileName, - uLong fileNameBufferSize)); -/* - Set the current file of the zipfile to the next file - with retrieving an information about the file. - return UNZ_OK if there is no problem - return UNZ_END_OF_LIST_OF_FILE if the actual file was the latest. -*/ - -int CC_DLL unzLocateFile OF((unzFile file, - const char *szFileName, - int iCaseSensitivity)); -/* - Try locate the file szFileName in the zipfile. - For the iCaseSensitivity signification, see unzStringFileNameCompare - - return value : - UNZ_OK if the file is found. It becomes the current file. - UNZ_END_OF_LIST_OF_FILE if the file is not found -*/ - - -/* ****************************************** */ -/* Ryan supplied functions */ -/* unz_file_info contain information about a file in the zipfile */ -typedef struct unz_file_pos_s -{ - uLong pos_in_zip_directory; /* offset in zip file directory */ - uLong num_of_file; /* # of file */ -} unz_file_pos; - -int CC_DLL unzGetFilePos( - unzFile file, - unz_file_pos* file_pos); - -int CC_DLL unzGoToFilePos( - unzFile file, - unz_file_pos* file_pos); - -typedef struct unz64_file_pos_s -{ - ZPOS64_T pos_in_zip_directory; /* offset in zip file directory */ - ZPOS64_T num_of_file; /* # of file */ -} unz64_file_pos; - -int CC_DLL unzGetFilePos64( - unzFile file, - unz64_file_pos* file_pos); - -int CC_DLL unzGoToFilePos64( - unzFile file, - const unz64_file_pos* file_pos); - -/* ****************************************** */ - -int CC_DLL unzGetCurrentFileInfo64 OF((unzFile file, - unz_file_info64 *pfile_info, - char *szFileName, - uLong fileNameBufferSize, - void *extraField, - uLong extraFieldBufferSize, - char *szComment, - uLong commentBufferSize)); - -int CC_DLL unzGetCurrentFileInfo OF((unzFile file, - unz_file_info *pfile_info, - char *szFileName, - uLong fileNameBufferSize, - void *extraField, - uLong extraFieldBufferSize, - char *szComment, - uLong commentBufferSize)); -/* - Get Info about the current file - if pfile_info!=NULL, the *pfile_info structure will contain some info about - the current file - if szFileName!=NULL, the filename string will be copied in szFileName - (fileNameBufferSize is the size of the buffer) - if extraField!=NULL, the extra field information will be copied in extraField - (extraFieldBufferSize is the size of the buffer). - This is the Central-header version of the extra field - if szComment!=NULL, the comment string of the file will be copied in szComment - (commentBufferSize is the size of the buffer) -*/ - - -/** Addition for GDAL : START */ - -ZPOS64_T CC_DLL unzGetCurrentFileZStreamPos64 OF((unzFile file)); - -/** Addition for GDAL : END */ - - -/***************************************************************************/ -/* for reading the content of the current zipfile, you can open it, read data - from it, and close it (you can close it before reading all the file) - */ - -int CC_DLL unzOpenCurrentFile OF((unzFile file)); -/* - Open for reading data the current file in the zipfile. - If there is no error, the return value is UNZ_OK. -*/ - -int CC_DLL unzOpenCurrentFilePassword OF((unzFile file, - const char* password)); -/* - Open for reading data the current file in the zipfile. - password is a crypting password - If there is no error, the return value is UNZ_OK. -*/ - -int CC_DLL unzOpenCurrentFile2 OF((unzFile file, - int* method, - int* level, - int raw)); -/* - Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) - if raw==1 - *method will receive method of compression, *level will receive level of - compression - note : you can set level parameter as NULL (if you did not want known level, - but you CANNOT set method parameter as NULL -*/ - -int CC_DLL unzOpenCurrentFile3 OF((unzFile file, - int* method, - int* level, - int raw, - const char* password)); -/* - Same than unzOpenCurrentFile, but open for read raw the file (not uncompress) - if raw==1 - *method will receive method of compression, *level will receive level of - compression - note : you can set level parameter as NULL (if you did not want known level, - but you CANNOT set method parameter as NULL -*/ - - -int CC_DLL unzCloseCurrentFile OF((unzFile file)); -/* - Close the file in zip opened with unzOpenCurrentFile - Return UNZ_CRCERROR if all the file was read but the CRC is not good -*/ - -int CC_DLL unzReadCurrentFile OF((unzFile file, - voidp buf, - unsigned len)); -/* - Read bytes from the current file (opened by unzOpenCurrentFile) - buf contain buffer where data must be copied - len the size of buf. - - return the number of byte copied if some bytes are copied - return 0 if the end of file was reached - return <0 with error code if there is an error - (UNZ_ERRNO for IO error, or zLib error for uncompress error) -*/ - -z_off_t CC_DLL unztell OF((unzFile file)); - -ZPOS64_T CC_DLL unztell64 OF((unzFile file)); -/* - Give the current position in uncompressed data -*/ - -int CC_DLL unzeof OF((unzFile file)); -/* - return 1 if the end of file was reached, 0 elsewhere -*/ - -int CC_DLL unzGetLocalExtrafield OF((unzFile file, - voidp buf, - unsigned len)); -/* - Read extra field from the current file (opened by unzOpenCurrentFile) - This is the local-header version of the extra field (sometimes, there is - more info in the local-header version than in the central-header) - - if buf==NULL, it return the size of the local extra field - - if buf!=NULL, len is the size of the buffer, the extra header is copied in - buf. - the return value is the number of bytes copied in buf, or (if <0) - the error code -*/ - -/***************************************************************************/ - -/* Get the current file offset */ -ZPOS64_T CC_DLL unzGetOffset64 (unzFile file); -uLong CC_DLL unzGetOffset (unzFile file); - -/* Set the current file offset */ -int CC_DLL unzSetOffset64 (unzFile file, ZPOS64_T pos); -int CC_DLL unzSetOffset (unzFile file, uLong pos); - -} // end of namespace cocos2d - -#endif /* _unz64_H */ diff --git a/cappuccino-sdk/incl/cocos2dx/text_input_node/CCIMEDelegate.h b/cappuccino-sdk/incl/cocos2dx/text_input_node/CCIMEDelegate.h deleted file mode 100644 index a39fa96..0000000 --- a/cappuccino-sdk/incl/cocos2dx/text_input_node/CCIMEDelegate.h +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_IME_DELEGATE_H__ -#define __CC_IME_DELEGATE_H__ - -#include "cocoa/CCGeometry.h" - -NS_CC_BEGIN - -/** - * @addtogroup input - * @{ - */ - -typedef struct -{ - CCRect begin; // the soft keyboard rectangle when animation begins - CCRect end; // the soft keyboard rectangle when animation ends - float duration; // the soft keyboard animation duration -} CCIMEKeyboardNotificationInfo; - -/** -@brief Input method editor delegate. -@js NA -@lua NA -*/ -class CC_DLL CCIMEDelegate -{ -public: - virtual ~CCIMEDelegate(); - - virtual bool attachWithIME(); - virtual bool detachWithIME(); - -protected: - friend class CCIMEDispatcher; - - /** - @brief Decide if the delegate instance is ready to receive an IME message. - - Called by CCIMEDispatcher. - */ - virtual bool canAttachWithIME() { return false; } - /** - @brief When the delegate detaches from the IME, this method is called by CCIMEDispatcher. - */ - virtual void didAttachWithIME() {} - - /** - @brief Decide if the delegate instance can stop receiving IME messages. - */ - virtual bool canDetachWithIME() { return false; } - - /** - @brief When the delegate detaches from the IME, this method is called by CCIMEDispatcher. - */ - virtual void didDetachWithIME() {} - - /** - @brief Called by CCIMEDispatcher when text input received from the IME. - */ - virtual void insertText(const char * text, int len) {CC_UNUSED_PARAM(text);CC_UNUSED_PARAM(len);} - - /** - @brief Called by CCIMEDispatcher after the user clicks the backward key. - */ - virtual void deleteBackward() {} - - /** - @brief Called by CCIMEDispatcher for text stored in delegate. - */ - virtual const char * getContentText() { return 0; } - - ////////////////////////////////////////////////////////////////////////// - // keyboard show/hide notification - ////////////////////////////////////////////////////////////////////////// - virtual void keyboardWillShow(CCIMEKeyboardNotificationInfo& info) {CC_UNUSED_PARAM(info);} - virtual void keyboardDidShow(CCIMEKeyboardNotificationInfo& info) {CC_UNUSED_PARAM(info);} - virtual void keyboardWillHide(CCIMEKeyboardNotificationInfo& info) {CC_UNUSED_PARAM(info);} - virtual void keyboardDidHide(CCIMEKeyboardNotificationInfo& info) {CC_UNUSED_PARAM(info);} - -protected: - CCIMEDelegate(); -}; - -// end of input group -/// @} - -NS_CC_END - -#endif // __CC_IME_DELEGATE_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/text_input_node/CCIMEDispatcher.h b/cappuccino-sdk/incl/cocos2dx/text_input_node/CCIMEDispatcher.h deleted file mode 100644 index 8e3ea5f..0000000 --- a/cappuccino-sdk/incl/cocos2dx/text_input_node/CCIMEDispatcher.h +++ /dev/null @@ -1,113 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_IME_DISPATCHER_H__ -#define __CC_IME_DISPATCHER_H__ - -#include "CCIMEDelegate.h" - -NS_CC_BEGIN - -/** - * @addtogroup input - * @{ - */ - -/** -@brief Input Method Edit Message Dispatcher. -@js NA -@lua NA -*/ -class CC_DLL CCIMEDispatcher -{ -public: - ~CCIMEDispatcher(); - - /** - @brief Returns the shared CCIMEDispatcher object for the system. - */ - static CCIMEDispatcher* sharedDispatcher(); - -// /** -// @brief Releases all CCIMEDelegates from the shared dispatcher. -// */ -// static void purgeSharedDispatcher(); - - /** - @brief Dispatches the input text from IME. - */ - void dispatchInsertText(const char * pText, int nLen); - - /** - @brief Dispatches the delete-backward operation. - */ - void dispatchDeleteBackward(); - - /** - @brief Get the content text from CCIMEDelegate, retrieved previously from IME. - */ - const char * getContentText(); - - ////////////////////////////////////////////////////////////////////////// - // dispatch keyboard notification - ////////////////////////////////////////////////////////////////////////// - void dispatchKeyboardWillShow(CCIMEKeyboardNotificationInfo& info); - void dispatchKeyboardDidShow(CCIMEKeyboardNotificationInfo& info); - void dispatchKeyboardWillHide(CCIMEKeyboardNotificationInfo& info); - void dispatchKeyboardDidHide(CCIMEKeyboardNotificationInfo& info); - -protected: - friend class CCIMEDelegate; - - /** - @brief Add delegate to receive IME messages. - */ - void addDelegate(CCIMEDelegate * pDelegate); - - /** - @brief Attach the pDelegate to the IME. - @return If the old delegate can detach from the IME, and the new delegate - can attach to the IME, return true, otherwise false. - */ - bool attachDelegateWithIME(CCIMEDelegate * pDelegate); - bool detachDelegateWithIME(CCIMEDelegate * pDelegate); - - /** - @brief Remove the delegate from the delegates which receive IME messages. - */ - void removeDelegate(CCIMEDelegate * pDelegate); - -private: - CCIMEDispatcher(); - - class Impl; - Impl * m_pImpl; -}; - -// end of input group -/// @} - -NS_CC_END - -#endif // __CC_IME_DISPATCHER_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/text_input_node/CCTextFieldTTF.h b/cappuccino-sdk/incl/cocos2dx/text_input_node/CCTextFieldTTF.h deleted file mode 100644 index fad5346..0000000 --- a/cappuccino-sdk/incl/cocos2dx/text_input_node/CCTextFieldTTF.h +++ /dev/null @@ -1,187 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_TEXT_FIELD_H__ -#define __CC_TEXT_FIELD_H__ - -#include "label_nodes/CCLabelTTF.h" -#include "text_input_node/CCIMEDelegate.h" -#include "touch_dispatcher/CCTouchDelegateProtocol.h" - -NS_CC_BEGIN - -class CCTextFieldTTF; - -/** - * @addtogroup input - * @{ - * @js NA - * @lua NA - */ - -class CC_DLL CCTextFieldDelegate -{ -public: - /** - @brief If the sender doesn't want to attach to the IME, return true; - */ - virtual bool onTextFieldAttachWithIME(CCTextFieldTTF * sender) - { - CC_UNUSED_PARAM(sender); - return false; - } - - /** - @brief If the sender doesn't want to detach from the IME, return true; - */ - virtual bool onTextFieldDetachWithIME(CCTextFieldTTF * sender) - { - CC_UNUSED_PARAM(sender); - return false; - } - - /** - @brief If the sender doesn't want to insert the text, return true; - */ - virtual bool onTextFieldInsertText(CCTextFieldTTF * sender, const char * text, int nLen) - { - CC_UNUSED_PARAM(sender); - CC_UNUSED_PARAM(text); - CC_UNUSED_PARAM(nLen); - return false; - } - - /** - @brief If the sender doesn't want to delete the delText, return true; - */ - virtual bool onTextFieldDeleteBackward(CCTextFieldTTF * sender, const char * delText, int nLen) - { - CC_UNUSED_PARAM(sender); - CC_UNUSED_PARAM(delText); - CC_UNUSED_PARAM(nLen); - return false; - } - - /** - @brief If the sender doesn't want to draw, return true. - */ - virtual bool onDraw(CCTextFieldTTF * sender) - { - CC_UNUSED_PARAM(sender); - return false; - } -}; - -/** -@brief A simple text input field with TTF font. -@js NA -*/ -class CC_DLL CCTextFieldTTF : public CCLabelTTF, public CCIMEDelegate -{ -public: - /** - * @lua NA - */ - CCTextFieldTTF(); - /** - * @lua NA - */ - virtual ~CCTextFieldTTF(); - - //char * description(); - - /** creates a CCTextFieldTTF from a fontname, alignment, dimension and font size */ - static CCTextFieldTTF * textFieldWithPlaceHolder(const char *placeholder, const CCSize& dimensions, CCTextAlignment alignment, const char *fontName, float fontSize); - /** creates a CCLabelTTF from a fontname and font size */ - static CCTextFieldTTF * textFieldWithPlaceHolder(const char *placeholder, const char *fontName, float fontSize); - /** initializes the CCTextFieldTTF with a font name, alignment, dimension and font size */ - bool initWithPlaceHolder(const char *placeholder, const CCSize& dimensions, CCTextAlignment alignment, const char *fontName, float fontSize); - /** initializes the CCTextFieldTTF with a font name and font size */ - bool initWithPlaceHolder(const char *placeholder, const char *fontName, float fontSize); - - /** - @brief Open keyboard and receive input text. - */ - virtual bool attachWithIME(); - - /** - @brief End text input and close keyboard. - */ - virtual bool detachWithIME(); - - ////////////////////////////////////////////////////////////////////////// - // properties - ////////////////////////////////////////////////////////////////////////// - - //Robtop Modifications: - ROB_CC_SYNTHESIZE(CCTextFieldDelegate *, m_pDelegate, Delegate); - ROB_CC_SYNTHESIZE_READONLY(int, m_nCharCount, CharCount); - virtual const ccColor3B& getColorSpaceHolder(); - virtual void setColorSpaceHolder(const ccColor3B& color); - - // input text property -public: - virtual void setString(const char *text); - virtual const char* getString(void); -protected: - std::string * m_pInputText; - - // place holder text property - // place holder text displayed when there is no text in the text field. -public: - virtual void setPlaceHolder(const char * text); - virtual const char * getPlaceHolder(void); -protected: - std::string * m_pPlaceHolder; - ccColor3B m_ColorSpaceHolder; -public: - virtual void setSecureTextEntry(bool value); - virtual bool isSecureTextEntry(); - -protected: - bool m_bSecureTextEntry; -protected: - - virtual void draw(); - - ////////////////////////////////////////////////////////////////////////// - // CCIMEDelegate interface - ////////////////////////////////////////////////////////////////////////// - - virtual bool canAttachWithIME(); - virtual bool canDetachWithIME(); - virtual void insertText(const char * text, int len); - virtual void deleteBackward(); - virtual const char * getContentText(); -private: - class LengthStack; - LengthStack * m_pLens; -}; - -// end of input group -/// @} - -NS_CC_END - -#endif // __CC_TEXT_FIELD_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/textures/CCTexture2D.h b/cappuccino-sdk/incl/cocos2dx/textures/CCTexture2D.h deleted file mode 100644 index 3a54eaa..0000000 --- a/cappuccino-sdk/incl/cocos2dx/textures/CCTexture2D.h +++ /dev/null @@ -1,311 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (C) 2008 Apple Inc. All Rights Reserved. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCTEXTURE2D_H__ -#define __CCTEXTURE2D_H__ - -#include -#include "cocoa/CCObject.h" -#include "cocoa/CCGeometry.h" -#include "ccTypes.h" -#ifdef EMSCRIPTEN -#include "base_nodes/CCGLBufferedNode.h" -#endif // EMSCRIPTEN - -NS_CC_BEGIN - -class CCImage; - -/** - * @addtogroup textures - * @{ - */ - -//CONSTANTS: - -/** @typedef CCTexture2DPixelFormat -Possible texture pixel formats -*/ -typedef enum { - - //! 32-bit texture: RGBA8888 - kCCTexture2DPixelFormat_RGBA8888, - //! 24-bit texture: RGBA888 - kCCTexture2DPixelFormat_RGB888, - //! 16-bit texture without Alpha channel - kCCTexture2DPixelFormat_RGB565, - //! 8-bit textures used as masks - kCCTexture2DPixelFormat_A8, - //! 8-bit intensity texture - kCCTexture2DPixelFormat_I8, - //! 16-bit textures used as masks - kCCTexture2DPixelFormat_AI88, - //! 16-bit textures: RGBA4444 - kCCTexture2DPixelFormat_RGBA4444, - //! 16-bit textures: RGB5A1 - kCCTexture2DPixelFormat_RGB5A1, - //! 4-bit PVRTC-compressed texture: PVRTC4 - kCCTexture2DPixelFormat_PVRTC4, - //! 2-bit PVRTC-compressed texture: PVRTC2 - kCCTexture2DPixelFormat_PVRTC2, - - - //! Default texture format: RGBA8888 - kCCTexture2DPixelFormat_Default = kCCTexture2DPixelFormat_RGBA8888, - - // backward compatibility stuff - kTexture2DPixelFormat_RGBA8888 = kCCTexture2DPixelFormat_RGBA8888, - kTexture2DPixelFormat_RGB888 = kCCTexture2DPixelFormat_RGB888, - kTexture2DPixelFormat_RGB565 = kCCTexture2DPixelFormat_RGB565, - kTexture2DPixelFormat_A8 = kCCTexture2DPixelFormat_A8, - kTexture2DPixelFormat_RGBA4444 = kCCTexture2DPixelFormat_RGBA4444, - kTexture2DPixelFormat_RGB5A1 = kCCTexture2DPixelFormat_RGB5A1, - kTexture2DPixelFormat_Default = kCCTexture2DPixelFormat_Default - -} CCTexture2DPixelFormat; - -class CCGLProgram; - -/** -Extension to set the Min / Mag filter -*/ -typedef struct _ccTexParams { - GLuint minFilter; - GLuint magFilter; - GLuint wrapS; - GLuint wrapT; -} ccTexParams; - -//CLASS INTERFACES: - -/** @brief CCTexture2D class. -* This class allows to easily create OpenGL 2D textures from images, text or raw data. -* The created CCTexture2D object will always have power-of-two dimensions. -* Depending on how you create the CCTexture2D object, the actual image area of the texture might be smaller than the texture dimensions i.e. "contentSize" != (pixelsWide, pixelsHigh) and (maxS, maxT) != (1.0, 1.0). -* Be aware that the content of the generated textures will be upside-down! -*/ -class CC_DLL CCTexture2D : public CCObject -#ifdef EMSCRIPTEN -, public CCGLBufferedNode -#endif // EMSCRIPTEN -{ -public: - /** - * @js ctor - */ - CCTexture2D(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTexture2D(); - /** - * @js NA - * @lua NA - */ - const char* description(void); - - /** These functions are needed to create mutable textures - * @js NA - */ - void releaseData(void *data); - /** - * @js NA - */ - void* keepData(void *data, unsigned int length); - - /** Initializes with a texture2d with data - * @js NA - * @lua NA - */ - bool initWithData(const void* data, CCTexture2DPixelFormat pixelFormat, unsigned int pixelsWide, unsigned int pixelsHigh, const CCSize& contentSize); - - /** - Drawing extensions to make it easy to draw basic quads using a CCTexture2D object. - These functions require GL_TEXTURE_2D and both GL_VERTEX_ARRAY and GL_TEXTURE_COORD_ARRAY client states to be enabled. - */ - /** draws a texture at a given point */ - void drawAtPoint(const CCPoint& point); - /** draws a texture inside a rect */ - void drawInRect(const CCRect& rect); - - /** - Extensions to make it easy to create a CCTexture2D object from an image file. - Note that RGBA type textures will have their alpha premultiplied - use the blending mode (GL_ONE, GL_ONE_MINUS_SRC_ALPHA). - */ - /** Initializes a texture from a UIImage object */ - - bool initWithImage(CCImage * uiImage); - - /** Initializes a texture from a string with dimensions, alignment, font name and font size */ - bool initWithString(const char *text, const char *fontName, float fontSize, const CCSize& dimensions, CCTextAlignment hAlignment, CCVerticalTextAlignment vAlignment); - /** Initializes a texture from a string with font name and font size */ - bool initWithString(const char *text, const char *fontName, float fontSize); - /** Initializes a texture from a string using a text definition*/ - bool initWithString(const char *text, ccFontDefinition *textDefinition); - - /** Initializes a texture from a PVR file */ - bool initWithPVRFile(const char* file); - - /** Initializes a texture from a ETC file */ - bool initWithETCFile(const char* file); - - /** sets the min filter, mag filter, wrap s and wrap t texture parameters. - If the texture size is NPOT (non power of 2), then in can only use GL_CLAMP_TO_EDGE in GL_TEXTURE_WRAP_{S,T}. - - @warning Calling this method could allocate additional texture memory. - - @since v0.8 - @code - when this functon bound to js,the input param are changed - js: var setTexParameters(var minFilter, var magFilter, var wrapS, var wrapT) - @endcode - */ - void setTexParameters(ccTexParams* texParams); - - /** sets antialias texture parameters: - - GL_TEXTURE_MIN_FILTER = GL_LINEAR - - GL_TEXTURE_MAG_FILTER = GL_LINEAR - - @warning Calling this method could allocate additional texture memory. - - @since v0.8 - */ - void setAntiAliasTexParameters(); - - /** sets alias texture parameters: - - GL_TEXTURE_MIN_FILTER = GL_NEAREST - - GL_TEXTURE_MAG_FILTER = GL_NEAREST - - @warning Calling this method could allocate additional texture memory. - - @since v0.8 - */ - void setAliasTexParameters(); - - - /** Generates mipmap images for the texture. - It only works if the texture size is POT (power of 2). - @since v0.99.0 - */ - void generateMipmap(); - - /** returns the pixel format. - @since v2.0 - */ - const char* stringForFormat(); - - /** returns the bits-per-pixel of the in-memory OpenGL texture - @since v1.0 - */ - unsigned int bitsPerPixelForFormat(); - - /** Helper functions that returns bits per pixels for a given format. - @since v2.0 - */ - unsigned int bitsPerPixelForFormat(CCTexture2DPixelFormat format); - - /** sets the default pixel format for UIImagescontains alpha channel. - If the UIImage contains alpha channel, then the options are: - - generate 32-bit textures: kCCTexture2DPixelFormat_RGBA8888 (default one) - - generate 24-bit textures: kCCTexture2DPixelFormat_RGB888 - - generate 16-bit textures: kCCTexture2DPixelFormat_RGBA4444 - - generate 16-bit textures: kCCTexture2DPixelFormat_RGB5A1 - - generate 16-bit textures: kCCTexture2DPixelFormat_RGB565 - - generate 8-bit textures: kCCTexture2DPixelFormat_A8 (only use it if you use just 1 color) - - How does it work ? - - If the image is an RGBA (with Alpha) then the default pixel format will be used (it can be a 8-bit, 16-bit or 32-bit texture) - - If the image is an RGB (without Alpha) then: If the default pixel format is RGBA8888 then a RGBA8888 (32-bit) will be used. Otherwise a RGB565 (16-bit texture) will be used. - - This parameter is not valid for PVR / PVR.CCZ images. - - @since v0.8 - */ - static void setDefaultAlphaPixelFormat(CCTexture2DPixelFormat format); - - /** returns the alpha pixel format - @since v0.8 - @js getDefaultAlphaPixelFormat - */ - static CCTexture2DPixelFormat defaultAlphaPixelFormat(); - - /** treats (or not) PVR files as if they have alpha premultiplied. - Since it is impossible to know at runtime if the PVR images have the alpha channel premultiplied, it is - possible load them as if they have (or not) the alpha channel premultiplied. - - By default it is disabled. - - @since v0.99.5 - */ - static void PVRImagesHavePremultipliedAlpha(bool haveAlphaPremultiplied); - - /** content size */ - const CCSize& getContentSizeInPixels(); - - bool hasPremultipliedAlpha(); - bool hasMipmaps(); - - //Robtop Modification: - void releaseGLTexture(void); -private: - bool initPremultipliedATextureWithImage(CCImage * image, unsigned int pixelsWide, unsigned int pixelsHigh); - - // By default PVR images are treated as if they don't have the alpha channel premultiplied - bool m_bPVRHaveAlphaPremultiplied; - - /** pixel format of the texture */ - CC_PROPERTY_READONLY(CCTexture2DPixelFormat, m_ePixelFormat, PixelFormat) - /** width in pixels */ - CC_PROPERTY_READONLY(unsigned int, m_uPixelsWide, PixelsWide) - /** height in pixels */ - CC_PROPERTY_READONLY(unsigned int, m_uPixelsHigh, PixelsHigh) - - /** texture name */ - CC_PROPERTY_READONLY(GLuint, m_uName, Name) - - /** texture max S */ - CC_PROPERTY(GLfloat, m_fMaxS, MaxS) - /** texture max T */ - CC_PROPERTY(GLfloat, m_fMaxT, MaxT) - /** content size */ - CC_PROPERTY_READONLY(CCSize, m_tContentSize, ContentSize) - - /** whether or not the texture has their Alpha premultiplied */ - bool m_bHasPremultipliedAlpha; - - bool m_bHasMipmaps; - - /** shader program used by drawAtPoint and drawInRect */ - CC_PROPERTY(CCGLProgram*, m_pShaderProgram, ShaderProgram); -}; - -// end of textures group -/// @} - -NS_CC_END - -#endif //__CCTEXTURE2D_H__ - diff --git a/cappuccino-sdk/incl/cocos2dx/textures/CCTextureAtlas.h b/cappuccino-sdk/incl/cocos2dx/textures/CCTextureAtlas.h deleted file mode 100644 index a4b640e..0000000 --- a/cappuccino-sdk/incl/cocos2dx/textures/CCTextureAtlas.h +++ /dev/null @@ -1,237 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCTEXTURE_ATLAS_H__ -#define __CCTEXTURE_ATLAS_H__ - -#include "ccTypes.h" -#include "cocoa/CCObject.h" -#include "ccConfig.h" -#include - -NS_CC_BEGIN - -class CCTexture2D; - -/** - * @addtogroup textures - * @{ - */ - -/** @brief A class that implements a Texture Atlas. -Supported features: -* The atlas file can be a PVRTC, PNG or any other format supported by Texture2D -* Quads can be updated in runtime -* Quads can be added in runtime -* Quads can be removed in runtime -* Quads can be re-ordered in runtime -* The TextureAtlas capacity can be increased or decreased in runtime -* OpenGL component: V3F, C4B, T2F. -The quads are rendered using an OpenGL ES VBO. -To render the quads using an interleaved vertex array list, you should modify the ccConfig.h file -*/ -class CC_DLL CCTextureAtlas : public CCObject -{ -protected: - GLushort* m_pIndices; -#if CC_TEXTURE_ATLAS_USE_VAO - GLuint m_uVAOname; -#endif - GLuint m_pBuffersVBO[2]; //0: vertex 1: indices - bool m_bDirty; //indicates whether or not the array buffer of the VBO needs to be updated - - - /** quantity of quads that are going to be drawn */ - CC_PROPERTY_READONLY(unsigned int, m_uTotalQuads, TotalQuads) - /** quantity of quads that can be stored with the current texture atlas size */ - CC_PROPERTY_READONLY(unsigned int, m_uCapacity, Capacity) - /** Texture of the texture atlas */ - CC_PROPERTY(CCTexture2D *, m_pTexture, Texture) - /** Quads that are going to be rendered */ - CC_PROPERTY(ccV3F_C4B_T2F_Quad *, m_pQuads, Quads) - -public: - /** - * @js ctor - */ - CCTextureAtlas(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTextureAtlas(); - /** - * @js NA - * @lua NA - */ - const char* description(); - - /** creates a TextureAtlas with an filename and with an initial capacity for Quads. - * The TextureAtlas capacity can be increased in runtime. - */ - static CCTextureAtlas* create(const char* file , unsigned int capacity); - - /** initializes a TextureAtlas with a filename and with a certain capacity for Quads. - * The TextureAtlas capacity can be increased in runtime. - * - * WARNING: Do not reinitialize the TextureAtlas because it will leak memory (issue #706) - */ - bool initWithFile(const char* file, unsigned int capacity); - - /** creates a TextureAtlas with a previously initialized Texture2D object, and - * with an initial capacity for n Quads. - * The TextureAtlas capacity can be increased in runtime. - */ - static CCTextureAtlas* createWithTexture(CCTexture2D *texture, unsigned int capacity); - - - /** initializes a TextureAtlas with a previously initialized Texture2D object, and - * with an initial capacity for Quads. - * The TextureAtlas capacity can be increased in runtime. - * - * WARNING: Do not reinitialize the TextureAtlas because it will leak memory (issue #706) - */ - bool initWithTexture(CCTexture2D *texture, unsigned int capacity); - - /** updates a Quad (texture, vertex and color) at a certain index - * index must be between 0 and the atlas capacity - 1 - @since v0.8 - */ - void updateQuad(ccV3F_C4B_T2F_Quad* quad, unsigned int index); - - /** Inserts a Quad (texture, vertex and color) at a certain index - index must be between 0 and the atlas capacity - 1 - @since v0.8 - */ - void insertQuad(ccV3F_C4B_T2F_Quad* quad, unsigned int index); - - /** Inserts a c array of quads at a given index - index must be between 0 and the atlas capacity - 1 - this method doesn't enlarge the array when amount + index > totalQuads - @since v1.1 - */ - void insertQuads(ccV3F_C4B_T2F_Quad* quads, unsigned int index, unsigned int amount); - - /** Removes the quad that is located at a certain index and inserts it at a new index - This operation is faster than removing and inserting in a quad in 2 different steps - @since v0.7.2 - */ - void insertQuadFromIndex(unsigned int fromIndex, unsigned int newIndex); - - /** removes a quad at a given index number. - The capacity remains the same, but the total number of quads to be drawn is reduced in 1 - @since v0.7.2 - */ - void removeQuadAtIndex(unsigned int index); - - /** removes a amount of quads starting from index - @since 1.1 - */ - void removeQuadsAtIndex(unsigned int index, unsigned int amount); - /** removes all Quads. - The TextureAtlas capacity remains untouched. No memory is freed. - The total number of quads to be drawn will be 0 - @since v0.7.2 - */ - void removeAllQuads(); - - - /** resize the capacity of the CCTextureAtlas. - * The new capacity can be lower or higher than the current one - * It returns YES if the resize was successful. - * If it fails to resize the capacity it will return NO with a new capacity of 0. - */ - bool resizeCapacity(unsigned int n); - - /** - Used internally by CCParticleBatchNode - don't use this unless you know what you're doing - @since 1.1 - */ - void increaseTotalQuadsWith(unsigned int amount); - - /** Moves an amount of quads from oldIndex at newIndex - @since v1.1 - */ - void moveQuadsFromIndex(unsigned int oldIndex, unsigned int amount, unsigned int newIndex); - - /** - Moves quads from index till totalQuads to the newIndex - Used internally by CCParticleBatchNode - This method doesn't enlarge the array if newIndex + quads to be moved > capacity - @since 1.1 - */ - void moveQuadsFromIndex(unsigned int index, unsigned int newIndex); - - /** - Ensures that after a realloc quads are still empty - Used internally by CCParticleBatchNode - @since 1.1 - */ - void fillWithEmptyQuadsFromIndex(unsigned int index, unsigned int amount); - - /** draws n quads - * n can't be greater than the capacity of the Atlas - */ - void drawNumberOfQuads(unsigned int n); - - /** draws n quads from an index (offset). - n + start can't be greater than the capacity of the atlas - - @since v1.0 - */ - void drawNumberOfQuads(unsigned int n, unsigned int start); - - /** draws all the Atlas's Quads - */ - void drawQuads(); - /** listen the event that coming to foreground on Android - */ - void listenBackToForeground(CCObject *obj); - - /** whether or not the array buffer of the VBO needs to be updated*/ - inline bool isDirty(void) { return m_bDirty; } - /** specify if the array buffer of the VBO needs to be updated */ - inline void setDirty(bool bDirty) { m_bDirty = bDirty; } - -private: - void setupIndices(); - void mapBuffers(); -#if CC_TEXTURE_ATLAS_USE_VAO - void setupVBOandVAO(); -#else - void setupVBO(); -#endif -}; - -// end of textures group -/// @} - -NS_CC_END - -#endif //__CCTEXTURE_ATLAS_H__ - - diff --git a/cappuccino-sdk/incl/cocos2dx/textures/CCTextureCache.h b/cappuccino-sdk/incl/cocos2dx/textures/CCTextureCache.h deleted file mode 100644 index 07aba33..0000000 --- a/cappuccino-sdk/incl/cocos2dx/textures/CCTextureCache.h +++ /dev/null @@ -1,265 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. -Copyright (c) Microsoft Open Technologies, Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCTEXTURE_CACHE_H__ -#define __CCTEXTURE_CACHE_H__ - -#include "cocoa/CCObject.h" -#include "cocoa/CCDictionary.h" -#include "textures/CCTexture2D.h" -#include - - -#if CC_ENABLE_CACHE_TEXTURE_DATA - #include "platform/CCImage.h" - #include -#endif - -NS_CC_BEGIN - -class CCLock; -class CCImage; - -/** - * @addtogroup textures - * @{ - */ - -/** @brief Singleton that handles the loading of textures -* Once the texture is loaded, the next time it will return -* a reference of the previously loaded texture reducing GPU & CPU memory -*/ -class CC_DLL CCTextureCache : public CCObject -{ -protected: - CCDictionary* m_pTextures; - //pthread_mutex_t *m_pDictLock; - - -private: - /// todo: void addImageWithAsyncObject(CCAsyncObject* async); - void addImageAsyncCallBack(float dt); -public: - /** - * @js ctor - * @lua NA - */ - CCTextureCache(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTextureCache(); - /** - * @js NA - * @lua NA - */ - const char* description(void); - /** - * @js NA - */ - CCDictionary* snapshotTextures(); - - /** Returns the shared instance of the cache - * @js getInstance - */ - static CCTextureCache * sharedTextureCache(); - - /** purges the cache. It releases the retained instance. - @since v0.99.0 - */ - static void purgeSharedTextureCache(); - - /** Returns a Texture2D object given an file image - * If the file image was not previously loaded, it will create a new CCTexture2D - * object and it will return it. It will use the filename as a key. - * Otherwise it will return a reference of a previously loaded image. - * Supported image extensions: .png, .bmp, .tiff, .jpeg, .pvr, .gif - */ - //Robtop Modification: - //CCTexture2D* addImage(const char* fileimage); - CCTexture2D* addImage(char const* filename, bool); - - - /* Returns a Texture2D object given a file image - * If the file image was not previously loaded, it will create a new CCTexture2D object and it will return it. - * Otherwise it will load a texture in a new thread, and when the image is loaded, the callback will be called with the Texture2D as a parameter. - * The callback will be called from the main thread, so it is safe to create any cocos2d object from the callback. - * Supported image extensions: .png, .jpg - * @since v0.8 - * @lua NA - */ - - void addImageAsync(const char *path, CCObject *target, SEL_CallFuncO selector); - - /* Returns a Texture2D object given an CGImageRef image - * If the image was not previously loaded, it will create a new CCTexture2D object and it will return it. - * Otherwise it will return a reference of a previously loaded image - * The "key" parameter will be used as the "key" for the cache. - * If "key" is nil, then a new texture will be created each time. - * @since v0.8 - */ - // todo: CGImageRef CCTexture2D* addCGImage(CGImageRef image, string & key); - /** Returns a Texture2D object given an UIImage image - * If the image was not previously loaded, it will create a new CCTexture2D object and it will return it. - * Otherwise it will return a reference of a previously loaded image - * The "key" parameter will be used as the "key" for the cache. - * If "key" is nil, then a new texture will be created each time. - */ - CCTexture2D* addUIImage(CCImage *image, const char *key); - - /** Returns an already created texture. Returns nil if the texture doesn't exist. - @since v0.99.5 - */ - CCTexture2D* textureForKey(const char* key); - - /** Reload texture from the image file - * If the file image hasn't loaded before, load it. - * Otherwise the texture will be reloaded from the file image. - * The "filenName" parameter is the related/absolute path of the file image. - * Return true if the reloading is succeed, otherwise return false. - */ - bool reloadTexture(const char* fileName); - - /** Purges the dictionary of loaded textures. - * Call this method if you receive the "Memory Warning" - * In the short term: it will free some resources preventing your app from being killed - * In the medium term: it will allocate more resources - * In the long term: it will be the same - */ - void removeAllTextures(); - - /** Removes unused textures - * Textures that have a retain count of 1 will be deleted - * It is convenient to call this method after when starting a new Scene - * @since v0.8 - */ - void removeUnusedTextures(); - - /** Deletes a texture from the cache given a texture - */ - void removeTexture(CCTexture2D* texture); - - /** Deletes a texture from the cache given a its key name - @since v0.99.4 - */ - void removeTextureForKey(const char *textureKeyName); - - /** Output to CCLOG the current contents of this CCTextureCache - * This will attempt to calculate the size of each texture, and the total texture memory in use - * - * @since v1.0 - */ - void dumpCachedTextureInfo(); - - /** Returns a Texture2D object given an PVR filename - * If the file image was not previously loaded, it will create a new CCTexture2D - * object and it will return it. Otherwise it will return a reference of a previously loaded image - */ - CCTexture2D* addPVRImage(const char* filename); - - /** Returns a Texture2D object given an ETC filename - * If the file image was not previously loaded, it will create a new CCTexture2D - * object and it will return it. Otherwise it will return a reference of a previously loaded image - * @lua NA - */ - CCTexture2D* addETCImage(const char* filename); - - /** Reload all textures - It's only useful when the value of CC_ENABLE_CACHE_TEXTURE_DATA is 1 - */ - static void reloadAllTextures(); - -}; - -#if CC_ENABLE_CACHE_TEXTURE_DATA - -class VolatileTexture -{ -typedef enum { - kInvalid = 0, - kImageFile, - kImageData, - kString, - kImage, -}ccCachedImageType; - -public: - VolatileTexture(CCTexture2D *t); - ~VolatileTexture(); - - static void addImageTexture(CCTexture2D *tt, const char* imageFileName, CCImage::EImageFormat format); - static void addStringTexture(CCTexture2D *tt, const char* text, const CCSize& dimensions, CCTextAlignment alignment, - CCVerticalTextAlignment vAlignment, const char *fontName, float fontSize); - static void addDataTexture(CCTexture2D *tt, void* data, CCTexture2DPixelFormat pixelFormat, const CCSize& contentSize); - static void addCCImage(CCTexture2D *tt, CCImage *image); - - static void setTexParameters(CCTexture2D *t, ccTexParams *texParams); - static void removeTexture(CCTexture2D *t); - static void reloadAllTextures(); - -public: - static std::list textures; - static bool isReloading; - -private: - // find VolatileTexture by CCTexture2D* - // if not found, create a new one - static VolatileTexture* findVolotileTexture(CCTexture2D *tt); - -protected: - CCTexture2D *texture; - - CCImage *uiImage; - - ccCachedImageType m_eCashedImageType; - - void *m_pTextureData; - CCSize m_TextureSize; - CCTexture2DPixelFormat m_PixelFormat; - - std::string m_strFileName; - CCImage::EImageFormat m_FmtImage; - - ccTexParams m_texParams; - CCSize m_size; - CCTextAlignment m_alignment; - CCVerticalTextAlignment m_vAlignment; - std::string m_strFontName; - std::string m_strText; - float m_fFontSize; -}; - -#endif - -// end of textures group -/// @} - -NS_CC_END - -#endif //__CCTEXTURE_CACHE_H__ - diff --git a/cappuccino-sdk/incl/cocos2dx/textures/CCTextureETC.h b/cappuccino-sdk/incl/cocos2dx/textures/CCTextureETC.h deleted file mode 100644 index 63171b3..0000000 --- a/cappuccino-sdk/incl/cocos2dx/textures/CCTextureETC.h +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCETCTEXTURE_H__ -#define __CCETCTEXTURE_H__ - -#include "cocoa/CCObject.h" -#include "platform/CCPlatformMacros.h" -#include "CCGL.h" - -NS_CC_BEGIN -/** - * @js NA - * @lua NA - */ -class CC_DLL CCTextureETC : public CCObject -{ -public: - CCTextureETC(); - virtual ~CCTextureETC(); - - bool initWithFile(const char* file); - - unsigned int getName() const; - unsigned int getWidth() const; - unsigned int getHeight() const; - -private: - bool loadTexture(const char* file); - -private: - GLuint _name; - unsigned int _width; - unsigned int _height; -}; - -NS_CC_END - -#endif /* defined(__CCETCTEXTURE_H__) */ diff --git a/cappuccino-sdk/incl/cocos2dx/textures/CCTexturePVR.h b/cappuccino-sdk/incl/cocos2dx/textures/CCTexturePVR.h deleted file mode 100644 index ce71c25..0000000 --- a/cappuccino-sdk/incl/cocos2dx/textures/CCTexturePVR.h +++ /dev/null @@ -1,152 +0,0 @@ -/**************************************************************************** -Copyright (c) 2011 Jirka Fajfr for cocos2d-x -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCPVRTEXTURE_H__ -#define __CCPVRTEXTURE_H__ - -#include "CCStdC.h" -#include "CCGL.h" -#include "cocoa/CCObject.h" -#include "cocoa/CCArray.h" - -NS_CC_BEGIN - -/** - * @addtogroup textures - * @{ - */ - -/** - @brief Structure which can tell where mipmap begins and how long is it -*/ -struct CCPVRMipmap { - unsigned char *address; - unsigned int len; -}; - -typedef struct _ccPVRTexturePixelFormatInfo { - GLenum internalFormat; - GLenum format; - GLenum type; - uint32_t bpp; - bool compressed; - bool alpha; - CCTexture2DPixelFormat ccPixelFormat; -} ccPVRTexturePixelFormatInfo; - -/** - @brief Determine how many mipmaps can we have. - Its same as define but it respects namespaces -*/ -enum { - CC_PVRMIPMAP_MAX = 16, -}; - - -/** CCTexturePVR - - Object that loads PVR images. - - Supported PVR formats: - - RGBA8888 - - BGRA8888 - - RGBA4444 - - RGBA5551 - - RGB565 - - A8 - - I8 - - AI88 - - PVRTC 4BPP - - PVRTC 2BPP - - Limitations: - Pre-generated mipmaps, such as PVR textures with mipmap levels embedded in file, - are only supported if all individual sprites are of _square_ size. - To use mipmaps with non-square textures, instead call CCTexture2D#generateMipmap on the sheet texture itself - (and to save space, save the PVR sprite sheet without mip maps included). - @js NA - @lua NA -*/ -class CCTexturePVR : public CCObject -{ -public: - CCTexturePVR(); - virtual ~CCTexturePVR(); - - /** initializes a CCTexturePVR with a path */ - bool initWithContentsOfFile(const char* path); - - /** creates and initializes a CCTexturePVR with a path */ - static CCTexturePVR* create(const char* path); - - // properties - - /** texture id name */ - inline unsigned int getName() { return m_uName; } - /** texture width */ - inline unsigned int getWidth() { return m_uWidth; } - /** texture height */ - inline unsigned int getHeight() { return m_uHeight; } - /** whether or not the texture has alpha */ - inline bool hasAlpha() { return m_bHasAlpha; } - /** whether or not the texture has premultiplied alpha */ - inline bool hasPremultipliedAlpha() { return m_bHasPremultipliedAlpha; } - /** whether or not the texture should use hasPremultipliedAlpha instead of global default */ - inline bool isForcePremultipliedAlpha() { return m_bForcePremultipliedAlpha; } - /** how many mipmaps the texture has. 1 means one level (level 0 */ - inline unsigned int getNumberOfMipmaps() { return m_uNumberOfMipmaps; } - inline CCTexture2DPixelFormat getFormat() { return m_eFormat; } - inline bool isRetainName() { return m_bRetainName; } - inline void setRetainName(bool retainName) { m_bRetainName = retainName; } - -private: - bool unpackPVRv2Data(unsigned char* data, unsigned int len); - bool unpackPVRv3Data(unsigned char* dataPointer, unsigned int dataLength); - bool createGLTexture(); - -protected: - struct CCPVRMipmap m_asMipmaps[CC_PVRMIPMAP_MAX]; // pointer to mipmap images - unsigned int m_uNumberOfMipmaps; // number of mipmap used - - unsigned int m_uWidth, m_uHeight; - GLuint m_uName; - bool m_bHasAlpha; - bool m_bHasPremultipliedAlpha; - bool m_bForcePremultipliedAlpha; - - // cocos2d integration - bool m_bRetainName; - CCTexture2DPixelFormat m_eFormat; - - const ccPVRTexturePixelFormatInfo *m_pPixelFormatInfo; -}; - -// end of textures group -/// @} - -NS_CC_END - - -#endif //__CCPVRTEXTURE_H__ \ No newline at end of file diff --git a/cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCParallaxNode.h b/cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCParallaxNode.h deleted file mode 100644 index b2a4e05..0000000 --- a/cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCParallaxNode.h +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2009-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCPARALLAX_NODE_H__ -#define __CCPARALLAX_NODE_H__ - -#include "base_nodes/CCNode.h" -/*#include "support/data_support/ccArray.h"*/ - -NS_CC_BEGIN - -struct _ccArray; - -/** - * @addtogroup tilemap_parallax_nodes - * @{ - */ - -/** @brief CCParallaxNode: A node that simulates a parallax scroller - -The children will be moved faster / slower than the parent according the the parallax ratio. - -*/ -class CC_DLL CCParallaxNode : public CCNode -{ - /** array that holds the offset / ratio of the children */ - CC_SYNTHESIZE(struct _ccArray *, m_pParallaxArray, ParallaxArray) - -public: - /** Adds a child to the container with a z-order, a parallax ratio and a position offset - It returns self, so you can chain several addChilds. - @since v0.8 - @js ctor - */ - CCParallaxNode(); - /** - * @js NA - * @lua NA - */ - virtual ~CCParallaxNode(); - - static CCParallaxNode * create(); - virtual void addChild(CCNode * child, unsigned int z, const CCPoint& parallaxRatio, const CCPoint& positionOffset); - // super methods - virtual void addChild(CCNode * child, unsigned int zOrder, int tag); - virtual void removeChild(CCNode* child, bool cleanup); - virtual void removeAllChildrenWithCleanup(bool cleanup); - virtual void visit(void); -private: - CCPoint absolutePosition(); -protected: - CCPoint m_tLastPosition; -}; - -// end of tilemap_parallax_nodes group -/// @} - -NS_CC_END - -#endif //__CCPARALLAX_NODE_H__ - - diff --git a/cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTMXLayer.h b/cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTMXLayer.h deleted file mode 100644 index 07acc70..0000000 --- a/cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTMXLayer.h +++ /dev/null @@ -1,229 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2009-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCTMX_LAYER_H__ -#define __CCTMX_LAYER_H__ - -#include "CCTMXObjectGroup.h" -#include "base_nodes/CCAtlasNode.h" -#include "sprite_nodes/CCSpriteBatchNode.h" -#include "CCTMXXMLParser.h" -NS_CC_BEGIN - -class CCTMXMapInfo; -class CCTMXLayerInfo; -class CCTMXTilesetInfo; -struct _ccCArray; - -/** - * @addtogroup tilemap_parallax_nodes - * @{ - */ - -/** @brief CCTMXLayer represents the TMX layer. - -It is a subclass of CCSpriteBatchNode. By default the tiles are rendered using a CCTextureAtlas. -If you modify a tile on runtime, then, that tile will become a CCSprite, otherwise no CCSprite objects are created. -The benefits of using CCSprite objects as tiles are: -- tiles (CCSprite) can be rotated/scaled/moved with a nice API - -If the layer contains a property named "cc_vertexz" with an integer (in can be positive or negative), -then all the tiles belonging to the layer will use that value as their OpenGL vertex Z for depth. - -On the other hand, if the "cc_vertexz" property has the "automatic" value, then the tiles will use an automatic vertex Z value. -Also before drawing the tiles, GL_ALPHA_TEST will be enabled, and disabled after drawing them. The used alpha func will be: - -glAlphaFunc( GL_GREATER, value ) - -"value" by default is 0, but you can change it from Tiled by adding the "cc_alpha_func" property to the layer. -The value 0 should work for most cases, but if you have tiles that are semi-transparent, then you might want to use a different -value, like 0.5. - -For further information, please see the programming guide: - -http://www.cocos2d-iphone.org/wiki/doku.php/prog_guide:tiled_maps - -@since v0.8.1 -Tiles can have tile flags for additional properties. At the moment only flip horizontal and flip vertical are used. These bit flags are defined in CCTMXXMLParser.h. - -@since 1.1 -*/ - -class CC_DLL CCTMXLayer : public CCSpriteBatchNode -{ - /** size of the layer in tiles */ - CC_SYNTHESIZE_PASS_BY_REF(CCSize, m_tLayerSize, LayerSize); - /** size of the map's tile (could be different from the tile's size) */ - CC_SYNTHESIZE_PASS_BY_REF(CCSize, m_tMapTileSize, MapTileSize); - /** pointer to the map of tiles */ - CC_SYNTHESIZE(unsigned int*, m_pTiles, Tiles); - /** Tileset information for the layer */ - CC_PROPERTY(CCTMXTilesetInfo*, m_pTileSet, TileSet); - /** Layer orientation, which is the same as the map orientation */ - CC_SYNTHESIZE(unsigned int, m_uLayerOrientation, LayerOrientation); - /** properties from the layer. They can be added using Tiled */ - CC_PROPERTY(CCDictionary*, m_pProperties, Properties); -public: - /** - * @js ctor - * @lua NA - */ - CCTMXLayer(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTMXLayer(); - - /** creates a CCTMXLayer with an tileset info, a layer info and a map info */ - static CCTMXLayer * create(CCTMXTilesetInfo *tilesetInfo, CCTMXLayerInfo *layerInfo, CCTMXMapInfo *mapInfo); - - /** initializes a CCTMXLayer with a tileset info, a layer info and a map info - * @lua NA - */ - bool initWithTilesetInfo(CCTMXTilesetInfo *tilesetInfo, CCTMXLayerInfo *layerInfo, CCTMXMapInfo *mapInfo); - - /** dealloc the map that contains the tile position from memory. - Unless you want to know at runtime the tiles positions, you can safely call this method. - If you are going to call layer->tileGIDAt() then, don't release the map - */ - void releaseMap(); - - /** returns the tile (CCSprite) at a given a tile coordinate. - The returned CCSprite will be already added to the CCTMXLayer. Don't add it again. - The CCSprite can be treated like any other CCSprite: rotated, scaled, translated, opacity, color, etc. - You can remove either by calling: - - layer->removeChild(sprite, cleanup); - - or layer->removeTileAt(ccp(x,y)); - @js getTileGIDAt - */ - CCSprite* tileAt(const CCPoint& tileCoordinate); - - /** returns the tile gid at a given tile coordinate. - if it returns 0, it means that the tile is empty. - This method requires the the tile map has not been previously released (eg. don't call layer->releaseMap()) - @js tileGIDAt - */ - unsigned int tileGIDAt(const CCPoint& tileCoordinate); - - /** returns the tile gid at a given tile coordinate. It also returns the tile flags. - This method requires the the tile map has not been previously released (eg. don't call [layer releaseMap]) - @js tileGIDAt - @lua NA - */ - unsigned int tileGIDAt(const CCPoint& tileCoordinate, ccTMXTileFlags* flags); - - /** sets the tile gid (gid = tile global id) at a given tile coordinate. - The Tile GID can be obtained by using the method "tileGIDAt" or by using the TMX editor -> Tileset Mgr +1. - If a tile is already placed at that position, then it will be removed. - */ - void setTileGID(unsigned int gid, const CCPoint& tileCoordinate); - - /** sets the tile gid (gid = tile global id) at a given tile coordinate. - The Tile GID can be obtained by using the method "tileGIDAt" or by using the TMX editor -> Tileset Mgr +1. - If a tile is already placed at that position, then it will be removed. - - Use withFlags if the tile flags need to be changed as well - */ - - void setTileGID(unsigned int gid, const CCPoint& tileCoordinate, ccTMXTileFlags flags); - - /** removes a tile at given tile coordinate */ - void removeTileAt(const CCPoint& tileCoordinate); - - /** returns the position in points of a given tile coordinate - * @js getPositionAt - */ - CCPoint positionAt(const CCPoint& tileCoordinate); - - /** return the value for the specific property name - * @js getProperty - */ - CCString *propertyNamed(const char *propertyName); - - /** Creates the tiles */ - void setupTiles(); - - /** CCTMXLayer doesn't support adding a CCSprite manually. - * @warning addchild(z, tag); is not supported on CCTMXLayer. Instead of setTileGID. - * @lua NA - */ - virtual void addChild(CCNode * child, int zOrder, int tag); - /** super method - * @lua NA - */ - void removeChild(CCNode* child, bool cleanup); - - inline const char* getLayerName(){ return m_sLayerName.c_str(); } - inline void setLayerName(const char *layerName){ m_sLayerName = layerName; } -private: - CCPoint positionForIsoAt(const CCPoint& pos); - CCPoint positionForOrthoAt(const CCPoint& pos); - CCPoint positionForHexAt(const CCPoint& pos); - - CCPoint calculateLayerOffset(const CCPoint& offset); - - /* optimization methods */ - CCSprite* appendTileForGID(unsigned int gid, const CCPoint& pos); - CCSprite* insertTileForGID(unsigned int gid, const CCPoint& pos); - CCSprite* updateTileForGID(unsigned int gid, const CCPoint& pos); - - /* The layer recognizes some special properties, like cc_vertez */ - void parseInternalProperties(); - void setupTileSprite(CCSprite* sprite, CCPoint pos, unsigned int gid); - CCSprite* reusedTileWithRect(CCRect rect); - int vertexZForPos(const CCPoint& pos); - - // index - unsigned int atlasIndexForExistantZ(unsigned int z); - unsigned int atlasIndexForNewZ(int z); -protected: - //! name of the layer - std::string m_sLayerName; - //! TMX Layer supports opacity - unsigned char m_cOpacity; - - unsigned int m_uMinGID; - unsigned int m_uMaxGID; - - //! Only used when vertexZ is used - int m_nVertexZvalue; - bool m_bUseAutomaticVertexZ; - - //! used for optimization - CCSprite *m_pReusedTile; - ccCArray *m_pAtlasIndexArray; - - // used for retina display - float m_fContentScaleFactor; -}; - -// end of tilemap_parallax_nodes group -/// @} - -NS_CC_END - -#endif //__CCTMX_LAYER_H__ - diff --git a/cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTMXObjectGroup.h b/cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTMXObjectGroup.h deleted file mode 100644 index ae30fc4..0000000 --- a/cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTMXObjectGroup.h +++ /dev/null @@ -1,84 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2010 Neophit -Copyright (c) 2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCTMX_OBJECT_GROUP_H__ -#define __CCTMX_OBJECT_GROUP_H__ - -#include "cocoa/CCGeometry.h" -#include "cocoa/CCString.h" -#include "cocoa/CCArray.h" -#include "cocoa/CCDictionary.h" - -NS_CC_BEGIN - -/** - * @addtogroup tilemap_parallax_nodes - * @{ - */ - -/** @brief CCTMXObjectGroup represents the TMX object group. -@since v0.99.0 -*/ -class CC_DLL CCTMXObjectGroup : public CCObject -{ - /** offset position of child objects */ - CC_SYNTHESIZE_PASS_BY_REF(CCPoint, m_tPositionOffset, PositionOffset); - /** list of properties stored in a dictionary */ - CC_PROPERTY(CCDictionary*, m_pProperties, Properties); - /** array of the objects */ - CC_PROPERTY(CCArray*, m_pObjects, Objects); -public: - /** - * @js ctor - */ - CCTMXObjectGroup(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTMXObjectGroup(); - - inline const char* getGroupName(){ return m_sGroupName.c_str(); } - inline void setGroupName(const char *groupName){ m_sGroupName = groupName; } - - /** return the value for the specific property name */ - CCString *propertyNamed(const char* propertyName); - - /** return the dictionary for the specific object name. - It will return the 1st object found on the array for the given name. - */ - CCDictionary* objectNamed(const char *objectName); -protected: - /** name of the group */ - std::string m_sGroupName; -}; - -// end of tilemap_parallax_nodes group -/// @} - -NS_CC_END - -#endif //__CCTMX_OBJECT_GROUP_H__ \ No newline at end of file diff --git a/cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTMXTiledMap.h b/cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTMXTiledMap.h deleted file mode 100644 index ac385ce..0000000 --- a/cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTMXTiledMap.h +++ /dev/null @@ -1,179 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2009-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCTMX_TILE_MAP_H__ -#define __CCTMX_TILE_MAP_H__ - -#include "base_nodes/CCNode.h" -#include "CCTMXObjectGroup.h" - -NS_CC_BEGIN - -class CCTMXObjectGroup; -class CCTMXLayer; -class CCTMXLayerInfo; -class CCTMXTilesetInfo; -class CCTMXMapInfo; - -/** - * @addtogroup tilemap_parallax_nodes - * @{ - */ - -/** Possible orientations of the TMX map */ -enum -{ - /** Orthogonal orientation */ - CCTMXOrientationOrtho, - - /** Hexagonal orientation */ - CCTMXOrientationHex, - - /** Isometric orientation */ - CCTMXOrientationIso, -}; - -/** @brief CCTMXTiledMap knows how to parse and render a TMX map. - -It adds support for the TMX tiled map format used by http://www.mapeditor.org -It supports isometric, hexagonal and orthogonal tiles. -It also supports object groups, objects, and properties. - -Features: -- Each tile will be treated as an CCSprite -- The sprites are created on demand. They will be created only when you call "layer->tileAt(position)" -- Each tile can be rotated / moved / scaled / tinted / "opaqued", since each tile is a CCSprite -- Tiles can be added/removed in runtime -- The z-order of the tiles can be modified in runtime -- Each tile has an anchorPoint of (0,0) -- The anchorPoint of the TMXTileMap is (0,0) -- The TMX layers will be added as a child -- The TMX layers will be aliased by default -- The tileset image will be loaded using the CCTextureCache -- Each tile will have a unique tag -- Each tile will have a unique z value. top-left: z=1, bottom-right: z=max z -- Each object group will be treated as an CCMutableArray -- Object class which will contain all the properties in a dictionary -- Properties can be assigned to the Map, Layer, Object Group, and Object - -Limitations: -- It only supports one tileset per layer. -- Embedded images are not supported -- It only supports the XML format (the JSON format is not supported) - -Technical description: -Each layer is created using an CCTMXLayer (subclass of CCSpriteBatchNode). If you have 5 layers, then 5 CCTMXLayer will be created, -unless the layer visibility is off. In that case, the layer won't be created at all. -You can obtain the layers (CCTMXLayer objects) at runtime by: -- map->getChildByTag(tag_number); // 0=1st layer, 1=2nd layer, 2=3rd layer, etc... -- map->layerNamed(name_of_the_layer); - -Each object group is created using a CCTMXObjectGroup which is a subclass of CCMutableArray. -You can obtain the object groups at runtime by: -- map->objectGroupNamed(name_of_the_object_group); - -Each object is a CCTMXObject. - -Each property is stored as a key-value pair in an CCMutableDictionary. -You can obtain the properties at runtime by: - -map->propertyNamed(name_of_the_property); -layer->propertyNamed(name_of_the_property); -objectGroup->propertyNamed(name_of_the_property); -object->propertyNamed(name_of_the_property); - -@since v0.8.1 -*/ -class CC_DLL CCTMXTiledMap : public CCNode -{ - /** the map's size property measured in tiles */ - CC_SYNTHESIZE_PASS_BY_REF(CCSize, m_tMapSize, MapSize); - /** the tiles's size property measured in pixels */ - CC_SYNTHESIZE_PASS_BY_REF(CCSize, m_tTileSize, TileSize); - /** map orientation */ - CC_SYNTHESIZE(int, m_nMapOrientation, MapOrientation); - /** object groups */ - CC_PROPERTY(CCArray*, m_pObjectGroups, ObjectGroups); - /** properties */ - CC_PROPERTY(CCDictionary*, m_pProperties, Properties); -public: - /** - * @js ctor - */ - CCTMXTiledMap(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTMXTiledMap(); - - /** creates a TMX Tiled Map with a TMX file.*/ - static CCTMXTiledMap* create(const char *tmxFile); - - /** initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources */ - static CCTMXTiledMap* createWithXML(const char* tmxString, const char* resourcePath); - - /** initializes a TMX Tiled Map with a TMX file */ - bool initWithTMXFile(const char *tmxFile); - - /** initializes a TMX Tiled Map with a TMX formatted XML string and a path to TMX resources */ - bool initWithXML(const char* tmxString, const char* resourcePath); - - /** return the TMXLayer for the specific layer - * @js getLayer - */ - CCTMXLayer* layerNamed(const char *layerName); - - /** return the TMXObjectGroup for the specific group - * @js getObjectGroup - */ - CCTMXObjectGroup* objectGroupNamed(const char *groupName); - - /** return the value for the specific property name - * @js getProperty - */ - CCString *propertyNamed(const char *propertyName); - - /** return properties dictionary for tile GID */ - CCDictionary* propertiesForGID(int GID); - -private: - CCTMXLayer * parseLayer(CCTMXLayerInfo *layerInfo, CCTMXMapInfo *mapInfo); - CCTMXTilesetInfo * tilesetForLayer(CCTMXLayerInfo *layerInfo, CCTMXMapInfo *mapInfo); - void buildWithMapInfo(CCTMXMapInfo* mapInfo); -protected: - //! tile properties - CCDictionary* m_pTileProperties; - -}; - -// end of tilemap_parallax_nodes group -/// @} - -NS_CC_END - -#endif //__CCTMX_TILE_MAP_H__ - - diff --git a/cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTMXXMLParser.h b/cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTMXXMLParser.h deleted file mode 100644 index cdcb332..0000000 --- a/cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTMXXMLParser.h +++ /dev/null @@ -1,241 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2009-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - - -#ifndef __CC_TM_XML_PARSER__ -#define __CC_TM_XML_PARSER__ - -#include "cocoa/CCArray.h" -#include "cocoa/CCDictionary.h" -#include "cocoa/CCGeometry.h" -#include "platform/CCSAXParser.h" - -#include - -NS_CC_BEGIN - -class CCTMXObjectGroup; - -/** @file -* Internal TMX parser -* -* IMPORTANT: These classed should not be documented using doxygen strings -* since the user should not use them. -* -*/ - -/** - * @addtogroup tilemap_parallax_nodes - * @{ - */ - -enum { - TMXLayerAttribNone = 1 << 0, - TMXLayerAttribBase64 = 1 << 1, - TMXLayerAttribGzip = 1 << 2, - TMXLayerAttribZlib = 1 << 3, -}; - -enum { - TMXPropertyNone, - TMXPropertyMap, - TMXPropertyLayer, - TMXPropertyObjectGroup, - TMXPropertyObject, - TMXPropertyTile -}; - -typedef enum ccTMXTileFlags_ { - kCCTMXTileHorizontalFlag = 0x80000000, - kCCTMXTileVerticalFlag = 0x40000000, - kCCTMXTileDiagonalFlag = 0x20000000, - kCCFlipedAll = (kCCTMXTileHorizontalFlag|kCCTMXTileVerticalFlag|kCCTMXTileDiagonalFlag), - kCCFlippedMask = ~(kCCFlipedAll) -} ccTMXTileFlags; - -// Bits on the far end of the 32-bit global tile ID (GID's) are used for tile flags - -/** @brief CCTMXLayerInfo contains the information about the layers like: -- Layer name -- Layer size -- Layer opacity at creation time (it can be modified at runtime) -- Whether the layer is visible (if it's not visible, then the CocosNode won't be created) - -This information is obtained from the TMX file. -*/ -class CC_DLL CCTMXLayerInfo : public CCObject -{ - CC_PROPERTY(CCDictionary*, m_pProperties, Properties); -public: - std::string m_sName; - CCSize m_tLayerSize; - unsigned int *m_pTiles; - bool m_bVisible; - unsigned char m_cOpacity; - bool m_bOwnTiles; - unsigned int m_uMinGID; - unsigned int m_uMaxGID; - CCPoint m_tOffset; -public: - CCTMXLayerInfo(); - virtual ~CCTMXLayerInfo(); -}; - -/** @brief CCTMXTilesetInfo contains the information about the tilesets like: -- Tileset name -- Tileset spacing -- Tileset margin -- size of the tiles -- Image used for the tiles -- Image size - -This information is obtained from the TMX file. -*/ -class CC_DLL CCTMXTilesetInfo : public CCObject -{ -public: - std::string m_sName; - unsigned int m_uFirstGid; - CCSize m_tTileSize; - unsigned int m_uSpacing; - unsigned int m_uMargin; - //! filename containing the tiles (should be spritesheet / texture atlas) - std::string m_sSourceImage; - //! size in pixels of the image - CCSize m_tImageSize; -public: - CCTMXTilesetInfo(); - virtual ~CCTMXTilesetInfo(); - CCRect rectForGID(unsigned int gid); -}; - -/** @brief CCTMXMapInfo contains the information about the map like: -- Map orientation (hexagonal, isometric or orthogonal) -- Tile size -- Map size - -And it also contains: -- Layers (an array of TMXLayerInfo objects) -- Tilesets (an array of TMXTilesetInfo objects) -- ObjectGroups (an array of TMXObjectGroupInfo objects) - -This information is obtained from the TMX file. - -*/ -class CC_DLL CCTMXMapInfo : public CCObject, public CCSAXDelegator -{ -public: - /// map orientation - CC_SYNTHESIZE(int, m_nOrientation, Orientation); - /// map width & height - CC_SYNTHESIZE_PASS_BY_REF(CCSize, m_tMapSize, MapSize); - /// tiles width & height - CC_SYNTHESIZE_PASS_BY_REF(CCSize, m_tTileSize, TileSize); - /// Layers - CC_PROPERTY(CCArray*, m_pLayers, Layers); - /// tilesets - CC_PROPERTY(CCArray*, m_pTilesets, Tilesets); - /// ObjectGroups - CC_PROPERTY(CCArray*, m_pObjectGroups, ObjectGroups); - /// parent element - CC_SYNTHESIZE(int, m_nParentElement, ParentElement); - /// parent GID - CC_SYNTHESIZE(unsigned int, m_uParentGID, ParentGID); - /// layer attribs - CC_SYNTHESIZE(int, m_nLayerAttribs, LayerAttribs); - /// is storing characters? - CC_SYNTHESIZE(bool, m_bStoringCharacters, StoringCharacters); - /// properties - CC_PROPERTY(CCDictionary*, m_pProperties, Properties); -public: - /** - * @js ctor - * @lua NA - */ - CCTMXMapInfo(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTMXMapInfo(); - /** creates a TMX Format with a tmx file */ - static CCTMXMapInfo * formatWithTMXFile(const char *tmxFile); - /** creates a TMX Format with an XML string and a TMX resource path */ - static CCTMXMapInfo * formatWithXML(const char* tmxString, const char* resourcePath); - /** initializes a TMX format with a tmx file - * @lua NA - */ - bool initWithTMXFile(const char *tmxFile); - /** initializes a TMX format with an XML string and a TMX resource path - * @lua NA - */ - bool initWithXML(const char* tmxString, const char* resourcePath); - /** initializes parsing of an XML file, either a tmx (Map) file or tsx (Tileset) file */ - bool parseXMLFile(const char *xmlFilename); - /* initializes parsing of an XML string, either a tmx (Map) string or tsx (Tileset) string */ - bool parseXMLString(const char *xmlString); - - CCDictionary* getTileProperties(); - void setTileProperties(CCDictionary* tileProperties); - - /** implement pure virtual methods of CCSAXDelegator - * @js NA - */ - void startElement(void *ctx, const char *name, const char **atts); - /** - * @js NA - */ - void endElement(void *ctx, const char *name); - /** - * @js NA - */ - void textHandler(void *ctx, const char *ch, int len); - - inline const char* getCurrentString(){ return m_sCurrentString.c_str(); } - inline void setCurrentString(const char *currentString){ m_sCurrentString = currentString; } - inline const char* getTMXFileName(){ return m_sTMXFileName.c_str(); } - inline void setTMXFileName(const char *fileName){ m_sTMXFileName = fileName; } -private: - void internalInit(const char* tmxFileName, const char* resourcePath); -protected: - //! tmx filename - std::string m_sTMXFileName; - // tmx resource path - std::string m_sResources; - //! current string - std::string m_sCurrentString; - //! tile properties - CCDictionary* m_pTileProperties; - unsigned int m_uCurrentFirstGID; -}; - -// end of tilemap_parallax_nodes group -/// @} - -NS_CC_END - -#endif - diff --git a/cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTileMapAtlas.h b/cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTileMapAtlas.h deleted file mode 100644 index 6534854..0000000 --- a/cappuccino-sdk/incl/cocos2dx/tilemap_parallax_nodes/CCTileMapAtlas.h +++ /dev/null @@ -1,111 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2008-2010 Ricardo Quesada -Copyright (c) 2011 Zynga Inc. - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCTILE_MAP_ATLAS__ -#define __CCTILE_MAP_ATLAS__ - - -#include "base_nodes/CCAtlasNode.h" - -NS_CC_BEGIN - -struct sImageTGA; -class CCDictionary; - -/** - * @addtogroup tilemap_parallax_nodes - * @{ - */ - -/** @brief CCTileMapAtlas is a subclass of CCAtlasNode. - -It knows how to render a map based of tiles. -The tiles must be in a .PNG format while the map must be a .TGA file. - -For more information regarding the format, please see this post: -http://www.cocos2d-iphone.org/archives/27 - -All features from CCAtlasNode are valid in CCTileMapAtlas - -IMPORTANT: -This class is deprecated. It is maintained for compatibility reasons only. -You SHOULD not use this class. -Instead, use the newer TMX file format: CCTMXTiledMap -*/ -class CC_DLL CCTileMapAtlas : public CCAtlasNode -{ - /** TileMap info */ - CC_PROPERTY(struct sImageTGA*, m_pTGAInfo, TGAInfo); -public: - /** - * @js ctor - */ - CCTileMapAtlas(); - /** - * @js NA - * @lua NA - */ - virtual ~CCTileMapAtlas(); - - /** creates a CCTileMap with a tile file (atlas) with a map file and the width and height of each tile in points. - The tile file will be loaded using the TextureMgr. - */ - static CCTileMapAtlas * create(const char *tile, const char *mapFile, int tileWidth, int tileHeight); - - /** initializes a CCTileMap with a tile file (atlas) with a map file and the width and height of each tile in points. - The file will be loaded using the TextureMgr. - */ - bool initWithTileFile(const char *tile, const char *mapFile, int tileWidth, int tileHeight); - /** returns a tile from position x,y. - For the moment only channel R is used - @js getTileAt - */ - ccColor3B tileAt(const CCPoint& position); - /** sets a tile at position x,y. - For the moment only channel R is used - */ - void setTile(const ccColor3B& tile, const CCPoint& position); - /** dealloc the map from memory */ - void releaseMap(); -private: - void loadTGAfile(const char *file); - void calculateItemsToRender(); - void updateAtlasValueAt(const CCPoint& pos, const ccColor3B& value, unsigned int index); - void updateAtlasValues(); - -protected: - //! x,y to atlas dictionary - CCDictionary* m_pPosToAtlasIndex; - //! numbers of tiles to render - int m_nItemsToRender; -}; - -// end of tilemap_parallax_nodes group -/// @} - -NS_CC_END - -#endif //__CCTILE_MAP_ATLAS__ - diff --git a/cappuccino-sdk/incl/cocos2dx/touch_dispatcher/CCTouch.h b/cappuccino-sdk/incl/cocos2dx/touch_dispatcher/CCTouch.h deleted file mode 100644 index fe5ab9b..0000000 --- a/cappuccino-sdk/incl/cocos2dx/touch_dispatcher/CCTouch.h +++ /dev/null @@ -1,101 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_TOUCH_H__ -#define __CC_TOUCH_H__ - -#include "cocoa/CCObject.h" -#include "cocoa/CCGeometry.h" - -NS_CC_BEGIN - -/** - * @addtogroup input - * @{ - */ - -class CC_DLL CCTouch : public CCObject -{ -public: - /** - * @js ctor - */ - CCTouch() - : m_nId(0), - m_startPointCaptured(false) - {} - - /** returns the current touch location in OpenGL coordinates */ - CCPoint getLocation() const; - /** returns the previous touch location in OpenGL coordinates */ - CCPoint getPreviousLocation() const; - /** returns the start touch location in OpenGL coordinates */ - CCPoint getStartLocation() const; - /** returns the delta of 2 current touches locations in screen coordinates */ - CCPoint getDelta() const; - /** returns the current touch location in screen coordinates */ - CCPoint getLocationInView() const; - /** returns the previous touch location in screen coordinates */ - CCPoint getPreviousLocationInView() const; - /** returns the start touch location in screen coordinates */ - CCPoint getStartLocationInView() const; - - void setTouchInfo(int id, float x, float y) - { - m_nId = id; - m_prevPoint = m_point; - m_point.x = x; - m_point.y = y; - if (!m_startPointCaptured) - { - m_startPoint = m_point; - m_startPointCaptured = true; - } - } - /** - * @js getId - */ - int getID() const - { - return m_nId; - } - -private: - int m_nId; - bool m_startPointCaptured; - CCPoint m_startPoint; - CCPoint m_point; - CCPoint m_prevPoint; -}; - -class CC_DLL CCEvent : public CCObject -{ -}; - -// end of input group -/// @} - -NS_CC_END - -#endif // __PLATFORM_TOUCH_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/touch_dispatcher/CCTouchDelegateProtocol.h b/cappuccino-sdk/incl/cocos2dx/touch_dispatcher/CCTouchDelegateProtocol.h deleted file mode 100644 index b2d4294..0000000 --- a/cappuccino-sdk/incl/cocos2dx/touch_dispatcher/CCTouchDelegateProtocol.h +++ /dev/null @@ -1,121 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2009 Valentin Milea - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __TOUCH_DISPATHCHER_CCTOUCH_DELEGATE_PROTOCOL_H__ -#define __TOUCH_DISPATHCHER_CCTOUCH_DELEGATE_PROTOCOL_H__ - -#include "cocoa/CCObject.h" -#include "ccConfig.h" - -NS_CC_BEGIN - -class CCTouch; -class CCEvent; -class CCSet; -class CCTouchDispatcher; - -/** - * @addtogroup input - * @{ - * @js NA - * @lua NA - */ - -class CC_DLL CCTouchDelegate -{ -public: - - CCTouchDelegate() {} - - virtual ~CCTouchDelegate() - { - } - - virtual bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent) {CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pEvent); return false;}; - // optional - - virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent) {CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pEvent);} - virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent) {CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pEvent);} - virtual void ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent) {CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pEvent);} - - // optional - virtual void ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent) {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);} - virtual void ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent) {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);} - virtual void ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent) {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);} - virtual void ccTouchesCancelled(CCSet *pTouches, CCEvent *pEvent) {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);} - -}; -/** - @brief - Using this type of delegate results in two benefits: - - 1. You don't need to deal with CCSets, the dispatcher does the job of splitting - them. You get exactly one UITouch per call. - - 2. You can *claim* a UITouch by returning YES in ccTouchBegan. Updates of claimed - touches are sent only to the delegate(s) that claimed them. So if you get a move/ - ended/canceled update you're sure it's your touch. This frees you from doing a - lot of checks when doing multi-touch. - - (The name TargetedTouchDelegate relates to updates "targeting" their specific - handler, without bothering the other handlers.) - @since v0.8 - @js NA - @lua NA - */ - class CC_DLL CCTargetedTouchDelegate : public CCTouchDelegate - { - public: - /** Return YES to claim the touch. - @since v0 - */ - virtual bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent) { CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pEvent);return false;}; - - // optional - virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent) {CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pEvent);} - virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent) {CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pEvent);} - virtual void ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent) {CC_UNUSED_PARAM(pTouch); CC_UNUSED_PARAM(pEvent);} - }; - -/** @brief - This type of delegate is the same one used by CocoaTouch. You will receive all the events (Began,Moved,Ended,Canceled). - @since v0.8 - @js NA - @lua NA - */ - class CC_DLL CCStandardTouchDelegate : public CCTouchDelegate - { - public: - // optional - virtual void ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent) {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);} - virtual void ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent) {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);} - virtual void ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent) {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);} - virtual void ccTouchesCancelled(CCSet *pTouches, CCEvent *pEvent) {CC_UNUSED_PARAM(pTouches); CC_UNUSED_PARAM(pEvent);} - }; - -// end of input group -/// @} - -NS_CC_END - -#endif // __TOUCH_DISPATHCHER_CCTOUCH_DELEGATE_PROTOCOL_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/touch_dispatcher/CCTouchDispatcher.h b/cappuccino-sdk/incl/cocos2dx/touch_dispatcher/CCTouchDispatcher.h deleted file mode 100644 index b1e374b..0000000 --- a/cappuccino-sdk/incl/cocos2dx/touch_dispatcher/CCTouchDispatcher.h +++ /dev/null @@ -1,227 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2009 Valentin Milea - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __TOUCH_DISPATCHER_CCTOUCH_DISPATCHER_H__ -#define __TOUCH_DISPATCHER_CCTOUCH_DISPATCHER_H__ - -#include "CCTouchDelegateProtocol.h" -#include "cocoa/CCObject.h" -#include "cocoa/CCArray.h" - -NS_CC_BEGIN - -/** - * @addtogroup input - * @{ - */ - -typedef enum -{ - ccTouchSelectorBeganBit = 1 << 0, - ccTouchSelectorMovedBit = 1 << 1, - ccTouchSelectorEndedBit = 1 << 2, - ccTouchSelectorCancelledBit = 1 << 3, - ccTouchSelectorAllBits = ( ccTouchSelectorBeganBit | ccTouchSelectorMovedBit | ccTouchSelectorEndedBit | ccTouchSelectorCancelledBit), -} ccTouchSelectorFlag; - - -enum { - CCTOUCHBEGAN, - CCTOUCHMOVED, - CCTOUCHENDED, - CCTOUCHCANCELLED, - - ccTouchMax, -}; - -class CCSet; -class CCEvent; - -struct ccTouchHandlerHelperData { - // we only use the type -// void (StandardTouchDelegate::*touchesSel)(CCSet*, CCEvent*); -// void (TargetedTouchDelegate::*touchSel)(NSTouch*, CCEvent*); - int m_type; -}; - -/** - * @js NA - */ -class CC_DLL EGLTouchDelegate -{ -public: - /** - * @lua NA - */ - virtual void touchesBegan(CCSet* touches, CCEvent* pEvent) = 0; - /** - * @lua NA - */ - virtual void touchesMoved(CCSet* touches, CCEvent* pEvent) = 0; - /** - * @lua NA - */ - virtual void touchesEnded(CCSet* touches, CCEvent* pEvent) = 0; - /** - * @lua NA - */ - virtual void touchesCancelled(CCSet* touches, CCEvent* pEvent) = 0; - /** - * @lua NA - */ - virtual ~EGLTouchDelegate() {} -}; - -class CCTouchHandler; -struct _ccCArray; -/** @brief CCTouchDispatcher. - Singleton that handles all the touch events. - The dispatcher dispatches events to the registered TouchHandlers. - There are 2 different type of touch handlers: - - Standard Touch Handlers - - Targeted Touch Handlers - - The Standard Touch Handlers work like the CocoaTouch touch handler: a set of touches is passed to the delegate. - On the other hand, the Targeted Touch Handlers only receive 1 touch at the time, and they can "swallow" touches (avoid the propagation of the event). - - Firstly, the dispatcher sends the received touches to the targeted touches. - These touches can be swallowed by the Targeted Touch Handlers. If there are still remaining touches, then the remaining touches will be sent - to the Standard Touch Handlers. - - @since v0.8.0 - @js NA - */ -class CC_DLL CCTouchDispatcher : public CCObject, public EGLTouchDelegate -{ -public: - /** - * @lua NA - */ - ~CCTouchDispatcher(); - /** - * @lua NA - */ - bool init(void); - /** - * @lua NA - */ - CCTouchDispatcher() - : m_pTargetedHandlers(NULL) - , m_pStandardHandlers(NULL) - , m_pHandlersToAdd(NULL) - , m_pHandlersToRemove(NULL) - - {} - -public: - /** Whether or not the events are going to be dispatched. Default: true */ - bool isDispatchEvents(void); - void setDispatchEvents(bool bDispatchEvents); - - /** Adds a standard touch delegate to the dispatcher's list. - * See StandardTouchDelegate description. - * IMPORTANT: The delegate will be retained. - * @lua NA - */ - void addStandardDelegate(CCTouchDelegate *pDelegate, int nPriority); - - /** Adds a targeted touch delegate to the dispatcher's list. - * See TargetedTouchDelegate description. - * IMPORTANT: The delegate will be retained. - * @lua NA - */ - void addTargetedDelegate(CCTouchDelegate *pDelegate, int nPriority, bool bSwallowsTouches); - - /** Removes a touch delegate. - * The delegate will be released - * @lua NA - */ - void removeDelegate(CCTouchDelegate *pDelegate); - - /** Removes all touch delegates, releasing all the delegates - * @lua NA - */ - void removeAllDelegates(void); - - /** Changes the priority of a previously added delegate. The lower the number, - * the higher the priority - * @lua NA - */ - void setPriority(int nPriority, CCTouchDelegate *pDelegate); - /** - * @lua NA - */ - void touches(CCSet *pTouches, CCEvent *pEvent, unsigned int uIndex); - /** - * @lua NA - */ - virtual void touchesBegan(CCSet* touches, CCEvent* pEvent); - /** - * @lua NA - */ - virtual void touchesMoved(CCSet* touches, CCEvent* pEvent); - /** - * @lua NA - */ - virtual void touchesEnded(CCSet* touches, CCEvent* pEvent); - /** - * @lua NA - */ - virtual void touchesCancelled(CCSet* touches, CCEvent* pEvent); - -public: - /** - * @lua NA - */ - CCTouchHandler* findHandler(CCTouchDelegate *pDelegate); -protected: - void forceRemoveDelegate(CCTouchDelegate *pDelegate); - void forceAddHandler(CCTouchHandler *pHandler, CCArray* pArray); - void forceRemoveAllDelegates(void); - void rearrangeHandlers(CCArray* pArray); - CCTouchHandler* findHandler(CCArray* pArray, CCTouchDelegate *pDelegate); - -protected: - CCArray* m_pTargetedHandlers; - CCArray* m_pStandardHandlers; - - bool m_bLocked; - bool m_bToAdd; - bool m_bToRemove; - CCArray* m_pHandlersToAdd; - struct _ccCArray *m_pHandlersToRemove; - bool m_bToQuit; - bool m_bDispatchEvents; - - // 4, 1 for each type of event - struct ccTouchHandlerHelperData m_sHandlerHelperData[ccTouchMax]; -}; - -// end of input group -/// @} - -NS_CC_END - -#endif // __TOUCH_DISPATCHER_CCTOUCH_DISPATCHER_H__ diff --git a/cappuccino-sdk/incl/cocos2dx/touch_dispatcher/CCTouchHandler.h b/cappuccino-sdk/incl/cocos2dx/touch_dispatcher/CCTouchHandler.h deleted file mode 100644 index 169f431..0000000 --- a/cappuccino-sdk/incl/cocos2dx/touch_dispatcher/CCTouchHandler.h +++ /dev/null @@ -1,129 +0,0 @@ -/**************************************************************************** -Copyright (c) 2010-2012 cocos2d-x.org -Copyright (c) 2009 Valentin Milea - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __TOUCH_DISPATCHER_CCTOUCH_HANDLER_H__ -#define __TOUCH_DISPATCHER_CCTOUCH_HANDLER_H__ - -#include "CCTouchDelegateProtocol.h" -#include "CCTouchDispatcher.h" -#include "cocoa/CCObject.h" -#include "cocoa/CCSet.h" - -NS_CC_BEGIN - -/** - * @addtogroup input - * @{ - */ - -/** - CCTouchHandler - Object than contains the delegate and priority of the event handler. - @js NA - @lua NA -*/ -class CC_DLL CCTouchHandler : public CCObject -{ -public: - virtual ~CCTouchHandler(void); - - /** delegate */ - CCTouchDelegate* getDelegate(); - void setDelegate(CCTouchDelegate *pDelegate); - - /** priority */ - int getPriority(void); - void setPriority(int nPriority); - - /** enabled selectors */ - int getEnabledSelectors(void); - void setEnalbedSelectors(int nValue); - - /** initializes a TouchHandler with a delegate and a priority */ - virtual bool initWithDelegate(CCTouchDelegate *pDelegate, int nPriority); - -public: - /** allocates a TouchHandler with a delegate and a priority */ - static CCTouchHandler* handlerWithDelegate(CCTouchDelegate *pDelegate, int nPriority); - -protected: - CCTouchDelegate *m_pDelegate; - int m_nPriority; - int m_nEnabledSelectors; -}; - -/** CCStandardTouchHandler - It forwards each event to the delegate. - @js NA - @lua NA - */ -class CC_DLL CCStandardTouchHandler : public CCTouchHandler -{ -public: - /** initializes a TouchHandler with a delegate and a priority */ - virtual bool initWithDelegate(CCTouchDelegate *pDelegate, int nPriority); - -public: - /** allocates a TouchHandler with a delegate and a priority */ - static CCStandardTouchHandler* handlerWithDelegate(CCTouchDelegate *pDelegate, int nPriority); -}; - -/** - CCTargetedTouchHandler - Object than contains the claimed touches and if it swallows touches. - Used internally by TouchDispatcher - @js NA - @lua NA - */ -class CC_DLL CCTargetedTouchHandler : public CCTouchHandler -{ -public: - ~CCTargetedTouchHandler(void); - - /** whether or not the touches are swallowed */ - bool isSwallowsTouches(void); - void setSwallowsTouches(bool bSwallowsTouches); - - /** MutableSet that contains the claimed touches */ - CCSet* getClaimedTouches(void); - - /** initializes a TargetedTouchHandler with a delegate, a priority and whether or not it swallows touches or not */ - bool initWithDelegate(CCTouchDelegate *pDelegate, int nPriority, bool bSwallow); - -public: - /** allocates a TargetedTouchHandler with a delegate, a priority and whether or not it swallows touches or not */ - static CCTargetedTouchHandler* handlerWithDelegate(CCTouchDelegate *pDelegate, int nPriority, bool bSwallow); - -protected: - bool m_bSwallowsTouches; - CCSet *m_pClaimedTouches; -}; - -// end of input group -/// @} - -NS_CC_END - -#endif // __TOUCH_DISPATCHER_CCTOUCH_HANDLER_H__ diff --git a/cappuccino-sdk/incl/extensions/AssetsManager/AssetsManager.h b/cappuccino-sdk/incl/extensions/AssetsManager/AssetsManager.h deleted file mode 100644 index bad245a..0000000 --- a/cappuccino-sdk/incl/extensions/AssetsManager/AssetsManager.h +++ /dev/null @@ -1,221 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - Copyright (c) Microsoft Open Technologies, Inc. - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __AssetsManager__ -#define __AssetsManager__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" - -#if (CC_TARGET_PLATFORM != CC_PLATFORM_WINRT) && (CC_TARGET_PLATFORM != CC_PLATFORM_WP8) -#include -#include -#include - -NS_CC_EXT_BEGIN - -class AssetsManagerDelegateProtocol; - -/* - * This class is used to auto update resources, such as pictures or scripts. - * The updated package should be a zip file. And there should be a file named - * version in the server, which contains version code. - * @js NA - * @lua NA - */ -class AssetsManager -{ -public: - enum ErrorCode - { - // Error caused by creating a file to store downloaded data - kCreateFile, - /** Error caused by network - -- network unavaivable - -- timeout - -- ... - */ - kNetwork, - /** There is not a new version - */ - kNoNewVersion, - /** Error caused in uncompressing stage - -- can not open zip file - -- can not read file global information - -- can not read file information - -- can not create a directory - -- ... - */ - kUncompress, - }; - - /* @brief Creates a AssetsManager with new package url, version code url and storage path. - * - * @param packageUrl URL of new package, the package should be a zip file. - * @param versionFileUrl URL of version file. It should contain version code of new package. - * @param storagePath The path to store downloaded resources. - */ - AssetsManager(const char* packageUrl = NULL, const char* versionFileUrl = NULL, const char* storagePath = NULL); - - virtual ~AssetsManager(); - - /* @brief Check out if there is a new version resource. - * You may use this method before updating, then let user determine whether - * he wants to update resources. - */ - virtual bool checkUpdate(); - - /* @brief Download new package if there is a new version, and uncompress downloaded zip file. - * Ofcourse it will set search path that stores downloaded files. - */ - virtual void update(); - - /* @brief Gets url of package. - */ - const char* getPackageUrl() const; - - /* @brief Sets package url. - */ - void setPackageUrl(const char* packageUrl); - - /* @brief Gets version file url. - */ - const char* getVersionFileUrl() const; - - /* @brief Gets version file url. - */ - void setVersionFileUrl(const char* versionFileUrl); - - /* @brief Gets current version code. - */ - std::string getVersion(); - - /* @brief Deletes recorded version code. - */ - void deleteVersion(); - - /* @brief Gets storage path. - */ - const char* getStoragePath() const; - - /* @brief Sets storage path. - * - * @param storagePath The path to store downloaded resources. - * @warm The path should be a valid path. - */ - void setStoragePath(const char* storagePath); - - /** @brief Sets delegate, the delegate will receive messages - */ - void setDelegate(AssetsManagerDelegateProtocol *delegate); - - /** @brief Sets connection time out in seconds - */ - void setConnectionTimeout(unsigned int timeout); - - /** @brief Gets connection time out in secondes - */ - unsigned int getConnectionTimeout(); - - /* downloadAndUncompress is the entry of a new thread - */ - friend void* assetsManagerDownloadAndUncompress(void*); - friend int assetsManagerProgressFunc(void *, double, double, double, double); - -protected: - bool downLoad(); - void checkStoragePath(); - bool uncompress(); - bool createDirectory(const char *path); - void setSearchPath(); - void sendErrorMessage(ErrorCode code); - -private: - typedef struct _Message - { - public: - _Message() : what(0), obj(NULL){} - unsigned int what; // message type - void* obj; - } Message; - - class Helper : public cocos2d::CCObject - { - public: - Helper(); - ~Helper(); - - virtual void update(float dt); - void sendMessage(Message *msg); - - private: - void handleUpdateSucceed(Message *msg); - - std::list *_messageQueue; - pthread_mutex_t _messageQueueMutex; - }; - -private: - //! The path to store downloaded resources. - std::string _storagePath; - - //! The version of downloaded resources. - std::string _version; - - std::string _packageUrl; - std::string _versionFileUrl; - - std::string _downloadedVersion; - - CURL *_curl; - Helper *_schedule; - pthread_t *_tid; - unsigned int _connectionTimeout; - - AssetsManagerDelegateProtocol *_delegate; // weak reference -}; - -class AssetsManagerDelegateProtocol -{ -public: - /* @brief Call back function for error - @param errorCode Type of error - */ - virtual void onError(AssetsManager::ErrorCode errorCode) {}; - /** @brief Call back function for recording downloading percent - @param percent How much percent downloaded - @warn This call back function just for recording downloading percent. - AssetsManager will do some other thing after downloading, you should - write code in onSuccess() after downloading. - */ - virtual void onProgress(int percent) {}; - /** @brief Call back function for success - */ - virtual void onSuccess() {}; -}; - -NS_CC_EXT_END; -#endif // CC_TARGET_PLATFORM != CC_PLATFORM_WINRT -#endif /* defined(__AssetsManager__) */ diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCBAnimationManager.h b/cappuccino-sdk/incl/extensions/CCBReader/CCBAnimationManager.h deleted file mode 100644 index 1e9dc6c..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCBAnimationManager.h +++ /dev/null @@ -1,251 +0,0 @@ -#ifndef __CCB_CCBANIMATION_MANAGER_H__ -#define __CCB_CCBANIMATION_MANAGER_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include "CCBSequence.h" -#include "CCBValue.h" -#include "CCBSequenceProperty.h" -#include "GUI/CCControlExtension/CCControl.h" - -NS_CC_EXT_BEGIN -/** - * @js NA - * @lua NA - */ -class CCBAnimationManagerDelegate -{ -public: - virtual void completedAnimationSequenceNamed(const char *name) = 0; -}; - -class CCBAnimationManager : public CCObject -{ -private: - CCArray *mSequences; - CCDictionary *mNodeSequences; - CCDictionary *mBaseValues; - int mAutoPlaySequenceId; - - CCNode *mRootNode; - - CCSize mRootContainerSize; - - CCBAnimationManagerDelegate *mDelegate; - CCBSequence *mRunningSequence; - - CCArray *mDocumentOutletNames; - CCArray *mDocumentOutletNodes; - CCArray *mDocumentCallbackNames; - CCArray *mDocumentCallbackNodes; - CCArray *mDocumentCallbackControlEvents; - CCArray *mKeyframeCallbacks; - CCDictionary *mKeyframeCallFuncs; - - std::string mDocumentControllerName; - std::string lastCompletedSequenceName; - - SEL_CallFunc mAnimationCompleteCallbackFunc; - CCObject *mTarget; - - -public: - bool jsControlled; - /** - * @js ctor - */ - CCBAnimationManager(); - /** - * @js NA - */ - ~CCBAnimationManager(); - - - CCObject *mOwner; - - virtual bool init(); - - CCArray* getSequences(); - void setSequences(CCArray* seq); - - - int getAutoPlaySequenceId(); - void setAutoPlaySequenceId(int autoPlaySequenceId); - - CCNode* getRootNode(); - void setRootNode(CCNode* pRootNode); // weak reference - - - void addDocumentCallbackNode(CCNode *node); - void addDocumentCallbackName(std::string name); - void addDocumentCallbackControlEvents(CCControlEvent eventType); - void addDocumentOutletNode(CCNode *node); - void addDocumentOutletName(std::string name); - - void setDocumentControllerName(const std::string &name); - - std::string getDocumentControllerName(); - CCArray* getDocumentCallbackNames(); - CCArray* getDocumentCallbackNodes(); - CCArray* getDocumentCallbackControlEvents(); - CCArray* getDocumentOutletNames(); - CCArray* getDocumentOutletNodes(); - std::string getLastCompletedSequenceName(); - - CCArray* getKeyframeCallbacks(); - - const CCSize& getRootContainerSize(); - void setRootContainerSize(const CCSize &rootContainerSize); - - CCBAnimationManagerDelegate* getDelegate(); - void setDelegate(CCBAnimationManagerDelegate* pDelegate); // retain - - const char* getRunningSequenceName(); - - const CCSize& getContainerSize(CCNode* pNode); - - void addNode(CCNode *pNode, CCDictionary *pSeq); - void setBaseValue(CCObject *pValue, CCNode *pNode, const char *pPropName); - void moveAnimationsFromNode(CCNode* fromNode, CCNode* toNode); - - /** @deprecated This interface will be deprecated sooner or later.*/ - CC_DEPRECATED_ATTRIBUTE void runAnimations(const char *pName, float fTweenDuration); - /** @deprecated This interface will be deprecated sooner or later.*/ - CC_DEPRECATED_ATTRIBUTE void runAnimations(const char *pName); - /** @deprecated This interface will be deprecated sooner or later.*/ - CC_DEPRECATED_ATTRIBUTE void runAnimations(int nSeqId, float fTweenDuraiton); - - void runAnimationsForSequenceNamedTweenDuration(const char *pName, float fTweenDuration); - void runAnimationsForSequenceNamed(const char *pName); - void runAnimationsForSequenceIdTweenDuration(int nSeqId, float fTweenDuraiton); - /** - * @lua NA - */ - void setAnimationCompletedCallback(CCObject *target, SEL_CallFunc callbackFunc); - - void debug(); - /** - * @js setCallFuncForJSCallbackNamed - */ - void setCallFunc(CCCallFunc *callFunc, const std::string &callbackNamed); - - CCObject* actionForCallbackChannel(CCBSequenceProperty* channel); - CCObject* actionForSoundChannel(CCBSequenceProperty* channel); - -private: - CCObject* getBaseValue(CCNode *pNode, const char* pPropName); - int getSequenceId(const char* pSequenceName); - CCBSequence* getSequence(int nSequenceId); - CCActionInterval* getAction(CCBKeyframe *pKeyframe0, CCBKeyframe *pKeyframe1, const char *pPropName, CCNode *pNode); - void setAnimatedProperty(const char *pPropName, CCNode *pNode, CCObject *pValue, float fTweenDuraion); - void setFirstFrame(CCNode *pNode, CCBSequenceProperty *pSeqProp, float fTweenDuration); - CCActionInterval* getEaseAction(CCActionInterval *pAction, int nEasingType, float fEasingOpt); - void runAction(CCNode *pNode, CCBSequenceProperty *pSeqProp, float fTweenDuration); - void sequenceCompleted(); -}; -/** - * @js NA - * @lua NA - */ -class CCBSetSpriteFrame : public CCActionInstant -{ -private: - CCSpriteFrame *mSpriteFrame; - -public: - ~CCBSetSpriteFrame(); - - /** creates a Place action with a position */ - static CCBSetSpriteFrame* create(CCSpriteFrame *pSpriteFrame); - bool initWithSpriteFrame(CCSpriteFrame *pSpriteFrame); - virtual void update(float time); - virtual CCObject* copyWithZone(CCZone *pZone); -}; - - -/** - * @js NA - * @lua NA - */ -class CCBSoundEffect : public CCActionInstant -{ -private: - std::string mSoundFile; - float mPitch, mPan, mGain; - -public: - ~CCBSoundEffect(); - - static CCBSoundEffect* actionWithSoundFile(const std::string &file, float pitch, float pan, float gain); - bool initWithSoundFile(const std::string &file, float pitch, float pan, float gain); - virtual void update(float time); - virtual CCObject* copyWithZone(CCZone *pZone); -}; - -/** - * @js NA - * @lua NA - */ -class CCBRotateTo : public CCActionInterval -{ -private: - float mStartAngle; - float mDstAngle; - float mDiffAngle; - -public: - static CCBRotateTo* create(float fDuration, float fAngle); - bool initWithDuration(float fDuration, float fAngle); - virtual void update(float time); - virtual CCObject* copyWithZone(CCZone *pZone); - virtual void startWithTarget(CCNode *pNode); -}; - -/** - * @js NA - * @lua NA - */ -class CCBRotateXTo: public CCActionInterval { -private: - float mStartAngle; - float mDstAngle; - float mDiffAngle; -public: - static CCBRotateXTo* create(float fDuration, float fAngle); - bool initWithDuration(float fDuration, float fAngle); - virtual void startWithTarget(CCNode *pNode); - virtual CCObject* copyWithZone(CCZone *pZone); - virtual void update(float time); -}; - -/** - * @js NA - * @lua NA - */ -class CCBRotateYTo: public CCActionInterval { -private: - float mStartAngle; - float mDstAngle; - float mDiffAngle; - -public: - static CCBRotateYTo* create(float fDuration, float fAngle); - bool initWithDuration(float fDuration, float fAngle); - virtual void startWithTarget(CCNode *pNode); - virtual CCObject* copyWithZone(CCZone *pZone); - virtual void update(float time); -}; - - -class CCBEaseInstant : public CCActionEase -{ -public: - static CCBEaseInstant* create(CCActionInterval *pAction); - - virtual void update(float dt); -}; - - -NS_CC_EXT_END - -#endif // __CCB_CCBANIMATION_MANAGER_H__ diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCBFileLoader.h b/cappuccino-sdk/incl/extensions/CCBReader/CCBFileLoader.h deleted file mode 100644 index 6a9a6d9..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCBFileLoader.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _CCB_CCBFILELOADER_H_ -#define _CCB_CCBFILELOADER_H_ - -#include "CCNodeLoader.h" -#include "CCBReader.h" - -NS_CC_EXT_BEGIN - -/* Forward declaration. */ -class CCBReader; -/** - * @js NA - * @lua NA - */ -class CCBFileLoader : public CCNodeLoader { - public: - virtual ~CCBFileLoader() {}; - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCBFileLoader, loader); - - protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCBFile); - - virtual void onHandlePropTypeCCBFile(CCNode * pNode, CCNode * pParent, const char * pPropertyName, CCNode * pCCBFileNode, CCBReader * pCCBReader); -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCBKeyframe.h b/cappuccino-sdk/incl/extensions/CCBReader/CCBKeyframe.h deleted file mode 100644 index a602669..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCBKeyframe.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef __CCB_KEYFRAME_H__ -#define __CCB_KEYFRAME_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" - -NS_CC_EXT_BEGIN -/** - * @js NA - * @lua NA - */ -class CCBKeyframe : public CCObject -{ -private: - CCObject *mValue; - float mTime; - int mEasingType; - float mEasingOpt; - -public: - CCBKeyframe(); - ~CCBKeyframe(); - - CCObject* getValue(); - void setValue(CCObject *pValue); // retain - - float getTime(); - void setTime(float fTime); - - int getEasingType(); - void setEasingType(int nEasingType); - - float getEasingOpt(); - void setEasingOpt(float fEasingOpt); -}; - -NS_CC_EXT_END - -#endif // __CCB_KEYFRAME_H__ diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCBMemberVariableAssigner.h b/cappuccino-sdk/incl/extensions/CCBReader/CCBMemberVariableAssigner.h deleted file mode 100644 index 2165d90..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCBMemberVariableAssigner.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef _CCB_CCBMEMBERVARIABLEASSIGNER_H_ -#define _CCB_CCBMEMBERVARIABLEASSIGNER_H_ - -#include "cocos2d.h" -#include "CCBValue.h" - -NS_CC_EXT_BEGIN - -#define CCB_MEMBERVARIABLEASSIGNER_GLUE(TARGET, MEMBERVARIABLENAME, MEMBERVARIABLETYPE, MEMBERVARIABLE) \ - if (pTarget == TARGET && 0 == strcmp(pMemberVariableName, (MEMBERVARIABLENAME))) { \ - MEMBERVARIABLETYPE pOldVar = MEMBERVARIABLE; \ - MEMBERVARIABLE = dynamic_cast(pNode); \ - CC_ASSERT(MEMBERVARIABLE); \ - if (pOldVar != MEMBERVARIABLE) { \ - CC_SAFE_RELEASE(pOldVar); \ - MEMBERVARIABLE->retain(); \ - } \ - return true; \ - } - -#define CCB_MEMBERVARIABLEASSIGNER_GLUE_WEAK(TARGET, MEMBERVARIABLENAME, MEMBERVARIABLETYPE, MEMBERVARIABLE) \ - if (pTarget == TARGET && 0 == strcmp(pMemberVariableName, MEMBERVARIABLENAME)) { \ - MEMBERVARIABLE = dynamic_cast(pNode); \ - CC_ASSERT(MEMBERVARIABLE); \ - return true; \ - } -/** - * @js NA - * @lua NA - */ -class CCBMemberVariableAssigner { - public: - virtual ~CCBMemberVariableAssigner() {}; - - /** - * The callback function of assigning member variable. - * @note The member variable must be CCNode or its subclass. - * @param pTarget The custom class. - * @param pMemberVariableName The name of the member variable. - * @param pNode The member variable. - * @return Whether the assignment was successful. - */ - virtual bool onAssignCCBMemberVariable(CCObject* pTarget, const char* pMemberVariableName, CCNode* pNode) = 0; - - /** - * The callback function of assigning custom properties. - * @note The member variable must be Integer, Float, Boolean or String. - * @param pTarget The custom class. - * @param pMemberVariableName The name of the member variable. - * @param pValue The value of the property. - * @return Whether the assignment was successful. - */ - virtual bool onAssignCCBCustomProperty(CCObject* pTarget, const char* pMemberVariableName, CCBValue* pCCBValue) { return false; }; -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCBReader.h b/cappuccino-sdk/incl/extensions/CCBReader/CCBReader.h deleted file mode 100644 index bb1c915..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCBReader.h +++ /dev/null @@ -1,440 +0,0 @@ -#ifndef _CCB_CCBREADER_H_ -#define _CCB_CCBREADER_H_ - -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include -#include -#include "CCBSequence.h" -#include "GUI/CCControlExtension/CCControl.h" - - -#define CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(T, METHOD) static T * METHOD() { \ - T * ptr = new T(); \ - if(ptr != NULL) { \ - ptr->autorelease(); \ - return ptr; \ - } \ - CC_SAFE_DELETE(ptr); \ - return NULL; \ -} - -#define CCB_STATIC_NEW_AUTORELEASE_OBJECT_WITH_INIT_METHOD(T, METHOD) static T * METHOD() { \ - T * ptr = new T(); \ - if(ptr != NULL && ptr->init()) { \ - ptr->autorelease(); \ - return ptr; \ - } \ - CC_SAFE_DELETE(ptr); \ - return NULL; \ -} - -#define kCCBVersion 5 - -enum { - kCCBPropTypePosition = 0, - kCCBPropTypeSize, - kCCBPropTypePoint, - kCCBPropTypePointLock, - kCCBPropTypeScaleLock, - kCCBPropTypeDegrees, - kCCBPropTypeInteger, - kCCBPropTypeFloat, - kCCBPropTypeFloatVar, - kCCBPropTypeCheck, - kCCBPropTypeSpriteFrame, - kCCBPropTypeTexture, - kCCBPropTypeByte, - kCCBPropTypeColor3, - kCCBPropTypeColor4FVar, - kCCBPropTypeFlip, - kCCBPropTypeBlendmode, - kCCBPropTypeFntFile, - kCCBPropTypeText, - kCCBPropTypeFontTTF, - kCCBPropTypeIntegerLabeled, - kCCBPropTypeBlock, - kCCBPropTypeAnimation, - kCCBPropTypeCCBFile, - kCCBPropTypeString, - kCCBPropTypeBlockCCControl, - kCCBPropTypeFloatScale, - kCCBPropTypeFloatXY -}; - -enum { - kCCBFloat0 = 0, - kCCBFloat1, - kCCBFloatMinus1, - kCCBFloat05, - kCCBFloatInteger, - kCCBFloatFull -}; - -enum { - kCCBPlatformAll = 0, - kCCBPlatformIOS, - kCCBPlatformMac -}; - -enum { - kCCBTargetTypeNone = 0, - kCCBTargetTypeDocumentRoot = 1, - kCCBTargetTypeOwner = 2, -}; - -enum -{ - kCCBKeyframeEasingInstant, - - kCCBKeyframeEasingLinear, - - kCCBKeyframeEasingCubicIn, - kCCBKeyframeEasingCubicOut, - kCCBKeyframeEasingCubicInOut, - - kCCBKeyframeEasingElasticIn, - kCCBKeyframeEasingElasticOut, - kCCBKeyframeEasingElasticInOut, - - kCCBKeyframeEasingBounceIn, - kCCBKeyframeEasingBounceOut, - kCCBKeyframeEasingBounceInOut, - - kCCBKeyframeEasingBackIn, - kCCBKeyframeEasingBackOut, - kCCBKeyframeEasingBackInOut, -}; - -enum -{ - kCCBPositionTypeRelativeBottomLeft, - kCCBPositionTypeRelativeTopLeft, - kCCBPositionTypeRelativeTopRight, - kCCBPositionTypeRelativeBottomRight, - kCCBPositionTypePercent, - kCCBPositionTypeMultiplyResolution, -}; - -enum -{ - kCCBSizeTypeAbsolute, - kCCBSizeTypePercent, - kCCBSizeTypeRelativeContainer, - kCCBSizeTypeHorizontalPercent, - kCCBSizeTypeVerticalPercent, - kCCBSizeTypeMultiplyResolution, -}; - -enum -{ - kCCBScaleTypeAbsolute, - kCCBScaleTypeMultiplyResolution -}; - - -NS_CC_EXT_BEGIN - -/** - * @addtogroup cocosbuilder - * @{ - * @js NA - * @lua NA - */ - -class CCBFile : public CCNode -{ -private: - CCNode *mCCBFileNode; - -public: - CCBFile(); - - static CCBFile* create(); - - CCNode* getCCBFileNode(); - void setCCBFileNode(CCNode *pNode); // retain -}; - -/* Forward declaration. */ -class CCNodeLoader; -class CCNodeLoaderLibrary; -class CCNodeLoaderListener; -class CCBMemberVariableAssigner; -class CCBSelectorResolver; -class CCBAnimationManager; -class CCData; -class CCBKeyframe; - -/** - * @brief Parse CCBI file which is generated by CocosBuilder - */ -class CCBReader : public CCObject -{ -private: - - CCData *mData; - unsigned char *mBytes; - int mCurrentByte; - int mCurrentBit; - - std::vector mStringCache; - std::set mLoadedSpriteSheets; - - CCObject *mOwner; - - CCBAnimationManager *mActionManager; //retain - CCDictionary* mActionManagers; - - std::set *mAnimatedProps; - - CCNodeLoaderLibrary *mCCNodeLoaderLibrary; - CCNodeLoaderListener *mCCNodeLoaderListener; - CCBMemberVariableAssigner *mCCBMemberVariableAssigner; - CCBSelectorResolver *mCCBSelectorResolver; - - std::vector mOwnerOutletNames; - CCArray* mOwnerOutletNodes; - CCArray* mNodesWithAnimationManagers; - CCArray* mAnimationManagersForNodes; - - std::vector mOwnerCallbackNames; - CCArray* mOwnerCallbackNodes; - CCArray* mOwnerOwnerCallbackControlEvents; - std::string mCCBRootPath; - bool hasScriptingOwner; - bool init(); -public: - - bool jsControlled; - /** - * @js NA - * @lua NA - */ - CCBReader(CCNodeLoaderLibrary *pCCNodeLoaderLibrary, CCBMemberVariableAssigner *pCCBMemberVariableAssigner = NULL, CCBSelectorResolver *pCCBSelectorResolver = NULL, CCNodeLoaderListener *pCCNodeLoaderListener = NULL); - /** - * @js NA - * @lua NA - */ - CCBReader(CCBReader *pCCBReader); - /** - * @js NA - * @lua NA - */ - virtual ~CCBReader(); - /** - * @js ctor - */ - CCBReader(); - - void setCCBRootPath(const char* pCCBRootPath); - const std::string& getCCBRootPath() const; - /** - * @js load - * @lua NA - */ - CCNode* readNodeGraphFromFile(const char *pCCBFileName); - /** - * @js load - * @lua NA - */ - CCNode* readNodeGraphFromFile(const char *pCCBFileName, CCObject *pOwner); - /** - * @js load - * @lua NA - */ - CCNode* readNodeGraphFromFile(const char *pCCBFileName, CCObject *pOwner, const CCSize &parentSize); - /** - * @js NA - * @lua NA - */ - CCNode* readNodeGraphFromData(CCData *pData, CCObject *pOwner, const CCSize &parentSize); - /** - * @js loadScene - * @lua NA - */ - CCScene* createSceneWithNodeGraphFromFile(const char *pCCBFileName); - /** - * @js loadScene - * @lua NA - */ - CCScene* createSceneWithNodeGraphFromFile(const char *pCCBFileName, CCObject *pOwner); - /** - * @js loadScene - * @lua NA - */ - CCScene* createSceneWithNodeGraphFromFile(const char *pCCBFileName, CCObject *pOwner, const CCSize &parentSize); - /** - * @js NA - * @lua NA - */ - CCBMemberVariableAssigner* getCCBMemberVariableAssigner(); - /** - * @js NA - * @lua NA - */ - CCBSelectorResolver* getCCBSelectorResolver(); - /** - * @js getActionManager - */ - CCBAnimationManager* getAnimationManager(); - /** - * @js setActionManager - */ - void setAnimationManager(CCBAnimationManager *pAnimationManager); - - /** Used in CCNodeLoader::parseProperties() - * @js NA - * @lua NA - */ - std::set* getAnimatedProperties(); - /** - * @js NA - * @lua NA - */ - std::set& getLoadedSpriteSheet(); - CCObject* getOwner(); - - /** Utility methods. - * @js NA - * @lua NA - */ - static std::string lastPathComponent(const char* pString); - /** - * @js NA - * @lua NA - */ - static std::string deletePathExtension(const char* pString); - /** - * @js NA - * @lua NA - */ - static std::string toLowerCase(const char* pCCString); - /** - * @js NA - * @lua NA - */ - static bool endsWith(const char* pString, const char* pEnding); - - /** Parse methods. - * @js NA - * @lua NA - */ - int readInt(bool pSigned); - /** - * @js NA - * @lua NA - */ - unsigned char readByte(); - /** - * @js NA - * @lua NA - */ - bool readBool(); - std::string readUTF8(); - /** - * @js NA - * @lua NA - */ - float readFloat(); - /** - * @js NA - * @lua NA - */ - std::string readCachedString(); - /** - * @js NA - * @lua NA - */ - bool isJSControlled(); - - - bool readCallbackKeyframesForSeq(CCBSequence* seq); - bool readSoundKeyframesForSeq(CCBSequence* seq); - - - - CCArray* getOwnerCallbackNames(); - CCArray* getOwnerCallbackNodes(); - CCArray* getOwnerCallbackControlEvents(); - CCArray* getOwnerOutletNames(); - CCArray* getOwnerOutletNodes(); - CCArray* getNodesWithAnimationManagers(); - CCArray* getAnimationManagersForNodes(); - /** - * @js NA - * @lua NA - */ - CCDictionary* getAnimationManagers(); - /** - * @js NA - */ - void setAnimationManagers(CCDictionary* x); // weak reference - /** - * @js NA - * @lua NA - */ - void addOwnerCallbackName(const std::string& name); - /** - * @js NA - * @lua NA - */ - void addOwnerCallbackNode(CCNode *node); - /** - * @js NA - * @lua NA - */ - void addOwnerCallbackControlEvents(CCControlEvent type); - /** - * @js NA - * @lua NA - */ - void addDocumentCallbackName(const std::string& name); - /** - * @js NA - * @lua NA - */ - void addDocumentCallbackNode(CCNode *node); - /** - * @js NA - * @lua NA - */ - void addDocumentCallbackControlEvents(CCControlEvent eventType); - /** - * @js NA - * @lua NA - */ - static float getResolutionScale(); - static void setResolutionScale(float scale); - /** - * @js NA - * @lua NA - */ - CCNode* readFileWithCleanUp(bool bCleanUp, CCDictionary* am); - - void addOwnerOutletName(std::string name); - void addOwnerOutletNode(CCNode *node); - -private: - void cleanUpNodeGraph(CCNode *pNode); - bool readSequences(); - CCBKeyframe* readKeyframe(int type); - - bool readHeader(); - bool readStringCache(); - //void readStringCacheEntry(); - CCNode* readNodeGraph(); - CCNode* readNodeGraph(CCNode * pParent); - - bool getBit(); - void alignBits(); - - friend class CCNodeLoader; -}; - -// end of effects group -/// @} - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCBSelectorResolver.h b/cappuccino-sdk/incl/extensions/CCBReader/CCBSelectorResolver.h deleted file mode 100644 index 19766b4..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCBSelectorResolver.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef _CCB_CCBSELECTORRESOLVER_H_ -#define _CCB_CCBSELECTORRESOLVER_H_ - -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include "../GUI/CCControlExtension/CCInvocation.h" - - -NS_CC_EXT_BEGIN - -#define CCB_SELECTORRESOLVER_CCMENUITEM_GLUE(TARGET, SELECTORNAME, METHOD) if(pTarget == TARGET && strcmp(pSelectorName, SELECTORNAME) == 0) { \ - return menu_selector(METHOD); \ -} - -#define CCB_SELECTORRESOLVER_CCCONTROL_GLUE(TARGET, SELECTORNAME, METHOD) if(pTarget == TARGET && strcmp(pSelectorName, SELECTORNAME) == 0) { \ - return cccontrol_selector(METHOD); \ -} - -#define CCB_SELECTORRESOLVER_CALLFUNC_GLUE(TARGET, SELECTORNAME, METHOD) if(pTarget == TARGET && strcmp(pSelectorName, SELECTORNAME) == 0) { \ - return callfuncN_selector(METHOD); \ -} -/** - * @js NA - * @lua NA - */ -class CCBSelectorResolver { - public: - virtual ~CCBSelectorResolver() {}; - virtual SEL_MenuHandler onResolveCCBCCMenuItemSelector(CCObject * pTarget, const char* pSelectorName) = 0; - virtual SEL_CallFuncN onResolveCCBCCCallFuncSelector(CCObject * pTarget, const char* pSelectorName) { return NULL; }; - virtual SEL_CCControlHandler onResolveCCBCCControlSelector(CCObject * pTarget, const char* pSelectorName) = 0; -}; - -/** - * @js NA - * @lua NA - */ -class CCBScriptOwnerProtocol { -public: - virtual ~CCBScriptOwnerProtocol() {}; - virtual CCBSelectorResolver * createNew() = 0; -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCBSequence.h b/cappuccino-sdk/incl/extensions/CCBReader/CCBSequence.h deleted file mode 100644 index f079a52..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCBSequence.h +++ /dev/null @@ -1,50 +0,0 @@ -#ifndef __CCB_CCSEQUENCE_H__ -#define __CCB_CCSEQUENCE_H__ - -#include -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include "CCBSequenceProperty.h" - -NS_CC_EXT_BEGIN -/** - * @js NA - * @lua NA - */ -class CCBSequence : public CCObject -{ -private: - float mDuration; - std::string mName; - int mSequenceId; - int mChainedSequenceId; - CCBSequenceProperty* mCallbackChannel; - CCBSequenceProperty* mSoundChannel; - -public: - CCBSequence(); - ~CCBSequence(); - float getDuration(); - void setDuration(float fDuration); - - CCBSequenceProperty* getCallbackChannel(); - void setCallbackChannel(CCBSequenceProperty* callbackChannel); - - CCBSequenceProperty* getSoundChannel(); - void setSoundChannel(CCBSequenceProperty* soundChannel); - - const char* getName(); - void setName(const char *pName); - - int getSequenceId(); - void setSequenceId(int nSequenceId); - - int getChainedSequenceId(); - void setChainedSequenceId(int nChainedSequenceId); -}; - - -NS_CC_EXT_END - - -#endif // __CCB_CCSEQUENCE_H__ diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCBSequenceProperty.h b/cappuccino-sdk/incl/extensions/CCBReader/CCBSequenceProperty.h deleted file mode 100644 index df7297a..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCBSequenceProperty.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef __CCB_SEQUENCE_PROPERTY_H__ -#define __CCB_SEQUENCE_PROPERTY_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include "CCBKeyframe.h" - -NS_CC_EXT_BEGIN -/** - * @js NA - * @lua NA - */ -class CCBSequenceProperty : public CCObject -{ -private: - std::string mName; - int mType; - CCArray *mKeyframes; - -public: - CCBSequenceProperty(); - ~CCBSequenceProperty(); - - virtual bool init(); - - const char* getName(); - void setName(const char* pName); - - int getType(); - void setType(int nType); - - CCArray* getKeyframes(); -}; - -NS_CC_EXT_END - -#endif // __CCB_SEQUENCE_PROPERTY_H__ diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCBValue.h b/cappuccino-sdk/incl/extensions/CCBReader/CCBValue.h deleted file mode 100644 index 0e549be..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCBValue.h +++ /dev/null @@ -1,74 +0,0 @@ -#ifndef __CCB_VALUE_H__ -#define __CCB_VALUE_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" - -/* - These classes are wrapper of basic types, such as ccColor3B - */ - -NS_CC_EXT_BEGIN -/** - * @js NA - * @lua NA - */ -class ccColor3BWapper : public CCObject -{ -private: - ccColor3B color; - -public: - static ccColor3BWapper* create(const ccColor3B& color); - - const ccColor3B& getColor() const; -}; - -enum -{ - kIntValue, - kFloatValue, - kBoolValue, - kUnsignedCharValue, - kStringValue, - kArrayValue -}; -/** - * @js NA - * @lua NA - */ -class CCBValue : public CCObject -{ -private: - union - { - int nValue; - float fValue; - } mValue; - - std::string m_strValue; - CCArray* m_arrValue; - int mType; - -public: - static CCBValue* create(int nValue); - static CCBValue* create(bool bValue); - static CCBValue* create(float fValue); - static CCBValue* create(unsigned char byte); - static CCBValue* create(const char* pStr); - static CCBValue* create(CCArray* pArr); - - - int getIntValue(); - float getFloatValue(); - bool getBoolValue(); - unsigned char getByteValue(); - const char* getStringValue(); - CCArray *getArrayValue(); - - int getType(); -}; - -NS_CC_EXT_END - -#endif // __CCB_VALUE_H__ diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCControlButtonLoader.h b/cappuccino-sdk/incl/extensions/CCBReader/CCControlButtonLoader.h deleted file mode 100644 index ee9dbe0..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCControlButtonLoader.h +++ /dev/null @@ -1,32 +0,0 @@ -#ifndef _CCB_CCCONTROLBUTTONLOADER_H_ -#define _CCB_CCCONTROLBUTTONLOADER_H_ - -#include "CCControlLoader.h" -#include "../GUI/CCControlExtension/CCControlButton.h" - -NS_CC_EXT_BEGIN - -/* Forward declaration. */ -class CCBReader; - -class CCControlButtonLoader : public CCControlLoader { - public: - virtual ~CCControlButtonLoader() {}; - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCControlButtonLoader, loader); - - protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCControlButton); - - virtual void onHandlePropTypeCheck(CCNode * pNode, CCNode * pParent, const char * pPropertyName, bool pCheck, CCBReader * pCCBReader); - virtual void onHandlePropTypeString(CCNode * pNode, CCNode * pParent, const char * pPropertyName, const char * pString, CCBReader * pCCBReader); - virtual void onHandlePropTypeFontTTF(CCNode * pNode, CCNode * pParent, const char * pPropertyName, const char * pFontTTF, CCBReader * pCCBReader); - virtual void onHandlePropTypeFloatScale(CCNode * pNode, CCNode * pParent, const char * pPropertyName, float pFloatScale, CCBReader * pCCBReader); - virtual void onHandlePropTypePoint(CCNode * pNode, CCNode * pParent, const char * pPropertyName, CCPoint pPoint, CCBReader * pCCBReader); - virtual void onHandlePropTypeSize(CCNode * pNode, CCNode * pParent, const char * pPropertyName, CCSize pSize, CCBReader * pCCBReader); - virtual void onHandlePropTypeSpriteFrame(CCNode * pNode, CCNode * pParent, const char * pPropertyName, CCSpriteFrame * pCCSpriteFrame, CCBReader * pCCBReader); - virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, const char * pPropertyName, ccColor3B pCCColor3B, CCBReader * pCCBReader); -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCControlLoader.h b/cappuccino-sdk/incl/extensions/CCBReader/CCControlLoader.h deleted file mode 100644 index e51dbe2..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCControlLoader.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef _CCB_CCCONTROLLOADER_H_ -#define _CCB_CCCONTROLLOADER_H_ - -#include "CCNodeLoader.h" -#include "../GUI/CCControlExtension/CCControl.h" - -NS_CC_EXT_BEGIN - -/* Forward declaration. */ -class CCBReader; -/** - * @js NA - * @lua NA - */ -class CCControlLoader : public CCNodeLoader { - public: - virtual ~CCControlLoader() {}; - - protected: - CCB_PURE_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCControl); - - virtual void onHandlePropTypeBlockCCControl(CCNode * pNode, CCNode * pParent, const char * pPropertyName, BlockCCControlData * pBlockCCControlData, CCBReader * pCCBReader); - virtual void onHandlePropTypeCheck(CCNode * pNode, CCNode * pParent, const char * pPropertyName, bool pCheck, CCBReader * pCCBReader); -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCData.h b/cappuccino-sdk/incl/extensions/CCBReader/CCData.h deleted file mode 100644 index 2b01778..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCData.h +++ /dev/null @@ -1,30 +0,0 @@ - -#ifndef __CCB_CCDATA_H__ -#define __CCB_CCDATA_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" - -NS_CC_EXT_BEGIN -/** - * @js NA - * @lua NA - */ -class CCData : public CCObject -{ -public: - CCData(unsigned char *pBytes, const unsigned long nSize); - CCData(CCData *pData); - ~CCData(); - - unsigned char* getBytes(); - unsigned long getSize(); - -private: - unsigned char* m_pBytes; - unsigned long m_nSize; -}; - -NS_CC_EXT_END - -#endif // __CCB_CCDATA_H__ diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCLabelBMFontLoader.h b/cappuccino-sdk/incl/extensions/CCBReader/CCLabelBMFontLoader.h deleted file mode 100644 index 7933d87..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCLabelBMFontLoader.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _CCB_CCLABELBMFONTLOADER_H_ -#define _CCB_CCLABELBMFONTLOADER_H_ - -#include "CCNodeLoader.h" - -NS_CC_EXT_BEGIN - -/* Forward declaration. */ -class CCBReader; -/** - * @js NA - * @lua NA - */ -class CCLabelBMFontLoader : public CCNodeLoader { - public: - virtual ~CCLabelBMFontLoader() {}; - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLabelBMFontLoader, loader); - - protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCLabelBMFont); - - virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, const char * pPropertyName, ccColor3B pCCColor3B, CCBReader * pCCBReader); - virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * pCCBReader); - virtual void onHandlePropTypeBlendFunc(CCNode * pNode, CCNode * pParent, const char * pPropertyName, ccBlendFunc pCCBlendFunc, CCBReader * pCCBReader); - virtual void onHandlePropTypeFntFile(CCNode * pNode, CCNode * pParent, const char * pPropertyName, const char* pFntFile, CCBReader * pCCBReader); - virtual void onHandlePropTypeText(CCNode * pNode, CCNode * pParent, const char * pPropertyName, const char* pText, CCBReader * pCCBReader); -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCLabelTTFLoader.h b/cappuccino-sdk/incl/extensions/CCBReader/CCLabelTTFLoader.h deleted file mode 100644 index d1d2eb3..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCLabelTTFLoader.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _CCB_CCLABELTTFLOADER_H_ -#define _CCB_CCLABELTTFLOADER_H_ - -#include "CCNodeLoader.h" - -NS_CC_EXT_BEGIN - -/* Forward declaration. */ -class CCBReader; -/** - * @js NA - * @lua NA - */ -class CCLabelTTFLoader : public CCNodeLoader { - public: - virtual ~CCLabelTTFLoader() {}; - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLabelTTFLoader, loader); - - protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCLabelTTF); - - virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, const char * pPropertyName, ccColor3B pCCColor3B, CCBReader * pCCBReader); - virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * pCCBReader); - virtual void onHandlePropTypeBlendFunc(CCNode * pNode, CCNode * pParent, const char * pPropertyName, ccBlendFunc pCCBlendFunc, CCBReader * pCCBReader); - virtual void onHandlePropTypeFontTTF(CCNode * pNode, CCNode * pParent, const char * pPropertyName, const char * pFontTTF, CCBReader * pCCBReader); - virtual void onHandlePropTypeText(CCNode * pNode, CCNode * pParent, const char * pPropertyName, const char * pText, CCBReader * pCCBReader); - virtual void onHandlePropTypeFloatScale(CCNode * pNode, CCNode * pParent, const char * pPropertyName, float pFloatScale, CCBReader * pCCBReader); - virtual void onHandlePropTypeIntegerLabeled(CCNode * pNode, CCNode * pParent, const char * pPropertyName, int pIntegerLabeled, CCBReader * pCCBReader); - virtual void onHandlePropTypeSize(CCNode * pNode, CCNode * pParent, const char * pPropertyName, CCSize pSize, CCBReader * pCCBReader); -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCLayerColorLoader.h b/cappuccino-sdk/incl/extensions/CCBReader/CCLayerColorLoader.h deleted file mode 100644 index 0390381..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCLayerColorLoader.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef _CCB_CCLAYERCOLORLOADER_H_ -#define _CCB_CCLAYERCOLORLOADER_H_ - -#include "CCLayerLoader.h" - -NS_CC_EXT_BEGIN - -/* Forward declaration. */ -class CCBReader; -/** - * @js NA - * @lua NA - */ -class CCLayerColorLoader : public CCLayerLoader { - public: - virtual ~CCLayerColorLoader() {}; - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLayerColorLoader, loader); - - protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCLayerColor); - - virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, const char * pPropertyName, ccColor3B pCCColor3B, CCBReader * pCCBReader); - virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * pCCBReader); - virtual void onHandlePropTypeBlendFunc(CCNode * pNode, CCNode * pParent, const char * pPropertyName, ccBlendFunc pCCBlendFunc, CCBReader * pCCBReader); -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCLayerGradientLoader.h b/cappuccino-sdk/incl/extensions/CCBReader/CCLayerGradientLoader.h deleted file mode 100644 index ed821ff..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCLayerGradientLoader.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _CCB_CCLAYERGRADIENTLOADER_H_ -#define _CCB_CCLAYERGRADIENTLOADER_H_ - -#include "CCLayerLoader.h" - -NS_CC_EXT_BEGIN - -/* Forward declaration. */ -class CCBReader; -/** - * @js NA - * @lua NA - */ -class CCLayerGradientLoader : public CCLayerLoader { - public: - virtual ~CCLayerGradientLoader() {}; - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLayerGradientLoader, loader); - - protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCLayerGradient); - - virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, const char * pPropertyName, ccColor3B pCCColor3B, CCBReader * pCCBReader); - virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * pCCBReader); - virtual void onHandlePropTypePoint(CCNode * pNode, CCNode * pParent, const char * pPropertyName, CCPoint pPoint, CCBReader * pCCBReader); - virtual void onHandlePropTypeBlendFunc(CCNode * pNode, CCNode * pParent, const char * pPropertyName, ccBlendFunc pCCBlendFunc, CCBReader * pCCBReader); -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCLayerLoader.h b/cappuccino-sdk/incl/extensions/CCBReader/CCLayerLoader.h deleted file mode 100644 index aeae5ac..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCLayerLoader.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _CCB_CCLAYERLOADER_H_ -#define _CCB_CCLAYERLOADER_H_ - -#include "CCNodeLoader.h" - -NS_CC_EXT_BEGIN - -/* Forward declaration. */ -class CCBReader; -/** - * @js NA - * @lua NA - */ -class CCLayerLoader : public CCNodeLoader { - public: - virtual ~CCLayerLoader() {}; - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCLayerLoader, loader); - - protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCLayer); - - virtual void onHandlePropTypeCheck(CCNode * pNode, CCNode * pParent, const char * pPropertyName, bool pCheck, CCBReader * pCCBReader); -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCMenuItemImageLoader.h b/cappuccino-sdk/incl/extensions/CCBReader/CCMenuItemImageLoader.h deleted file mode 100644 index daa3d0f..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCMenuItemImageLoader.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _CCB_CCMENUITEMIMAGELOADER_H_ -#define _CCB_CCMENUITEMIMAGELOADER_H_ - -#include "CCMenuItemLoader.h" - -NS_CC_EXT_BEGIN - -/* Forward declaration. */ -class CCBReader; -/** - * @js NA - * @lua NA - */ -class CCMenuItemImageLoader : public CCMenuItemLoader { - public: - virtual ~CCMenuItemImageLoader() {}; - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCMenuItemImageLoader, loader); - - protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCMenuItemImage); - - virtual void onHandlePropTypeSpriteFrame(CCNode * pNode, CCNode * pParent, const char * pPropertyName, CCSpriteFrame * pCCSpriteFrame, CCBReader * pCCBReader); -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCMenuItemLoader.h b/cappuccino-sdk/incl/extensions/CCBReader/CCMenuItemLoader.h deleted file mode 100644 index 41c2ad6..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCMenuItemLoader.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef _CCB_CCMENUITEMLOADER_H_ -#define _CCB_CCMENUITEMLOADER_H_ - -#include "CCLayerLoader.h" - -NS_CC_EXT_BEGIN - -/* Forward declaration. */ -class CCBReader; -/** - * @js NA - * @lua NA - */ -class CCMenuItemLoader : public CCNodeLoader { - public: - virtual ~CCMenuItemLoader() {}; - - protected: - CCB_PURE_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCMenuItem); - - virtual void onHandlePropTypeBlock(CCNode * pNode, CCNode * pParent, const char * pPropertyName, BlockData * pBlockData, CCBReader * pCCBReader); - virtual void onHandlePropTypeCheck(CCNode * pNode, CCNode * pParent, const char * pPropertyName, bool pCheck, CCBReader * pCCBReader); -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCMenuLoader.h b/cappuccino-sdk/incl/extensions/CCBReader/CCMenuLoader.h deleted file mode 100644 index 1b418ad..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCMenuLoader.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef _CCB_CCMENULOADER_H_ -#define _CCB_CCMENULOADER_H_ - -#include "CCLayerLoader.h" - -NS_CC_EXT_BEGIN - -/* Forward declaration. */ -class CCBReader; -/** - * @js NA - * @lua NA - */ -class CCMenuLoader : public CCLayerLoader { - public: - virtual ~CCMenuLoader() {}; - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCMenuLoader, loader); - - protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCMenu); -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCNode+CCBRelativePositioning.h b/cappuccino-sdk/incl/extensions/CCBReader/CCNode+CCBRelativePositioning.h deleted file mode 100644 index 5de7956..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCNode+CCBRelativePositioning.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef __CCB_CCNODE_RELATIVEPOSITIONING_H__ -#define __CCB_CCNODE_RELATIVEPOSITIONING_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" - -NS_CC_EXT_BEGIN - -extern CCPoint getAbsolutePosition(const CCPoint &pt, int nType, const CCSize &containerSize, const char *pPropName); - -extern void setRelativeScale(CCNode *pNode, float fScaleX, float fScaleY, int nType, const char* pPropName); - -NS_CC_EXT_END - -#endif // __CCB_CCNODE_RELATIVEPOSITIONING_H__ diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCNodeLoader.h b/cappuccino-sdk/incl/extensions/CCBReader/CCNodeLoader.h deleted file mode 100644 index fdbedb7..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCNodeLoader.h +++ /dev/null @@ -1,128 +0,0 @@ -#ifndef _CCB_CCNODELOADER_H_ -#define _CCB_CCNODELOADER_H_ - -#include "../GUI/CCControlExtension/CCInvocation.h" -#include "cocos2d.h" -#include "CCBReader.h" -#include "CCBValue.h" - -NS_CC_EXT_BEGIN - -#define PROPERTY_POSITION "position" -#define PROPERTY_CONTENTSIZE "contentSize" -#define PROPERTY_SKEW "skew" -#define PROPERTY_ANCHORPOINT "anchorPoint" -#define PROPERTY_SCALE "scale" -#define PROPERTY_ROTATION "rotation" -#define PROPERTY_ROTATIONX "rotationX" -#define PROPERTY_ROTATIONY "rotationY" -#define PROPERTY_TAG "tag" -#define PROPERTY_IGNOREANCHORPOINTFORPOSITION "ignoreAnchorPointForPosition" -#define PROPERTY_VISIBLE "visible" - -#define ASSERT_FAIL_UNEXPECTED_PROPERTY(PROPERTY) CCLog("Unexpected property: '%s'!\n", PROPERTY); assert(false) -#define ASSERT_FAIL_UNEXPECTED_PROPERTYTYPE(PROPERTYTYPE) CCLog("Unexpected property type: '%d'!\n", PROPERTYTYPE); assert(false) - -#define CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(T) virtual T * createCCNode(cocos2d::CCNode * pParent, cocos2d::extension::CCBReader * pCCBReader) { \ - return T::create(); \ -} - -#define CCB_PURE_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(T) virtual T * createCCNode(cocos2d::CCNode * pParent, cocos2d::extension::CCBReader * pCCBReader) = 0 - -struct BlockData { - SEL_MenuHandler mSELMenuHandler; - CCObject * mTarget; -}; - -struct BlockCCControlData { - SEL_CCControlHandler mSELCCControlHandler; - CCObject * mTarget; - int mControlEvents; -}; - -/* Forward declaration. */ -class CCBReader; -/** - * @js NA - * @lua NA - */ -class CCNodeLoader : public CCObject { - public: - CCNodeLoader(); - virtual ~CCNodeLoader(); - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCNodeLoader, loader); - - virtual CCNode * loadCCNode(CCNode *, CCBReader * pCCBReader); - virtual void parseProperties(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual CCDictionary* getCustomProperties(); - - protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCNode); - - virtual CCPoint parsePropTypePosition(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader, const char *pPropertyName); - virtual CCPoint parsePropTypePoint(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual CCPoint parsePropTypePointLock(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual CCSize parsePropTypeSize(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual float * parsePropTypeScaleLock(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader, const char *pPropertyName); - virtual float parsePropTypeFloat(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual float parsePropTypeDegrees(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader, const char *pPropertyName); - virtual float parsePropTypeFloatScale(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual int parsePropTypeInteger(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual int parsePropTypeIntegerLabeled(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual float * parsePropTypeFloatVar(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual bool parsePropTypeCheck(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader, const char *pPropertyName); - virtual CCSpriteFrame * parsePropTypeSpriteFrame(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader, const char *pPropertyName); - virtual CCAnimation * parsePropTypeAnimation(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual CCTexture2D * parsePropTypeTexture(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual unsigned char parsePropTypeByte(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader, const char *pPropertyName); - virtual ccColor3B parsePropTypeColor3(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader, const char *pPropertyName); - virtual ccColor4F * parsePropTypeColor4FVar(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual bool * parsePropTypeFlip(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual ccBlendFunc parsePropTypeBlendFunc(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual std::string parsePropTypeFntFile(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual std::string parsePropTypeString(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual std::string parsePropTypeText(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual std::string parsePropTypeFontTTF(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual BlockData * parsePropTypeBlock(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual BlockCCControlData * parsePropTypeBlockCCControl(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual CCNode * parsePropTypeCCBFile(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - virtual float * parsePropTypeFloatXY(CCNode * pNode, CCNode * pParent, CCBReader * pCCBReader); - - - virtual void onHandlePropTypePosition(CCNode * pNode, CCNode * pParent, const char* pPropertyName, CCPoint pPosition, CCBReader * pCCBReader); - virtual void onHandlePropTypePoint(CCNode * pNode, CCNode * pParent, const char* pPropertyName, CCPoint pPoint, CCBReader * pCCBReader); - virtual void onHandlePropTypePointLock(CCNode * pNode, CCNode * pParent, const char* pPropertyName, CCPoint pPointLock, CCBReader * pCCBReader); - virtual void onHandlePropTypeSize(CCNode * pNode, CCNode * pParent, const char* pPropertyName, CCSize pSize, CCBReader * pCCBReader); - virtual void onHandlePropTypeScaleLock(CCNode * pNode, CCNode * pParent, const char* pPropertyName, float * pScaleLock, CCBReader * pCCBReader); - virtual void onHandlePropTypeFloat(CCNode * pNode, CCNode * pParent, const char* pPropertyName, float pFloat, CCBReader * pCCBReader); - virtual void onHandlePropTypeDegrees(CCNode * pNode, CCNode * pParent, const char* pPropertyName, float pDegrees, CCBReader * pCCBReader); - virtual void onHandlePropTypeFloatScale(CCNode * pNode, CCNode * pParent, const char* pPropertyName, float pFloatScale, CCBReader * pCCBReader); - virtual void onHandlePropTypeInteger(CCNode * pNode, CCNode * pParent, const char* pPropertyName, int pInteger, CCBReader * pCCBReader); - virtual void onHandlePropTypeIntegerLabeled(CCNode * pNode, CCNode * pParent, const char* pPropertyName, int pIntegerLabeled, CCBReader * pCCBReader); - virtual void onHandlePropTypeFloatVar(CCNode * pNode, CCNode * pParent, const char* pPropertyName, float * pFoatVar, CCBReader * pCCBReader); - virtual void onHandlePropTypeFloatXY(CCNode * pNode, CCNode * pParent, const char* pPropertyName, float * pFoatVar, CCBReader * pCCBReader); - - virtual void onHandlePropTypeCheck(CCNode * pNode, CCNode * pParent, const char* pPropertyName, bool pCheck, CCBReader * pCCBReader); - virtual void onHandlePropTypeSpriteFrame(CCNode * pNode, CCNode * pParent, const char* pPropertyName, CCSpriteFrame * pCCSpriteFrame, CCBReader * pCCBReader); - virtual void onHandlePropTypeAnimation(CCNode * pNode, CCNode * pParent, const char* pPropertyName, CCAnimation * pCCAnimation, CCBReader * pCCBReader); - virtual void onHandlePropTypeTexture(CCNode * pNode, CCNode * pParent, const char* pPropertyName, CCTexture2D * pCCTexture2D, CCBReader * pCCBReader); - virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, const char* pPropertyName, unsigned char pByte, CCBReader * pCCBReader); - virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, const char* pPropertyName, ccColor3B pCCColor3B, CCBReader * pCCBReader); - virtual void onHandlePropTypeColor4FVar(CCNode * pNode, CCNode * pParent, const char* pPropertyName, ccColor4F * pCCColor4FVar, CCBReader * pCCBReader); - virtual void onHandlePropTypeFlip(CCNode * pNode, CCNode * pParent, const char* pPropertyName, bool * pFlip, CCBReader * pCCBReader); - virtual void onHandlePropTypeBlendFunc(CCNode * pNode, CCNode * pParent, const char* pPropertyName, ccBlendFunc pCCBlendFunc, CCBReader * pCCBReader); - virtual void onHandlePropTypeFntFile(CCNode * pNode, CCNode * pParent, const char* pPropertyName, const char * pFntFile, CCBReader * pCCBReader); - virtual void onHandlePropTypeString(CCNode * pNode, CCNode * pParent, const char* pPropertyName, const char * pString, CCBReader * pCCBReader); - virtual void onHandlePropTypeText(CCNode * pNode, CCNode * pParent, const char* pPropertyName, const char * pText, CCBReader * pCCBReader); - virtual void onHandlePropTypeFontTTF(CCNode * pNode, CCNode * pParent, const char* pPropertyName, const char * pFontTTF, CCBReader * pCCBReader); - virtual void onHandlePropTypeBlock(CCNode * pNode, CCNode * pParent, const char* pPropertyName, BlockData * pBlockData, CCBReader * pCCBReader); - virtual void onHandlePropTypeBlockCCControl(CCNode * pNode, CCNode * pParent, const char* pPropertyName, BlockCCControlData * pBlockCCControlData, CCBReader * pCCBReader); - virtual void onHandlePropTypeCCBFile(CCNode * pNode, CCNode * pParent, const char* pPropertyName, CCNode * pCCBFileNode, CCBReader * pCCBReader); - -protected: - CCDictionary* m_pCustomProperties; -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCNodeLoaderLibrary.h b/cappuccino-sdk/incl/extensions/CCBReader/CCNodeLoaderLibrary.h deleted file mode 100644 index 2b159c2..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCNodeLoaderLibrary.h +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef _CCB_CCNODELOADERLIBRARY_H_ -#define _CCB_CCNODELOADERLIBRARY_H_ - -#include "cocos2d.h" -#include "CCBReader.h" - -NS_CC_EXT_BEGIN - -class CCNodeLoader; - -typedef std::map CCNodeLoaderMap; -typedef std::pair CCNodeLoaderMapEntry; -/** - * @js NA - * @lua NA - */ -class CCNodeLoaderLibrary : public CCObject { - private: - CCNodeLoaderMap mCCNodeLoaders; - - public: - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCNodeLoaderLibrary, library); - - CCNodeLoaderLibrary(); - virtual ~CCNodeLoaderLibrary(); - - void registerDefaultCCNodeLoaders(); - void registerCCNodeLoader(const char * pClassName, CCNodeLoader * pCCNodeLoader); - //void registerCCNodeLoader(CCString * pClassName, CCNodeLoader * pCCNodeLoader); - void unregisterCCNodeLoader(const char * pClassName); - //void unregisterCCNodeLoader(CCString * pClassName); - CCNodeLoader * getCCNodeLoader(const char * pClassName); - //CCNodeLoader * getCCNodeLoader(CCString * pClassName); - void purge(bool pDelete); - - public: - static CCNodeLoaderLibrary * sharedCCNodeLoaderLibrary(); - static void purgeSharedCCNodeLoaderLibrary(); - - static CCNodeLoaderLibrary * newDefaultCCNodeLoaderLibrary(); -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCNodeLoaderListener.h b/cappuccino-sdk/incl/extensions/CCBReader/CCNodeLoaderListener.h deleted file mode 100644 index 91f831a..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCNodeLoaderListener.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _CCB_CCNODELOADERLISTENER_H_ -#define _CCB_CCNODELOADERLISTENER_H_ - -#include "cocos2d.h" - -NS_CC_EXT_BEGIN -/** - * @js NA - * @lua NA - */ -class CCNodeLoaderListener { - public: - virtual ~CCNodeLoaderListener() {}; - - virtual void onNodeLoaded(CCNode * pNode, CCNodeLoader * pNodeLoader) = 0; -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCParticleSystemQuadLoader.h b/cappuccino-sdk/incl/extensions/CCBReader/CCParticleSystemQuadLoader.h deleted file mode 100644 index badf582..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCParticleSystemQuadLoader.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _CCB_CCPARTICLESYSTEMQUADLOADER_H_ -#define _CCB_CCPARTICLESYSTEMQUADLOADER_H_ - -#include "CCNodeLoader.h" - -NS_CC_EXT_BEGIN - -/* Forward declaration. */ -class CCBReader; -/** - * @js NA - * @lua NA - */ -class CCParticleSystemQuadLoader : public CCNodeLoader { - public: - virtual ~CCParticleSystemQuadLoader() {}; - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCParticleSystemQuadLoader, loader); - - protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCParticleSystemQuad); - - virtual void onHandlePropTypeIntegerLabeled(CCNode * pNode, CCNode * pParent, const char * pPropertyName, int pIntegerLabeled, CCBReader * pCCBReader); - virtual void onHandlePropTypePoint(CCNode * pNode, CCNode * pParent, const char * pPropertyName, CCPoint pPoint, CCBReader * pCCBReader); - virtual void onHandlePropTypeFloat(CCNode * pNode, CCNode * pParent, const char * pPropertyName, float pFloat, CCBReader * pCCBReader); - virtual void onHandlePropTypeInteger(CCNode * pNode, CCNode * pParent, const char * pPropertyName, int pInteger, CCBReader * pCCBReader); - virtual void onHandlePropTypeFloatVar(CCNode * pNode, CCNode * pParent, const char * pPropertyName, float * pFloatVar, CCBReader * pCCBReader); - virtual void onHandlePropTypeColor4FVar(CCNode * pNode, CCNode * pParent, const char * pPropertyName, ccColor4F * pCCColor4FVar, CCBReader * pCCBReader); - virtual void onHandlePropTypeBlendFunc(CCNode * pNode, CCNode * pParent, const char * pPropertyName, ccBlendFunc pCCBlendFunc, CCBReader * pCCBReader); - virtual void onHandlePropTypeTexture(CCNode * pNode, CCNode * pParent, const char * pPropertyName, CCTexture2D * pCCTexture2D, CCBReader * pCCBReader); -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCScale9SpriteLoader.h b/cappuccino-sdk/incl/extensions/CCBReader/CCScale9SpriteLoader.h deleted file mode 100644 index 7ffbaa8..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCScale9SpriteLoader.h +++ /dev/null @@ -1,34 +0,0 @@ -#ifndef _CCB_CCSCALE9SPRITELOADER_H_ -#define _CCB_CCSCALE9SPRITELOADER_H_ - -#include "CCNodeLoader.h" -#include "CCScale9SpriteLoader.h" -#include "../GUI/CCControlExtension/CCScale9Sprite.h" - -NS_CC_EXT_BEGIN - -/* Forward declaration. */ -class CCBReader; -/** - * @js NA - * @lua NA - */ -class CCScale9SpriteLoader : public CCNodeLoader { - public: - virtual ~CCScale9SpriteLoader() {}; - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCScale9SpriteLoader, loader); - - protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCScale9Sprite); - - virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, const char * pPropertyName, ccColor3B pCCColor3B, CCBReader * pCCBReader); - virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * pCCBReader); - virtual void onHandlePropTypeBlendFunc(CCNode * pNode, CCNode * pParent, const char * pPropertyName, ccBlendFunc pCCBlendFunc, CCBReader * pCCBReader); - virtual void onHandlePropTypeSpriteFrame(CCNode * pNode, CCNode * pParent, const char * pPropertyName, CCSpriteFrame * pCCSpriteFrame, CCBReader * pCCBReader); - virtual void onHandlePropTypeSize(CCNode * pNode, CCNode * pParent, const char * pPropertyName, CCSize pSize, CCBReader * pCCBReader); - virtual void onHandlePropTypeFloat(CCNode * pNode, CCNode * pParent, const char * pPropertyName, float pFloat, CCBReader * pCCBReader); -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCScrollViewLoader.h b/cappuccino-sdk/incl/extensions/CCBReader/CCScrollViewLoader.h deleted file mode 100644 index b893369..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCScrollViewLoader.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _CCB_CCSCROLLVIEWLOADER_H_ -#define _CCB_CCSCROLLVIEWLOADER_H_ - -#include "CCNodeLoader.h" -#include "../GUI/CCScrollView/CCScrollView.h" - -NS_CC_EXT_BEGIN - -/* Forward declaration. */ -class CCBReader; -/** - * @js NA - * @lua NA - */ -class CCScrollViewLoader : public CCNodeLoader { - public: - virtual ~CCScrollViewLoader() {}; - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCScrollViewLoader, loader); - - protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCScrollView); - virtual void onHandlePropTypeSize(CCNode * pNode, CCNode * pParent, const char * pPropertyName, CCSize pSize, CCBReader * pCCBReader); - virtual void onHandlePropTypeCCBFile(CCNode * pNode, CCNode * pParent, const char * pPropertyName, CCNode * pCCBFileNode, CCBReader * pCCBReader); - virtual void onHandlePropTypeCheck(CCNode * pNode, CCNode * pParent, const char * pPropertyName, bool pCheck, CCBReader * pCCBReader); - virtual void onHandlePropTypeFloat(CCNode * pNode, CCNode * pParent, const char * pPropertyName, float pFloat, CCBReader * pCCBReader); - virtual void onHandlePropTypeIntegerLabeled(CCNode * pNode, CCNode * pParent, const char * pPropertyName, int pIntegerLabeled, CCBReader * pCCBReader); -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CCBReader/CCSpriteLoader.h b/cappuccino-sdk/incl/extensions/CCBReader/CCSpriteLoader.h deleted file mode 100644 index 3c4e706..0000000 --- a/cappuccino-sdk/incl/extensions/CCBReader/CCSpriteLoader.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef _CCB_CCSPRITELOADER_H_ -#define _CCB_CCSPRITELOADER_H_ - -#include "CCNodeLoader.h" - -NS_CC_EXT_BEGIN - -/* Forward declaration. */ -class CCBReader; -/** - * @js NA - * @lua NA - */ -class CCSpriteLoader : public CCNodeLoader { - public: - virtual ~CCSpriteLoader() {}; - CCB_STATIC_NEW_AUTORELEASE_OBJECT_METHOD(CCSpriteLoader, loader); - - protected: - CCB_VIRTUAL_NEW_AUTORELEASE_CREATECCNODE_METHOD(CCSprite); - - virtual void onHandlePropTypeColor3(CCNode * pNode, CCNode * pParent, const char * pPropertyName, ccColor3B pCCColor3B, CCBReader * pCCBReader); - virtual void onHandlePropTypeByte(CCNode * pNode, CCNode * pParent, const char * pPropertyName, unsigned char pByte, CCBReader * pCCBReader); - virtual void onHandlePropTypeBlendFunc(CCNode * pNode, CCNode * pParent, const char * pPropertyName, ccBlendFunc pCCBBlendFunc, CCBReader * pCCBReader); - virtual void onHandlePropTypeSpriteFrame(CCNode * pNode, CCNode * pParent, const char * pPropertyName, CCSpriteFrame * pCCSpriteFrame, CCBReader * pCCBReader); - virtual void onHandlePropTypeFlip(CCNode * pNode, CCNode * pParent, const char * pPropertyName, bool * pFlip, CCBReader * pCCBReader); -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionEaseEx.h b/cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionEaseEx.h deleted file mode 100644 index 6bae19d..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionEaseEx.h +++ /dev/null @@ -1,363 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCActionEaseEx_H__ -#define __CCActionEaseEx_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" - -NS_CC_EXT_BEGIN - -/** - @brief Ease Bezier - @ingroup Actions - */ -class CCEaseBezierAction:public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - - virtual void setBezierParamer( float p0, float p1, float p2, float p3); - -public: - /** creates the action */ - static CCEaseBezierAction* create(CCActionInterval* pAction); - -private: - float m_p0; - float m_p1; - float m_p2; - float m_p3; -}; - -/** - @brief Ease Quadratic In - @ingroup Actions - */ -class CCEaseQuadraticActionIn:public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCEaseQuadraticActionIn* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Quadratic Out - @ingroup Actions - */ -class CCEaseQuadraticActionOut:public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCEaseQuadraticActionOut* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Quadratic InOut - @ingroup Actions - */ -class CCEaseQuadraticActionInOut:public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCEaseQuadraticActionInOut* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Quartic In - @ingroup Actions - */ -class CCEaseQuarticActionIn:public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCEaseQuarticActionIn* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Quartic Out - @ingroup Actions - */ -class CCEaseQuarticActionOut:public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCEaseQuarticActionOut* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Quartic InOut - @ingroup Actions - */ -class CCEaseQuarticActionInOut:public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCEaseQuarticActionInOut* create(CCActionInterval* pAction); -}; - - -/** - @brief Ease Quintic In - @ingroup Actions - */ -class CCEaseQuinticActionIn:public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCEaseQuinticActionIn* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Quintic Out - @ingroup Actions - */ -class CCEaseQuinticActionOut:public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCEaseQuinticActionOut* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Quintic InOut - @ingroup Actions - */ -class CCEaseQuinticActionInOut:public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCEaseQuinticActionInOut* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Circle In - @ingroup Actions - */ -class CCEaseCircleActionIn:public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCEaseCircleActionIn* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Circle Out - @ingroup Actions - */ -class CCEaseCircleActionOut:public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCEaseCircleActionOut* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Circle InOut - @ingroup Actions - */ -class CCEaseCircleActionInOut:public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCEaseCircleActionInOut* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Cubic In - @ingroup Actions - */ -class CCEaseCubicActionIn:public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCEaseCubicActionIn* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Cubic Out - @ingroup Actions - */ -class CCEaseCubicActionOut:public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCEaseCubicActionOut* create(CCActionInterval* pAction); -}; - -/** - @brief Ease Cubic InOut - @ingroup Actions - */ -class CCEaseCubicActionInOut:public CCActionEase -{ -public: - virtual void update(float time); - virtual CCActionInterval* reverse(void); - /** - * @js NA - * @lua NA - */ - virtual CCObject* copyWithZone(CCZone* pZone); - -public: - /** creates the action */ - static CCEaseCubicActionInOut* create(CCActionInterval* pAction); -}; -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionFrame.h b/cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionFrame.h deleted file mode 100644 index 6c145d4..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionFrame.h +++ /dev/null @@ -1,453 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __ActionFRAME_H__ -#define __ActionFRAME_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" - -NS_CC_EXT_BEGIN - -enum FrameType -{ - kKeyframeMove = 0, - kKeyframeScale, - kKeyframeRotate, - kKeyframeTint, - kKeyframeFade, - kKeyframeMax -}; - -enum FrameEaseType -{ - FrameEase_Custom = -1, - - FrameEase_Linear = 0, - - FrameEase_Sine_EaseIn, - FrameEase_Sine_EaseOut, - FrameEase_Sine_EaseInOut, - - - FrameEase_Quad_EaseIn, - FrameEase_Quad_EaseOut, - FrameEase_Quad_EaseInOut, - - FrameEase_Cubic_EaseIn, - FrameEase_Cubic_EaseOut, - FrameEase_Cubic_EaseInOut, - - FrameEase_Quart_EaseIn, - FrameEase_Quart_EaseOut, - FrameEase_Quart_EaseInOut, - - FrameEase_Quint_EaseIn, - FrameEase_Quint_EaseOut, - FrameEase_Quint_EaseInOut, - - FrameEase_Expo_EaseIn, - FrameEase_Expo_EaseOut, - FrameEase_Expo_EaseInOut, - - FrameEase_Circ_EaseIn, - FrameEase_Circ_EaseOut, - FrameEase_Circ_EaseInOut, - - FrameEase_Elastic_EaseIn, - FrameEase_Elastic_EaseOut, - FrameEase_Elastic_EaseInOut, - - FrameEase_Back_EaseIn, - FrameEase_Back_EaseOut, - FrameEase_Back_EaseInOut, - - FrameEase_Bounce_EaseIn, - FrameEase_Bounce_EaseOut, - FrameEase_Bounce_EaseInOut, - - FrameEase_TWEEN_EASING_MAX = 10000 -}; -/** -* @js NA -* @lua NA -*/ -class ActionFrame:public CCObject -{ - -public: - - /** - * Default constructor - */ - ActionFrame(); - - /** - * Default destructor - */ - virtual ~ActionFrame(); - - /** - * Changes the index of action frame - * - * @param index the index of action frame - */ - void setFrameIndex(int index); - - /** - * Gets the index of action frame - * - * @return the index of action frame - */ - int getFrameIndex(); - - /** - * Changes the time of action frame - * - * @param fTime the time of action frame - */ - void setFrameTime(float fTime); - - /** - * Gets the time of action frame - * - * @return fTime the time of action frame - */ - float getFrameTime(); - - /** - * Changes the type of action frame - * - * @param frameType the type of action frame - */ - void setFrameType(int frameType); - - /** - * Gets the type of action frame - * - * @return the type of action frame - */ - int getFrameType(); - - /** - * Changes the easing type. - * - * @param easingType the easing type. - */ - void setEasingType(int easingType); - - /** - * Gets the easing type. - * - * @return the easing type. - */ - int getEasingType(); - - /** - * Gets the CCAction of ActionFrame. - * - * @parame fDuration the duration time of ActionFrame - * - * @return CCAction - */ - virtual CCActionInterval* getAction(float fDuration); - /** - * Gets the CCAction of ActionFrame. - * - * @parame fDuration the duration time of ActionFrame - * - * @parame fDuration the source ActionFrame - * - * @return CCAction - */ - virtual CCActionInterval* getAction(float fDuration,ActionFrame* srcFrame); - - /** - *Set the CCAction easing parameter. - * - *@parame parameter the parameter for frame ease - * - */ - virtual void setEasingParameter(std::vector parameter); -protected: - /** - * Gets the Easing Action of ActionFrame. - * - * @parame action the duration time of ActionFrame - * - * @return CCAction - */ - virtual CCActionInterval* getEasingAction(CCActionInterval* action); -protected: - int m_frameType; - int m_frameIndex; - float m_fTime; - FrameEaseType m_easingType; - std::vector m_Parameter; -}; -/** -* @js NA -* @lua NA -*/ -class ActionMoveFrame:public ActionFrame -{ -public: - - /** - * Default constructor - */ - ActionMoveFrame(); - - /** - * Default destructor - */ - virtual ~ActionMoveFrame(); - - /** - * Changes the move action position. - * - * @param the move action position. - */ - void setPosition(CCPoint pos); - - /** - * Gets the move action position. - * - * @return the move action position. - */ - CCPoint getPosition(); - - /** - * Gets the CCAction of ActionFrame. - * - * @parame fDuration the duration time of ActionFrame - * - * @return CCAction - */ - virtual CCActionInterval* getAction(float fDuration); -protected: - CCPoint m_position; -}; -/** -* @js NA -* @lua NA -*/ -class ActionScaleFrame:public ActionFrame -{ -public: - - /** - * Default constructor - */ - ActionScaleFrame(); - - /** - * Default destructor - */ - virtual ~ActionScaleFrame(); - - /** - * Changes the scale action scaleX. - * - * @param the scale action scaleX. - */ - void setScaleX(float scaleX); - - /** - * Gets the scale action scaleX. - * - * @return the scale action scaleX. - */ - float getScaleX(); - - /** - * Changes the scale action scaleY. - * - * @param rotation the scale action scaleY. - */ - void setScaleY(float scaleY); - - /** - * Gets the scale action scaleY. - * - * @return the the scale action scaleY. - */ - float getScaleY(); - - /** - * Gets the CCAction of ActionFrame. - * - * @parame fDuration the duration time of ActionFrame - * - * @return CCAction - */ - virtual CCActionInterval* getAction(float fDuration); -protected: - float m_scaleX; - float m_scaleY; -}; -/** -* @js NA -* @lua NA -*/ -class ActionRotationFrame:public ActionFrame -{ -public: - - /** - * Default constructor - */ - ActionRotationFrame(); - - /** - * Default destructor - */ - virtual ~ActionRotationFrame(); - - /** - * Changes rotate action rotation. - * - * @param rotation rotate action rotation. - */ - void setRotation(float rotation); - - /** - * Gets the rotate action rotation. - * - * @return the rotate action rotation. - */ - float getRotation(); - - /** - * Gets the CCAction of ActionFrame. - * - * @parame fDuration the duration time of ActionFrame - * - * @return CCAction - */ - virtual CCActionInterval* getAction(float fDuration); - /** - * Gets the CCAction of ActionFrame. - * - * @parame fDuration the duration time of ActionFrame - * - * @parame fDuration the source ActionFrame - * - * @return CCAction - */ - virtual CCActionInterval* getAction(float fDuration,ActionFrame* srcFrame); -public: - float m_rotation; -}; -/** -* @js NA -* @lua NA -*/ -class ActionFadeFrame:public ActionFrame -{ -public: - - /** - * Default constructor - */ - ActionFadeFrame(); - - /** - * Default destructor - */ - virtual ~ActionFadeFrame(); - - /** - * Changes the fade action opacity. - * - * @param opacity the fade action opacity - */ - void setOpacity(int opacity); - - /** - * Gets the fade action opacity. - * - * @return the fade action opacity. - */ - int getOpacity(); - - /** - * Gets the CCAction of ActionFrame. - * - * @parame fDuration the duration time of ActionFrame - * - * @return CCAction - */ - virtual CCActionInterval* getAction(float fDuration); -protected: - float m_opacity; -}; -/** -* @js NA -* @lua NA -*/ -class ActionTintFrame:public ActionFrame -{ - -public: - - /** - * Default constructor - */ - ActionTintFrame(); - - /** - * Default destructor - */ - virtual ~ActionTintFrame(); - - /** - * Changes the tint action color. - * - * @param ccolor the tint action color - */ - void setColor(ccColor3B ccolor); - - /** - * Gets the tint action color. - * - * @return the tint action color. - */ - ccColor3B getColor(); - - /** - * Gets the CCAction of ActionFrame. - * - * @parame fDuration the duration time of ActionFrame - * - * @return CCAction - */ - virtual CCActionInterval* getAction(float fDuration); -protected: - ccColor3B m_color; -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionFrameEasing.h b/cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionFrameEasing.h deleted file mode 100644 index b35c128..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionFrameEasing.h +++ /dev/null @@ -1,76 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __ActionFrameEasing_H__ -#define __ActionFrameEasing_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include "../Json/DictionaryHelper.h" - -NS_CC_EXT_BEGIN - -enum FrameEasingType -{ - kCCBKeyframeEasingInstant, - - kCCBKeyframeEasingLinear, - - kCCBKeyframeEasingCubicIn, - kCCBKeyframeEasingCubicOut, - kCCBKeyframeEasingCubicInOut, - - kCCBKeyframeEasingElasticIn, - kCCBKeyframeEasingElasticOut, - kCCBKeyframeEasingElasticInOut, - - kCCBKeyframeEasingBounceIn, - kCCBKeyframeEasingBounceOut, - kCCBKeyframeEasingBounceInOut, - - kCCBKeyframeEasingBackIn, - kCCBKeyframeEasingBackOut, - kCCBKeyframeEasingBackInOut, -}; -/** -* @js NA -* @lua NA -*/ -class ActionFrameEasing:public cocos2d::CCObject -{ -protected: - FrameEasingType m_type; - float m_fValue; -public: - ActionFrameEasing(); - virtual ~ActionFrameEasing(); - - float bounceTime(float t); - - float easeValue(float t); -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionManager.h b/cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionManager.h deleted file mode 100644 index 18a2bd6..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionManager.h +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __ActionMANAGER_H__ -#define __ActionMANAGER_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include "CCActionObject.h" -#include "../Json/rapidjson/document.h" -NS_CC_EXT_BEGIN - /** - * @js NA - * @lua NA - */ -class ActionManager:public CCObject -{ -public: - - /** - * Default constructor - * @js ctor - */ - ActionManager(); - - /** - * Default destructor - * @js NA - */ - virtual ~ActionManager(); - - /** - * Gets the static instance of ActionManager. - */ - static ActionManager* shareManager(); - - /** - * Purges ActionManager point. - */ - static void purge(); - - /** - * Gets an ActionObject with a name. - * - * @param jsonName UI file name - * - * @param actionName action name in the UI file. - * - * @return ActionObject which named as the param name - */ - ActionObject* getActionByName(const char* jsonName,const char* actionName); - - /** - * Play an Action with a name. - * - * @param jsonName UI file name - * - * @param actionName action name in teh UIfile. - */ - ActionObject* playActionByName(const char* jsonName,const char* actionName); - - /** - * Play an Action with a name. - * - * @param jsonName UI file name - * - * @param actionName action name in teh UIfile. - * - * @param func ui action call back - */ - ActionObject* playActionByName(const char* jsonName,const char* actionName, CCCallFunc* func); - - /*init properties with json dictionay*/ - void initWithDictionary(const char* jsonName,const rapidjson::Value &dic,CCObject* root); - /** - * Release all actions. - * - */ - void releaseActions(); - -protected: - CCDictionary* m_pActionDic; -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionNode.h b/cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionNode.h deleted file mode 100644 index 38ee24d..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionNode.h +++ /dev/null @@ -1,182 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __ActionNODE_H__ -#define __ActionNODE_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include "CCActionFrame.h" -#include "../Json/DictionaryHelper.h" -#include "../Json/rapidjson/document.h" -NS_CC_EXT_BEGIN -/** -* @js NA -* @lua NA -*/ -class ActionNode:public CCObject -{ -public: - - /** - * Default constructor - */ - ActionNode(); - - /** - * Default destructor - */ - virtual ~ActionNode(); - /** - * Sets the time interval of frame. - * - * @param fTime the time interval of frame - */ - void setUnitTime(float fTime); - - /** - * Gets the time interval of frame. - * - * @return fTime the time interval of frame - */ - float getUnitTime(); - /** - * Sets tag for ActionNode - * - * @param tag tag of ActionNode - */ - void setActionTag(int tag); - - /** - * Gets tag for ActionNode - * - * @return tag tag of ActionNode - */ - int getActionTag(); - - /** - * Sets node which will run a action. - * - * @param node which will run a action - */ - void setObject(CCObject* node); - - /** - * Gets node which will run a action. - * - * @return node which will run a action - */ - CCObject* getObject(); - - /** - * Insets a ActionFrame to ActionNode. - * - * @param index the index of ActionFrame - * - * @param frame the ActionFrame which will be inserted - */ - void insertFrame(int index, ActionFrame* frame); - - /** - * Pushs back a ActionFrame to ActionNode. - * - * @param frame the ActionFrame which will be added - */ - void addFrame(ActionFrame* frame); - - /** - * Remove a ActionFrame from ActionNode. - * - * @param frame the ActionFrame which will be removed - */ - void deleteFrame(ActionFrame* frame ); - - /** - * Remove all ActionFrames from ActionNode. - */ - void clearAllFrame(); - - /** - * Gets index of first ActionFrame. - * - * @return index of first ActionFrame - */ - int getFirstFrameIndex(); - - /** - * Gets index of last ActionFrame. - * - * @return index of last ActionFrame - */ - int getLastFrameIndex(); - - /** - * Updates action states to some time. - * - * @param fTime the time when need to update - */ - virtual bool updateActionToTimeLine(float fTime); - - /** - * Play the action. - */ - virtual void playAction(); - - /** - * Stop the action. - */ - virtual void stopAction(); - - /*init properties with a json dictionary*/ - virtual void initWithDictionary(const rapidjson::Value& dic,CCObject* root); - /** - * Gets if the action is done once time. - * - * @return that if the action is done once time - */ - virtual bool isActionDoneOnce(); -protected: - int currentFrameIndex; - int destFrameIndex; - - float m_fUnitTime; - - int m_ActionTag; - CCObject* m_Object; - CCSpawn * m_actionSpawn; - CCAction* m_action; - CCArray* m_FrameArray; - int frameArrayNum; - -protected: - virtual CCNode* getActionNode(); - virtual CCSpawn * refreshActionProperty(); - virtual void runAction(); - virtual void initActionNodeFromRoot(CCObject* root); - virtual void easingToFrame(float duration,float delayTime,ActionFrame* srcFrame,ActionFrame* destFrame); -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionObject.h b/cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionObject.h deleted file mode 100644 index 5360ab9..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Action/CCActionObject.h +++ /dev/null @@ -1,181 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __ActionObject_H__ -#define __ActionObject_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include "../Json/rapidjson/document.h" - -NS_CC_EXT_BEGIN - -class ActionNode; -/** -* @js NA -* @lua NA -*/ -class ActionObject:public CCObject -{ -public: - - /** - * Default constructor - */ - ActionObject(); - - /** - * Default destructor - */ - virtual ~ActionObject(); - - /** - * Sets name for object - * - * @param name name of object - */ - void setName(const char* name); - - /** - * Sets name for object - * - * @return name of object - */ - const char* getName(); - - /** - * Sets if the action will loop play. - * - * @param bLoop that if the action will loop play - */ - void setLoop(bool bLoop); - - /** - * Gets if the action will loop play. - * - * @return that if the action will loop play - */ - bool getLoop(); - - /** - * Sets the time interval of frame. - * - * @param fTime the time interval of frame - */ - void setUnitTime(float fTime); - - /** - * Gets the time interval of frame. - * - * @return fTime the time interval of frame - */ - float getUnitTime(); - - /** - * Sets the current time of frame. - * - * @param fTime the current time of frame - */ - void setCurrentTime(float fTime); - - /** - * Gets the current time of frame. - * - * @return fTime the current time of frame - */ - float getCurrentTime(); - - /** - * Gets the total time of frame. - * - * @return fTime the current time of frame - */ - float getTotalTime(); - /** - * Return if the action is playing. - * - * @return true if the action is playing, false the otherwise - */ - bool isPlaying(); - - /** - * Play the action. - */ - void play(); - - /** - * Play the action. - * - * @ Action Call Back - */ - void play(CCCallFunc* func); - - /** - * Pause the action. - */ - void pause(); - - /** - * Stop the action. - */ - void stop(); - - /** - * Adds a ActionNode to play the action. - * - * @node the ActionNode which will play the action - */ - void addActionNode(ActionNode* node); - - /** - * Removes a ActionNode which play the action. - * - * @node the ActionNode which play the action - */ - void removeActionNode(ActionNode* node); - - /*update frame method*/ - void updateToFrameByTime(float fTime); - - /*init properties with a json dictionary*/ - void initWithDictionary(const rapidjson::Value& dic,CCObject* root); - - void simulationActionUpdate(float dt); - -protected: - CCArray* m_ActionNodeList;/*actionnode*/ - std::string m_name; - bool m_loop; - bool m_bPause; - bool m_bPlaying; - float m_fUnitTime; - float m_CurrentTime; - CCScheduler *m_pScheduler; - CCCallFunc *m_CallBack; - float m_fTotalTime; -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/CCArmature.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/CCArmature.h deleted file mode 100644 index 3766b88..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/CCArmature.h +++ /dev/null @@ -1,216 +0,0 @@ - -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCARMATURE_H__ -#define __CCARMATURE_H__ - -#include "utils/CCArmatureDefine.h" -#include "CCBone.h" -#include "display/CCBatchNode.h" -#include "animation/CCArmatureAnimation.h" - -class b2Body; -struct cpBody; - -NS_CC_EXT_BEGIN -/** - * @lua NA - */ -class CCArmature : public CCNodeRGBA, public CCBlendProtocol -{ - -public: - - /** - * Allocates and initializes an armature. - * @return An initialized armature which is marked as "autorelease". - */ - static CCArmature *create(); - - /** - * Allocates an armature, and use the CCArmatureData named name in CCArmatureDataManager to initializes the armature. - * - * @param name CCArmature will use the name to find the CCArmatureData to initializes it. - * @return A initialized armature which is marked as "autorelease". - */ - static CCArmature *create(const char *name); - - static CCArmature *create(const char *name, CCBone *parentBone); - -public: - /** - * @js ctor - */ - CCArmature(); - /** - * @js NA - */ - ~CCArmature(void); - - /** - * Init the empty armature - */ - virtual bool init(); - - /** - * Init an armature with specified name - * @param name CCArmature name - */ - virtual bool init(const char *name); - - virtual bool init(const char *name, CCBone *parentBone); - /** - * Add a CCBone to this CCArmature, - * - * @param bone The CCBone you want to add to CCArmature - * @param parentName The parent CCBone's name you want to add to . If it's NULL, then set CCArmature to its parent - */ - virtual void addBone(CCBone *bone, const char *parentName); - /** - * Get a bone with the specified name - * - * @param name The bone's name you want to get - */ - virtual CCBone *getBone(const char *name) const; - /** - * Change a bone's parent with the specified parent name. - * - * @param bone The bone you want to change parent - * @param parentName The new parent's name. - */ - virtual void changeBoneParent(CCBone *bone, const char *parentName); - /** - * Remove a bone with the specified name. If recursion it will also remove child CCBone recursionly. - * - * @param bone The bone you want to remove - * @param recursion Determine whether remove the bone's child recursion. - */ - virtual void removeBone(CCBone *bone, bool recursion); - - /** - * Get CCArmature's bone dictionary - * @return CCArmature's bone dictionary - */ - CCDictionary *getBoneDic(); - - /** - * This boundingBox will calculate all bones' boundingBox every time - */ - virtual CCRect boundingBox(); - - CCBone *getBoneAtPoint(float x, float y); - - virtual void visit(); - virtual void update(float dt); - virtual void draw(); - - virtual CCAffineTransform nodeToParentTransform(); - - virtual void onEnter(); - virtual void onExit(); - - /** - * Set contentsize and Calculate anchor point. - */ - virtual void updateOffsetPoint(); - - inline void setBlendFunc(ccBlendFunc blendFunc) - { - m_sBlendFunc = blendFunc; - } - inline ccBlendFunc getBlendFunc(void) - { - return m_sBlendFunc; - } - - virtual void setAnimation(CCArmatureAnimation *animation); - virtual CCArmatureAnimation *getAnimation(); - - virtual CCTextureAtlas *getTexureAtlasWithTexture(CCTexture2D *texture); - -#if ENABLE_PHYSICS_BOX2D_DETECT || ENABLE_PHYSICS_CHIPMUNK_DETECT - virtual void setColliderFilter(CCColliderFilter *filter); -#elif ENABLE_PHYSICS_SAVE_CALCULATED_VERTEX - virtual void drawContour(); -#endif - -#if ENABLE_PHYSICS_BOX2D_DETECT - /** - * @js NA - */ - virtual b2Fixture *getShapeList(); -#elif ENABLE_PHYSICS_CHIPMUNK_DETECT - /** - * @js NA - */ - virtual cpShape *getShapeList(); -#endif - -protected: - - /* - * Used to create CCBone internal - * @js NA - */ - CCBone *createBone(const char *boneName ); - - CC_SYNTHESIZE(CCArmatureData *, m_pArmatureData, ArmatureData); - - CC_SYNTHESIZE(CCBatchNode *, m_pBatchNode, BatchNode); - - CC_SYNTHESIZE(std::string, m_strName, Name); - - CC_SYNTHESIZE(CCTextureAtlas *, m_pAtlas, TextureAtlas); - - CC_PROPERTY(CCBone *, m_pParentBone, ParentBone); - - CC_SYNTHESIZE(float, m_fVersion, Version); - - CC_SYNTHESIZE_READONLY(bool, m_bArmatureTransformDirty, ArmatureTransformDirty); -protected: - CCDictionary *m_pBoneDic; //! The dictionary of the bones, include all bones in the armature, no matter it is the direct bone or the indirect bone. It is different from m_pChindren. - - CCArray *m_pTopBoneList; - - static std::map m_sArmatureIndexDic; //! Use to save armature zorder info, - - ccBlendFunc m_sBlendFunc; - - CCPoint m_pOffsetPoint; - - CCArmatureAnimation *m_pAnimation; - - CCDictionary *m_pTextureAtlasDic; - -#if ENABLE_PHYSICS_BOX2D_DETECT - CC_PROPERTY(b2Body *, m_pBody, Body); -#elif ENABLE_PHYSICS_CHIPMUNK_DETECT - CC_PROPERTY(cpBody *, m_pBody, Body); -#endif -}; - -NS_CC_EXT_END - -#endif /*__CCARMATURE_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/CCBone.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/CCBone.h deleted file mode 100644 index b3a7687..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/CCBone.h +++ /dev/null @@ -1,242 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCBONE_H__ -#define __CCBONE_H__ - -#include "utils/CCArmatureDefine.h" -#include "datas/CCDatas.h" -#include "animation/CCTween.h" -#include "display/CCDecorativeDisplay.h" -#include "display/CCDisplayManager.h" - -NS_CC_EXT_BEGIN - -class CCArmature; -/** - * @lua NA - */ -class CCBone : public CCNodeRGBA -{ -public: - /** - * Allocates and initializes a bone. - * @return A initialized bone which is marked as "autorelease". - */ - static CCBone *create(); - /** - * Allocates and initializes a bone. - * - * @param name If name is not null, then set name to the bone's name - * @return A initialized bone which is marked as "autorelease". - */ - static CCBone *create(const char *name); - -public: - /** - * @js ctor - */ - CCBone(); - /** - * @js NA - */ - virtual ~CCBone(void); - - /** - * Initializes an empty CCBone with nothing init. - */ - virtual bool init(); - - /** - * Initializes a CCBone with the specified name - * @param name CCBone's name. - */ - virtual bool init(const char *name); - - /** - * Add display and use displayData to init the display. - * If index already have a display, then replace it. - * If index is current display index, then also change display to _index - * - * @param displayData it include the display information, like DisplayType. - * If you want to create a sprite display, then create a CCSpriteDisplayData param - * - * @param index the index of the display you want to replace or add to - * -1 : append display from back - */ - void addDisplay(CCDisplayData *displayData, int index); - - void addDisplay(CCNode *display, int index); - - void removeDisplay(int index); - - /** - * @deprecated please use changeDisplayWithIndex and changeDisplayWithName - */ - CC_DEPRECATED_ATTRIBUTE void changeDisplayByIndex(int index, bool force); - CC_DEPRECATED_ATTRIBUTE void changeDisplayByName(const char *name, bool force); - - void changeDisplayWithIndex(int index, bool force); - void changeDisplayWithName(const char *name, bool force); - - /** - * Add a child to this bone, and it will let this child call setParent(CCBone *parent) function to set self to it's parent - * @param child the child you want to add - */ - void addChildBone(CCBone *child); - - /** - * Set parent bone. - * If parent is NUll, then also remove this bone from armature. - * It will not set the CCArmature, if you want to add the bone to a CCArmature, you should use CCArmature::addBone(CCBone *bone, const char* parentName). - * - * @param parent the parent bone. - * NULL : remove this bone from armature - */ - void setParentBone(CCBone *parent); - - /** - * Get parent bone - * @return parent bone - */ - CCBone *getParentBone(); - - using CCNode::removeFromParent; - /** - * Remove itself from its parent. - * @param recursion whether or not to remove childBone's display - */ - void removeFromParent(bool recursion); - - /** - * Removes a child CCBone - * @param bone the bone you want to remove - */ - void removeChildBone(CCBone *bone, bool recursion); - - void update(float delta); - - void updateDisplayedColor(const ccColor3B &parentColor); - void updateDisplayedOpacity(GLubyte parentOpacity); - - void setColor(const ccColor3B &color); - void setOpacity(GLubyte opacity); - - //! Update color to render display - void updateColor(); - - //! Update zorder - void updateZOrder(); - - virtual void setZOrder(int zOrder); - - CCTween *getTween(); - - /* - * Whether or not the bone's transform property changed. if true, the bone will update the transform. - */ - virtual inline void setTransformDirty(bool dirty) { m_bBoneTransformDirty = dirty; } - virtual inline bool isTransformDirty() { return m_bBoneTransformDirty; } - - /* - * Set blend function - */ - virtual void setBlendFunc(const ccBlendFunc& blendFunc); - virtual ccBlendFunc getBlendFunc(void) { return m_sBlendFunc; } - - /* - * Set if blend function is dirty - */ - virtual void setBlendDirty(bool dirty) { m_bBlendDirty = dirty; } - virtual bool isBlendDirty(void) { return m_bBlendDirty; } - - virtual CCAffineTransform nodeToArmatureTransform(); - virtual CCAffineTransform nodeToWorldTransform(); - - CCNode *getDisplayRenderNode(); - DisplayType getDisplayRenderNodeType(); - - /* - * Get the ColliderBody list in this bone. The object in the CCArray is ColliderBody. - */ - virtual CCArray *getColliderBodyList(); - -#if ENABLE_PHYSICS_BOX2D_DETECT || ENABLE_PHYSICS_CHIPMUNK_DETECT - virtual void setColliderFilter(CCColliderFilter *filter); - virtual CCColliderFilter *getColliderFilter(); -#endif - -public: - /* - * The origin state of the CCBone. Display's state is effected by m_pBoneData, m_pNode, m_pTweenData - * when call setData function, it will copy from the CCBoneData. - */ - CC_PROPERTY(CCBoneData *, m_pBoneData, BoneData); - - //! A weak reference to the CCArmature - CC_PROPERTY(CCArmature *, m_pArmature, Armature); - - //! A weak reference to the child CCArmature - CC_PROPERTY(CCArmature *, m_pChildArmature, ChildArmature); - - CC_SYNTHESIZE(CCDisplayManager *, m_pDisplayManager, DisplayManager) - - /* - * When CCArmature play an animation, if there is not a CCMovementBoneData of this bone in this CCMovementData, this bone will be hidden. - * Set IgnoreMovementBoneData to true, then this bone will also be shown. - */ - CC_SYNTHESIZE(bool, m_bIgnoreMovementBoneData, IgnoreMovementBoneData) - -protected: - virtual void applyParentTransform(CCBone *parent); - - CCTween *m_pTween; //! Calculate tween effect - - //! Used for making tween effect in every frame - CC_SYNTHESIZE_READONLY(CCFrameData *, m_pTweenData, TweenData); - - CC_SYNTHESIZE(std::string, m_strName, Name); - - CCBone *m_pParentBone; //! A weak reference to its parent - bool m_bBoneTransformDirty; //! Whether or not transform dirty - - //! Transform in armature space, use this to change display's state - CCAffineTransform m_tWorldTransform; - - //! World Point, Scale, Rotation in armature space - CC_SYNTHESIZE_READONLY(CCBaseData *, m_tWorldInfo, WorldInfo); - - //! Armature's parent bone - CCBone *m_pArmatureParentBone; - - //! Data version - float m_fDataVersion; - - ccBlendFunc m_sBlendFunc; - bool m_bBlendDirty; -}; - -NS_CC_EXT_END - -#endif /*__CCBONE_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/animation/CCArmatureAnimation.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/animation/CCArmatureAnimation.h deleted file mode 100644 index 239e524..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/animation/CCArmatureAnimation.h +++ /dev/null @@ -1,324 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - - -#ifndef __CCANIMATION_H__ -#define __CCANIMATION_H__ - -#include "CCProcessBase.h" -#include - -NS_CC_EXT_BEGIN - - -enum MovementEventType -{ - START, - COMPLETE, - LOOP_COMPLETE -}; - - -class CCArmature; -class CCBone; - -typedef void (CCObject::*SEL_MovementEventCallFunc)(CCArmature *, MovementEventType, const char *); -typedef void (CCObject::*SEL_FrameEventCallFunc)(CCBone *, const char *, int, int); - -#define movementEvent_selector(_SELECTOR) (SEL_MovementEventCallFunc)(&_SELECTOR) -#define frameEvent_selector(_SELECTOR) (SEL_FrameEventCallFunc)(&_SELECTOR) - -struct CCFrameEvent -{ - CCBone *bone; - const char *frameEventName; - int originFrameIndex; - int currentFrameIndex; -}; - -struct CCMovementEvent -{ - CCArmature *armature; - MovementEventType movementType; - const char *movementID; -}; - -/** - * @lua NA - */ -class CCArmatureAnimation : public CCProcessBase -{ -public: - /** - * Create with a CCArmature - * @param armature The CCArmature CCArmatureAnimation will bind to - */ - static CCArmatureAnimation *create(CCArmature *armature); -public: - /** - * @js ctor - */ - CCArmatureAnimation(); - /** - * @js NA - */ - virtual ~CCArmatureAnimation(void); - - /** - * Init with a CCArmature - * @param armature The CCArmature CCArmatureAnimation will bind to - */ - virtual bool init(CCArmature *armature); - - /** - * Scale animation play speed. - * This method is deprecated, please use setSpeedScale. - * @param animationScale Scale value - */ - CC_DEPRECATED_ATTRIBUTE virtual void setAnimationScale(float animationScale); - CC_DEPRECATED_ATTRIBUTE virtual float getAnimationScale() const; - - /** - * Scale animation play speed. - * @param animationScale Scale value - */ - virtual void setSpeedScale(float speedScale); - virtual float getSpeedScale() const; - - //! The animation update speed - CC_DEPRECATED_ATTRIBUTE virtual void setAnimationInternal(float animationInternal) {}; - - using CCProcessBase::play; - /** - * Play animation by animation name. - * - * @param animationName The animation name you want to play - * @param durationTo The frames between two animation changing-over. - * It's meaning is changing to this animation need how many frames - * - * -1 : use the value from CCMovementData get from flash design panel - * @param durationTween The frame count you want to play in the game. - * if _durationTween is 80, then the animation will played 80 frames in a loop - * - * -1 : use the value from CCMovementData get from flash design panel - * - * @param loop Whether the animation is loop - * - * loop < 0 : use the value from CCMovementData get from flash design panel - * loop = 0 : this animation is not loop - * loop > 0 : this animation is loop - * - * @param tweenEasing CCTween easing is used for calculate easing effect - * - * TWEEN_EASING_MAX : use the value from CCMovementData get from flash design panel - * -1 : fade out - * 0 : line - * 1 : fade in - * 2 : fade in and out - * - */ - virtual void play(const char *animationName, int durationTo = -1, int durationTween = -1, int loop = -1, int tweenEasing = TWEEN_EASING_MAX); - - /** - * Play animation by index, the other param is the same to play. - * Deprecated, please use playWithIndex - * @param animationIndex the animation index you want to play - */ - CC_DEPRECATED_ATTRIBUTE virtual void playByIndex(int animationIndex, int durationTo = -1, int durationTween = -1, int loop = -1, int tweenEasing = TWEEN_EASING_MAX); - virtual void playWithIndex(int animationIndex, int durationTo = -1, int durationTween = -1, int loop = -1, int tweenEasing = TWEEN_EASING_MAX); - - /** - * Play several animation by names - */ - virtual void playWithNames(const std::vector& movementNames, int durationTo = -1, bool loop = true); - - /** - * Play several animation by indexes - */ - virtual void playWithIndexes(const std::vector& movementIndexes, int durationTo = -1, bool loop = true); - - - // For bindings - virtual void playWithArray(cocos2d::CCArray *movementNames, int durationTo = -1, bool loop = true); - virtual void playWithIndexArray(cocos2d::CCArray *movementIndexes, int durationTo = -1, bool loop = true); - - /** - * Go to specified frame and play current movement. - * You need first switch to the movement you want to play, then call this function. - * - * example : playByIndex(0); - * gotoAndPlay(0); - * playByIndex(1); - * gotoAndPlay(0); - * gotoAndPlay(15); - */ - virtual void gotoAndPlay(int frameIndex); - - /** - * Go to specified frame and pause current movement. - */ - virtual void gotoAndPause(int frameIndex); - - /** - * Pause the Process - */ - virtual void pause(); - /** - * Resume the Process - */ - virtual void resume(); - /** - * Stop the Process - */ - virtual void stop(); - - - /** - * Get movement count - */ - int getMovementCount(); - - void update(float dt); - - /** - * Get current movementID - * @return The name of current movement - */ - std::string getCurrentMovementID(); - - /** - * Set armature's movement event callback function - * To disconnect this event, just setMovementEventCallFunc(NULL, NULL); - */ - void setMovementEventCallFunc(CCObject *target, SEL_MovementEventCallFunc callFunc); - - /** - * Set armature's frame event callback function - * To disconnect this event, just setFrameEventCallFunc(NULL, NULL); - */ - void setFrameEventCallFunc(CCObject *target, SEL_FrameEventCallFunc callFunc); - - - /** - * Returns a user assigned CCObject - * - * @return A user assigned CCObject - */ - virtual CCObject* getUserObject(); - /** - * Returns a user assigned CCObject - * - * The UserObject will be retained once in this method, - * and the previous UserObject (if existed) will be relese. - * The UserObject will be released in destructure. - * - * @param A user assigned CCObject - */ - virtual void setUserObject(CCObject *pUserObject); -protected: - - /** - * Update(float dt) will call this handler, you can handle your logic here - * @js NA - */ - void updateHandler(); - - /** - * Update current key frame, and process auto stop, pause - * @js NA - */ - void updateFrameData(float currentPercent); - - /** - * Emit a frame event - * @js NA - */ - void frameEvent(CCBone *bone, const char *frameEventName, int originFrameIndex, int currentFrameIndex); - - /** - * Emit a movement event - */ - void movementEvent(CCArmature *armature, MovementEventType movementType, const char *movementID); - - void updateMovementList(); - - inline bool isIgnoreFrameEvent() { return m_bIgnoreFrameEvent; } - - friend class CCTween; -protected: - //! CCAnimationData save all MovementDatas this animation used. - CC_SYNTHESIZE_RETAIN(CCAnimationData *, m_pAnimationData, AnimationData); - - //! Scale the animation speed - float m_fSpeedScale; - - CCMovementData *m_pMovementData; //! CCMovementData save all MovementFrameDatas this animation used. - - CCArmature *m_pArmature; //! A weak reference of armature - - std::string m_strMovementID; //! Current movment's name - - int m_iToIndex; //! The frame index in CCMovementData->m_pMovFrameDataArr, it's different from m_iFrameIndex. - - CCArray *m_pTweenList; - - bool m_bIgnoreFrameEvent; - - std::queue m_sFrameEventQueue; - std::queue m_sMovementEventQueue; - - std::vector m_sMovementList; - - bool m_bOnMovementList; - bool m_bMovementListLoop; - unsigned int m_uMovementIndex; - int m_iMovementListDurationTo; - - CCObject *m_pUserObject; -protected: - /** - * MovementEvent CallFunc. - * @param CCArmature* a CCArmature - * @param MovementEventType, Event Type, like START, COMPLETE. - * @param const char*, Movement ID, also called Movement Name - */ - SEL_MovementEventCallFunc m_sMovementEventCallFunc; - - /** - * FrameEvent CallFunc. - * @param CCBone*, a CCBone - * @param const char*, the name of this frame event - * @param int, origin frame index - * @param int, current frame index, animation may be delayed - */ - SEL_FrameEventCallFunc m_sFrameEventCallFunc; - - - CCObject *m_sMovementEventTarget; - CCObject *m_sFrameEventTarget; -}; - -NS_CC_EXT_END - -#endif /*__CCANIMATION_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/animation/CCProcessBase.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/animation/CCProcessBase.h deleted file mode 100644 index 3e83309..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/animation/CCProcessBase.h +++ /dev/null @@ -1,168 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - - -#ifndef __CCPROCESSBASE_H__ -#define __CCPROCESSBASE_H__ - -#include "../utils/CCArmatureDefine.h" -#include "../datas/CCDatas.h" - -NS_CC_EXT_BEGIN - -enum AnimationType -{ - SINGLE_FRAME = -4, //! the animation just have one frame - ANIMATION_NO_LOOP, //! the animation isn't loop - - ANIMATION_TO_LOOP_FRONT, //! the animation loop from front - ANIMATION_TO_LOOP_BACK, //! the animation loop from back - - ANIMATION_LOOP_FRONT, //! the animation loop from front - ANIMATION_LOOP_BACK, //! the animation loop from back - - ANIMATION_MAX, - -}; - -/** - * @js NA - * @lua NA - */ -class CCProcessBase : public CCObject -{ -public: - CCProcessBase(void); - ~CCProcessBase(void); - - /** - * Play animation by animation name. - * - * @param durationTo The frames between two animation changing-over. - * It's meaning is changing to this animation need how many frames - * - * -1 : use the value from CCMovementData get from flash design panel - * @param durationTween The frame count you want to play in the game. - * if _durationTween is 80, then the animation will played 80 frames in a loop - * - * -1 : use the value from CCMovementData get from flash design panel - * - * @param loop Whether the animation is loop - * - * loop < 0 : use the value from CCMovementData get from flash design panel - * loop = 0 : this animation is not loop - * loop > 0 : this animation is loop - * - * @param tweenEasing CCTween easing is used for calculate easing effect - * - * TWEEN_EASING_MAX : use the value from CCMovementData get from flash design panel - * -1 : fade out - * 0 : line - * 1 : fade in - * 2 : fade in and out - * - */ - virtual void play(int durationTo, int durationTween, int loop, int tweenEasing); - - /** - * Pause the Process - */ - virtual void pause(); - /** - * Resume the Process - */ - virtual void resume(); - /** - * Stop the Process - */ - virtual void stop(); - - - - /** - * You should never call this function, unless you know what you do - * Update the Process, include current process, current frame and son on - * - * @param The duration since last update - */ - virtual void update(float dt); - - virtual int getCurrentFrameIndex(); - -protected: - - virtual void gotoFrame(int frameIndex); - - /** - * Update(float dt) will call this handler, you can handle your logic here - */ - virtual void updateHandler() {}; - -protected: - //! Scale the process speed - CC_SYNTHESIZE(float, m_fProcessScale, ProcessScale); - - //! Set and get whether the aniamtion is pause - CC_SYNTHESIZE(bool, m_bIsPause, IsPause); - - //! Set and get whether the aniamtion is complete - CC_SYNTHESIZE(bool, m_bIsComplete, IsComplete); - - //! Set and get whether the aniamtion is playing - CC_SYNTHESIZE(bool, m_bIsPlaying, IsPlaying); - - //! Current percent this process arrived - CC_SYNTHESIZE(float, m_fCurrentPercent, CurrentPercent); - - //! The raw duration - CC_SYNTHESIZE(int, m_iRawDuration, RawDuration); - - //! The animation whether or not loop - CC_SYNTHESIZE(AnimationType, m_eLoopType, LoopType); - - //! The tween easing effect - CC_SYNTHESIZE(CCTweenType, m_eTweenEasing, TweenEasing); - -protected: - //! The durantion frame count will run - int m_iDurationTween; - - //! Current frame this process arrived, this frame is tween frame - float m_fCurrentFrame; - //! Frame index it the time line - int m_iCurFrameIndex; - - //! Next frame this process need run to - int m_iNextFrameIndex; - - - bool m_bIsLoopBack; - - //! The animation update speed - float m_fAnimationInternal; -}; - -NS_CC_EXT_END - -#endif /*__CCPROCESSBASE_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/animation/CCTween.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/animation/CCTween.h deleted file mode 100644 index b60878e..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/animation/CCTween.h +++ /dev/null @@ -1,147 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - - -#ifndef __CCTWEEN_H__ -#define __CCTWEEN_H__ - -#include "CCProcessBase.h" -#include "../utils/CCTweenFunction.h" - -NS_CC_EXT_BEGIN - -class CCBone; -class CCArmatureAnimation; -/** -* @js NA -* @lua NA -*/ -class CCTween : public CCProcessBase -{ -public: - /** - * Create with a CCBone - * @param bone the CCBone CCTween will bind to - */ - static CCTween *create(CCBone *bone); -public: - CCTween(void); - virtual ~CCTween(void); - - /** - * Init with a CCBone - * @param bone the CCBone CCTween will bind to - */ - virtual bool init(CCBone *bone); - - using CCProcessBase::play; - /** - * Start the Process - * - * @param movementBoneData the CCMovementBoneData include all CCFrameData - * @param durationTo the number of frames changing to this animation needs. - * @param durationTween the number of frames this animation actual last. - * - * @param loop whether the animation is loop - * - * loop < 0 : use the value from CCMovementData get from Action Editor - * loop = 0 : this animation is not loop - * loop > 0 : this animation is loop - * - * @param tweenEasing tween easing is used for calculate easing effect - * - * TWEEN_EASING_MAX : use the value from CCMovementData get from Action Editor - * -1 : fade out - * 0 : line - * 1 : fade in - * 2 : fade in and out - * - */ - virtual void play(CCMovementBoneData *movementBoneData, int durationTo, int durationTween, int loop, int tweenEasing); - - virtual void gotoAndPlay(int frameIndex); - virtual void gotoAndPause(int frameIndex); - - inline void setAnimation(CCArmatureAnimation *animation) { m_pAnimation = animation; } - inline CCArmatureAnimation *getAnimation() const { return m_pAnimation; } -protected: - - /** - * Update(float dt) will call this handler, you can handle your logic here - */ - virtual void updateHandler(); - - /** - * Calculate which frame arrived, and if current frame have event, then call the event listener - */ - virtual float updateFrameData(float currentPercent); - - /** - * Calculate the between value of _from and _to, and give it to between frame data - */ - virtual void setBetween(CCFrameData *from, CCFrameData *to, bool limit = true); - - /** - * According to the percent to calculate current CCFrameData with tween effect - */ - virtual CCFrameData *tweenNodeTo(float percent, CCFrameData *node = NULL); - - /** - * According to the percent to calculate current color with tween effect - */ - virtual void tweenColorTo(float percent, CCFrameData *node); - - /** - * Update display index and process the key frame event when arrived a key frame - */ - virtual void arriveKeyFrame(CCFrameData *keyFrameData); -protected: - //! A weak reference to the current CCMovementBoneData. The data is in the data pool - CC_SYNTHESIZE(CCMovementBoneData *, m_pMovementBoneData, MovementBoneData) - - CCFrameData *m_pTweenData; //! The computational tween frame data, //! A weak reference to the CCBone's tweenData - CCFrameData *m_pFrom; //! From frame data, used for calculate between value - CCFrameData *m_pTo; //! To frame data, used for calculate between value - CCFrameData *m_pBetween; //! Between frame data, used for calculate current CCFrameData(m_pNode) value - - - CCBone *m_pBone; //! A weak reference to the CCBone - - CCTweenType m_eFrameTweenEasing; //! Dedermine which tween effect current frame use - - int m_iBetweenDuration; //! Current key frame will last m_iBetweenDuration frames - int m_iTotalDuration; - - - int m_iFromIndex; //! The current frame index in FrameList of CCMovementBoneData, it's different from m_iFrameIndex - int m_iToIndex; //! The next frame index in FrameList of CCMovementBoneData, it's different from m_iFrameIndex - - CCArmatureAnimation *m_pAnimation; - - bool m_bPassLastFrame; -}; - -NS_CC_EXT_END - -#endif /*__CCTWEEN_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/datas/CCDatas.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/datas/CCDatas.h deleted file mode 100644 index 82eed69..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/datas/CCDatas.h +++ /dev/null @@ -1,473 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCARMATURE_DATAS_H__ -#define __CCARMATURE_DATAS_H__ - -#include "../utils/CCArmatureDefine.h" -#include "../utils/CCTweenFunction.h" - - -#define CC_CREATE_NO_PARAM_NO_INIT(varType)\ -public: \ - static inline varType *create(void){ \ - varType *var = new varType();\ - if (var)\ -{\ - var->autorelease();\ - return var;\ -}\ - CC_SAFE_DELETE(var);\ - return NULL;\ -} - -#define CC_CREATE_NO_PARAM(varType)\ -public: \ - static inline varType *create(void){ \ - varType *var = new varType();\ - if (var && var->init())\ -{\ - var->autorelease();\ - return var;\ -}\ - CC_SAFE_DELETE(var);\ - return NULL;\ -} - -NS_CC_EXT_BEGIN - -/** - * The base node include a lot of attributes. - * @lua NA - */ -class CCBaseData : public CCObject -{ -public: - CC_CREATE_NO_PARAM_NO_INIT(CCBaseData) -public: - /** - * @js ctor - */ - CCBaseData(); - /** - * @js NA - */ - ~CCBaseData(void); - - /* - * Copy data from node - * @param node A CCBaseData to copy data - */ - virtual void copy(const CCBaseData *node); - - /* - * Calculate two CCBaseData's between value(to - from) and set to self - * - * @param from from CCBaseData - * @param to to CCBaseData - */ - virtual void subtract(CCBaseData *from, CCBaseData *to, bool limit); - - virtual void setColor(const ccColor4B &color); - virtual ccColor4B getColor(); -public: - float x; //! position x attribute - float y; //! position y attribute - int zOrder; //! zorder attribute, used to order the CCBone's depth order - - /** - * x y skewX skewY scaleX scaleY used to calculate transform matrix - * skewX, skewY can have rotation effect - * To get more matrix information, you can have a look at this pape : http://www.senocular.com/flash/tutorials/transformmatrix/ - */ - float skewX; - float skewY; - float scaleX; - float scaleY; - - float tweenRotate; //! SkewX, SkewY, and TweenRotate effect the rotation - - bool isUseColorInfo; //! Whether or not this frame have the color changed Info - int a, r, g, b; - -}; - - -/** -* DisplayType distinguish which type your display is. -*/ -enum DisplayType -{ - CS_DISPLAY_SPRITE, //! display is a single CCSprite - CS_DISPLAY_ARMATURE, //! display is a CCArmature - CS_DISPLAY_PARTICLE, //! display is a CCParticle. - - CS_DISPLAY_MAX -}; -/** -* @js NA -* @lua NA -*/ -class CCDisplayData : public CCObject -{ -public: - CC_CREATE_NO_PARAM_NO_INIT(CCDisplayData) - - static const char *changeDisplayToTexture(const char *displayName); -public: - CCDisplayData(); - virtual ~CCDisplayData(void) {}; - - virtual void copy(CCDisplayData *displayData); - - DisplayType displayType; //! mark which type your display is - std::string displayName; -}; - - -/** -* @js NA -* @lua NA -*/ -class CCSpriteDisplayData : public CCDisplayData -{ -public: - CC_CREATE_NO_PARAM_NO_INIT(CCSpriteDisplayData) -public: - CCSpriteDisplayData(); - virtual ~CCSpriteDisplayData() {}; - - void copy(CCDisplayData *displayData); -public: - CCBaseData skinData; -}; - -/** -* @js NA -* @lua NA -*/ -class CCArmatureDisplayData : public CCDisplayData -{ -public: - CC_CREATE_NO_PARAM_NO_INIT(CCArmatureDisplayData) -public: - CCArmatureDisplayData(); - virtual ~CCArmatureDisplayData() {}; -}; - -/** -* @js NA -* @lua NA -*/ -class CCParticleDisplayData : public CCDisplayData -{ -public: - CC_CREATE_NO_PARAM_NO_INIT(CCParticleDisplayData) -public: - CCParticleDisplayData(); - virtual ~CCParticleDisplayData() {}; -public: -}; - - - -/** -* CCBoneData used to init a CCBone. -* CCBoneData keeps a CCDisplayData list, a CCBone can have many display to change. -* The display information saved in the CCDisplayData -* @js NA -* @lua NA -*/ -class CCBoneData : public CCBaseData -{ -public: - CC_CREATE_NO_PARAM(CCBoneData) -public: - CCBoneData(void); - ~CCBoneData(void); - - virtual bool init(); - - void addDisplayData(CCDisplayData *displayData); - CCDisplayData *getDisplayData(int index); -public: - std::string name; //! the bone's name - std::string parentName; //! the bone parent's name - CCArray displayDataList; //! save CCDisplayData informations for the CCBone - CCAffineTransform boneDataTransform; -}; - - -/** -* CCArmatureData saved the CCArmature name and Bonedata needed for the CCBones in this CCArmature -* When we create a CCArmature, we need to get each CCBone's CCBoneData as it's init information. -* So we can get a CCBoneData from the CCDictionary saved in the CCArmatureData. -* @js NA -* @lua NA -*/ -class CCArmatureData : public CCObject -{ -public: - CC_CREATE_NO_PARAM(CCArmatureData) -public: - CCArmatureData(); - ~CCArmatureData(); - - bool init(); - void addBoneData(CCBoneData *boneData); - CCBoneData *getBoneData(const char *boneName); -public: - std::string name; - CCDictionary boneDataDic; - float dataVersion; -}; - -enum CCBlendType -{ - BLEND_NORMAL, - BLEND_LAYER, - BLEND_DARKEN, - BLEND_MULTIPLY, - BLEND_LIGHTEN, - BLEND_SCREEN, - BLEND_OVERLAY, - BLEND_HARD_LIGHT, - BLEND_ADD, - BLEND_SUBSTRACT, - BLEND_DIFFERENCE, - BLEND_INVERT, - BLEND_ALPHA, - BLEND_ERASE -}; - -/** -* @js NA -* @lua NA -*/ -class CCFrameData : public CCBaseData -{ -public: - CC_CREATE_NO_PARAM_NO_INIT(CCFrameData) -public: - CCFrameData(); - ~CCFrameData(); - - virtual void copy(const CCBaseData *node); -public: - int frameID; - int duration; //! The frame will last duration frames - - CCTweenType tweenEasing; //! Every frame's tween easing effect - int easingParamNumber; - float *easingParams; - - bool isTween; //! Whether it's a tween key frame - - /** - * The current display index when change to this frame. - * If value is -1, then display will not be shown. - */ - int displayIndex; - - ccBlendFunc blendFunc; - - std::string strEvent; - /** - * strMovement, strEvent, strSound, strSoundEffect do not support yet - */ - std::string strMovement; - std::string strSound; - std::string strSoundEffect; -}; - -/** -* @js NA -* @lua NA -*/ -class CCMovementBoneData : public CCObject -{ -public: - CC_CREATE_NO_PARAM(CCMovementBoneData) -public: - CCMovementBoneData(); - ~CCMovementBoneData(void); - - virtual bool init(); - - void addFrameData(CCFrameData *frameData); - CCFrameData *getFrameData(int index); -public: - float delay; //! movement delay percent, this value can produce a delay effect - float scale; //! scale this movement - float duration; //! this CCBone in this movement will last m_iDuration frames - std::string name; //! bone name - - CCArray frameList; -}; - -/** -* @js NA -* @lua NA -*/ -class CCMovementData : public CCObject -{ -public: - CC_CREATE_NO_PARAM_NO_INIT(CCMovementData) -public: - CCMovementData(void); - ~CCMovementData(void); - - void addMovementBoneData(CCMovementBoneData *movBoneData); - CCMovementBoneData *getMovementBoneData(const char *boneName); -public: - std::string name; - int duration; //! the frames this movement will last - float scale; //! scale this movement - - /** - * Change to this movement will last durationTo frames. Use this effect can avoid too suddenly changing. - * - * Example : current movement is "stand", we want to change to "run", then we fill durationTo frames before - * change to "run" instead of changing to "run" directly. - */ - int durationTo; - - /* - * This is different from duration, durationTween contain tween effect. - * duration is the raw time that the animation will last, it's the same with the time you edit in the Action Editor. - * durationTween is the actual time you want this animation last. - * Example : If we edit 10 frames in the flash, then duration is 10. When we set durationTween to 50, the movement will last 50 frames, the extra 40 frames will auto filled with tween effect - */ - int durationTween; - - bool loop; //! whether the movement was looped - - /** - * Which tween easing effect the movement use - * TWEEN_EASING_MAX : use the value from CCMovementData get from flash design panel - */ - CCTweenType tweenEasing; - - /** - * @brief save movment bone data - * @key const char * - * @value CCMovementBoneData * - */ - CCDictionary movBoneDataDic; -}; - - -/** -* CCAnimationData include all movement infomation for the CCArmature -* The struct is CCAnimationData -> CCMovementData -> CCMovementBoneData -> CCFrameData -* -> MovementFrameData -* @js NA -* @lua NA -*/ -class CCAnimationData : public CCObject -{ -public: - CC_CREATE_NO_PARAM_NO_INIT(CCAnimationData) -public: - CCAnimationData(void); - ~CCAnimationData(void); - - void addMovement(CCMovementData *movData); - CCMovementData *getMovement(const char *movementName); - int getMovementCount(); -public: - std::string name; - CCDictionary movementDataDic; - std::vector movementNames; -}; - - -struct CCContourVertex2 : public CCObject -{ - CCContourVertex2(float xx, float yy) - { - this->x = xx; - this->y = yy; - } - - float x; - float y; -}; - -/* -* CCContourData include a contour vertex information -* @js NA -* @lua NA -*/ -class CCContourData : public CCObject -{ -public: - CC_CREATE_NO_PARAM(CCContourData) -public: - CCContourData(); - ~CCContourData(void); - - virtual bool init(); - virtual void addVertex(CCPoint *vertex); -public: - CCArray vertexList; //! Save contour vertex info, vertex saved in a CCPoint -}; - - - - -/* -* CCTextureData include a texture's information -* @js NA -* @lua NA -*/ -class CCTextureData : public CCObject -{ -public: - CC_CREATE_NO_PARAM(CCTextureData) -public: - CCTextureData(); - ~CCTextureData(void); - - virtual bool init(); - - void addContourData(CCContourData *contourData); - CCContourData *getContourData(int index); -public: - - float height; //! The texture's width, height - float width; - - float pivotX; //! The texture's anchor point - float pivotY; - - std::string name; //! The texture's name - - CCArray contourDataList; -}; - - -NS_CC_EXT_END - -#endif /*__CCARMATURE_DATAS_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCBatchNode.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCBatchNode.h deleted file mode 100644 index e0ef642..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCBatchNode.h +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCBATCHNODE_H__ -#define __CCBATCHNODE_H__ - -#include "../utils/CCArmatureDefine.h" - -NS_CC_EXT_BEGIN -/** - * @lua NA - */ -class CCBatchNode : public CCNode -{ -public: - static CCBatchNode *create(); -public: - /** - * @js ctor - */ - CCBatchNode(); - /** - * @js NA - */ - ~CCBatchNode(); - /** - * @js NA - */ - virtual bool init(); - virtual void addChild(CCNode *pChild); - virtual void addChild(CCNode *pChild, int zOrder); - virtual void addChild(CCNode *pChild, int zOrder, int tag); - virtual void removeChild(CCNode* child, bool cleanup); - virtual void visit(); - /** - * @js NA - */ - void draw(); - - virtual CCTextureAtlas *getTexureAtlasWithTexture(CCTexture2D *texture); -protected: - CCTextureAtlas *m_pAtlas; - CCDictionary *m_pTextureAtlasDic; -}; - -NS_CC_EXT_END - -#endif /*__CCBATCHNODE_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCDecorativeDisplay.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCDecorativeDisplay.h deleted file mode 100644 index e3675c1..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCDecorativeDisplay.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCDECORATIVEDISPLAY_H__ -#define __CCDECORATIVEDISPLAY_H__ - -#include "../utils/CCArmatureDefine.h" -#include "CCDisplayFactory.h" -#include "../datas/CCDatas.h" - - -#if ENABLE_PHYSICS_BOX2D_DETECT || ENABLE_PHYSICS_CHIPMUNK_DETECT || ENABLE_PHYSICS_SAVE_CALCULATED_VERTEX -#include "../physics/CCColliderDetector.h" -#endif - -NS_CC_EXT_BEGIN -/** - * @js NA - * @lua NA - */ -class CCDecorativeDisplay: public CCObject -{ -public: - static CCDecorativeDisplay *create(); -public: - CCDecorativeDisplay(void); - ~CCDecorativeDisplay(void); - - virtual bool init(); - -protected: - - CC_SYNTHESIZE_RETAIN(CCNode *, m_pDisplay, Display); - CC_SYNTHESIZE_RETAIN(CCDisplayData *, m_pDisplayData, DisplayData); - -#if ENABLE_PHYSICS_BOX2D_DETECT || ENABLE_PHYSICS_CHIPMUNK_DETECT || ENABLE_PHYSICS_SAVE_CALCULATED_VERTEX - CC_SYNTHESIZE_RETAIN(CCColliderDetector *, m_pColliderDetector, ColliderDetector); -#endif -}; - -NS_CC_EXT_END - -#endif /*__CCDECORATIVEDISPLAY_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCDisplayFactory.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCDisplayFactory.h deleted file mode 100644 index ed3b59a..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCDisplayFactory.h +++ /dev/null @@ -1,65 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCDISPLAYFACTORY_H__ -#define __CCDISPLAYFACTORY_H__ - -#include "../utils/CCArmatureDefine.h" -#include "../datas/CCDatas.h" - -NS_CC_EXT_BEGIN - -class CCSkin; -class CCBone; -class CCDecorativeDisplay; -class CCDisplayData; -/** - * @js NA - * @lua NA - */ -class CCDisplayFactory -{ -public: - static void addDisplay(CCBone *bone, CCDecorativeDisplay *decoDisplay, CCDisplayData *displayData); - static void createDisplay(CCBone *bone, CCDecorativeDisplay *decoDisplay); - static void updateDisplay(CCBone *bone, float dt, bool dirty); - - static void addSpriteDisplay(CCBone *bone, CCDecorativeDisplay *decoDisplay, CCDisplayData *displayData); - static void createSpriteDisplay(CCBone *bone, CCDecorativeDisplay *decoDisplay); - static void initSpriteDisplay(CCBone *bone, CCDecorativeDisplay *decoDisplay, const char *displayName, CCSkin *skin); - - - static void addArmatureDisplay(CCBone *bone, CCDecorativeDisplay *decoDisplay, CCDisplayData *displayData); - static void createArmatureDisplay(CCBone *bone, CCDecorativeDisplay *decoDisplay); - static void updateArmatureDisplay(CCBone *bone, CCNode *display, float dt); - - static void addParticleDisplay(CCBone *bone, CCDecorativeDisplay *decoDisplay, CCDisplayData *displayData); - static void createParticleDisplay(CCBone *bone, CCDecorativeDisplay *decoDisplay); - static void updateParticleDisplay(CCBone *bone, CCNode *display, float dt); -}; - - -NS_CC_EXT_END - -#endif /*__CCDISPLAYFACTORY_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCDisplayManager.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCDisplayManager.h deleted file mode 100644 index cbaef10..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCDisplayManager.h +++ /dev/null @@ -1,156 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCDISPLAYMANAGER_H__ -#define __CCDISPLAYMANAGER_H__ - -#include "../utils/CCArmatureDefine.h" -#include "../display/CCDecorativeDisplay.h" -#include "../datas/CCDatas.h" - -NS_CC_EXT_BEGIN - -class CCBone; - -/**! CCDisplayManager manages CCBone's display - * @js NA - * @lua NA - */ -class CCDisplayManager : public CCObject -{ -public: - static CCDisplayManager *create(CCBone *bone); - -public: - CCDisplayManager(); - ~CCDisplayManager(); - - bool init(CCBone *bone); - - /** - * Use CCBoneData to init the display list. - * If display is a sprite, and it have texture info in the TexutreData, then use TexutreData to init the display's anchor point - * If the display is a CCArmature, then create a new CCArmature - */ - virtual void initDisplayList(CCBoneData *boneData); - - /** - * Add display and use _DisplayData init the display. - * If index already have a display, then replace it. - * If index is current display index, then also change display to _index - * - * @param displayData it include the display information, like DisplayType. - * If you want to create a sprite display, then create a CCSpriteDisplayData param - * - * @param index the index of the display you want to replace or add to - * -1 : append display from back - */ - void addDisplay(CCDisplayData *displayData, int index); - - void addDisplay(CCNode *display, int index); - - void removeDisplay(int index); - - CCArray *getDecorativeDisplayList(); - - /** - * @deprecated please use changeDisplayWithIndex and changeDisplayWithName - */ - CC_DEPRECATED_ATTRIBUTE void changeDisplayByIndex(int index, bool force); - CC_DEPRECATED_ATTRIBUTE void changeDisplayByName(const char *name, bool force); - - /** - * Change display by index. You can just use this method to change display in the display list. - * The display list is just used for this bone, and it is the displays you may use in every frame. - * - * Note : if index is the same with prev index, the method will not effect - * - * @param index The index of the display you want to change - * @param force If true, then force change display to specified display, or current display will set to display index edit in the flash every key frame. - */ - void changeDisplayWithIndex(int index, bool force); - void changeDisplayWithName(const char *name, bool force); - - CCNode *getDisplayRenderNode(); - DisplayType getDisplayRenderNodeType(); - - int getCurrentDisplayIndex(); - - virtual void setCurrentDecorativeDisplay(CCDecorativeDisplay *decoDisplay); - virtual CCDecorativeDisplay *getCurrentDecorativeDisplay(); - virtual CCDecorativeDisplay *getDecorativeDisplayByIndex( int index); - - /** - * Sets whether the display is visible - * The default value is true, a node is default to visible - * - * @param visible true if the node is visible, false if the node is hidden. - */ - virtual void setVisible(bool visible); - /** - * Determines if the display is visible - * - * @see setVisible(bool) - * @return true if the node is visible, false if the node is hidden. - */ - virtual bool isVisible(); - - CCSize getContentSize(); - CCRect getBoundingBox(); - - CCPoint getAnchorPoint(); - CCPoint getAnchorPointInPoints(); - - /** - * Check if the position is inside the bone. - */ - virtual bool containPoint(CCPoint &_point); - - /** - * Check if the position is inside the bone. - */ - virtual bool containPoint(float x, float y); - -protected: - CCArray *m_pDecoDisplayList; - //! Display render node. - CCNode *m_pDisplayRenderNode; - //! Display render node type - DisplayType m_eDisplayType; - //! Include current display information, like contour sprite, etc. - CCDecorativeDisplay *m_pCurrentDecoDisplay; - //! Current display index - int m_iDisplayIndex; - - CC_SYNTHESIZE(bool, m_bForceChangeDisplay, ForceChangeDisplay) - - //! Whether of not the bone is visible. Default is true - bool m_bVisible; - - CCBone *m_pBone; -}; - -NS_CC_EXT_END - -#endif /*__CCDISPLAYMANAGER_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCSkin.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCSkin.h deleted file mode 100644 index 488472f..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/display/CCSkin.h +++ /dev/null @@ -1,67 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCSKIN_H__ -#define __CCSKIN_H__ - -#include "../utils/CCArmatureDefine.h" -#include "../CCBone.h" - -NS_CC_EXT_BEGIN -/** - * @lua NA - */ -class CCSkin : public CCSprite -{ -public: - static CCSkin *create(); - static CCSkin *createWithSpriteFrameName(const char *pszSpriteFrameName); - static CCSkin *create(const char *pszFileName); -public: - /** - * @js ctor - */ - CCSkin(); - - bool initWithSpriteFrameName(const char *pszSpriteFrameName); - bool initWithFile(const char *pszFilename); - - void updateArmatureTransform(); - void updateTransform(); - - CCAffineTransform nodeToWorldTransform(); - CCAffineTransform nodeToWorldTransformAR(); - - CC_PROPERTY_PASS_BY_REF(CCBaseData, m_sSkinData, SkinData); - CC_PROPERTY(CCBone *, m_pBone, Bone); - -protected: - CCArmature *m_pArmature; - CCAffineTransform m_tSkinTransform; - CC_SYNTHESIZE_READONLY(std::string, m_strDisplayName, DisplayName) -}; - -NS_CC_EXT_END - -#endif /*__CCSKIN_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/external_tool/sigslot.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/external_tool/sigslot.h deleted file mode 100644 index ef08d34..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/external_tool/sigslot.h +++ /dev/null @@ -1,2540 +0,0 @@ -// sigslot.h: Signal/Slot classes -// -// Written by Sarah Thompson (sarah@telergy.com) 2002. -// -// License: Public domain. You are free to use this code however you like, with the proviso that -// the author takes on no responsibility or liability for any use. -// -// QUICK DOCUMENTATION -// -// (see also the full documentation at http://sigslot.sourceforge.net/) -// -// #define switches -// SIGSLOT_PURE_ISO - Define this to force ISO C++ compliance. This also disables -// all of the thread safety support on platforms where it is -// available. -// -// SIGSLOT_USE_POSIX_THREADS - Force use of Posix threads when using a C++ compiler other than -// gcc on a platform that supports Posix threads. (When using gcc, -// this is the default - use SIGSLOT_PURE_ISO to disable this if -// necessary) -// -// SIGSLOT_DEFAULT_MT_POLICY - Where thread support is enabled, this defaults to multi_threaded_global. -// Otherwise, the default is single_threaded. #define this yourself to -// override the default. In pure ISO mode, anything other than -// single_threaded will cause a compiler error. -// -// PLATFORM NOTES -// -// Win32 - On Win32, the WIN32 symbol must be #defined. Most mainstream -// compilers do this by default, but you may need to define it -// yourself if your build environment is less standard. This causes -// the Win32 thread support to be compiled in and used automatically. -// -// Unix/Linux/BSD, etc. - If you're using gcc, it is assumed that you have Posix threads -// available, so they are used automatically. You can override this -// (as under Windows) with the SIGSLOT_PURE_ISO switch. If you're using -// something other than gcc but still want to use Posix threads, you -// need to #define SIGSLOT_USE_POSIX_THREADS. -// -// ISO C++ - If none of the supported platforms are detected, or if -// SIGSLOT_PURE_ISO is defined, all multithreading support is turned off, -// along with any code that might cause a pure ISO C++ environment to -// complain. Before you ask, gcc -ansi -pedantic won't compile this -// library, but gcc -ansi is fine. Pedantic mode seems to throw a lot of -// errors that aren't really there. If you feel like investigating this, -// please contact the author. -// -// -// THREADING MODES -// -// single_threaded - Your program is assumed to be single threaded from the point of view -// of signal/slot usage (i.e. all objects using signals and slots are -// created and destroyed from a single thread). Behaviour if objects are -// destroyed concurrently is undefined (i.e. you'll get the occasional -// segmentation fault/memory exception). -// -// multi_threaded_global - Your program is assumed to be multi threaded. Objects using signals and -// slots can be safely created and destroyed from any thread, even when -// connections exist. In multi_threaded_global mode, this is achieved by a -// single global mutex (actually a critical section on Windows because they -// are faster). This option uses less OS resources, but results in more -// opportunities for contention, possibly resulting in more context switches -// than are strictly necessary. -// -// multi_threaded_local - Behaviour in this mode is essentially the same as multi_threaded_global, -// except that each signal, and each object that inherits has_slots, all -// have their own mutex/critical section. In practice, this means that -// mutex collisions (and hence context switches) only happen if they are -// absolutely essential. However, on some platforms, creating a lot of -// mutexes can slow down the whole OS, so use this option with care. -// -// USING THE LIBRARY -// -// See the full documentation at http://sigslot.sourceforge.net/ -// -// - -#ifndef SIGSLOT_H__ -#define SIGSLOT_H__ - -#include -#include - -#if defined(SIGSLOT_PURE_ISO) || (!defined(WIN32) && !defined(__GNUG__) && !defined(SIGSLOT_USE_POSIX_THREADS)) -# define _SIGSLOT_SINGLE_THREADED -#elif defined(WIN32) -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WINRT) || (CC_TARGET_PLATFORM == CC_PLATFORM_WP8) -// TODO: CC_PLATFORM_WINRT/CC_PLATFORM_WP8 need to implement _SIGSLOT_HAS_WIN32_THREADS -# define _SIGSLOT_SINGLE_THREADED -#else -# define _SIGSLOT_HAS_WIN32_THREADS -#endif -# include -#elif defined(__GNUG__) || defined(SIGSLOT_USE_POSIX_THREADS) -# define _SIGSLOT_HAS_POSIX_THREADS -# include -#else -# define _SIGSLOT_SINGLE_THREADED -#endif - -#ifndef SIGSLOT_DEFAULT_MT_POLICY -# ifdef _SIGSLOT_SINGLE_THREADED -# define SIGSLOT_DEFAULT_MT_POLICY single_threaded -# else -# define SIGSLOT_DEFAULT_MT_POLICY multi_threaded_local -# endif -#endif - - -namespace sigslot { - - class single_threaded - { - public: - single_threaded() - { - ; - } - - virtual ~single_threaded() - { - ; - } - - virtual void lock() - { - ; - } - - virtual void unlock() - { - ; - } - }; - -#ifdef _SIGSLOT_HAS_WIN32_THREADS - // The multi threading policies only get compiled in if they are enabled. - class multi_threaded_global - { - public: - multi_threaded_global() - { - static bool isinitialised = false; - - if(!isinitialised) - { - InitializeCriticalSection(get_critsec()); - isinitialised = true; - } - } - - multi_threaded_global(const multi_threaded_global&) - { - ; - } - - virtual ~multi_threaded_global() - { - ; - } - - virtual void lock() - { - EnterCriticalSection(get_critsec()); - } - - virtual void unlock() - { - LeaveCriticalSection(get_critsec()); - } - - private: - CRITICAL_SECTION* get_critsec() - { - static CRITICAL_SECTION g_critsec; - return &g_critsec; - } - }; - - class multi_threaded_local - { - public: - multi_threaded_local() - { - InitializeCriticalSection(&m_critsec); - } - - multi_threaded_local(const multi_threaded_local&) - { - InitializeCriticalSection(&m_critsec); - } - - virtual ~multi_threaded_local() - { - DeleteCriticalSection(&m_critsec); - } - - virtual void lock() - { - EnterCriticalSection(&m_critsec); - } - - virtual void unlock() - { - LeaveCriticalSection(&m_critsec); - } - - private: - CRITICAL_SECTION m_critsec; - }; -#endif // _SIGSLOT_HAS_WIN32_THREADS - -#ifdef _SIGSLOT_HAS_POSIX_THREADS - // The multi threading policies only get compiled in if they are enabled. - class multi_threaded_global - { - public: - multi_threaded_global() - { - pthread_mutex_init(get_mutex(), NULL); - } - - multi_threaded_global(const multi_threaded_global&) - { - ; - } - - virtual ~multi_threaded_global() - { - ; - } - - virtual void lock() - { - pthread_mutex_lock(get_mutex()); - } - - virtual void unlock() - { - pthread_mutex_unlock(get_mutex()); - } - - private: - pthread_mutex_t* get_mutex() - { - static pthread_mutex_t g_mutex; - return &g_mutex; - } - }; - - class multi_threaded_local - { - public: - multi_threaded_local() - { - pthread_mutex_init(&m_mutex, NULL); - } - - multi_threaded_local(const multi_threaded_local&) - { - pthread_mutex_init(&m_mutex, NULL); - } - - virtual ~multi_threaded_local() - { - pthread_mutex_destroy(&m_mutex); - } - - virtual void lock() - { - pthread_mutex_lock(&m_mutex); - } - - virtual void unlock() - { - pthread_mutex_unlock(&m_mutex); - } - - private: - pthread_mutex_t m_mutex; - }; -#endif // _SIGSLOT_HAS_POSIX_THREADS - - template - class lock_block - { - public: - mt_policy *m_mutex; - - lock_block(mt_policy *mtx) - : m_mutex(mtx) - { - m_mutex->lock(); - } - - ~lock_block() - { - m_mutex->unlock(); - } - }; - - template - class has_slots; - - template - class _connection_base0 - { - public: - virtual has_slots* getdest() const = 0; - virtual void emit() = 0; - virtual _connection_base0* clone() = 0; - virtual _connection_base0* duplicate(has_slots* pnewdest) = 0; - }; - - template - class _connection_base1 - { - public: - virtual has_slots* getdest() const = 0; - virtual void emit(arg1_type) = 0; - virtual _connection_base1* clone() = 0; - virtual _connection_base1* duplicate(has_slots* pnewdest) = 0; - }; - - template - class _connection_base2 - { - public: - virtual has_slots* getdest() const = 0; - virtual void emit(arg1_type, arg2_type) = 0; - virtual _connection_base2* clone() = 0; - virtual _connection_base2* duplicate(has_slots* pnewdest) = 0; - }; - - template - class _connection_base3 - { - public: - virtual has_slots* getdest() const = 0; - virtual void emit(arg1_type, arg2_type, arg3_type) = 0; - virtual _connection_base3* clone() = 0; - virtual _connection_base3* duplicate(has_slots* pnewdest) = 0; - }; - - template - class _connection_base4 - { - public: - virtual has_slots* getdest() const = 0; - virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type) = 0; - virtual _connection_base4* clone() = 0; - virtual _connection_base4* duplicate(has_slots* pnewdest) = 0; - }; - - template - class _connection_base5 - { - public: - virtual has_slots* getdest() const = 0; - virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type, - arg5_type) = 0; - virtual _connection_base5* clone() = 0; - virtual _connection_base5* duplicate(has_slots* pnewdest) = 0; - }; - - template - class _connection_base6 - { - public: - virtual has_slots* getdest() const = 0; - virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, - arg6_type) = 0; - virtual _connection_base6* clone() = 0; - virtual _connection_base6* duplicate(has_slots* pnewdest) = 0; - }; - - template - class _connection_base7 - { - public: - virtual has_slots* getdest() const = 0; - virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, - arg6_type, arg7_type) = 0; - virtual _connection_base7* clone() = 0; - virtual _connection_base7* duplicate(has_slots* pnewdest) = 0; - }; - - template - class _connection_base8 - { - public: - virtual has_slots* getdest() const = 0; - virtual void emit(arg1_type, arg2_type, arg3_type, arg4_type, arg5_type, - arg6_type, arg7_type, arg8_type) = 0; - virtual _connection_base8* clone() = 0; - virtual _connection_base8* duplicate(has_slots* pnewdest) = 0; - }; - - template - class _signal_base : public mt_policy - { - public: - virtual void slot_disconnect(has_slots* pslot) = 0; - virtual void slot_duplicate(const has_slots* poldslot, has_slots* pnewslot) = 0; - }; - - template - class has_slots : public mt_policy - { - private: - typedef std::set<_signal_base *> sender_set; - typedef typename sender_set::const_iterator const_iterator; - - public: - has_slots() - { - ; - } - - has_slots(const has_slots& hs) - : mt_policy(hs) - { - lock_block lock(this); - const_iterator it = hs.m_senders.begin(); - const_iterator itEnd = hs.m_senders.end(); - - while(it != itEnd) - { - (*it)->slot_duplicate(&hs, this); - m_senders.insert(*it); - ++it; - } - } - - void signal_connect(_signal_base* sender) - { - lock_block lock(this); - m_senders.insert(sender); - } - - void signal_disconnect(_signal_base* sender) - { - lock_block lock(this); - m_senders.erase(sender); - } - - virtual ~has_slots() - { - disconnect_all(); - } - - void disconnect_all() - { - lock_block lock(this); - const_iterator it = m_senders.begin(); - const_iterator itEnd = m_senders.end(); - - while(it != itEnd) - { - (*it)->slot_disconnect(this); - ++it; - } - - m_senders.erase(m_senders.begin(), m_senders.end()); - } - - private: - sender_set m_senders; - }; - - template - class _signal_base0 : public _signal_base - { - public: - typedef std::list<_connection_base0 *> connections_list; - - _signal_base0() - { - ; - } - - _signal_base0(const _signal_base0& s) - : _signal_base(s) - { - lock_block lock(this); - typename connections_list::const_iterator it = s.m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = s.m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_connect(this); - m_connected_slots.push_back((*it)->clone()); - - ++it; - } - } - - ~_signal_base0() - { - disconnect_all(); - } - - void disconnect_all() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_disconnect(this); - delete *it; - - ++it; - } - - m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); - } - - void disconnect(has_slots* pclass) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == pclass) - { - delete *it; - m_connected_slots.erase(it); - pclass->signal_disconnect(this); - return; - } - - ++it; - } - } - - void slot_disconnect(has_slots* pslot) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - typename connections_list::iterator itNext = it; - ++itNext; - - if((*it)->getdest() == pslot) - { - delete *it; - m_connected_slots.erase(it); - } - - it = itNext; - } - } - - void slot_duplicate(const has_slots* oldtarget, has_slots* newtarget) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == oldtarget) - { - m_connected_slots.push_back((*it)->duplicate(newtarget)); - } - - ++it; - } - } - - protected: - connections_list m_connected_slots; - }; - - template - class _signal_base1 : public _signal_base - { - public: - typedef std::list<_connection_base1 *> connections_list; - - _signal_base1() - { - ; - } - - _signal_base1(const _signal_base1& s) - : _signal_base(s) - { - lock_block lock(this); - typename connections_list::const_iterator it = s.m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = s.m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_connect(this); - m_connected_slots.push_back((*it)->clone()); - - ++it; - } - } - - void slot_duplicate(const has_slots* oldtarget, has_slots* newtarget) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == oldtarget) - { - m_connected_slots.push_back((*it)->duplicate(newtarget)); - } - - ++it; - } - } - - ~_signal_base1() - { - disconnect_all(); - } - - void disconnect_all() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_disconnect(this); - delete *it; - - ++it; - } - - m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); - } - - void disconnect(has_slots* pclass) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == pclass) - { - delete *it; - m_connected_slots.erase(it); - pclass->signal_disconnect(this); - return; - } - - ++it; - } - } - - void slot_disconnect(has_slots* pslot) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - typename connections_list::iterator itNext = it; - ++itNext; - - if((*it)->getdest() == pslot) - { - delete *it; - m_connected_slots.erase(it); - } - - it = itNext; - } - } - - - protected: - connections_list m_connected_slots; - }; - - template - class _signal_base2 : public _signal_base - { - public: - typedef std::list<_connection_base2 *> - connections_list; - - _signal_base2() - { - ; - } - - _signal_base2(const _signal_base2& s) - : _signal_base(s) - { - lock_block lock(this); - typename connections_list::const_iterator it = s.m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = s.m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_connect(this); - m_connected_slots.push_back((*it)->clone()); - - ++it; - } - } - - void slot_duplicate(const has_slots* oldtarget, has_slots* newtarget) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == oldtarget) - { - m_connected_slots.push_back((*it)->duplicate(newtarget)); - } - - ++it; - } - } - - ~_signal_base2() - { - disconnect_all(); - } - - void disconnect_all() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_disconnect(this); - delete *it; - - ++it; - } - - m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); - } - - void disconnect(has_slots* pclass) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == pclass) - { - delete *it; - m_connected_slots.erase(it); - pclass->signal_disconnect(this); - return; - } - - ++it; - } - } - - void slot_disconnect(has_slots* pslot) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - typename connections_list::iterator itNext = it; - ++itNext; - - if((*it)->getdest() == pslot) - { - delete *it; - m_connected_slots.erase(it); - } - - it = itNext; - } - } - - protected: - connections_list m_connected_slots; - }; - - template - class _signal_base3 : public _signal_base - { - public: - typedef std::list<_connection_base3 *> - connections_list; - - _signal_base3() - { - ; - } - - _signal_base3(const _signal_base3& s) - : _signal_base(s) - { - lock_block lock(this); - typename connections_list::const_iterator it = s.m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = s.m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_connect(this); - m_connected_slots.push_back((*it)->clone()); - - ++it; - } - } - - void slot_duplicate(const has_slots* oldtarget, has_slots* newtarget) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == oldtarget) - { - m_connected_slots.push_back((*it)->duplicate(newtarget)); - } - - ++it; - } - } - - ~_signal_base3() - { - disconnect_all(); - } - - void disconnect_all() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_disconnect(this); - delete *it; - - ++it; - } - - m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); - } - - void disconnect(has_slots* pclass) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == pclass) - { - delete *it; - m_connected_slots.erase(it); - pclass->signal_disconnect(this); - return; - } - - ++it; - } - } - - void slot_disconnect(has_slots* pslot) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - typename connections_list::iterator itNext = it; - ++itNext; - - if((*it)->getdest() == pslot) - { - delete *it; - m_connected_slots.erase(it); - } - - it = itNext; - } - } - - protected: - connections_list m_connected_slots; - }; - - template - class _signal_base4 : public _signal_base - { - public: - typedef std::list<_connection_base4 *> connections_list; - - _signal_base4() - { - ; - } - - _signal_base4(const _signal_base4& s) - : _signal_base(s) - { - lock_block lock(this); - typename connections_list::const_iterator it = s.m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = s.m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_connect(this); - m_connected_slots.push_back((*it)->clone()); - - ++it; - } - } - - void slot_duplicate(const has_slots* oldtarget, has_slots* newtarget) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == oldtarget) - { - m_connected_slots.push_back((*it)->duplicate(newtarget)); - } - - ++it; - } - } - - ~_signal_base4() - { - disconnect_all(); - } - - void disconnect_all() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_disconnect(this); - delete *it; - - ++it; - } - - m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); - } - - void disconnect(has_slots* pclass) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == pclass) - { - delete *it; - m_connected_slots.erase(it); - pclass->signal_disconnect(this); - return; - } - - ++it; - } - } - - void slot_disconnect(has_slots* pslot) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - typename connections_list::iterator itNext = it; - ++itNext; - - if((*it)->getdest() == pslot) - { - delete *it; - m_connected_slots.erase(it); - } - - it = itNext; - } - } - - protected: - connections_list m_connected_slots; - }; - - template - class _signal_base5 : public _signal_base - { - public: - typedef std::list<_connection_base5 *> connections_list; - - _signal_base5() - { - ; - } - - _signal_base5(const _signal_base5& s) - : _signal_base(s) - { - lock_block lock(this); - typename connections_list::const_iterator it = s.m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = s.m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_connect(this); - m_connected_slots.push_back((*it)->clone()); - - ++it; - } - } - - void slot_duplicate(const has_slots* oldtarget, has_slots* newtarget) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == oldtarget) - { - m_connected_slots.push_back((*it)->duplicate(newtarget)); - } - - ++it; - } - } - - ~_signal_base5() - { - disconnect_all(); - } - - void disconnect_all() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_disconnect(this); - delete *it; - - ++it; - } - - m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); - } - - void disconnect(has_slots* pclass) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == pclass) - { - delete *it; - m_connected_slots.erase(it); - pclass->signal_disconnect(this); - return; - } - - ++it; - } - } - - void slot_disconnect(has_slots* pslot) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - typename connections_list::iterator itNext = it; - ++itNext; - - if((*it)->getdest() == pslot) - { - delete *it; - m_connected_slots.erase(it); - } - - it = itNext; - } - } - - protected: - connections_list m_connected_slots; - }; - - template - class _signal_base6 : public _signal_base - { - public: - typedef std::list<_connection_base6 *> connections_list; - - _signal_base6() - { - ; - } - - _signal_base6(const _signal_base6& s) - : _signal_base(s) - { - lock_block lock(this); - typename connections_list::const_iterator it = s.m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = s.m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_connect(this); - m_connected_slots.push_back((*it)->clone()); - - ++it; - } - } - - void slot_duplicate(const has_slots* oldtarget, has_slots* newtarget) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == oldtarget) - { - m_connected_slots.push_back((*it)->duplicate(newtarget)); - } - - ++it; - } - } - - ~_signal_base6() - { - disconnect_all(); - } - - void disconnect_all() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_disconnect(this); - delete *it; - - ++it; - } - - m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); - } - - void disconnect(has_slots* pclass) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == pclass) - { - delete *it; - m_connected_slots.erase(it); - pclass->signal_disconnect(this); - return; - } - - ++it; - } - } - - void slot_disconnect(has_slots* pslot) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - typename connections_list::iterator itNext = it; - ++itNext; - - if((*it)->getdest() == pslot) - { - delete *it; - m_connected_slots.erase(it); - } - - it = itNext; - } - } - - protected: - connections_list m_connected_slots; - }; - - template - class _signal_base7 : public _signal_base - { - public: - typedef std::list<_connection_base7 *> connections_list; - - _signal_base7() - { - ; - } - - _signal_base7(const _signal_base7& s) - : _signal_base(s) - { - lock_block lock(this); - typename connections_list::const_iterator it = s.m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = s.m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_connect(this); - m_connected_slots.push_back((*it)->clone()); - - ++it; - } - } - - void slot_duplicate(const has_slots* oldtarget, has_slots* newtarget) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == oldtarget) - { - m_connected_slots.push_back((*it)->duplicate(newtarget)); - } - - ++it; - } - } - - ~_signal_base7() - { - disconnect_all(); - } - - void disconnect_all() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_disconnect(this); - delete *it; - - ++it; - } - - m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); - } - - void disconnect(has_slots* pclass) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == pclass) - { - delete *it; - m_connected_slots.erase(it); - pclass->signal_disconnect(this); - return; - } - - ++it; - } - } - - void slot_disconnect(has_slots* pslot) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - typename connections_list::iterator itNext = it; - ++itNext; - - if((*it)->getdest() == pslot) - { - delete *it; - m_connected_slots.erase(it); - } - - it = itNext; - } - } - - protected: - connections_list m_connected_slots; - }; - - template - class _signal_base8 : public _signal_base - { - public: - typedef std::list<_connection_base8 *> - connections_list; - - _signal_base8() - { - ; - } - - _signal_base8(const _signal_base8& s) - : _signal_base(s) - { - lock_block lock(this); - typename connections_list::const_iterator it = s.m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = s.m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_connect(this); - m_connected_slots.push_back((*it)->clone()); - - ++it; - } - } - - void slot_duplicate(const has_slots* oldtarget, has_slots* newtarget) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == oldtarget) - { - m_connected_slots.push_back((*it)->duplicate(newtarget)); - } - - ++it; - } - } - - ~_signal_base8() - { - disconnect_all(); - } - - void disconnect_all() - { - lock_block lock(this); - typename connections_list::const_iterator it = m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - (*it)->getdest()->signal_disconnect(this); - delete *it; - - ++it; - } - - m_connected_slots.erase(m_connected_slots.begin(), m_connected_slots.end()); - } - - void disconnect(has_slots* pclass) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - if((*it)->getdest() == pclass) - { - delete *it; - m_connected_slots.erase(it); - pclass->signal_disconnect(this); - return; - } - - ++it; - } - } - - void slot_disconnect(has_slots* pslot) - { - lock_block lock(this); - typename connections_list::iterator it = m_connected_slots.begin(); - typename connections_list::iterator itEnd = m_connected_slots.end(); - - while(it != itEnd) - { - typename connections_list::iterator itNext = it; - ++itNext; - - if((*it)->getdest() == pslot) - { - delete *it; - m_connected_slots.erase(it); - } - - it = itNext; - } - } - - protected: - connections_list m_connected_slots; - }; - - - template - class _connection0 : public _connection_base0 - { - public: - _connection0() - { - m_pobject = NULL; - m_pmemfun = NULL; - } - - _connection0(dest_type* pobject, void (dest_type::*pmemfun)()) - { - m_pobject = pobject; - m_pmemfun = pmemfun; - } - - virtual _connection_base0* clone() - { - return new _connection0(*this); - } - - virtual _connection_base0* duplicate(has_slots* pnewdest) - { - return new _connection0((dest_type *)pnewdest, m_pmemfun); - } - - virtual void emit() - { - (m_pobject->*m_pmemfun)(); - } - - virtual has_slots* getdest() const - { - return m_pobject; - } - - private: - dest_type* m_pobject; - void (dest_type::* m_pmemfun)(); - }; - - template - class _connection1 : public _connection_base1 - { - public: - _connection1() - { - m_pobject = NULL; - m_pmemfun = NULL; - } - - _connection1(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type)) - { - m_pobject = pobject; - m_pmemfun = pmemfun; - } - - virtual _connection_base1* clone() - { - return new _connection1(*this); - } - - virtual _connection_base1* duplicate(has_slots* pnewdest) - { - return new _connection1((dest_type *)pnewdest, m_pmemfun); - } - - virtual void emit(arg1_type a1) - { - (m_pobject->*m_pmemfun)(a1); - } - - virtual has_slots* getdest() const - { - return m_pobject; - } - - private: - dest_type* m_pobject; - void (dest_type::* m_pmemfun)(arg1_type); - }; - - template - class _connection2 : public _connection_base2 - { - public: - _connection2() - { - m_pobject = NULL; - m_pmemfun = NULL; - } - - _connection2(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, - arg2_type)) - { - m_pobject = pobject; - m_pmemfun = pmemfun; - } - - virtual _connection_base2* clone() - { - return new _connection2(*this); - } - - virtual _connection_base2* duplicate(has_slots* pnewdest) - { - return new _connection2((dest_type *)pnewdest, m_pmemfun); - } - - virtual void emit(arg1_type a1, arg2_type a2) - { - (m_pobject->*m_pmemfun)(a1, a2); - } - - virtual has_slots* getdest() const - { - return m_pobject; - } - - private: - dest_type* m_pobject; - void (dest_type::* m_pmemfun)(arg1_type, arg2_type); - }; - - template - class _connection3 : public _connection_base3 - { - public: - _connection3() - { - m_pobject = NULL; - m_pmemfun = NULL; - } - - _connection3(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, - arg2_type, arg3_type)) - { - m_pobject = pobject; - m_pmemfun = pmemfun; - } - - virtual _connection_base3* clone() - { - return new _connection3(*this); - } - - virtual _connection_base3* duplicate(has_slots* pnewdest) - { - return new _connection3((dest_type *)pnewdest, m_pmemfun); - } - - virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3) - { - (m_pobject->*m_pmemfun)(a1, a2, a3); - } - - virtual has_slots* getdest() const - { - return m_pobject; - } - - private: - dest_type* m_pobject; - void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type); - }; - - template - class _connection4 : public _connection_base4 - { - public: - _connection4() - { - m_pobject = NULL; - m_pmemfun = NULL; - } - - _connection4(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type)) - { - m_pobject = pobject; - m_pmemfun = pmemfun; - } - - virtual _connection_base4* clone() - { - return new _connection4(*this); - } - - virtual _connection_base4* duplicate(has_slots* pnewdest) - { - return new _connection4((dest_type *)pnewdest, m_pmemfun); - } - - virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, - arg4_type a4) - { - (m_pobject->*m_pmemfun)(a1, a2, a3, a4); - } - - virtual has_slots* getdest() const - { - return m_pobject; - } - - private: - dest_type* m_pobject; - void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, - arg4_type); - }; - - template - class _connection5 : public _connection_base5 - { - public: - _connection5() - { - m_pobject = NULL; - m_pmemfun = NULL; - } - - _connection5(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type, arg5_type)) - { - m_pobject = pobject; - m_pmemfun = pmemfun; - } - - virtual _connection_base5* clone() - { - return new _connection5(*this); - } - - virtual _connection_base5* duplicate(has_slots* pnewdest) - { - return new _connection5((dest_type *)pnewdest, m_pmemfun); - } - - virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5) - { - (m_pobject->*m_pmemfun)(a1, a2, a3, a4, a5); - } - - virtual has_slots* getdest() const - { - return m_pobject; - } - - private: - dest_type* m_pobject; - void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, arg4_type, - arg5_type); - }; - - template - class _connection6 : public _connection_base6 - { - public: - _connection6() - { - m_pobject = NULL; - m_pmemfun = NULL; - } - - _connection6(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type, arg5_type, arg6_type)) - { - m_pobject = pobject; - m_pmemfun = pmemfun; - } - - virtual _connection_base6* clone() - { - return new _connection6(*this); - } - - virtual _connection_base6* duplicate(has_slots* pnewdest) - { - return new _connection6((dest_type *)pnewdest, m_pmemfun); - } - - virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5, arg6_type a6) - { - (m_pobject->*m_pmemfun)(a1, a2, a3, a4, a5, a6); - } - - virtual has_slots* getdest() const - { - return m_pobject; - } - - private: - dest_type* m_pobject; - void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, arg4_type, - arg5_type, arg6_type); - }; - - template - class _connection7 : public _connection_base7 - { - public: - _connection7() - { - m_pobject = NULL; - m_pmemfun = NULL; - } - - _connection7(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, arg7_type)) - { - m_pobject = pobject; - m_pmemfun = pmemfun; - } - - virtual _connection_base7* clone() - { - return new _connection7(*this); - } - - virtual _connection_base7* duplicate(has_slots* pnewdest) - { - return new _connection7((dest_type *)pnewdest, m_pmemfun); - } - - virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5, arg6_type a6, arg7_type a7) - { - (m_pobject->*m_pmemfun)(a1, a2, a3, a4, a5, a6, a7); - } - - virtual has_slots* getdest() const - { - return m_pobject; - } - - private: - dest_type* m_pobject; - void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, arg4_type, - arg5_type, arg6_type, arg7_type); - }; - - template - class _connection8 : public _connection_base8 - { - public: - _connection8() - { - m_pobject = NULL; - m_pmemfun = NULL; - } - - _connection8(dest_type* pobject, void (dest_type::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, - arg7_type, arg8_type)) - { - m_pobject = pobject; - m_pmemfun = pmemfun; - } - - virtual _connection_base8* clone() - { - return new _connection8(*this); - } - - virtual _connection_base8* duplicate(has_slots* pnewdest) - { - return new _connection8((dest_type *)pnewdest, m_pmemfun); - } - - virtual void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5, arg6_type a6, arg7_type a7, arg8_type a8) - { - (m_pobject->*m_pmemfun)(a1, a2, a3, a4, a5, a6, a7, a8); - } - - virtual has_slots* getdest() const - { - return m_pobject; - } - - private: - dest_type* m_pobject; - void (dest_type::* m_pmemfun)(arg1_type, arg2_type, arg3_type, arg4_type, - arg5_type, arg6_type, arg7_type, arg8_type); - }; - - template - class signal0 : public _signal_base0 - { - public: - typedef std::list<_connection_base0 *> connections_list; - signal0() - { - ; - } - - signal0(const signal0& s) - : _signal_base0(s) - { - ; - } - - - template - void connect(desttype* pclass, void (desttype::*pmemfun)()) - { - lock_block lock(this); - _connection0* conn = - new _connection0(pclass, pmemfun); - - _signal_base0::m_connected_slots.push_back(conn); - pclass->signal_connect(this); - } - - void emit() - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = _signal_base0::m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = _signal_base0::m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(); - - it = itNext; - } - } - - void operator()() - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = _signal_base0::m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = _signal_base0::m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(); - - it = itNext; - } - } - - }; - - template - class signal1 : public _signal_base1 - { - public: - typedef std::list<_connection_base1 *> connections_list; - typedef _signal_base1 signal_base; - signal1() - { - ; - } - - signal1(const signal1& s) - : _signal_base1(s) - { - ; - } - - template - void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type)) - { - lock_block lock(this); - _connection1* conn = - new _connection1(pclass, pmemfun); - signal_base::m_connected_slots.push_back(conn); - pclass->signal_connect(this); - } - - void emit(arg1_type a1) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = signal_base::m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = signal_base::m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1); - - it = itNext; - } - } - - void operator()(arg1_type a1) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = signal_base::m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = signal_base::m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1); - - it = itNext; - } - } - }; - - template - class signal2 : public _signal_base2 - { - public: - typedef std::list<_connection_base2 *> - connections_list; - typedef _signal_base2 signal_base; - signal2() - { - ; - } - - signal2(const signal2& s) - : _signal_base2(s) - { - ; - } - - template - void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, - arg2_type)) - { - lock_block lock(this); - _connection2* conn = new - _connection2(pclass, pmemfun); - signal_base::m_connected_slots.push_back(conn); - pclass->signal_connect(this); - } - - void emit(arg1_type a1, arg2_type a2) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = signal_base::m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = signal_base::m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2); - - it = itNext; - } - } - - void operator()(arg1_type a1, arg2_type a2) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = signal_base::m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = signal_base::m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2); - - it = itNext; - } - } - }; - - template - class signal3 : public _signal_base3 - { - public: - typedef std::list<_connection_base3 *> - connections_list; - typedef _signal_base3 signal_base; - signal3() - { - ; - } - - ~signal3() - { - - } - - signal3(const signal3& s) - : _signal_base3(s) - { - ; - } - - template - void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, - arg2_type, arg3_type)) - { - lock_block lock(this); - _connection3* conn = - new _connection3(pclass, - pmemfun); - signal_base::m_connected_slots.push_back(conn); - pclass->signal_connect(this); - } - - void emit(arg1_type a1, arg2_type a2, arg3_type a3) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = signal_base::m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = signal_base::m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3); - - it = itNext; - } - } - - void operator()(arg1_type a1, arg2_type a2, arg3_type a3) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = signal_base::m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = signal_base::m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3); - - it = itNext; - } - } - }; - - template - class signal4 : public _signal_base4 - { - public: - typedef std::list<_connection_base4 *> connections_list; - typedef _signal_base4 signal_base; - signal4() - { - ; - } - - signal4(const signal4& s) - : _signal_base4(s) - { - ; - } - - template - void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type)) - { - lock_block lock(this); - _connection4* - conn = new _connection4(pclass, pmemfun); - signal_base::m_connected_slots.push_back(conn); - pclass->signal_connect(this); - } - - void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = signal_base::m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = signal_base::m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4); - - it = itNext; - } - } - - void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = signal_base::m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = signal_base::m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4); - - it = itNext; - } - } - }; - - template - class signal5 : public _signal_base5 - { - public: - typedef std::list<_connection_base5 *> connections_list; - typedef _signal_base5 signal_base; - signal5() - { - ; - } - - signal5(const signal5& s) - : _signal_base5(s) - { - ; - } - - template - void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type, arg5_type)) - { - lock_block lock(this); - _connection5* conn = new _connection5(pclass, pmemfun); - signal_base::m_connected_slots.push_back(conn); - pclass->signal_connect(this); - } - - void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = signal_base::m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = signal_base::m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4, a5); - - it = itNext; - } - } - - void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = signal_base::m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = signal_base::m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4, a5); - - it = itNext; - } - } - }; - - - template - class signal6 : public _signal_base6 - { - public: - typedef std::list<_connection_base6 *> connections_list; - typedef _signal_base6 signal_base; - signal6() - { - ; - } - - signal6(const signal6& s) - : _signal_base6(s) - { - ; - } - - template - void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type, arg5_type, arg6_type)) - { - lock_block lock(this); - _connection6* conn = - new _connection6(pclass, pmemfun); - signal_base::m_connected_slots.push_back(conn); - pclass->signal_connect(this); - } - - void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5, arg6_type a6) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = signal_base::m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = signal_base::m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4, a5, a6); - - it = itNext; - } - } - - void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5, arg6_type a6) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = signal_base::m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = signal_base::m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4, a5, a6); - - it = itNext; - } - } - }; - - template - class signal7 : public _signal_base7 - { - public: - typedef std::list<_connection_base7 *> connections_list; - typedef _signal_base7 signal_base; - signal7() - { - ; - } - - signal7(const signal7& s) - : _signal_base7(s) - { - ; - } - - template - void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, - arg7_type)) - { - lock_block lock(this); - _connection7* conn = - new _connection7(pclass, pmemfun); - signal_base::m_connected_slots.push_back(conn); - pclass->signal_connect(this); - } - - void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5, arg6_type a6, arg7_type a7) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = signal_base::m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = signal_base::m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4, a5, a6, a7); - - it = itNext; - } - } - - void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5, arg6_type a6, arg7_type a7) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = signal_base::m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = signal_base::m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4, a5, a6, a7); - - it = itNext; - } - } - }; - - template - class signal8 : public _signal_base8 - { - public: - typedef std::list<_connection_base8 *> - connections_list; - typedef _signal_base8 signal_base; - signal8() - { - ; - } - - signal8(const signal8& s) - : _signal_base8(s) - { - ; - } - - template - void connect(desttype* pclass, void (desttype::*pmemfun)(arg1_type, - arg2_type, arg3_type, arg4_type, arg5_type, arg6_type, - arg7_type, arg8_type)) - { - lock_block lock(this); - _connection8* conn = - new _connection8(pclass, pmemfun); - signal_base::m_connected_slots.push_back(conn); - pclass->signal_connect(this); - } - - void emit(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5, arg6_type a6, arg7_type a7, arg8_type a8) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = signal_base::m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = signal_base::m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4, a5, a6, a7, a8); - - it = itNext; - } - } - - void operator()(arg1_type a1, arg2_type a2, arg3_type a3, arg4_type a4, - arg5_type a5, arg6_type a6, arg7_type a7, arg8_type a8) - { - lock_block lock(this); - typename connections_list::const_iterator itNext, it = signal_base::m_connected_slots.begin(); - typename connections_list::const_iterator itEnd = signal_base::m_connected_slots.end(); - - while(it != itEnd) - { - itNext = it; - ++itNext; - - (*it)->emit(a1, a2, a3, a4, a5, a6, a7, a8); - - it = itNext; - } - } - }; - -}; // namespace sigslot - -#endif // SIGSLOT_H__ - diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/physics/CCColliderDetector.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/physics/CCColliderDetector.h deleted file mode 100644 index 4c7ffe2..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/physics/CCColliderDetector.h +++ /dev/null @@ -1,160 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCCOLLIDERDETECTOR_H__ -#define __CCCOLLIDERDETECTOR_H__ - -#include "../utils/CCArmatureDefine.h" -#include "../datas/CCDatas.h" - -#ifndef PT_RATIO -#define PT_RATIO 32 -#endif - -#if ENABLE_PHYSICS_CHIPMUNK_DETECT -struct cpBody; -struct cpShape; -#elif ENABLE_PHYSICS_BOX2D_DETECT -class b2Body; -class b2Fixture; -struct b2Filter; -#endif - - -NS_CC_EXT_BEGIN - -class CCBone; -/** - * @js NA - * @lua NA - */ -class CCColliderFilter -{ -public: - ~CCColliderFilter() { } - -#if ENABLE_PHYSICS_BOX2D_DETECT -public: - CCColliderFilter(unsigned short categoryBits = 0x0001, unsigned short maskBits = 0xFFFF, signed short groupIndex = 0); - void updateShape(b2Fixture *fixture); -protected: - CC_SYNTHESIZE(unsigned short, m_CategoryBits, CategoryBits); - CC_SYNTHESIZE(unsigned short, m_MaskBits, MaskBits); - CC_SYNTHESIZE(signed short, m_GroupIndex, GroupIndex); -#elif ENABLE_PHYSICS_CHIPMUNK_DETECT -public: - CCColliderFilter(uintptr_t collisionType = 0, uintptr_t group = 0); - void updateShape(cpShape *shape); -protected: - CC_SYNTHESIZE(uintptr_t, m_CollisionType, CollisionType); - CC_SYNTHESIZE(uintptr_t, m_Group, Group); -#endif -}; - -/** -* @js NA -* @lua NA -*/ -class ColliderBody : public CCObject -{ -public: -#if ENABLE_PHYSICS_BOX2D_DETECT - CC_SYNTHESIZE(b2Fixture *, m_pFixture, B2Fixture) -#elif ENABLE_PHYSICS_CHIPMUNK_DETECT - CC_SYNTHESIZE(cpShape *, m_pShape, Shape) -#elif ENABLE_PHYSICS_SAVE_CALCULATED_VERTEX - CC_SYNTHESIZE_READONLY(CCArray *, m_pCalculatedVertexList, CalculatedVertexList); -#endif - -public: - ColliderBody(CCContourData *contourData); - ~ColliderBody(); - - inline CCContourData *getContourData() { return m_pContourData; } - -#if ENABLE_PHYSICS_BOX2D_DETECT || ENABLE_PHYSICS_CHIPMUNK_DETECT - void setColliderFilter(CCColliderFilter *filter); - CCColliderFilter *getColliderFilter(); -private: - CCColliderFilter *m_pFilter; -#endif - -private: - CCContourData *m_pContourData; -}; - -/* - * @brief ContourSprite used to draw the contour of the display - * @js NA - * @lua NA - */ -class CCColliderDetector : public CCObject -{ -public: - static CCColliderDetector *create(); - static CCColliderDetector *create(CCBone *bone); -public: - CCColliderDetector(); - ~CCColliderDetector(void); - - virtual bool init(); - virtual bool init(CCBone *bone); - - void addContourData(CCContourData *contourData); - void addContourDataList(CCArray *contourDataList); - - void removeContourData(CCContourData *contourData); - void removeAll(); - - void updateTransform(CCAffineTransform &t); - - void setActive(bool active); - bool getActive(); - - CCArray *getColliderBodyList(); - -#if ENABLE_PHYSICS_BOX2D_DETECT || ENABLE_PHYSICS_CHIPMUNK_DETECT - virtual void setColliderFilter(CCColliderFilter *filter); - virtual CCColliderFilter *getColliderFilter(); -protected: - CCColliderFilter *m_pFilter; -#endif -protected: - CCArray *m_pColliderBodyList; - - CC_SYNTHESIZE(CCBone *, m_pBone, Bone); - -#if ENABLE_PHYSICS_BOX2D_DETECT - CC_PROPERTY(b2Body *, m_pBody, Body); -#elif ENABLE_PHYSICS_CHIPMUNK_DETECT - CC_PROPERTY(cpBody *, m_pBody, Body); -#endif - -protected: - bool m_bActive; -}; - -NS_CC_EXT_END - -#endif /*__CCCOLLIDERDETECTOR_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCArmatureDataManager.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCArmatureDataManager.h deleted file mode 100644 index b0050eb..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCArmatureDataManager.h +++ /dev/null @@ -1,203 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCARMATUREDATAMANAGER_H__ -#define __CCARMATUREDATAMANAGER_H__ - -#include "CCArmatureDefine.h" -#include "../datas/CCDatas.h" - - -NS_CC_EXT_BEGIN - -struct CCRelativeData -{ - std::vector plistFiles; - std::vector armatures; - std::vector animations; - std::vector textures; -}; - -/** - * @brief format and manage armature configuration and armature animation - * @lua NA - */ -class CCArmatureDataManager : public CCObject -{ -public: - /** - * @js getInstance - */ - static CCArmatureDataManager *sharedArmatureDataManager(); - - static void purge(); -private: - CCArmatureDataManager(void); - ~CCArmatureDataManager(void); - -public: - - /** - * Init CCArmatureDataManager - */ - virtual bool init(); - - - - /** - * Add armature data - * @param id The id of the armature data - * @param armatureData CCArmatureData * - */ - void addArmatureData(const char *id, CCArmatureData *armatureData, const char *configFilePath = ""); - - /** - * @brief get armature data - * @param id the id of the armature data you want to get - * @return CCArmatureData * - */ - CCArmatureData *getArmatureData(const char *id); - - /** - * @brief remove armature data - * @param id the id of the armature data you want to get - */ - void removeArmatureData(const char *id); - - /** - * @brief add animation data - * @param id the id of the animation data - * @return CCAnimationData * - */ - void addAnimationData(const char *id, CCAnimationData *animationData, const char *configFilePath = ""); - - /** - * @brief get animation data from m_pAnimationDatas(CCDictionary) - * @param id the id of the animation data you want to get - * @return CCAnimationData * - */ - CCAnimationData *getAnimationData(const char *id); - - /** - * @brief remove animation data - * @param id the id of the animation data - */ - void removeAnimationData(const char *id); - - /** - * @brief add texture data - * @param id the id of the texture data - * @return CCTextureData * - */ - void addTextureData(const char *id, CCTextureData *textureData, const char *configFilePath = ""); - - /** - * @brief get texture data - * @param id the id of the texture data you want to get - * @return CCTextureData * - */ - CCTextureData *getTextureData(const char *id); - - /** - * @brief remove texture data - * @param id the id of the texture data you want to get - */ - void removeTextureData(const char *id); - - /** - * @brief Add ArmatureFileInfo, it is managed by CCArmatureDataManager. - */ - void addArmatureFileInfo(const char *configFilePath); - - /** - * @brief Add ArmatureFileInfo, it is managed by CCArmatureDataManager. - * It will load data in a new thread - */ - void addArmatureFileInfoAsync(const char *configFilePath, CCObject *target, SEL_SCHEDULE selector); - - /** - * @brief Add ArmatureFileInfo, it is managed by CCArmatureDataManager. - */ - void addArmatureFileInfo(const char *imagePath, const char *plistPath, const char *configFilePath); - - /** - * @brief Add ArmatureFileInfo, it is managed by CCArmatureDataManager. - * It will load data in a new thread - */ - void addArmatureFileInfoAsync(const char *imagePath, const char *plistPath, const char *configFilePath, CCObject *target, SEL_SCHEDULE selector); - - - virtual void removeArmatureFileInfo(const char *configFilePath); - - - /** - * @brief Add sprite frame to CCSpriteFrameCache, it will save display name and it's relative image name - */ - void addSpriteFrameFromFile(const char *plistPath, const char *imagePath, const char *configFilePath = ""); - - - /** - * @brief Juge whether or not need auto load sprite file - */ - bool isAutoLoadSpriteFile(); - - - CCDictionary *getArmatureDatas() const; - CCDictionary *getAnimationDatas() const; - CCDictionary *getTextureDatas() const; - -protected: - void addRelativeData(const char* configFilePath); - CCRelativeData *getRelativeData(const char* configFilePath); -private: - /** - * @brief save amature datas - * @key std::string - * @value CCArmatureData * - */ - CCDictionary *m_pArmarureDatas; - - /** - * @brief save animation datas - * @key std::string - * @value CCAnimationData * - */ - CCDictionary *m_pAnimationDatas; - - /** - * @brief save texture datas - * @key std::string - * @value CCTextureData * - */ - CCDictionary *m_pTextureDatas; - - bool m_bAutoLoadSpriteFile; - - std::map m_sRelativeDatas; -}; - - -NS_CC_EXT_END - -#endif/*__CCARMATUREDATAMANAGER_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCArmatureDefine.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCArmatureDefine.h deleted file mode 100644 index a64eb39..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCArmatureDefine.h +++ /dev/null @@ -1,71 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCARMATUREDEFINE_H__ -#define __CCARMATUREDEFINE_H__ - - -#include "cocos2d.h" -#include "ExtensionMacros.h" - -#define VERSION_COMBINED 0.30f -#define VERSION_CHANGE_ROTATION_RANGE 1.0f -#define VERSION_COLOR_READING 1.1f - -#ifndef AUTO_ADD_SPRITE_FRAME_NAME_PREFIX -#define AUTO_ADD_SPRITE_FRAME_NAME_PREFIX 0 -#endif // !AUTO_ADD_SPRITE_FRAME_NAME_PREFIX - - -#define PHYSICS_TYPE 3 - -#if PHYSICS_TYPE == 1 -#define ENABLE_PHYSICS_BOX2D_DETECT 1 -#define ENABLE_PHYSICS_CHIPMUNK_DETECT 0 -#define ENABLE_PHYSICS_SAVE_CALCULATED_VERTEX 0 -#elif PHYSICS_TYPE == 2 -#define ENABLE_PHYSICS_BOX2D_DETECT 0 -#define ENABLE_PHYSICS_CHIPMUNK_DETECT 1 -#define ENABLE_PHYSICS_SAVE_CALCULATED_VERTEX 0 -#elif PHYSICS_TYPE == 3 -#define ENABLE_PHYSICS_BOX2D_DETECT 0 -#define ENABLE_PHYSICS_CHIPMUNK_DETECT 0 -#define ENABLE_PHYSICS_SAVE_CALCULATED_VERTEX 1 -#else -#define ENABLE_PHYSICS_BOX2D_DETECT 0 -#define ENABLE_PHYSICS_CHIPMUNK_DETECT 0 -#define ENABLE_PHYSICS_SAVE_CALCULATED_VERTEX 0 -#endif - - -#define CS_RETURN_IF(cond) if (cond) return -#define CS_RETURN_NULL_IF(cond) if (cond) return NULL; - -NS_CC_EXT_BEGIN - -const char *armatureVersion(); - -NS_CC_EXT_END - -#endif /*__CCARMATUREDEFINE_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCDataReaderHelper.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCDataReaderHelper.h deleted file mode 100644 index 163a677..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCDataReaderHelper.h +++ /dev/null @@ -1,133 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCDATAREADERHELPER_H__ -#define __CCDATAREADERHELPER_H__ - -#include "CCArmatureDefine.h" -#include "../datas/CCDatas.h" -#include "../CCArmature.h" - -#include "../../Json/DictionaryHelper.h" -#include "../../Json/rapidjson/document.h" - -namespace tinyxml2 -{ - class XMLElement; -} - -NS_CC_EXT_BEGIN - -typedef struct _DataInfo DataInfo; -/** -* @js NA -* @lua NA -*/ -class CCDataReaderHelper : CCObject -{ -public: - static CCDataReaderHelper *sharedDataReaderHelper(); - - /** - * Scale the position data, used for multiresolution adapter - * It won't effect the data already read. - */ - static void setPositionReadScale(float scale); - static float getPositionReadScale(); - - static void purge(); - -public: - ~CCDataReaderHelper(); - - void addDataFromFile(const char *filePath); - void addDataFromFileAsync(const char *imagePath, const char *plistPath, const char *filePath, CCObject *target, SEL_SCHEDULE selector); - - void addDataAsyncCallBack(float dt); - - void removeConfigFile(const char *configFile); -public: - - /** - * Translate XML export from Dragon CCBone flash tool to datas, and save them. - * When you add a new xml, the data already saved will be keeped. - * - * @param xmlPath The cache of the xml - */ - static void addDataFromCache(const char *pFileContent, DataInfo *dataInfo = NULL); - - - - /** - * Decode CCArmature Datas from xml export from Dragon CCBone flash tool - */ - static CCArmatureData *decodeArmature(tinyxml2::XMLElement *armatureXML, DataInfo *dataInfo); - static CCBoneData *decodeBone(tinyxml2::XMLElement *boneXML, tinyxml2::XMLElement *parentXML, DataInfo *dataInfo); - static CCDisplayData *decodeBoneDisplay(tinyxml2::XMLElement *displayXML, DataInfo *dataInfo); - - - /** - * Decode CCArmatureAnimation Datas from xml export from Dragon CCBone flash tool - */ - static CCAnimationData *decodeAnimation(tinyxml2::XMLElement *animationXML, DataInfo *dataInfo); - static CCMovementData *decodeMovement(tinyxml2::XMLElement *movementXML, CCArmatureData *armatureData, DataInfo *dataInfo); - static CCMovementBoneData *decodeMovementBone(tinyxml2::XMLElement *movBoneXml, tinyxml2::XMLElement *parentXml, CCBoneData *boneData, DataInfo *dataInfo); - static CCFrameData *decodeFrame(tinyxml2::XMLElement *frameXML, tinyxml2::XMLElement *parentFrameXml, CCBoneData *boneData, DataInfo *dataInfo); - - - /** - * Decode Texture Datas from xml export from Dragon CCBone flash tool - */ - static CCTextureData *decodeTexture(tinyxml2::XMLElement *textureXML, DataInfo *dataInfo); - - /** - * Decode Contour Datas from xml export from Dragon CCBone flash tool - */ - static CCContourData *decodeContour(tinyxml2::XMLElement *contourXML, DataInfo *dataInfo); - -public: - static void addDataFromJsonCache(const char *fileContent, DataInfo *dataInfo = NULL); - - static CCArmatureData *decodeArmature(const rapidjson::Value &json, DataInfo *dataInfo); - static CCBoneData *decodeBone(const rapidjson::Value &json, DataInfo *dataInfo); - static CCDisplayData *decodeBoneDisplay(const rapidjson::Value &json, DataInfo *dataInfo); - static CCAnimationData *decodeAnimation(const rapidjson::Value &json, DataInfo *dataInfo); - static CCMovementData *decodeMovement(const rapidjson::Value &json, DataInfo *dataInfo); - - static CCMovementBoneData *decodeMovementBone(const rapidjson::Value &json, DataInfo *dataInfo); - static CCFrameData *decodeFrame(const rapidjson::Value &json, DataInfo *dataInfo); - - static CCTextureData *decodeTexture(const rapidjson::Value &json); - static CCContourData *decodeContour(const rapidjson::Value &json); - - static void decodeNode(CCBaseData *node, const rapidjson::Value &json, DataInfo *dataInfo); -private: - static std::vector s_arrConfigFileList; - - static CCDataReaderHelper *s_DataReaderHelper; -}; - -NS_CC_EXT_END - -#endif /*__CCDATAREADERHELPER_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCSpriteFrameCacheHelper.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCSpriteFrameCacheHelper.h deleted file mode 100644 index 29f598a..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCSpriteFrameCacheHelper.h +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCSPRITEFRAMECACHEHELPER_H__ -#define __CCSPRITEFRAMECACHEHELPER_H__ - -#include "CCArmatureDefine.h" -#include - -using namespace std; - -NS_CC_EXT_BEGIN -/** -* @js NA -* @lua NA -*/ -class CCSpriteFrameCacheHelper -{ -public: - static CCSpriteFrameCacheHelper *sharedSpriteFrameCacheHelper(); - - static void purge(); -public: - - /** - * @brief Add sprite frame to CCSpriteFrameCache, it will save display name and it's relative image name - */ - void addSpriteFrameFromFile(const char *plistPath, const char *imagePath); - - -private: - CCSpriteFrameCacheHelper(); - ~CCSpriteFrameCacheHelper(); - - static CCSpriteFrameCacheHelper *s_SpriteFrameCacheHelper; -}; - -NS_CC_EXT_END - -#endif /*__CCSPRITEFRAMECACHEHELPER_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCTransformHelp.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCTransformHelp.h deleted file mode 100644 index 8a3e0ef..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCTransformHelp.h +++ /dev/null @@ -1,64 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCTRANSFORMHELP_H__ -#define __CCTRANSFORMHELP_H__ - -#include "CCArmatureDefine.h" -#include "../datas/CCDatas.h" - -NS_CC_EXT_BEGIN - -/* - * use to calculate the matrix of node from parent node - * @js NA - * @lua NA - */ -class CCTransformHelp -{ -public: - CCTransformHelp(); - - static void transformFromParent(CCBaseData &node, const CCBaseData &parentNode); - static void transformToParent(CCBaseData &node, const CCBaseData &parentNode); - - static void transformFromParentWithoutScale(CCBaseData &node, const CCBaseData &parentNode); - static void transformToParentWithoutScale(CCBaseData &node, const CCBaseData &parentNode); - - static void nodeToMatrix(const CCBaseData &_node, CCAffineTransform &_matrix); - static void matrixToNode(const CCAffineTransform &_matrix, CCBaseData &_node); - - static void nodeConcat(CCBaseData &target, CCBaseData &source); - static void nodeSub(CCBaseData &target, CCBaseData &source); -public: - static CCAffineTransform helpMatrix1; - static CCAffineTransform helpMatrix2; - - static CCPoint helpPoint1; - static CCPoint helpPoint2; -}; - -NS_CC_EXT_END - -#endif /*__CCTRANSFORMHELP_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCTweenFunction.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCTweenFunction.h deleted file mode 100644 index 6a12553..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCTweenFunction.h +++ /dev/null @@ -1,141 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCTWEENFUNCTION_H__ -#define __CCTWEENFUNCTION_H__ - - -#include "CCArmatureDefine.h" -#include - -NS_CC_EXT_BEGIN - -enum CCTweenType -{ - CUSTOM_EASING = -1, - - Linear, - - Sine_EaseIn, - Sine_EaseOut, - Sine_EaseInOut, - - - Quad_EaseIn, - Quad_EaseOut, - Quad_EaseInOut, - - Cubic_EaseIn, - Cubic_EaseOut, - Cubic_EaseInOut, - - Quart_EaseIn, - Quart_EaseOut, - Quart_EaseInOut, - - Quint_EaseIn, - Quint_EaseOut, - Quint_EaseInOut, - - Expo_EaseIn, - Expo_EaseOut, - Expo_EaseInOut, - - Circ_EaseIn, - Circ_EaseOut, - Circ_EaseInOut, - - Elastic_EaseIn, - Elastic_EaseOut, - Elastic_EaseInOut, - - Back_EaseIn, - Back_EaseOut, - Back_EaseInOut, - - Bounce_EaseIn, - Bounce_EaseOut, - Bounce_EaseInOut, - - TWEEN_EASING_MAX = 10000 -}; -/** -* @js NA -* @lua NA -*/ -class CCTweenFunction -{ -public: - - static float tweenTo(float time, CCTweenType type, float *easingParam); - - static float linear(float time); - - static float sineEaseIn(float time); - static float sineEaseOut(float time); - static float sineEaseInOut(float time); - - static float quadEaseIn(float time); - static float quadEaseOut(float time); - static float quadEaseInOut(float time); - - static float cubicEaseIn(float time); - static float cubicEaseOut(float time); - static float cubicEaseInOut(float time); - - static float quartEaseIn(float time); - static float quartEaseOut(float time); - static float quartEaseInOut(float time); - - static float quintEaseIn(float time); - static float quintEaseOut(float time); - static float quintEaseInOut(float time); - - static float expoEaseIn(float time); - static float expoEaseOut(float time); - static float expoEaseInOut(float time); - - static float circEaseIn(float time); - static float circEaseOut(float time); - static float circEaseInOut(float time); - - static float elasticEaseIn(float time, float *easingParam); - static float elasticEaseOut(float time, float *easingParam); - static float elasticEaseInOut(float time, float *easingParam); - - static float backEaseIn(float time); - static float backEaseOut(float time); - static float backEaseInOut(float time); - - static float bounceEaseIn(float time); - static float bounceEaseOut(float time); - static float bounceEaseInOut(float time); - - static float customEase(float time, float *easingParam); -}; - - -NS_CC_EXT_END - -#endif /*__CCTWEENFUNCTION_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCUtilMath.h b/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCUtilMath.h deleted file mode 100644 index 68f41d6..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Armature/utils/CCUtilMath.h +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCUTILMATH_H__ -#define __CCUTILMATH_H__ - -#include "CCArmatureDefine.h" -#include - -NS_CC_EXT_BEGIN - -#define CC_DOUBLE_PI (M_PI*2) - -#define CC_HALF_PI (M_PI * 0.5f) - - -//! hit test function -bool isSpriteContainPoint(CCSprite *sprite, CCPoint point); -bool isSpriteContainPoint(CCSprite *sprite, CCPoint point, CCPoint &outPoint); - -#define CC_SPRITE_CONTAIN_POINT(sprite, point) isSpriteContainPoint((sprite), (point)) -#define CC_SPRITE_CONTAIN_POINT_WITH_RETURN(sprite, point, outPoint) isSpriteContainPoint((sprite), (point), outPoint) - - -//! motion curve function -CCPoint bezierTo(float t, CCPoint &point1, CCPoint &point2, CCPoint &point3); -CCPoint bezierTo(float t, CCPoint &point1, CCPoint &point2, CCPoint &point3, CCPoint &point4); - -CCPoint circleTo(float t, CCPoint ¢er, float radius, float fromRadian, float radianDif); - - -NS_CC_EXT_END - -#endif /*__CCUTILMATH_H__*/ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComAttribute.h b/cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComAttribute.h deleted file mode 100644 index babbba1..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComAttribute.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_EXTENTIONS_CCCOMATTRIBUTE_H__ -#define __CC_EXTENTIONS_CCCOMATTRIBUTE_H__ - -#include "CCComBase.h" - -NS_CC_EXT_BEGIN -/** - * @lua NA - */ -class CCComAttribute : public cocos2d::CCComponent -{ - DECLARE_CLASS_COMPONENT_INFO -protected: - /** - * @js ctor - */ - CCComAttribute(void); - /** - * @js NA - */ - virtual ~CCComAttribute(void); - -public: - virtual bool init(); - static CCComAttribute* create(void); - virtual bool serialize(void* r); - - void setInt(const char *key, int value); - void setFloat(const char *key, float value); - void setBool(const char *key, bool value); - void setCString(const char *key, const char *value); - - int getInt(const char *key, int def = 0) const; - float getFloat(const char *key, float def = 0.0f) const; - bool getBool(const char *key, bool def = false) const; - const char* getCString(const char *key, const char *def = NULL) const; - - bool parse(const std::string &jsonPath); -private: - cocos2d::CCDictionary *_dict; - rapidjson::Document _doc; -}; - -NS_CC_EXT_END - -#endif // __FUNDATION__CCCOMPONENT_H__ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComAudio.h b/cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComAudio.h deleted file mode 100644 index 303a51a..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComAudio.h +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_EXTENTIONS_CCCOMAUDIO_H__ -#define __CC_EXTENTIONS_CCCOMAUDIO_H__ - -#include "CCComBase.h" - -NS_CC_EXT_BEGIN -/** - * @lua NA - */ -class CCComAudio : public cocos2d::CCComponent -{ - DECLARE_CLASS_COMPONENT_INFO -protected: - CCComAudio(void); - virtual ~CCComAudio(void); - -public: - virtual bool init(); - virtual void onEnter(); - virtual void onExit(); - virtual bool isEnabled() const; - virtual void setEnabled(bool b); - virtual bool serialize(void* r); - - static CCComAudio* create(void); - -public: - void end(); - void preloadBackgroundMusic(const char* pszFilePath); - void playBackgroundMusic(const char* pszFilePath, bool bLoop); - void playBackgroundMusic(const char* pszFilePath); - void playBackgroundMusic(); - void stopBackgroundMusic(bool bReleaseData); - void stopBackgroundMusic(); - void pauseBackgroundMusic(); - void resumeBackgroundMusic(); - void rewindBackgroundMusic(); - bool willPlayBackgroundMusic(); - bool isBackgroundMusicPlaying(); - float getBackgroundMusicVolume(); - void setBackgroundMusicVolume(float volume); - float getEffectsVolume(); - void setEffectsVolume(float volume); - unsigned int playEffect(const char* pszFilePath, bool bLoop); - unsigned int playEffect(const char* pszFilePath); - unsigned int playEffect(); - void pauseEffect(unsigned int nSoundId); - void pauseAllEffects(); - void resumeEffect(unsigned int nSoundId); - void resumeAllEffects(); - void stopEffect(unsigned int nSoundId); - void stopAllEffects(); - void preloadEffect(const char* pszFilePath); - void unloadEffect(const char* pszFilePath); - void setFile(const char* pszFilePath); - const char* getFile(); - void setLoop(bool bLoop); - bool isLoop(); -private: - std::string m_strFilePath; - bool m_bLoop; -}; - -NS_CC_EXT_END - -#endif // __FUNDATION__CCCOMPONENT_H__ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComBase.h b/cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComBase.h deleted file mode 100644 index cc1b227..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComBase.h +++ /dev/null @@ -1,51 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_EXTENTIONS_CCCOMBASE_H__ -#define __CC_EXTENTIONS_CCCOMBASE_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include "../Trigger/ObjectFactory.h" -#include "../Json/DictionaryHelper.h" -#include - - -#define DECLARE_CLASS_COMPONENT_INFO \ - public: \ - static cocos2d::extension::ObjectFactory::TInfo Type; \ - static cocos2d::CCObject* createInstance(void); \ - -#define IMPLEMENT_CLASS_COMPONENT_INFO(className) \ - cocos2d::CCObject* className::createInstance(void) \ - { \ - return className::create(); \ - } \ - cocos2d::extension::ObjectFactory::TInfo className::Type(#className, &className::createInstance); \ - -#define CREATE_CLASS_COMPONENT_INFO(className) \ - cocos2d::extension::ObjectFactory::TInfo(#className, &className::createInstance) - - -#endif diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComController.h b/cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComController.h deleted file mode 100644 index 1b3c845..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComController.h +++ /dev/null @@ -1,59 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_EXTENTIONS_CCCOMCONTROLLER_H__ -#define __CC_EXTENTIONS_CCCOMCONTROLLER_H__ - -#include "CCComBase.h" -#include "CCInputDelegate.h" - -NS_CC_EXT_BEGIN -/** - * @lua NA - */ -class CCComController : public cocos2d::CCComponent, public CCInputDelegate -{ - DECLARE_CLASS_COMPONENT_INFO -public: - /** - * @js ctor - */ - CCComController(void); - /** - * @js NA - */ - virtual ~CCComController(void); - virtual bool init(); - virtual void onEnter(); - virtual void onExit(); - virtual void update(float delta); - virtual bool isEnabled() const; - virtual void setEnabled(bool b); - - static CCComController* create(void); -}; - -NS_CC_EXT_END - -#endif // __FUNDATION__CCCOMPONENT_H__ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComRender.h b/cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComRender.h deleted file mode 100644 index b2fb6eb..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Components/CCComRender.h +++ /dev/null @@ -1,66 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_EXTENTIONS_CCCOMRENDER_H__ -#define __CC_EXTENTIONS_CCCOMRENDER_H__ - -#include "CCComBase.h" - -NS_CC_EXT_BEGIN - -/** - * @lua NA - */ -class CCComRender : public cocos2d::CCComponent -{ - DECLARE_CLASS_COMPONENT_INFO -public: - /** - * @js ctor - */ - CCComRender(void); - CCComRender(cocos2d::CCNode *node, const char *comName); - /** - * @js NA - */ - virtual ~CCComRender(void); - -public: - virtual void onEnter(); - virtual void onExit(); - virtual bool serialize(void* r); - virtual cocos2d::CCNode* getNode(); - virtual void setNode(cocos2d::CCNode *pNode); - - static CCComRender* create(cocos2d::CCNode *pNode, const char *comName); - static CCComRender* create(void); -private: - bool readJson(const char *pszFileName, rapidjson::Document &doc); -private: - cocos2d::CCNode *m_pRender; -}; - -NS_CC_EXT_END - -#endif // __FUNDATION__CCCOMPONENT_H__ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Components/CCInputDelegate.h b/cappuccino-sdk/incl/extensions/CocoStudio/Components/CCInputDelegate.h deleted file mode 100644 index 4be3b76..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Components/CCInputDelegate.h +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CC_EXTENTIONS_CCINPUTDELEGATE_H__ -#define __CC_EXTENTIONS_CCINPUTDELEGATE_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" - -NS_CC_EXT_BEGIN -/** - * @lua NA - */ -class CCInputDelegate : public CCTouchDelegate, public CCAccelerometerDelegate, public CCKeypadDelegate -{ -protected: - CCInputDelegate(void); - virtual ~CCInputDelegate(void); - -public: - virtual bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent); - - virtual void ccTouchesBegan(CCSet *pTouches, CCEvent *pEvent); - virtual void ccTouchesMoved(CCSet *pTouches, CCEvent *pEvent); - virtual void ccTouchesEnded(CCSet *pTouches, CCEvent *pEvent); - virtual void ccTouchesCancelled(CCSet *pTouches, CCEvent *pEvent); - /** - * @js NA - */ - virtual void didAccelerate(CCAcceleration* pAccelerationValue); -public: - virtual bool isTouchEnabled(); - virtual void setTouchEnabled(bool value); - - virtual bool isAccelerometerEnabled(); - virtual void setAccelerometerEnabled(bool value); - - virtual bool isKeypadEnabled(); - virtual void setKeypadEnabled(bool value); - - virtual void setTouchMode(ccTouchesMode mode); - virtual int getTouchMode(); - - virtual void setTouchPriority(int priority); - virtual int getTouchPriority(); - -protected: - bool m_bTouchEnabled; - bool m_bAccelerometerEnabled; - bool m_bKeypadEnabled; - -private: - int m_nTouchPriority; - ccTouchesMode m_eTouchMode; -}; - -NS_CC_EXT_END - -#endif // __FUNDATION__CCCOMPONENT_H__ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/BaseClasses/UIWidget.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/BaseClasses/UIWidget.h deleted file mode 100644 index b9559f7..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/BaseClasses/UIWidget.h +++ /dev/null @@ -1,730 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __UIWIDGET_H__ -#define __UIWIDGET_H__ - -#include "cocos2d.h" -#include "../Layouts/UILayoutDefine.h" -#include "../Layouts/UILayoutParameter.h" -#include "../System/GUIDefine.h" - -NS_CC_BEGIN - -namespace ui { - -typedef enum -{ - BRIGHT_NONE = -1, - BRIGHT_NORMAL, - BRIGHT_HIGHLIGHT -}BrightStyle; - -typedef enum -{ - WidgetTypeWidget, //control - WidgetTypeContainer //container -}WidgetType; - -typedef enum -{ - UI_TEX_TYPE_LOCAL, - UI_TEX_TYPE_PLIST -}TextureResType; - -typedef enum -{ - TOUCH_EVENT_BEGAN, - TOUCH_EVENT_MOVED, - TOUCH_EVENT_ENDED, - TOUCH_EVENT_CANCELED -}TouchEventType; - -typedef enum -{ - SIZE_ABSOLUTE, - SIZE_PERCENT -}SizeType; - -typedef enum -{ - POSITION_ABSOLUTE, - POSITION_PERCENT -}PositionType; - -typedef void (CCObject::*SEL_TouchEvent)(CCObject*,TouchEventType); -#define toucheventselector(_SELECTOR) (SEL_TouchEvent)(&_SELECTOR) -/** -* @js NA -* @lua NA -*/ -class Widget : public CCNode -{ -public: - /** - * Default constructor - */ - Widget(void); - - /** - * Default destructor - */ - virtual ~Widget(); - - /** - * Allocates and initializes a widget. - */ - static Widget* create(); - - /** - * Sets whether the widget is enabled - * - * Highest control of widget. - * The default value is true, a widget is default to enabled - * - * @param enabled true if the widget is enabled, widget may be touched and visible, false if the widget is disabled, widget cannot be touched and hidden. - */ - virtual void setEnabled(bool enabled); - - /** - * Determines if the widget is enabled - * - * @return true if the widget is enabled, false if the widget is disabled. - */ - bool isEnabled() const; - - /** - * Sets whether the widget is bright - * - * The default value is true, a widget is default to bright - * - * @param visible true if the widget is bright, false if the widget is dark. - */ - void setBright(bool bright); - - /** - * Determines if the widget is bright - * - * @return true if the widget is bright, false if the widget is dark. - */ - bool isBright() const; - - /** - * Sets whether the widget is touch enabled - * - * The default value is false, a widget is default to touch disabled - * - * @param visible true if the widget is touch enabled, false if the widget is touch disabled. - */ - virtual void setTouchEnabled(bool enabled); - - /** - * To set the bright style of widget. - * - * @see BrightStyle - * - * @param style BRIGHT_NORMAL the widget is normal state, BRIGHT_HIGHLIGHT the widget is height light state. - */ - void setBrightStyle(BrightStyle style); - - /** - * Determines if the widget is touch enabled - * - * @return true if the widget is touch enabled, false if the widget is touch disabled. - */ - bool isTouchEnabled() const; - - /** - * Determines if the widget is on focused - * - * @return true if the widget is on focused, false if the widget is not on focused. - */ - bool isFocused() const; - - /** - * Sets whether the widget is on focused - * - * The default value is false, a widget is default to not on focused - * - * @param fucosed true if the widget is on focused, false if the widget is not on focused. - */ - void setFocused(bool fucosed); - - /** - * Gets the left boundary position of this widget. - * - * @return The left boundary position of this widget. - */ - float getLeftInParent(); - - /** - * Gets the bottom boundary position of this widget. - * - * @return The bottom boundary position of this widget. - */ - float getBottomInParent(); - - /** - * Gets the right boundary position of this widget. - * - * @return The right boundary position of this widget. - */ - float getRightInParent(); - - /** - * Gets the top boundary position of this widget. - * - * @return The top boundary position of this widget. - */ - float getTopInParent(); - - /** - * Adds a child to the container with z-order as 0. - * - * If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. - * - * @param child A child node - */ - virtual void addChild(CCNode * child); - /** - * Adds a child to the container with a z-order - * - * If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. - * - * @param child A child node - * @param zOrder Z order for drawing priority. Please refer to setZOrder(int) - */ - virtual void addChild(CCNode * child, int zOrder); - /** - * Adds a child to the container with z order and tag - * - * If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. - * - * @param child A child node - * @param zOrder Z order for drawing priority. Please refer to setZOrder(int) - * @param tag A interger to identify the node easily. Please refer to setTag(int) - */ - virtual void addChild(CCNode* child, int zOrder, int tag); - /** - * Gets a child from the container with its tag - * - * @param tag An identifier to find the child node. - * - * @return a Node object whose tag equals to the input parameter - */ - virtual CCNode * getChildByTag(int tag); - - virtual void sortAllChildren(); - /** - * Return an array of children - * - * Composing a "tree" structure is a very important feature of Node - * Here's a sample code of traversing children array: - @code - Node* node = NULL; - CCARRAY_FOREACH(parent->getChildren(), node) - { - node->setPosition(0,0); - } - @endcode - * This sample code traverses all children nodes, and set their position to (0,0) - * - * @return An array of children - */ - virtual CCArray* getChildren(); - - /** - * Get the amount of children. - * - * @return The amount of children. - */ - virtual unsigned int getChildrenCount() const; - - /** - * Removes this node itself from its parent node with a cleanup. - * If the node orphan, then nothing happens. - * @see `removeFromParentAndCleanup(bool)` - */ - virtual void removeFromParent(); - /** - * Removes this node itself from its parent node. - * If the node orphan, then nothing happens. - * @param cleanup true if all actions and callbacks on this node should be removed, false otherwise. - * @js removeFromParent - * @lua removeFromParent - */ - virtual void removeFromParentAndCleanup(bool cleanup); - - virtual void removeChild(CCNode* child); - - /** - * Removes a child from the container. It will also cleanup all running actions depending on the cleanup parameter. - * - * @param child The child node which will be removed. - * @param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. - */ - virtual void removeChild(CCNode* child, bool cleanup); - - /** - * Removes a child from the container by tag value. It will also cleanup all running actions depending on the cleanup parameter - * - * @param tag An interger number that identifies a child node - * @param cleanup true if all running actions and callbacks on the child node will be cleanup, false otherwise. - */ - virtual void removeChildByTag(int tag, bool cleanup); - /** - * Removes all children from the container with a cleanup. - * - * @see `removeAllChildrenWithCleanup(bool)` - */ - virtual void removeAllChildren(); - /** - * Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter. - * - * @param cleanup true if all running actions on all children nodes should be cleanup, false oterwise. - * @js removeAllChildren - * @lua removeAllChildren - */ - virtual void removeAllChildrenWithCleanup(bool cleanup); - - /** - * Gets a child from the container with its name - * - * @param name An key to find the child widget. - * - * @return a Widget object whose name equals to the input parameter - */ - virtual Widget* getChildByName(const char* name); - - virtual void addNode(CCNode* node); - - virtual void addNode(CCNode * node, int zOrder); - - virtual void addNode(CCNode* node, int zOrder, int tag); - - virtual CCNode * getNodeByTag(int tag); - - virtual CCArray* getNodes(); - - virtual void removeNode(CCNode* node); - - virtual void removeNodeByTag(int tag); - - virtual void removeAllNodes(); - - virtual void visit(); - - /** - * Sets the touch event target/selector of the menu item - */ - void addTouchEventListener(CCObject* target,SEL_TouchEvent selector); - - - //cocos2d property - - /** - * Changes the position (x,y) of the widget in OpenGL coordinates - * - * Usually we use p(x,y) to compose Point object. - * The original point (0,0) is at the left-bottom corner of screen. - * - * @param position The position (x,y) of the widget in OpenGL coordinates - */ - void setPosition(const CCPoint &pos); - - /** - * Changes the position (x,y) of the widget in OpenGL coordinates - * - * Usually we use p(x,y) to compose Point object. - * The original point (0,0) is at the left-bottom corner of screen. - * - * @param percent The percent (x,y) of the widget in OpenGL coordinates - */ - void setPositionPercent(const CCPoint &percent); - - /** - * Gets the percent (x,y) of the widget in OpenGL coordinates - * - * @see setPosition(const Point&) - * - * @return The percent (x,y) of the widget in OpenGL coordinates - */ - const CCPoint& getPositionPercent(); - - /** - * Changes the position type of the widget - * - * @see PositionType - * - * @param type the position type of widget - */ - void setPositionType(PositionType type); - - /** - * Gets the position type of the widget - * - * @see PositionType - * - * @return type the position type of widget - */ - PositionType getPositionType() const; - - /** - * Sets whether the widget should be flipped horizontally or not. - * - * @param bFlipX true if the widget should be flipped horizaontally, false otherwise. - */ - virtual void setFlipX(bool flipX); - - /** - * Returns the flag which indicates whether the widget is flipped horizontally or not. - * - * It only flips the texture of the widget, and not the texture of the widget's children. - * Also, flipping the texture doesn't alter the anchorPoint. - * If you want to flip the anchorPoint too, and/or to flip the children too use: - * widget->setScaleX(sprite->getScaleX() * -1); - * - * @return true if the widget is flipped horizaontally, false otherwise. - */ - virtual bool isFlipX(){return _flippedX;}; - - /** - * Sets whether the widget should be flipped vertically or not. - * - * @param bFlipY true if the widget should be flipped vertically, flase otherwise. - */ - virtual void setFlipY(bool flipY); - - /** - * Return the flag which indicates whether the widget is flipped vertically or not. - * - * It only flips the texture of the widget, and not the texture of the widget's children. - * Also, flipping the texture doesn't alter the anchorPoint. - * If you want to flip the anchorPoint too, and/or to flip the children too use: - * widget->setScaleY(widget->getScaleY() * -1); - * - * @return true if the widget is flipped vertically, flase otherwise. - */ - virtual bool isFlipY(){return _flippedY;}; - - virtual void setColor(const ccColor3B& color); - - virtual void setOpacity(GLubyte opacity); - - const ccColor3B& getColor(){return _color;}; - - GLubyte getOpacity(){return _opacity;}; - - /** - * A call back function when widget lost of focus. - */ - void didNotSelectSelf(); - - /* - * Checks a point if in parent's area. - * - * @param point - * - * @return true if the point is in parent's area, flase otherwise. - */ - bool clippingParentAreaContainPoint(const CCPoint &pt); - - /* - * Sends the touch event to widget's parent - */ - virtual void checkChildInfo(int handleState,Widget* sender,const CCPoint &touchPoint); - - /* - * Gets the touch began point of widget when widget is selected. - * - * @return the touch began point. - */ - const CCPoint& getTouchStartPos(); - - /* - * Gets the touch move point of widget when widget is selected. - * - * @return the touch move point. - */ - const CCPoint& getTouchMovePos(); - - /* - * Gets the touch end point of widget when widget is selected. - * - * @return the touch end point. - */ - const CCPoint& getTouchEndPos(); - - /** - * Changes the name that is used to identify the widget easily. - * - * @param A const char* that indentifies the widget. - */ - void setName(const char* name); - - /** - * Returns a name that is used to identify the widget easily. - * - * You can set tags to widget then identify them easily. - * - * @return A const char* that identifies the widget. - */ - const char* getName() const; - - /** - * Returns a type that is widget's type - * - * @see WidgetType - * - * @return A WidgetType - */ - WidgetType getWidgetType() const; - - /** - * Changes the size that is widget's size - * - * @param size that is widget's size - */ - virtual void setSize(const CCSize &size); - - /** - * Changes the percent that is widget's percent size - * - * @param percent that is widget's percent size - */ - virtual void setSizePercent(const CCPoint &percent); - - /** - * Changes the size type of widget. - * - * @see SizeType - * - * @param type that is widget's size type - */ - void setSizeType(SizeType type); - - /** - * Gets the size type of widget. - * - * @see SizeType - * - * @param type that is widget's size type - */ - SizeType getSizeType() const; - - /** - * Returns size of widget - * - * @return size - */ - const CCSize& getSize() const; - - virtual const CCSize& getLayoutSize() {return _size;}; - - /** - * Returns size percent of widget - * - * @return size percent - */ - const CCPoint& getSizePercent() const; - - const CCSize& getCustomSize() const; - - /** - * Checks a point if is in widget's space - * - * @param point - * - * @return true if the point is in widget's space, flase otherwise. - */ - virtual bool hitTest(const CCPoint &pt); - - virtual bool onTouchBegan(CCTouch *touch, CCEvent *unused_event); - virtual void onTouchMoved(CCTouch *touch, CCEvent *unused_event); - virtual void onTouchEnded(CCTouch *touch, CCEvent *unused_event); - virtual void onTouchCancelled(CCTouch *touch, CCEvent *unused_event); - - /** - * Sets a LayoutParameter to widget. - * - * @see LayoutParameter - * - * @param LayoutParameter pointer - * - * @param type Relative or Linear - */ - void setLayoutParameter(LayoutParameter* parameter); - - /** - * Gets LayoutParameter of widget. - * - * @see LayoutParameter - * - * @param type Relative or Linear - * - * @return LayoutParameter - */ - LayoutParameter* getLayoutParameter(LayoutParameterType type); - - /** - * Ignore the widget size - * - * @param ignore, true that widget will ignore it's size, use texture size, false otherwise. Default value is true. - */ - virtual void ignoreContentAdaptWithSize(bool ignore); - - /** - * Gets the widget if is ignore it's size. - * - * @param ignore, true that widget will ignore it's size, use texture size, false otherwise. Default value is true. - */ - bool isIgnoreContentAdaptWithSize() const; - - /** - * Gets world position of widget. - * - * @return world position of widget. - */ - CCPoint getWorldPosition(); - - /** - * Gets the Virtual Renderer of widget. - * - * For example, a button's Virtual Renderer is it's texture renderer. - * - * @return Node pointer. - */ - virtual CCNode* getVirtualRenderer(); - - /** - * Gets the content size of widget. - * - * Content size is widget's texture size. - */ - virtual const CCSize& getContentSize() const; - - /** - * Returns the "class name" of widget. - */ - virtual std::string getDescription() const; - - Widget* clone(); - - virtual void onEnter(); - virtual void onExit(); - - void updateSizeAndPosition(); - - void updateSizeAndPosition(const CCSize& parentSize); - - /*temp action*/ - void setActionTag(int tag); - int getActionTag(); -protected: - //call back function called when size changed. - virtual void onSizeChanged(); - - //initializes state of widget. - virtual bool init(); - - //initializes renderer of widget. - virtual void initRenderer(){}; - - //call back function called widget's state changed to normal. - virtual void onPressStateChangedToNormal(); - - //call back function called widget's state changed to selected. - virtual void onPressStateChangedToPressed(); - - //call back function called widget's state changed to dark. - virtual void onPressStateChangedToDisabled(); - void pushDownEvent(); - void moveEvent(); - void releaseUpEvent(); - void cancelUpEvent(); - void updateAnchorPoint(); - virtual void updateTextureColor(){}; - virtual void updateTextureOpacity(){}; - virtual void updateTextureRGBA(){}; - virtual void updateFlippedX(){}; - virtual void updateFlippedY(){}; - void updateColorToRenderer(CCNode* renderer); - void updateOpacityToRenderer(CCNode* renderer); - void updateRGBAToRenderer(CCNode* renderer); - void copyProperties(Widget* model); - virtual Widget* createCloneInstance(); - virtual void copySpecialProperties(Widget* model); - virtual void copyClonedWidgetChildren(Widget* model); - Widget* getWidgetParent(); -protected: - bool _enabled; ///< Highest control of widget - bool _bright; ///< is this widget bright - bool _touchEnabled; ///< is this widget touch endabled - bool _touchPassedEnabled; ///< is the touch event should be passed - bool _focus; ///< is the widget on focus - BrightStyle _brightStyle; ///< bright style - CCPoint _touchStartPos; ///< touch began point - CCPoint _touchMovePos; ///< touch moved point - CCPoint _touchEndPos; ///< touch ended point - - CCObject* _touchEventListener; - SEL_TouchEvent _touchEventSelector; - - - - std::string _name; - WidgetType _widgetType; - int _actionTag; - CCSize _size; - CCSize _customSize; - bool _ignoreSize; - bool _affectByClipping; - SizeType _sizeType; - CCPoint _sizePercent; - PositionType _positionType; - CCPoint _positionPercent; - bool _reorderWidgetChildDirty; - bool _hitted; - CCArray* _widgetChildren; - CCDictionary* _layoutParameterDictionary; - - CCArray* _nodes; - - ccColor3B _color; - GLubyte _opacity; - - bool _flippedX; - bool _flippedY; - - friend class TouchGroup; -}; -} - -namespace gui = ui; - -NS_CC_END - - - -#endif /* defined(__Widget__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/Layouts/UILayout.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/Layouts/UILayout.h deleted file mode 100644 index 33b7650..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/Layouts/UILayout.h +++ /dev/null @@ -1,316 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __LAYOUT_H__ -#define __LAYOUT_H__ - -#include "../BaseClasses/UIWidget.h" - -NS_CC_BEGIN - -namespace ui { - -typedef enum -{ - LAYOUT_COLOR_NONE, - LAYOUT_COLOR_SOLID, - LAYOUT_COLOR_GRADIENT -}LayoutBackGroundColorType; - -typedef enum -{ - LAYOUT_ABSOLUTE, - LAYOUT_LINEAR_VERTICAL, - LAYOUT_LINEAR_HORIZONTAL, - LAYOUT_RELATIVE -}LayoutType; - -typedef enum { - LAYOUT_CLIPPING_STENCIL, - LAYOUT_CLIPPING_SCISSOR -}LayoutClippingType; - -/** - * @js NA - * @lua NA - */ -class Layout : public Widget -{ - - DECLARE_CLASS_GUI_INFO - -public: - /** - * Default constructor - */ - Layout(); - - /** - * Default destructor - */ - virtual ~Layout(); - - /** - * Allocates and initializes a layout. - */ - static Layout* create(); - - //background - /** - * Sets a background image for layout - * - * @param fileName image file path. - * - * @param texType @see TextureResType. UI_TEX_TYPE_LOCAL means local file, UI_TEX_TYPE_PLIST means sprite frame. - */ - void setBackGroundImage(const char* fileName,TextureResType texType = UI_TEX_TYPE_LOCAL); - - /** - * Sets a background image capinsets for layout, if the background image is a scale9 render. - * - * @param capinsets of background image. - * - */ - void setBackGroundImageCapInsets(const CCRect& capInsets); - - const CCRect& getBackGroundImageCapInsets(); - - /** - * Sets Color Type for layout. - * - * @param type @see LayoutBackGroundColorType. - */ - void setBackGroundColorType(LayoutBackGroundColorType type); - - LayoutBackGroundColorType getBackGroundColorType(); - - /** - * Sets background iamge use scale9 renderer. - * - * @param enabled true that use scale9 renderer, false otherwise. - */ - void setBackGroundImageScale9Enabled(bool enabled); - - bool isBackGroundImageScale9Enabled(); - - /** - * Sets background color for layout, if color type is LAYOUT_COLOR_SOLID - * - * @param color - */ - void setBackGroundColor(const ccColor3B &color); - - const ccColor3B& getBackGroundColor(); - - /** - * Sets background color for layout, if color type is LAYOUT_COLOR_GRADIENT - * - * @param start color - * - * @param end color - */ - void setBackGroundColor(const ccColor3B &startColor, const ccColor3B &endColor); - - const ccColor3B& getBackGroundStartColor(); - - const ccColor3B& getBackGroundEndColor(); - - /** - * Sets background opacity layout. - * - * @param opacity - */ - void setBackGroundColorOpacity(GLubyte opacity); - - GLubyte getBackGroundColorOpacity(); - - /** - * Sets background color vector for layout, if color type is LAYOUT_COLOR_GRADIENT - * - * @param vector - */ - void setBackGroundColorVector(const CCPoint &vector); - - const CCPoint& getBackGroundColorVector(); - - void setBackGroundImageColor(const ccColor3B& color); - - void setBackGroundImageOpacity(GLubyte opacity); - - const ccColor3B& getBackGroundImageColor(); - - GLubyte getBackGroundImageOpacity(); - - /** - * Remove the background image of layout. - */ - void removeBackGroundImage(); - - /** - * Gets background image texture size. - * - * @return background image texture size. - */ - const CCSize& getBackGroundImageTextureSize() const; - - /** - * Changes if layout can clip it's content and child. - * - * If you really need this, please enable it. But it would reduce the rendering efficiency. - * - * @param clipping enabled. - */ - virtual void setClippingEnabled(bool enabled); - - void setClippingType(LayoutClippingType type); - - LayoutClippingType getClippingType(); - - /** - * Gets if layout is clipping enabled. - * - * @return if layout is clipping enabled. - */ - virtual bool isClippingEnabled(); - - /** - * Returns the "class name" of widget. - */ - virtual std::string getDescription() const; - - /** - * Sets LayoutType. - * - * @see LayoutType - * - * @param LayoutType - */ - virtual void setLayoutType(LayoutType type); - - /** - * Gets LayoutType. - * - * @see LayoutType - * - * @return LayoutType - */ - virtual LayoutType getLayoutType() const; - - virtual void addChild(CCNode * child); - /** - * Adds a child to the container with a z-order - * - * If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. - * - * @param child A child node - * @param zOrder Z order for drawing priority. Please refer to setZOrder(int) - */ - virtual void addChild(CCNode * child, int zOrder); - /** - * Adds a child to the container with z order and tag - * - * If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. - * - * @param child A child node - * @param zOrder Z order for drawing priority. Please refer to setZOrder(int) - * @param tag A interger to identify the node easily. Please refer to setTag(int) - */ - virtual void addChild(CCNode* child, int zOrder, int tag); - - virtual void removeChild(CCNode* child); - - virtual void removeChild(CCNode* widget, bool cleanup); - - virtual void removeAllChildren(); - - virtual void removeAllChildrenWithCleanup(bool cleanup); - - virtual void visit(); - - virtual void sortAllChildren(); - - void requestDoLayout(); - - virtual void onEnter(); - virtual void onExit(); - - virtual bool hitTest(const CCPoint &pt); -protected: - //override "init" method of widget. - virtual bool init(); - - //override "onSizeChanged" method of widget. - virtual void onSizeChanged(); - - //init background image renderer. - void addBackGroundImage(); - - void supplyTheLayoutParameterLackToChild(Widget* child); - virtual Widget* createCloneInstance(); - virtual void copySpecialProperties(Widget* model); - virtual void copyClonedWidgetChildren(Widget* model); - - void stencilClippingVisit(); - void scissorClippingVisit(); - - void setStencilClippingSize(const CCSize& size); - const CCRect& getClippingRect(); - virtual void doLayout(); - void updateBackGroundImageColor(); - void updateBackGroundImageOpacity(); - void updateBackGroundImageRGBA(); -protected: - bool _clippingEnabled; - - //background - bool _backGroundScale9Enabled; - CCNode* _backGroundImage; - std::string _backGroundImageFileName; - CCRect _backGroundImageCapInsets; - LayoutBackGroundColorType _colorType; - TextureResType _bgImageTexType; - CCLayerColor* _colorRender; - CCLayerGradient* _gradientRender; - ccColor3B _cColor; - ccColor3B _gStartColor; - ccColor3B _gEndColor; - CCPoint _alongVector; - GLubyte _cOpacity; - CCSize _backGroundImageTextureSize; - LayoutType _layoutType; - LayoutClippingType _clippingType; - CCDrawNode* _clippingStencil; - bool _handleScissor; - bool _scissorRectDirty; - CCRect _clippingRect; - Layout* _clippingParent; - bool _doLayoutDirty; - bool _clippingRectDirty; - ccColor3B _backGroundImageColor; - GLubyte _backGroundImageOpacity; -}; - -} -NS_CC_END -#endif /* defined(__Layout__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/Layouts/UILayoutDefine.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/Layouts/UILayoutDefine.h deleted file mode 100644 index 772e94b..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/Layouts/UILayoutDefine.h +++ /dev/null @@ -1,96 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __UILAYOUTDEFINE_H__ -#define __UILAYOUTDEFINE_H__ - -#include "cocos2d.h" - -NS_CC_BEGIN - -namespace ui { -/** -* @js NA -* @lua NA -*/ -class Margin -{ -public: - float left; - float top; - float right; - float bottom; - -public: - Margin(); - Margin(float l, float t, float r, float b); - Margin(const Margin& other); - Margin& operator= (const Margin& other); - void setMargin(float l, float t, float r, float b); - bool equals(const Margin& target) const; -}; - -const Margin MarginZero = Margin(); - -typedef enum -{ - LINEAR_GRAVITY_NONE, - LINEAR_GRAVITY_LEFT, - LINEAR_GRAVITY_TOP, - LINEAR_GRAVITY_RIGHT, - LINEAR_GRAVITY_BOTTOM, - LINEAR_GRAVITY_CENTER_VERTICAL, - LINEAR_GRAVITY_CENTER_HORIZONTAL -}LinearGravity; - -typedef enum -{ - RELATIVE_ALIGN_NONE, - RELATIVE_ALIGN_PARENT_TOP_LEFT, - RELATIVE_ALIGN_PARENT_TOP_CENTER_HORIZONTAL, - RELATIVE_ALIGN_PARENT_TOP_RIGHT, - RELATIVE_ALIGN_PARENT_LEFT_CENTER_VERTICAL, - RELATIVE_CENTER_IN_PARENT, - RELATIVE_ALIGN_PARENT_RIGHT_CENTER_VERTICAL, - RELATIVE_ALIGN_PARENT_LEFT_BOTTOM, - RELATIVE_ALIGN_PARENT_BOTTOM_CENTER_HORIZONTAL, - RELATIVE_ALIGN_PARENT_RIGHT_BOTTOM, - - RELATIVE_LOCATION_ABOVE_LEFTALIGN, - RELATIVE_LOCATION_ABOVE_CENTER, - RELATIVE_LOCATION_ABOVE_RIGHTALIGN, - RELATIVE_LOCATION_LEFT_OF_TOPALIGN, - RELATIVE_LOCATION_LEFT_OF_CENTER, - RELATIVE_LOCATION_LEFT_OF_BOTTOMALIGN, - RELATIVE_LOCATION_RIGHT_OF_TOPALIGN, - RELATIVE_LOCATION_RIGHT_OF_CENTER, - RELATIVE_LOCATION_RIGHT_OF_BOTTOMALIGN, - RELATIVE_LOCATION_BELOW_LEFTALIGN, - RELATIVE_LOCATION_BELOW_CENTER, - RELATIVE_LOCATION_BELOW_RIGHTALIGN -}RelativeAlign; - -} -NS_CC_END -#endif /* defined(__UILayoutDefine__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/Layouts/UILayoutParameter.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/Layouts/UILayoutParameter.h deleted file mode 100644 index 552a0b0..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/Layouts/UILayoutParameter.h +++ /dev/null @@ -1,226 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __LAYOUTPARMETER_H__ -#define __LAYOUTPARMETER_H__ - -#include "UILayoutDefine.h" - -NS_CC_BEGIN - -namespace ui { - -typedef enum -{ - LAYOUT_PARAMETER_NONE, - LAYOUT_PARAMETER_LINEAR, - LAYOUT_PARAMETER_RELATIVE -}LayoutParameterType; -/** -* @js NA -* @lua NA -*/ -class LayoutParameter : public CCObject -{ -public: - /** - * Default constructor - */ - LayoutParameter() : _margin(Margin()){_layoutParameterType = LAYOUT_PARAMETER_NONE;}; - - /** - * Default destructor - */ - virtual ~LayoutParameter(){}; - - /** - * Allocates and initializes. - * @return A initialized LayoutParameter which is marked as "autorelease". - */ - static LayoutParameter* create(); - - /** - * Sets Margin parameter for LayoutParameter. - * - * @see Margin - * - * @param margin - */ - void setMargin(const Margin& margin); - - /** - * Gets Margin parameter of LayoutParameter. - * - * @see Margin - * - * @return const Margin& - */ - const Margin& getMargin() const; - - /** - * Gets LayoutParameterType of LayoutParameter. - * - * @see LayoutParameterType - * - * @return LayoutParameterType - */ - LayoutParameterType getLayoutType() const; - - LayoutParameter* clone(); - virtual LayoutParameter* createCloneInstance(); - virtual void copyProperties(LayoutParameter* model); -protected: - Margin _margin; - LayoutParameterType _layoutParameterType; -}; -/** -* @js NA -* @lua NA -*/ -class LinearLayoutParameter : public LayoutParameter -{ -public: - /** - * Default constructor - */ - LinearLayoutParameter() : _linearGravity(LINEAR_GRAVITY_NONE){_layoutParameterType = LAYOUT_PARAMETER_LINEAR;}; - - /** - * Default destructor - */ - virtual ~LinearLayoutParameter(){}; - - /** - * Allocates and initializes. - * @return A initialized LayoutParameter which is marked as "autorelease". - */ - static LinearLayoutParameter* create(); - - /** - * Sets LinearGravity parameter for LayoutParameter. - * - * @see LinearGravity - * - * @param LinearGravity - */ - void setGravity(LinearGravity gravity); - - /** - * Gets LinearGravity parameter for LayoutParameter. - * - * @see LinearGravity - * - * @return LinearGravity - */ - LinearGravity getGravity() const; - virtual LayoutParameter* createCloneInstance(); - virtual void copyProperties(LayoutParameter* model); -protected: - LinearGravity _linearGravity; -}; -/** -* @js NA -* @lua NA -*/ - -class RelativeLayoutParameter : public LayoutParameter -{ -public: - /** - * Default constructor - */ - RelativeLayoutParameter() : _relativeAlign(RELATIVE_ALIGN_NONE),_relativeWidgetName(""),_relativeLayoutName(""),_put(false){_layoutParameterType = LAYOUT_PARAMETER_RELATIVE;}; - - /** - * Default destructor - */ - virtual ~RelativeLayoutParameter(){}; - - /** - * Allocates and initializes. - * @return A initialized LayoutParameter which is marked as "autorelease". - */ - static RelativeLayoutParameter* create(); - - /** - * Sets RelativeAlign parameter for LayoutParameter. - * - * @see RelativeAlign - * - * @param RelativeAlign - */ - void setAlign(RelativeAlign align); - - /** - * Gets RelativeAlign parameter for LayoutParameter. - * - * @see RelativeAlign - * - * @return RelativeAlign - */ - RelativeAlign getAlign() const; - - /** - * Sets a key for LayoutParameter. Witch widget named this is relative to. - * - * @param name - */ - void setRelativeToWidgetName(const char* name); - - /** - * Gets the key of LayoutParameter. Witch widget named this is relative to. - * - * @return name - */ - const char* getRelativeToWidgetName() const; - - /** - * Sets a name in Relative Layout for LayoutParameter. - * - * @param name - */ - void setRelativeName(const char* name); - - /** - * Gets a name in Relative Layout of LayoutParameter. - * - * @return name - */ - const char* getRelativeName() const; - - virtual LayoutParameter* createCloneInstance(); - virtual void copyProperties(LayoutParameter* model); -protected: - RelativeAlign _relativeAlign; - std::string _relativeWidgetName; - std::string _relativeLayoutName; - bool _put; - friend class Layout; -}; - -} - -NS_CC_END - -#endif /* defined(__LayoutParameter__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/System/CocosGUI.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/System/CocosGUI.h deleted file mode 100644 index 6d71d19..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/System/CocosGUI.h +++ /dev/null @@ -1,55 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __COCOSGUI_H__ -#define __COCOSGUI_H__ - - -#include "../BaseClasses/UIWidget.h" -#include "../Layouts/UILayout.h" -#include "../UIWidgets/UIButton.h" -#include "../UIWidgets/UICheckBox.h" -#include "../UIWidgets/UIImageView.h" -#include "../UIWidgets/UILabel.h" -#include "../UIWidgets/UILabelAtlas.h" -#include "../UIWidgets/UILoadingBar.h" -#include "../UIWidgets/ScrollWidget/UIScrollView.h" -#include "../UIWidgets/UISlider.h" -#include "../UIWidgets/UITextField.h" -#include "../UIWidgets/ScrollWidget/UIListView.h" -#include "../UIWidgets/UILabelBMFont.h" -#include "../UIWidgets/ScrollWidget/UIPageView.h" -#include "UIHelper.h" -#include "../../Reader/GUIReader.h" -#include "UITouchGroup.h" -#include "../UIWidgets/Compatible/CompatibleClasses.h" -#include "../UIWidgets/UIRichText.h" - -//NS_CC_EXT_BEGIN - -const char* CocosGUIVersion(); - -//NS_CC_EXT_END - -#endif /* defined(__CocosGUITest__Cocos__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/System/GUIDefine.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/System/GUIDefine.h deleted file mode 100644 index c2bbbe5..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/System/GUIDefine.h +++ /dev/null @@ -1,75 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __TestCpp__GUIDefine__ -#define __TestCpp__GUIDefine__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include -#include "../../Trigger/ObjectFactory.h" - -#ifdef __apple__ -#pragma mark - -#pragma mark Widget macro -#pragma mark - -#endif - -#define DECLARE_CLASS_GUI_INFO \ - public: \ - static cocos2d::extension::ObjectFactory::TInfo Type; \ - static cocos2d::CCObject* createInstance(void); \ - -#define IMPLEMENT_CLASS_GUI_INFO(className) \ - cocos2d::CCObject* className::createInstance(void) \ - { \ - return className::create(); \ - } \ - cocos2d::extension::ObjectFactory::TInfo className::Type(#className, &className::createInstance); \ - -#define CREATE_CLASS_GUI_INFO(className) \ - cocos2d::extension::ObjectFactory::TInfo(#className, &className::createInstance) - -#ifdef __apple__ -#pragma mark - -#pragma mark Reader macro -#pragma mark - -#endif - -#define DECLARE_CLASS_WIDGET_READER_INFO \ -public: \ - static cocos2d::extension::ObjectFactory::TInfo Type; \ - static cocos2d::CCObject* createInstance(void); \ - -#define IMPLEMENT_CLASS_WIDGET_READER_INFO(className) \ - cocos2d::CCObject* className::createInstance(void) \ - { \ - return className::getInstance(); \ - } \ - cocos2d::extension::ObjectFactory::TInfo className::Type(#className, &className::createInstance); \ - -#define CREATE_CLASS_WIDGET_READER_INFO(className) \ - cocos2d::extension::ObjectFactory::TInfo(#className, &className::createInstance) - -#endif /* defined(__TestCpp__GUIDefine__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/System/UIHelper.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/System/UIHelper.h deleted file mode 100644 index d050e43..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/System/UIHelper.h +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __UIHELPER_H__ -#define __UIHELPER_H__ - -NS_CC_BEGIN - -namespace ui { - -/** -* @js NA -* @lua NA -*/ -class UIHelper -{ -public: - /** - * Finds a widget whose tag equals to param tag from root widget. - * - * @param root widget which will be seeked. - * - * @tag tag value. - * - * @return finded result. - */ - static Widget* seekWidgetByTag(Widget* root, int tag); - - /** - * Finds a widget whose name equals to param name from root widget. - * - * @param root widget which will be seeked. - * - * @name name value. - * - * @return finded result. - */ - static Widget* seekWidgetByName(Widget* root, const char* name); - - /** - * Finds a widget whose name equals to param name from root widget. - * - * RelativeLayout will call this method to find the widget witch is needed. - * - * @param root widget which will be seeked. - * - * @name name value. - * - * @return finded result. - */ - static Widget* seekWidgetByRelativeName(Widget* root, const char* name); - - /*temp action*/ - static Widget* seekActionWidgetByActionTag(Widget* root, int tag); -}; -} - -NS_CC_END - -#endif /* defined(__CocoGUI__UISystem__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/System/UITouchGroup.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/System/UITouchGroup.h deleted file mode 100644 index 62b0ca1..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/System/UITouchGroup.h +++ /dev/null @@ -1,132 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - - -#ifndef __UILAYER_H__ -#define __UILAYER_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include "../BaseClasses/UIWidget.h" - -NS_CC_BEGIN - -namespace ui { - -/** - * @lua NA - */ -class TouchGroup : public CCLayer -{ - -public: - /** - * Default constructor - * @js ctor - */ - TouchGroup(); - - /** - * Default destructor - * @js NA - */ - virtual ~TouchGroup(); - - /** - * Allocates and initializes a widget. - */ - static TouchGroup *create(void); - - //initializes state of uilayer. - virtual bool init(); - - virtual void onEnter(); - virtual void onExit(); - virtual void onEnterTransitionDidFinish(); - - virtual bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent); - - /** - * Add a widget to UILayer, for drawing. - * - * @param widget. - */ - void addWidget(Widget* widget); - - /** - * Remove a widget from UILayer. - * - * @param widget. - * - * @param cleanup true if all running actions on all children widgets should be cleanup, false otherwise. - */ - void removeWidget(Widget* widget); - - /** - * Finds a widget whose tag is equal tag param from widget tree. - * - * @param tag. - */ - Widget* getWidgetByTag(int tag); - - /** - * Seek a widget whose name is equal name param from widget tree. - * - * @param name. - */ - Widget* getWidgetByName(const char* name); - - /** - * Remove and clean up all of UILayer's widget. - */ - virtual void clear(); - - /** - * Gets root widget of UILayer. - * - * @return UIRootWidget, "UIRootWidget" is the root widget of UILayer. - */ - Widget* getRootWidget(); -protected: - bool checkEventWidget(CCTouch* touch, CCEvent *pEvent); - bool checkTouchEvent(Widget* root, CCTouch* touch, CCEvent* pEvent); -protected: - Widget* m_pRootWidget; - CCPoint touchBeganedPoint; - CCPoint touchMovedPoint; - CCPoint touchEndedPoint; - CCPoint touchCanceledPoint; - CCArray* m_pSelectedWidgets; -}; - -} - -NS_CC_END - - - -#endif /* defined(__UILAYER_H__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/Compatible/CompatibleClasses.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/Compatible/CompatibleClasses.h deleted file mode 100644 index 6b33df4..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/Compatible/CompatibleClasses.h +++ /dev/null @@ -1,58 +0,0 @@ - -#ifndef __COMPATIBLECLASSES_H__ -#define __COMPATIBLECLASSES_H__ - -#include "cocos2d.h" -#include "../../BaseClasses/UIWidget.h" -#include "../UIButton.h" -#include "../UICheckBox.h" -#include "../UIImageView.h" -#include "../UILabel.h" -#include "../UILabelAtlas.h" -#include "../UILabelBMFont.h" -#include "../UILoadingBar.h" -#include "../UISlider.h" -#include "../UITextField.h" -#include "../../Layouts/UILayout.h" -#include "../ScrollWidget/UIListView.h" -#include "../ScrollWidget/UIPageView.h" -#include "../ScrollWidget/UIScrollView.h" - -//class type define -NS_CC_BEGIN -// -namespace ui { - -typedef cocos2d::ui::Layout UIPanel; -typedef cocos2d::ui::Layout UILayout; -typedef cocos2d::ui::Widget UIWidget; - -typedef cocos2d::ui::LayoutParameter UILayoutParameter; -typedef cocos2d::ui::Margin UIMargin; - -typedef cocos2d::ui::ListView UIListView; -typedef cocos2d::ui::PageView UIPageView; -typedef cocos2d::ui::ScrollView UIDragPanel; -typedef cocos2d::ui::ScrollView UIScrollView; -typedef cocos2d::ui::Button UIButton; -typedef cocos2d::ui::Button UITextButton; -typedef cocos2d::ui::CheckBox UICheckBox; -typedef cocos2d::ui::ImageView UIImageView; -typedef cocos2d::ui::Label UILabel; -typedef cocos2d::ui::LabelAtlas UILabelAtlas; -typedef cocos2d::ui::LabelBMFont UILabelBMFont; -typedef cocos2d::ui::LoadingBar UILoadingBar; -typedef cocos2d::ui::Slider UISlider; -typedef cocos2d::ui::TextField UITextField; -typedef cocos2d::ui::TouchGroup UILayer; - -typedef cocos2d::ui::LinearGravity UILinearGravity; -typedef cocos2d::ui::RelativeAlign UIRelativeAlign; -typedef cocos2d::ui::LayoutParameter UILayoutParameter; -typedef cocos2d::ui::LinearLayoutParameter UILinearLayoutParameter; -typedef cocos2d::ui::RelativeLayoutParameter UIRelativeLayoutParameter; -} -NS_CC_END - - -#endif /* defined(__CompatibleClasses__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIListView.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIListView.h deleted file mode 100644 index 0c90e1c..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIListView.h +++ /dev/null @@ -1,215 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - - -#ifndef __UILISTVIEW_H__ -#define __UILISTVIEW_H__ - -#include "UIScrollView.h" - -NS_CC_BEGIN - -namespace ui{ - -typedef enum -{ - LISTVIEW_GRAVITY_LEFT, - LISTVIEW_GRAVITY_RIGHT, - LISTVIEW_GRAVITY_CENTER_HORIZONTAL, - - LISTVIEW_GRAVITY_TOP, - LISTVIEW_GRAVITY_BOTTOM, - LISTVIEW_GRAVITY_CENTER_VERTICAL, -}ListViewGravity; - -typedef enum -{ - LISTVIEW_ONSELECTEDITEM_START, - LISTVIEW_ONSELECTEDITEM_END -}ListViewEventType; - -typedef void (CCObject::*SEL_ListViewEvent)(CCObject*,ListViewEventType); -#define listvieweventselector(_SELECTOR) (SEL_ListViewEvent)(&_SELECTOR) - -class ListView : public ScrollView -{ - - DECLARE_CLASS_GUI_INFO - -public: - - /** - * Default constructor - */ - ListView(); - - /** - * Default destructor - */ - virtual ~ListView(); - - /** - * Allocates and initializes. - */ - static ListView* create(); - - /** - * Sets a item model for listview - * - * A model will be cloned for adding default item. - * - * @param model item model for listview - */ - void setItemModel(Widget* model); - - /** - * Push back a default item(create by a cloned model) into listview. - */ - void pushBackDefaultItem(); - - /** - * Insert a default item(create by a cloned model) into listview. - */ - void insertDefaultItem(int index); - - /** - * Push back custom item into listview. - */ - void pushBackCustomItem(Widget* item); - - /** - * Insert custom item into listview. - */ - void insertCustomItem(Widget* item, int index); - - /** - * Removes the last item of listview. - */ - void removeLastItem(); - - /** - * Removes a item whose index is same as the parameter. - * - * @param index of item. - */ - void removeItem(int index); - - void removeAllItems(); - - /** - * Returns a item whose index is same as the parameter. - * - * @param index of item. - * - * @return the item widget. - */ - Widget* getItem(unsigned int index); - - /** - * Returns the item container. - */ - CCArray* getItems(); - - /** - * Returns the index of item. - * - * @param item the item which need to be checked. - * - * @return the index of item. - */ - unsigned int getIndex(Widget* item) const; - - /** - * Changes the gravity of listview. - * @see ListViewGravity - */ - void setGravity(ListViewGravity gravity); - - /** - * Changes the margin between each item. - * - * @param margin - */ - void setItemsMargin(float margin); - - float getItemsMargin(); - - virtual void sortAllChildren(); - - int getCurSelectedIndex() const; - - void addEventListenerListView(CCObject* target, SEL_ListViewEvent selector); - - /** - * Changes scroll direction of scrollview. - * - * @see SCROLLVIEW_DIR SCROLLVIEW_DIR_VERTICAL means vertical scroll, SCROLLVIEW_DIR_HORIZONTAL means horizontal scroll - * - * @param SCROLLVIEW_DIR - */ - virtual void setDirection(SCROLLVIEW_DIR dir); - - virtual std::string getDescription() const; - - void requestRefreshView(); - - void refreshView(); -protected: - virtual void addChild(CCNode* child) {ScrollView::addChild(child);}; - virtual void addChild(CCNode * child, int zOrder) {ScrollView::addChild(child, zOrder);}; - virtual void addChild(CCNode* child, int zOrder, int tag) {ScrollView::addChild(child, zOrder, tag);}; - virtual void removeChild(CCNode* widget) {ScrollView::removeChild(widget);}; - virtual void removeChild(CCNode* widget, bool cleanup) {ScrollView::removeChild(widget, cleanup);}; - - virtual void removeAllChildren() {ScrollView::removeAllChildren();}; - virtual void removeAllChildrenWithCleanup(bool cleanup) {ScrollView::removeAllChildrenWithCleanup(cleanup);}; - virtual CCArray* getChildren() {return ScrollView::getChildren();}; - virtual unsigned int getChildrenCount() const {return ScrollView::getChildrenCount();}; - virtual CCNode * getChildByTag(int tag) {return ScrollView::getChildByTag(tag);}; - virtual Widget* getChildByName(const char* name) {return ScrollView::getChildByName(name);}; - virtual bool init(); - void updateInnerContainerSize(); - void remedyLayoutParameter(Widget* item); - virtual void onSizeChanged(); - virtual Widget* createCloneInstance(); - virtual void copySpecialProperties(Widget* model); - virtual void copyClonedWidgetChildren(Widget* model); - void selectedItemEvent(int state); - virtual void interceptTouchEvent(int handleState,Widget* sender,const CCPoint &touchPoint); -protected: - - Widget* _model; - ListViewGravity _gravity; - float _itemsMargin; - CCObject* _listViewEventListener; - SEL_ListViewEvent _listViewEventSelector; - int _curSelectedIndex; - bool _refreshViewDirty; - CCArray* _items; -}; - -} -NS_CC_END - -#endif /* defined(__ListView__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIPageView.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIPageView.h deleted file mode 100644 index 54a00e8..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIPageView.h +++ /dev/null @@ -1,221 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __UIPAGEVIEW_H__ -#define __UIPAGEVIEW_H__ - -#include "../../Layouts/UILayout.h" -#include "UIScrollInterface.h" - -NS_CC_BEGIN - -namespace ui { - -typedef enum -{ - PAGEVIEW_EVENT_TURNING, -}PageViewEventType; - -typedef void (CCObject::*SEL_PageViewEvent)(CCObject*, PageViewEventType); -#define pagevieweventselector(_SELECTOR)(SEL_PageViewEvent)(&_SELECTOR) - -typedef enum { - PAGEVIEW_TOUCHLEFT, - PAGEVIEW_TOUCHRIGHT -}PVTouchDir; - -class PageView : public Layout , public UIScrollInterface -{ - - DECLARE_CLASS_GUI_INFO - -public: - /** - * Default constructor - */ - PageView(); - - /** - * Default destructor - */ - virtual ~PageView(); - - /** - * Allocates and initializes. - */ - static PageView* create(); - - /** - * Add a widget to a page of pageview. - * - * @param widget widget to be added to pageview. - * - * @param pageIdx index of page. - * - * @param forceCreate if force create and there is no page exsit, pageview would create a default page for adding widget. - */ - void addWidgetToPage(Widget* widget, int pageIdx, bool forceCreate); - - /** - * Push back a page to pageview. - * - * @param page page to be added to pageview. - */ - void addPage(Layout* page); - - /** - * Inert a page to pageview. - * - * @param page page to be added to pageview. - */ - void insertPage(Layout* page, int idx); - - /** - * Remove a page of pageview. - * - * @param page page which will be removed. - */ - void removePage(Layout* page); - - /** - * Remove a page at index of pageview. - * - * @param index index of page. - */ - void removePageAtIndex(int index); - - void removeAllPages(); - - /** - * scroll pageview to index. - * - * @param idx index of page. - */ - void scrollToPage(int idx); - - /** - * Gets current page index. - * - * @return current page index. - */ - int getCurPageIndex() const; - - CCArray* getPages(); - - Layout* getPage(int index); - - // event - void addEventListenerPageView(CCObject *target, SEL_PageViewEvent selector); - - - - - virtual bool onTouchBegan(CCTouch *touch, CCEvent *unusedEvent); - virtual void onTouchMoved(CCTouch *touch, CCEvent *unusedEvent); - virtual void onTouchEnded(CCTouch *touch, CCEvent *unusedEvent); - virtual void onTouchCancelled(CCTouch *touch, CCEvent *unusedEvent); - - //override "update" method of widget. - virtual void update(float dt); - /** - * Sets LayoutType. - * - * @see LayoutType - * - * @param LayoutType - */ - virtual void setLayoutType(LayoutType type){}; - - /** - * Gets LayoutType. - * - * @see LayoutType - * - * @return LayoutType - */ - virtual LayoutType getLayoutType() const {return LAYOUT_ABSOLUTE;}; - - /** - * Returns the "class name" of widget. - */ - virtual std::string getDescription() const; - - virtual void onEnter(); -protected: - virtual void addChild(CCNode * child); - virtual void addChild(CCNode * child, int zOrder); - virtual void addChild(CCNode* child, int zOrder, int tag); - virtual void removeChild(CCNode* widget); - virtual void removeChild(CCNode* widget, bool cleanup); - virtual void removeAllChildren(); - virtual void removeAllChildrenWithCleanup(bool cleanup); - virtual CCArray* getChildren(){return Widget::getChildren();}; - virtual unsigned int getChildrenCount() const {return Widget::getChildrenCount();}; - virtual CCNode * getChildByTag(int tag) {return Widget::getChildByTag(tag);}; - virtual Widget* getChildByName(const char* name) {return Widget::getChildByName(name);}; - virtual bool init(); - Layout* createPage(); - float getPositionXByIndex(int idx); - void updateBoundaryPages(); - virtual void handlePressLogic(const CCPoint &touchPoint); - virtual void handleMoveLogic(const CCPoint &touchPoint); - virtual void handleReleaseLogic(const CCPoint &touchPoint); - virtual void interceptTouchEvent(int handleState, Widget* sender, const CCPoint &touchPoint); - virtual void checkChildInfo(int handleState, Widget* sender, const CCPoint &touchPoint); - virtual bool scrollPages(float touchOffset); - void movePages(float offset); - void pageTurningEvent(); - void updateChildrenSize(); - void updateChildrenPosition(); - virtual void onSizeChanged(); - virtual Widget* createCloneInstance(); - virtual void copySpecialProperties(Widget* model); - virtual void copyClonedWidgetChildren(Widget* model); - virtual void setClippingEnabled(bool enabled) {Layout::setClippingEnabled(enabled);}; - virtual void doLayout() {if (!_doLayoutDirty){return;} _doLayoutDirty = false;}; -protected: - int _curPageIdx; - CCArray* _pages; - PVTouchDir _touchMoveDir; - float _touchStartLocation; - float _touchMoveStartLocation; - CCPoint _movePagePoint; - Widget* _leftChild; - Widget* _rightChild; - float _leftBoundary; - float _rightBoundary; - bool _isAutoScrolling; - float _autoScrollDistance; - float _autoScrollSpeed; - int _autoScrollDir; - float _childFocusCancelOffset; - CCObject* _pageViewEventListener; - SEL_PageViewEvent _pageViewEventSelector; - -}; - -} -NS_CC_END - -#endif /* defined(__PageView__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIScrollInterface.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIScrollInterface.h deleted file mode 100644 index 2a70f17..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIScrollInterface.h +++ /dev/null @@ -1,49 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __UISCROLLDELEGATE_H__ -#define __UISCROLLDELEGATE_H__ - -#include "../../BaseClasses/UIWidget.h" - -NS_CC_BEGIN - -namespace ui { - -class UIScrollInterface -{ -public: - virtual ~UIScrollInterface() {} - -protected: - virtual void handlePressLogic(const CCPoint &touchPoint) = 0; - virtual void handleMoveLogic(const CCPoint &touchPoint) = 0; - virtual void handleReleaseLogic(const CCPoint &touchPoint) = 0; - virtual void interceptTouchEvent(int handleState, Widget* sender, const CCPoint &touchPoint) = 0; -}; - -} -NS_CC_END - -#endif /* defined(__UIScrollDelegate__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIScrollView.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIScrollView.h deleted file mode 100644 index 728fcf5..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/ScrollWidget/UIScrollView.h +++ /dev/null @@ -1,442 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __UISCROLLVIEW_H__ -#define __UISCROLLVIEW_H__ - -#include "../../Layouts/UILayout.h" -#include "UIScrollInterface.h" - -NS_CC_BEGIN - -namespace ui { - -class ScrollInnerContainer : public Layout -{ -public: - ScrollInnerContainer(); - virtual ~ScrollInnerContainer(); - static ScrollInnerContainer* create(); - virtual const CCSize& getLayoutSize(); -protected: -}; - -enum SCROLLVIEW_DIR -{ - SCROLLVIEW_DIR_NONE, - SCROLLVIEW_DIR_VERTICAL, - SCROLLVIEW_DIR_HORIZONTAL, - SCROLLVIEW_DIR_BOTH -}; - -typedef enum -{ - SCROLLVIEW_EVENT_SCROLL_TO_TOP, - SCROLLVIEW_EVENT_SCROLL_TO_BOTTOM, - SCROLLVIEW_EVENT_SCROLL_TO_LEFT, - SCROLLVIEW_EVENT_SCROLL_TO_RIGHT, - SCROLLVIEW_EVENT_SCROLLING, - SCROLLVIEW_EVENT_BOUNCE_TOP, - SCROLLVIEW_EVENT_BOUNCE_BOTTOM, - SCROLLVIEW_EVENT_BOUNCE_LEFT, - SCROLLVIEW_EVENT_BOUNCE_RIGHT -}ScrollviewEventType; - -typedef void (CCObject::*SEL_ScrollViewEvent)(CCObject*, ScrollviewEventType); -#define scrollvieweventselector(_SELECTOR) (SEL_ScrollViewEvent)(&_SELECTOR) - - -class ScrollView : public Layout , public UIScrollInterface -{ - - DECLARE_CLASS_GUI_INFO - -public: - /** - * Default constructor - */ - ScrollView(); - - /** - * Default destructor - */ - virtual ~ScrollView(); - - /** - * Allocates and initializes. - */ - static ScrollView* create(); - - /** - * Changes scroll direction of scrollview. - * - * @see SCROLLVIEW_DIR SCROLLVIEW_DIR_VERTICAL means vertical scroll, SCROLLVIEW_DIR_HORIZONTAL means horizontal scroll - * - * @param SCROLLVIEW_DIR - */ - virtual void setDirection(SCROLLVIEW_DIR dir); - - /** - * Gets scroll direction of scrollview. - * - * @see SCROLLVIEW_DIR SCROLLVIEW_DIR_VERTICAL means vertical scroll, SCROLLVIEW_DIR_HORIZONTAL means horizontal scroll - * - * @return SCROLLVIEW_DIR - */ - SCROLLVIEW_DIR getDirection(); - - /** - * Gets inner container of scrollview. - * - * Inner container is the container of scrollview's children. - * - * @return inner container. - */ - Layout* getInnerContainer(); - - /** - * Scroll inner container to bottom boundary of scrollview. - */ - void scrollToBottom(float time, bool attenuated); - - /** - * Scroll inner container to top boundary of scrollview. - */ - void scrollToTop(float time, bool attenuated); - - /** - * Scroll inner container to left boundary of scrollview. - */ - void scrollToLeft(float time, bool attenuated); - - /** - * Scroll inner container to right boundary of scrollview. - */ - void scrollToRight(float time, bool attenuated); - - /** - * Scroll inner container to top and left boundary of scrollview. - */ - void scrollToTopLeft(float time, bool attenuated); - - /** - * Scroll inner container to top and right boundary of scrollview. - */ - void scrollToTopRight(float time, bool attenuated); - - /** - * Scroll inner container to bottom and left boundary of scrollview. - */ - void scrollToBottomLeft(float time, bool attenuated); - - /** - * Scroll inner container to bottom and right boundary of scrollview. - */ - void scrollToBottomRight(float time, bool attenuated); - - /** - * Scroll inner container to vertical percent position of scrollview. - */ - void scrollToPercentVertical(float percent, float time, bool attenuated); - - /** - * Scroll inner container to horizontal percent position of scrollview. - */ - void scrollToPercentHorizontal(float percent, float time, bool attenuated); - - /** - * Scroll inner container to both direction percent position of scrollview. - */ - void scrollToPercentBothDirection(const CCPoint& percent, float time, bool attenuated); - - /** - * Move inner container to bottom boundary of scrollview. - */ - void jumpToBottom(); - - /** - * Move inner container to top boundary of scrollview. - */ - void jumpToTop(); - - /** - * Move inner container to left boundary of scrollview. - */ - void jumpToLeft(); - - /** - * Move inner container to right boundary of scrollview. - */ - void jumpToRight(); - - /** - * Move inner container to top and left boundary of scrollview. - */ - void jumpToTopLeft(); - - /** - * Move inner container to top and right boundary of scrollview. - */ - void jumpToTopRight(); - - /** - * Move inner container to bottom and left boundary of scrollview. - */ - void jumpToBottomLeft(); - - /** - * Move inner container to bottom and right boundary of scrollview. - */ - void jumpToBottomRight(); - - /** - * Move inner container to vertical percent position of scrollview. - */ - void jumpToPercentVertical(float percent); - - /** - * Move inner container to horizontal percent position of scrollview. - */ - void jumpToPercentHorizontal(float percent); - - /** - * Move inner container to both direction percent position of scrollview. - */ - void jumpToPercentBothDirection(const CCPoint& percent); - - /** - * Changes inner container size of scrollview. - * - * Inner container size must be larger than or equal scrollview's size. - * - * @param inner container size. - */ - void setInnerContainerSize(const CCSize &size); - - /** - * Gets inner container size of scrollview. - * - * Inner container size must be larger than or equal scrollview's size. - * - * @return inner container size. - */ - const CCSize& getInnerContainerSize() const; - - /** - * Add call back function called scrollview event triggered - */ - void addEventListenerScrollView(CCObject* target, SEL_ScrollViewEvent selector); - - virtual void addChild(CCNode * child); - /** - * Adds a child to the container with a z-order - * - * If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. - * - * @param child A child node - * @param zOrder Z order for drawing priority. Please refer to setZOrder(int) - */ - virtual void addChild(CCNode * child, int zOrder); - /** - * Adds a child to the container with z order and tag - * - * If the child is added to a 'running' node, then 'onEnter' and 'onEnterTransitionDidFinish' will be called immediately. - * - * @param child A child node - * @param zOrder Z order for drawing priority. Please refer to setZOrder(int) - * @param tag A interger to identify the node easily. Please refer to setTag(int) - */ - virtual void addChild(CCNode* child, int zOrder, int tag); - - //override "removeAllChildrenAndCleanUp" method of widget. - virtual void removeAllChildren(); - - virtual void removeAllChildrenWithCleanup(bool cleanup); - - virtual void removeChild(CCNode* child); - - //override "removeChild" method of widget. - virtual void removeChild(CCNode* child, bool cleaup); - - //override "getChildren" method of widget. - virtual CCArray* getChildren(); - - virtual unsigned int getChildrenCount() const; - - virtual CCNode * getChildByTag(int tag); - - virtual Widget* getChildByName(const char* name); - - virtual void addNode(CCNode* node); - - virtual void addNode(CCNode * node, int zOrder); - - virtual void addNode(CCNode* node, int zOrder, int tag); - - virtual CCNode * getNodeByTag(int tag); - - virtual void removeNodeByTag(int tag); - - virtual CCArray* getNodes(); - - virtual void removeNode(CCNode* node); - - virtual void removeAllNodes(); - - - virtual bool onTouchBegan(CCTouch *touch, CCEvent *unusedEvent); - virtual void onTouchMoved(CCTouch *touch, CCEvent *unusedEvent); - virtual void onTouchEnded(CCTouch *touch, CCEvent *unusedEvent); - virtual void onTouchCancelled(CCTouch *touch, CCEvent *unusedEvent); - - virtual void update(float dt); - - void setBounceEnabled(bool enabled); - - bool isBounceEnabled() const; - - void setInertiaScrollEnabled(bool enabled); - - bool isInertiaScrollEnabled() const; - - /** - * Sets LayoutType. - * - * @see LayoutType - * - * @param LayoutType - */ - virtual void setLayoutType(LayoutType type); - - /** - * Gets LayoutType. - * - * @see LayoutType - * - * @return LayoutType - */ - virtual LayoutType getLayoutType() const; - - /** - * Returns the "class name" of widget. - */ - virtual std::string getDescription() const; - - virtual void onEnter(); -protected: - virtual bool init(); - virtual void initRenderer(); - void moveChildren(float offsetX, float offsetY); - void autoScrollChildren(float dt); - void bounceChildren(float dt); - void checkBounceBoundary(); - bool checkNeedBounce(); - void startAutoScrollChildrenWithOriginalSpeed(const CCPoint& dir, float v, bool attenuated, float acceleration); - void startAutoScrollChildrenWithDestination(const CCPoint& des, float time, bool attenuated); - void jumpToDestination(const CCPoint& des); - void stopAutoScrollChildren(); - void startBounceChildren(float v); - void stopBounceChildren(); - bool checkCustomScrollDestination(float* touchOffsetX, float* touchOffsetY); - virtual bool scrollChildren(float touchOffsetX, float touchOffsetY); - bool bounceScrollChildren(float touchOffsetX, float touchOffsetY); - void startRecordSlidAction(); - virtual void endRecordSlidAction(); - virtual void handlePressLogic(const CCPoint &touchPoint); - virtual void handleMoveLogic(const CCPoint &touchPoint); - virtual void handleReleaseLogic(const CCPoint &touchPoint); - virtual void interceptTouchEvent(int handleState,Widget* sender,const CCPoint &touchPoint); - virtual void checkChildInfo(int handleState,Widget* sender,const CCPoint &touchPoint); - void recordSlidTime(float dt); - void scrollToTopEvent(); - void scrollToBottomEvent(); - void scrollToLeftEvent(); - void scrollToRightEvent(); - void scrollingEvent(); - void bounceTopEvent(); - void bounceBottomEvent(); - void bounceLeftEvent(); - void bounceRightEvent(); - virtual void onSizeChanged(); - virtual Widget* createCloneInstance(); - virtual void copySpecialProperties(Widget* model); - virtual void copyClonedWidgetChildren(Widget* model); - virtual void setClippingEnabled(bool able) {Layout::setClippingEnabled(able);}; - virtual void doLayout(); -protected: - ScrollInnerContainer* _innerContainer; - - SCROLLVIEW_DIR _direction; - - CCPoint _touchBeganPoint; - CCPoint _touchMovedPoint; - CCPoint _touchEndedPoint; - CCPoint _touchMovingPoint; - CCPoint _autoScrollDir; - - float _topBoundary; - float _bottomBoundary; - float _leftBoundary; - float _rightBoundary; - - float _bounceTopBoundary; - float _bounceBottomBoundary; - float _bounceLeftBoundary; - float _bounceRightBoundary; - - - bool _autoScroll; - float _autoScrollAddUpTime; - - float _autoScrollOriginalSpeed; - float _autoScrollAcceleration; - bool _isAutoScrollSpeedAttenuated; - bool _needCheckAutoScrollDestination; - CCPoint _autoScrollDestination; - - bool _bePressed; - float _slidTime; - CCPoint _moveChildPoint; - float _childFocusCancelOffset; - - bool _leftBounceNeeded; - bool _topBounceNeeded; - bool _rightBounceNeeded; - bool _bottomBounceNeeded; - - bool _bounceEnabled; - bool _bouncing; - CCPoint _bounceDir; - float _bounceOriginalSpeed; - bool _inertiaScrollEnabled; - - - - CCObject* _scrollViewEventListener; - SEL_ScrollViewEvent _scrollViewEventSelector; -}; - -} -NS_CC_END -#endif /* defined(__CocoGUI__ScrollView__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UIButton.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UIButton.h deleted file mode 100644 index bb5a2c0..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UIButton.h +++ /dev/null @@ -1,225 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __UIBUTTON_H__ -#define __UIBUTTON_H__ - -#include "../BaseClasses/UIWidget.h" - -NS_CC_BEGIN - -namespace ui{ - -/** -* @js NA -* @lua NA -*/ -class Button : public Widget -{ - DECLARE_CLASS_GUI_INFO - -public: - /** - * Default constructor - */ - Button(); - - /** - * Default destructor - */ - virtual ~Button(); - - /** - * Allocates and initializes. - */ - static Button* create(); - - /** - * Load textures for button. - * - * @param normal normal state texture. - * - * @param selected selected state texture. - * - * @param disabled dark state texture. - * - * @param texType @see UI_TEX_TYPE_LOCAL - */ - void loadTextures(const char* normal,const char* selected,const char* disabled,TextureResType texType = UI_TEX_TYPE_LOCAL); - - /** - * Load normal state texture for button. - * - * @param normal normal state texture. - * - * @param texType @see UI_TEX_TYPE_LOCAL - */ - void loadTextureNormal(const char* normal, TextureResType texType = UI_TEX_TYPE_LOCAL); - - /** - * Load selected state texture for button. - * - * @param selected selected state texture. - * - * @param texType @see UI_TEX_TYPE_LOCAL - */ - void loadTexturePressed(const char* selected, TextureResType texType = UI_TEX_TYPE_LOCAL); - - /** - * Load dark state texture for button. - * - * @param disabled dark state texture. - * - * @param texType @see UI_TEX_TYPE_LOCAL - */ - void loadTextureDisabled(const char* disabled, TextureResType texType = UI_TEX_TYPE_LOCAL); - - /** - * Sets capinsets for button, if button is using scale9 renderer. - * - * @param capInsets capinsets for button - */ - void setCapInsets(const CCRect &capInsets); - - /** - * Sets capinsets for button, if button is using scale9 renderer. - * - * @param capInsets capinsets for button - */ - void setCapInsetsNormalRenderer(const CCRect &capInsets); - - const CCRect& getCapInsetNormalRenderer(); - - /** - * Sets capinsets for button, if button is using scale9 renderer. - * - * @param capInsets capinsets for button - */ - void setCapInsetsPressedRenderer(const CCRect &capInsets); - - const CCRect& getCapInsetPressedRenderer(); - - /** - * Sets capinsets for button, if button is using scale9 renderer. - * - * @param capInsets capinsets for button - */ - void setCapInsetsDisabledRenderer(const CCRect &capInsets); - - const CCRect& getCapInsetDisabledRenderer(); - - //override "setAnchorPoint" of widget. - virtual void setAnchorPoint(const CCPoint &pt); - - /** - * Sets if button is using scale9 renderer. - * - * @param true that using scale9 renderer, false otherwise. - */ - virtual void setScale9Enabled(bool able); - - bool isScale9Enabled(); - - /** - * Changes if button can be clicked zoom effect. - * - * @param true that can be clicked zoom effect, false otherwise. - */ - void setPressedActionEnabled(bool enabled); - - //override "ignoreContentAdaptWithSize" method of widget. - virtual void ignoreContentAdaptWithSize(bool ignore); - - //override "getContentSize" method of widget. - virtual const CCSize& getContentSize() const; - - //override "getVirtualRenderer" method of widget. - virtual CCNode* getVirtualRenderer(); - - /** - * Returns the "class name" of widget. - */ - virtual std::string getDescription() const; - - void setTitleText(const std::string& text); - const char* getTitleText() const; - void setTitleColor(const ccColor3B& color); - const ccColor3B& getTitleColor() const; - void setTitleFontSize(float size); - float getTitleFontSize() const; - void setTitleFontName(const char* fontName); - const char* getTitleFontName() const; - -protected: - virtual bool init(); - virtual void initRenderer(); - virtual void onPressStateChangedToNormal(); - virtual void onPressStateChangedToPressed(); - virtual void onPressStateChangedToDisabled(); - virtual void onSizeChanged(); - virtual void updateTextureColor(); - virtual void updateTextureOpacity(); - virtual void updateTextureRGBA(); - virtual void updateFlippedX(); - virtual void updateFlippedY(); - void normalTextureScaleChangedWithSize(); - void pressedTextureScaleChangedWithSize(); - void disabledTextureScaleChangedWithSize(); - virtual Widget* createCloneInstance(); - virtual void copySpecialProperties(Widget* model); -protected: - CCNode* _buttonNormalRenderer; - CCNode* _buttonClickedRenderer; - CCNode* _buttonDisableRenderer; - CCLabelTTF* _titleRenderer; - std::string _normalFileName; - std::string _clickedFileName; - std::string _disabledFileName; - bool _prevIgnoreSize; - bool _scale9Enabled; - CCRect _capInsetsNormal; - CCRect _capInsetsPressed; - CCRect _capInsetsDisabled; - TextureResType _normalTexType; - TextureResType _pressedTexType; - TextureResType _disabledTexType; - CCSize _normalTextureSize; - CCSize _pressedTextureSize; - CCSize _disabledTextureSize; - bool _pressedActionEnabled; - ccColor3B _titleColor; - float _normalTextureScaleXInSize; - float _normalTextureScaleYInSize; - float _pressedTextureScaleXInSize; - float _pressedTextureScaleYInSize; - bool _normalTextureLoaded; - bool _pressedTextureLoaded; - bool _disabledTextureLoaded; -}; - -} - -NS_CC_END - -#endif /* defined(__CocoGUI__Button__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UICheckBox.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UICheckBox.h deleted file mode 100644 index 81c5549..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UICheckBox.h +++ /dev/null @@ -1,210 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __UICHECKBOX_H__ -#define __UICHECKBOX_H__ - -#include "../BaseClasses/UIWidget.h" - -NS_CC_BEGIN - -namespace ui { - -typedef enum -{ - CHECKBOX_STATE_EVENT_SELECTED, - CHECKBOX_STATE_EVENT_UNSELECTED -}CheckBoxEventType; - -typedef void (CCObject::*SEL_SelectedStateEvent)(CCObject*,CheckBoxEventType); -#define checkboxselectedeventselector(_SELECTOR) (SEL_SelectedStateEvent)(&_SELECTOR) - -/** -* @js NA -* @lua NA -*/ -class CheckBox : public Widget -{ - DECLARE_CLASS_GUI_INFO - -public: - /** - * Default constructor - */ - CheckBox(); - - /** - * Default destructor - */ - virtual ~CheckBox(); - - /** - * Allocates and initializes. - */ - static CheckBox* create(); - - /** - * Load textures for checkbox. - * - * @param backGround backGround texture. - * - * @param backGroundSelected backGround selected state texture. - * - * @param cross cross texture. - * - * @param frontCrossDisabled cross dark state texture. - * - * @param texType @see UI_TEX_TYPE_LOCAL - */ - void loadTextures(const char* backGround,const char* backGroundSelected,const char* cross,const char* backGroundDisabled,const char* frontCrossDisabled,TextureResType texType = UI_TEX_TYPE_LOCAL); - - /** - * Load backGround texture for checkbox. - * - * @param backGround backGround texture. - * - * @param texType @see UI_TEX_TYPE_LOCAL - */ - void loadTextureBackGround(const char* backGround,TextureResType type = UI_TEX_TYPE_LOCAL); - - /** - * Load backGroundSelected texture for checkbox. - * - * @param backGroundSelected backGround selected state texture. - * - * @param texType @see UI_TEX_TYPE_LOCAL - */ - void loadTextureBackGroundSelected(const char* backGroundSelected,TextureResType texType = UI_TEX_TYPE_LOCAL); - - /** - * Load cross texture for checkbox. - * - * @param cross cross texture. - * - * @param texType @see UI_TEX_TYPE_LOCAL - */ - void loadTextureFrontCross(const char* cross,TextureResType texType = UI_TEX_TYPE_LOCAL); - - /** - * Load backGroundDisabled texture for checkbox. - * - * @param backGroundDisabled backGroundDisabled texture. - * - * @param texType @see UI_TEX_TYPE_LOCAL - */ - void loadTextureBackGroundDisabled(const char* backGroundDisabled,TextureResType texType = UI_TEX_TYPE_LOCAL); - - /** - * Load frontCrossDisabled texture for checkbox. - * - * @param frontCrossDisabled frontCrossDisabled texture. - * - * @param texType @see UI_TEX_TYPE_LOCAL - */ - void loadTextureFrontCrossDisabled(const char* frontCrossDisabled,TextureResType texType = UI_TEX_TYPE_LOCAL); - - /** - * Sets selcted state for checkbox. - * - * @param selected true that checkbox is selected, false otherwise. - */ - void setSelectedState(bool selected); - - /** - * Gets selcted state of checkbox. - * - * @return selected true that checkbox is selected, false otherwise. - */ - bool getSelectedState(); - - //override "setAnchorPoint" method of widget. - virtual void setAnchorPoint(const CCPoint &pt); - - //add a call back function would called when checkbox is selected or unselected. - void addEventListenerCheckBox(CCObject* target,SEL_SelectedStateEvent selector); - - //override "onTouchEnded" method of widget. - virtual void onTouchEnded(CCTouch *touch, CCEvent *unused_event); - - //override "getContentSize" method of widget. - virtual const CCSize& getContentSize() const; - - //override "getVirtualRenderer" method of widget. - virtual CCNode* getVirtualRenderer(); - - /** - * Returns the "class name" of widget. - */ - virtual std::string getDescription() const; - -protected: - virtual bool init(); - virtual void initRenderer(); - virtual void onPressStateChangedToNormal(); - virtual void onPressStateChangedToPressed(); - virtual void onPressStateChangedToDisabled(); - void selectedEvent(); - void unSelectedEvent(); - virtual void onSizeChanged(); - virtual void updateTextureColor(); - virtual void updateTextureOpacity(); - virtual void updateTextureRGBA(); - virtual void updateFlippedX(); - virtual void updateFlippedY(); - void backGroundTextureScaleChangedWithSize(); - void backGroundSelectedTextureScaleChangedWithSize(); - void frontCrossTextureScaleChangedWithSize(); - void backGroundDisabledTextureScaleChangedWithSize(); - void frontCrossDisabledTextureScaleChangedWithSize(); - virtual Widget* createCloneInstance(); - virtual void copySpecialProperties(Widget* model); -protected: - CCSprite* _backGroundBoxRenderer; - CCSprite* _backGroundSelectedBoxRenderer; - CCSprite* _frontCrossRenderer; - CCSprite* _backGroundBoxDisabledRenderer; - CCSprite* _frontCrossDisabledRenderer; - bool _isSelected; - - CCObject* _checkBoxEventListener; - SEL_SelectedStateEvent _checkBoxEventSelector; - - TextureResType _backGroundTexType; - TextureResType _backGroundSelectedTexType; - TextureResType _frontCrossTexType; - TextureResType _backGroundDisabledTexType; - TextureResType _frontCrossDisabledTexType; - - std::string _backGroundFileName; - std::string _backGroundSelectedFileName; - std::string _frontCrossFileName; - std::string _backGroundDisabledFileName; - std::string _frontCrossDisabledFileName; -}; - -} - -NS_CC_END - -#endif /* defined(__CocoGUI__CheckBox__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UIImageView.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UIImageView.h deleted file mode 100644 index c5e2dbb..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UIImageView.h +++ /dev/null @@ -1,129 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __UIIMAGEVIEW_H__ -#define __UIIMAGEVIEW_H__ - -#include "../BaseClasses/UIWidget.h" - -NS_CC_BEGIN - -namespace ui { - -/** -* @js NA -* @lua NA -*/ -class ImageView : public Widget -{ - DECLARE_CLASS_GUI_INFO - -public: - /** - * Default constructor - */ - ImageView(); - - /** - * Default destructor - */ - virtual ~ImageView(); - - /** - * Allocates and initializes. - */ - static ImageView* create(); - - /** - * Load texture for imageview. - * - * @param fileName file name of texture. - * - * @param texType @see UI_TEX_TYPE_LOCAL - */ - void loadTexture(const char* fileName,TextureResType texType = UI_TEX_TYPE_LOCAL); - - /** - * Updates the texture rect of the ImageView in points. - * It will call setTextureRect:rotated:untrimmedSize with rotated = NO, and utrimmedSize = rect.size. - */ - void setTextureRect(const CCRect& rect); - - /** - * Sets if imageview is using scale9 renderer. - * - * @param true that using scale9 renderer, false otherwise. - */ - void setScale9Enabled(bool able); - - bool isScale9Enabled(); - - /** - * Sets capinsets for imageview, if imageview is using scale9 renderer. - * - * @param capInsets capinsets for imageview - */ - void setCapInsets(const CCRect &capInsets); - - const CCRect& getCapInsets(); - - //override "setAnchorPoint" method of widget. - virtual void setAnchorPoint(const CCPoint &pt); - - //override "ignoreContentAdaptWithSize" method of widget. - virtual void ignoreContentAdaptWithSize(bool ignore); - - /** - * Returns the "class name" of widget. - */ - virtual std::string getDescription() const; - - virtual const CCSize& getContentSize() const; - virtual CCNode* getVirtualRenderer(); -protected: - virtual void initRenderer(); - virtual void onSizeChanged(); - virtual void updateTextureColor(); - virtual void updateTextureOpacity(); - virtual void updateTextureRGBA(); - virtual void updateFlippedX(); - virtual void updateFlippedY(); - void imageTextureScaleChangedWithSize(); - virtual Widget* createCloneInstance(); - virtual void copySpecialProperties(Widget* model); -protected: - bool _scale9Enabled; - bool _prevIgnoreSize; - CCRect _capInsets; - CCNode* _imageRenderer; - std::string _textureFile; - TextureResType _imageTexType; - CCSize _imageTextureSize; -}; - -} - -NS_CC_END - -#endif /* defined(__CocoGUI__ImageView__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UILabel.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UILabel.h deleted file mode 100644 index c31d7fa..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UILabel.h +++ /dev/null @@ -1,164 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __UILABEL_H__ -#define __UILABEL_H__ - -#include "../BaseClasses/UIWidget.h" - -NS_CC_BEGIN - -namespace ui { - -/** -* @js NA -* @lua NA -*/ -class Label : public Widget -{ - DECLARE_CLASS_GUI_INFO - -public: - /** - * Default constructor - */ - Label(); - - /** - * Default destructor - */ - virtual ~Label(); - - /** - * Allocates and initializes. - */ - static Label* create(); - - /** - * Changes the string value of label. - * - * @param text string value. - */ - void setText(const std::string& text); - - /** - * Gets the string value of label. - * - * @return text string value. - */ - const char* getStringValue(); - - /** - * Gets the string length of label. - * - * @return string length. - */ - int getStringLength(); - - /** - * Sets the font size of label. - * - * @param font size. - */ - void setFontSize(int size); - - int getFontSize(); - - /** - * Sets the font name of label. - * - * @param font name. - */ - void setFontName(const std::string& name); - - const char* getFontName(); - /** - * Sets the touch scale enabled of label. - * - * @param touch scale enabled of label. - */ - void setTouchScaleChangeEnabled(bool enabled); - - /** - * Gets the touch scale enabled of label. - * - * @return touch scale enabled of label. - */ - bool isTouchScaleChangeEnabled(); - - //override "setAnchorPoint" method of widget. - virtual void setAnchorPoint(const CCPoint &pt); - - //override "getContentSize" method of widget. - virtual const CCSize& getContentSize() const; - - //override "getVirtualRenderer" method of widget. - virtual CCNode* getVirtualRenderer(); - - /** - * Returns the "class name" of widget. - */ - virtual std::string getDescription() const; - - void setTextAreaSize(const CCSize &size); - - CCSize getTextAreaSize(); - - void setTextHorizontalAlignment(CCTextAlignment alignment); - - CCTextAlignment getTextHorizontalAlignment(); - - void setTextVerticalAlignment(CCVerticalTextAlignment alignment); - - CCVerticalTextAlignment getTextVerticalAlignment(); -protected: - virtual bool init(); - virtual void initRenderer(); - virtual void onPressStateChangedToNormal(); - virtual void onPressStateChangedToPressed(); - virtual void onPressStateChangedToDisabled(); - virtual void onSizeChanged(); - virtual void updateTextureColor(); - virtual void updateTextureOpacity(); - virtual void updateTextureRGBA(); - virtual void updateFlippedX(); - virtual void updateFlippedY(); - void labelScaleChangedWithSize(); - virtual Widget* createCloneInstance(); - virtual void copySpecialProperties(Widget* model); -protected: - bool _touchScaleChangeEnabled; - float _normalScaleValueX; - float _normalScaleValueY; - std::string _fontName; - int _fontSize; - float _onSelectedScaleOffset; - CCLabelTTF* _labelRenderer; -}; - -} - -NS_CC_END - -#endif /* defined(__CocoGUI__Label__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UILabelAtlas.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UILabelAtlas.h deleted file mode 100644 index 2150cfc..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UILabelAtlas.h +++ /dev/null @@ -1,128 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __UILABELATLAS_H__ -#define __UILABELATLAS_H__ - -#include "../BaseClasses/UIWidget.h" - -NS_CC_BEGIN - -namespace ui { - -/** - * @js NA - * @lua NA - */ -class UICCLabelAtlas : public CCLabelAtlas -{ -public: - /** - * Default constructor - */ - UICCLabelAtlas(); - - /** - * Default destructor - */ - virtual ~UICCLabelAtlas(); - - /** - * Allocates and initializes. - */ - static UICCLabelAtlas* create(); - void setProperty(const std::string& string, const std::string& charMapFile, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap); - void setProperty(const std::string& string, CCTexture2D *texture, unsigned int itemWidth, unsigned int itemHeight, unsigned int startCharMap); - virtual void updateDisplayedOpacity(GLubyte opacity); - virtual void draw(void); -}; -/** - * @js NA - * @lua NA - */ -class LabelAtlas : public Widget -{ - DECLARE_CLASS_GUI_INFO - -public: - /** - * Default constructor - */ - LabelAtlas(); - - /** - * Default destructor - */ - virtual ~LabelAtlas(); - - /** - * Allocates and initializes. - */ - static LabelAtlas* create(); - - /** initializes the LabelAtlas with a string, a char map file(the atlas), the width and height of each element and the starting char of the atlas */ - void setProperty(const std::string& stringValue,const std::string& charMapFile, int itemWidth, int itemHeight, const std::string& startCharMap); - - //set string value for labelatlas. - void setStringValue(const std::string& value); - - //get string value for labelatlas. - const char* getStringValue() const; - - //override "setAnchorPoint" method of widget. - virtual void setAnchorPoint(const CCPoint &pt); - - //override "getContentSize" method of widget. - virtual const CCSize& getContentSize() const; - - //override "getVirtualRenderer" method of widget. - virtual CCNode* getVirtualRenderer(); - - /** - * Returns the "class name" of widget. - */ - virtual std::string getDescription() const; - -protected: - virtual void initRenderer(); - virtual void onSizeChanged(); - virtual void updateTextureColor(); - virtual void updateTextureOpacity(); - virtual void updateTextureRGBA(); - void labelAtlasScaleChangedWithSize(); - virtual Widget* createCloneInstance(); - virtual void copySpecialProperties(Widget* model); -protected: - UICCLabelAtlas* _labelAtlasRenderer; - std::string _stringValue; - std::string _charMapFileName; - int _itemWidth; - int _itemHeight; - std::string _startCharMap; -}; - -} -NS_CC_END - -#endif /* defined(__CocoGUI__LabelAtlas__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UILabelBMFont.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UILabelBMFont.h deleted file mode 100644 index 39af54f..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UILabelBMFont.h +++ /dev/null @@ -1,92 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __UILABELBMFONT_H__ -#define __UILABELBMFONT_H__ - -#include "../BaseClasses/UIWidget.h" - -NS_CC_BEGIN - -namespace ui { - -/** -* @js NA -* @lua NA -*/ -class LabelBMFont : public Widget -{ - DECLARE_CLASS_GUI_INFO - -public: - /** - * Default constructor - */ - LabelBMFont(); - - /** - * Default destructor - */ - virtual ~LabelBMFont(); - - /** - * Allocates and initializes. - */ - static LabelBMFont* create(); - - /** init a bitmap font atlas with an initial string and the FNT file */ - void setFntFile(const char* fileName); - - /** set string value for labelbmfont*/ - void setText(const char* value); - - /** get string value for labelbmfont*/ - const char* getStringValue(); - virtual void setAnchorPoint(const CCPoint &pt); - virtual const CCSize& getContentSize() const; - virtual CCNode* getVirtualRenderer(); - /** - * Returns the "class name" of widget. - */ - virtual std::string getDescription() const; -protected: - virtual void initRenderer(); - virtual void onSizeChanged(); - virtual void updateTextureColor(); - virtual void updateTextureOpacity(); - virtual void updateTextureRGBA(); - void labelBMFontScaleChangedWithSize(); - virtual Widget* createCloneInstance(); - virtual void copySpecialProperties(Widget* model); -protected: - cocos2d::CCLabelBMFont* _labelBMFontRenderer; - bool _fntFileHasInit; - std::string _fntFileName; - std::string _stringValue; -}; - -} -NS_CC_END - -#endif /* defined(__LabelBMFont__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UILoadingBar.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UILoadingBar.h deleted file mode 100644 index 100af27..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UILoadingBar.h +++ /dev/null @@ -1,161 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __UILOADINGBAR_H__ -#define __UILOADINGBAR_H__ - -#include "../BaseClasses/UIWidget.h" - -NS_CC_BEGIN - -namespace ui { - -typedef enum -{ - LoadingBarTypeLeft, - LoadingBarTypeRight -}LoadingBarType; -/** -* @js NA -* @lua NA -*/ -class LoadingBar : public Widget -{ - - DECLARE_CLASS_GUI_INFO - -public: - /** - * Default constructor - */ - LoadingBar(); - - /** - * Default destructor - */ - virtual ~LoadingBar(); - - /** - * Allocates and initializes. - */ - static LoadingBar* create(); - - /** - * Changes the progress direction of loadingbar. - * - * @see LoadingBarType LoadingBarTypeLeft means progress left to right, LoadingBarTypeRight otherwise. - * - * @param LoadingBarType - */ - void setDirection(LoadingBarType dir); - - /** - * Gets the progress direction of loadingbar. - * - * @see LoadingBarType LoadingBarTypeLeft means progress left to right, LoadingBarTypeRight otherwise. - * - * @param LoadingBarType - */ - int getDirection(); - - /** - * Load texture for loadingbar. - * - * @param fileName file name of texture. - * - * @param texType @see UI_TEX_TYPE_LOCAL - */ - void loadTexture(const char* texture,TextureResType texType = UI_TEX_TYPE_LOCAL); - - /** - * Changes the progress direction of loadingbar. - * - * @param percent percent value from 1 to 100. - */ - void setPercent(int percent); - - /** - * Gets the progress direction of loadingbar. - * - * @return percent percent value from 1 to 100. - */ - int getPercent(); - - /** - * Sets if loadingbar is using scale9 renderer. - * - * @param true that using scale9 renderer, false otherwise. - */ - void setScale9Enabled(bool enabled); - - bool isScale9Enabled(); - - /** - * Sets capinsets for loadingbar, if loadingbar is using scale9 renderer. - * - * @param capInsets capinsets for loadingbar - */ - void setCapInsets(const CCRect &capInsets); - - const CCRect& getCapInsets(); - - //override "ignoreContentAdaptWithSize" method of widget. - virtual void ignoreContentAdaptWithSize(bool ignore); - - //override "getContentSize" method of widget. - virtual const CCSize& getContentSize() const; - - //override "getVirtualRenderer" method of widget. - virtual CCNode* getVirtualRenderer(); - - /** - * Returns the "class name" of widget. - */ - virtual std::string getDescription() const; -protected: - virtual void initRenderer(); - virtual void onSizeChanged(); - virtual void updateTextureColor(); - virtual void updateTextureOpacity(); - virtual void updateTextureRGBA(); - void setScale9Scale(); - void barRendererScaleChangedWithSize(); - virtual Widget* createCloneInstance(); - virtual void copySpecialProperties(Widget* model); -protected: - LoadingBarType _barType; - int _percent; - float _totalLength; - CCNode* _barRenderer; - TextureResType _renderBarTexType; - CCSize _barRendererTextureSize; - bool _scale9Enabled; - bool _prevIgnoreSize; - CCRect _capInsets; - std::string _textureFile; -}; - -} -NS_CC_END -#endif /* defined(__CocoGUI__LoadingBar__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UIRichText.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UIRichText.h deleted file mode 100644 index 8645a78..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UIRichText.h +++ /dev/null @@ -1,133 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __UIRICHTEXT_H__ -#define __UIRICHTEXT_H__ - -#include "../BaseClasses/UIWidget.h" - -NS_CC_BEGIN - -namespace ui { - -typedef enum { - RICH_TEXT, - RICH_IMAGE, - RICH_CUSTOM -}RichElementType; - -class RichElement : public CCObject -{ -public: - RichElement(){}; - virtual ~RichElement(){}; - virtual bool init(int tag, const ccColor3B& color, GLubyte opacity); -protected: - RichElementType _type; - int _tag; - ccColor3B _color; - GLubyte _opacity; - friend class RichText; -}; - -class RichElementText : public RichElement -{ -public: - RichElementText(){_type = RICH_TEXT;}; - virtual ~RichElementText(){}; - virtual bool init(int tag, const ccColor3B& color, GLubyte opacity, const char* text, const char* fontName, float fontSize); - static RichElementText* create(int tag, const ccColor3B& color, GLubyte opacity, const char* text, const char* fontName, float fontSize); -protected: - std::string _text; - std::string _fontName; - float _fontSize; - friend class RichText; - -}; - -class RichElementImage : public RichElement -{ -public: - RichElementImage(){_type = RICH_IMAGE;}; - virtual ~RichElementImage(){}; - virtual bool init(int tag, const ccColor3B& color, GLubyte opacity, const char* filePath); - static RichElementImage* create(int tag, const ccColor3B& color, GLubyte opacity, const char* filePath); -protected: - std::string _filePath; - CCRect _textureRect; - int _textureType; - friend class RichText; -}; - -class RichElementCustomNode : public RichElement -{ -public: - RichElementCustomNode(){_type = RICH_CUSTOM;}; - virtual ~RichElementCustomNode(){CC_SAFE_RELEASE(_customNode);}; - virtual bool init(int tag, const ccColor3B& color, GLubyte opacity, CCNode* customNode); - static RichElementCustomNode* create(int tag, const ccColor3B& color, GLubyte opacity, CCNode* customNode); -protected: - CCNode* _customNode; - friend class RichText; -}; - -class RichText : public Widget -{ -public: - RichText(); - virtual ~RichText(); - static RichText* create(); - void insertElement(RichElement* element, int index); - void pushBackElement(RichElement* element); - void removeElement(int index); - void removeElement(RichElement* element); - virtual void visit(); - void setVerticalSpace(float space); - virtual void setAnchorPoint(const CCPoint &pt); - virtual const CCSize& getContentSize() const; - void formatText(); - virtual void ignoreContentAdaptWithSize(bool ignore); -protected: - virtual bool init(); - virtual void initRenderer(); - void pushToContainer(CCNode* renderer); - void handleTextRenderer(const char* text, const char* fontName, float fontSize, const ccColor3B& color, GLubyte opacity); - void handleImageRenderer(const char* fileParh, const ccColor3B& color, GLubyte opacity); - void handleCustomRenderer(CCNode* renderer); - void formarRenderers(); - void addNewLine(); -protected: - bool _formatTextDirty; - CCArray* _richElements; - std::vector _elementRenders; - float _leftSpaceWidth; - float _verticalSpace; - CCNode* _elementRenderersContainer; -}; - -} - -NS_CC_END - -#endif /* defined(__UIRichText__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UISlider.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UISlider.h deleted file mode 100644 index 21195ca..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UISlider.h +++ /dev/null @@ -1,249 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __UISLIDER_H__ -#define __UISLIDER_H__ - -#include "../BaseClasses/UIWidget.h" - -NS_CC_BEGIN - -namespace ui { - -typedef enum -{ - SLIDER_PERCENTCHANGED -}SliderEventType; - -typedef void (CCObject::*SEL_SlidPercentChangedEvent)(CCObject*,SliderEventType); -#define sliderpercentchangedselector(_SELECTOR) (SEL_SlidPercentChangedEvent)(&_SELECTOR) - -/** -* @js NA -* @lua NA -*/ -class Slider : public Widget -{ - - DECLARE_CLASS_GUI_INFO - -public: - /** - * Default constructor - */ - Slider(); - - /** - * Default destructor - */ - virtual ~Slider(); - - /** - * Allocates and initializes. - */ - static Slider* create(); - - /** - * Load texture for slider bar. - * - * @param fileName file name of texture. - * - * @param texType @see UI_TEX_TYPE_LOCAL - */ - void loadBarTexture(const char* fileName,TextureResType texType = UI_TEX_TYPE_LOCAL); - - /** - * Sets if slider is using scale9 renderer. - * - * @param true that using scale9 renderer, false otherwise. - */ - void setScale9Enabled(bool able); - - bool isScale9Enabled(); - - /** - * Sets capinsets for slider, if slider is using scale9 renderer. - * - * @param capInsets capinsets for slider - */ - void setCapInsets(const CCRect &capInsets); - - /** - * Sets capinsets for slider, if slider is using scale9 renderer. - * - * @param capInsets capinsets for slider - */ - void setCapInsetsBarRenderer(const CCRect &capInsets); - - const CCRect& getCapInsetBarRenderer(); - - /** - * Sets capinsets for slider, if slider is using scale9 renderer. - * - * @param capInsets capinsets for slider - */ - void setCapInsetProgressBarRebderer(const CCRect &capInsets); - - const CCRect& getCapInsetProgressBarRebderer(); - - /** - * Load textures for slider ball. - * - * @param slider ball normal normal state texture. - * - * @param slider ball selected selected state texture. - * - * @param slider ball disabled dark state texture. - * - * @param texType @see UI_TEX_TYPE_LOCAL - */ - void loadSlidBallTextures(const char* normal,const char* pressed,const char* disabled,TextureResType texType = UI_TEX_TYPE_LOCAL); - - /** - * Load normal state texture for slider ball. - * - * @param normal normal state texture. - * - * @param texType @see UI_TEX_TYPE_LOCAL - */ - void loadSlidBallTextureNormal(const char* normal,TextureResType texType = UI_TEX_TYPE_LOCAL); - - /** - * Load selected state texture for slider ball. - * - * @param selected selected state texture. - * - * @param texType @see UI_TEX_TYPE_LOCAL - */ - void loadSlidBallTexturePressed(const char* pressed,TextureResType texType = UI_TEX_TYPE_LOCAL); - - /** - * Load dark state texture for slider ball. - * - * @param disabled dark state texture. - * - * @param texType @see UI_TEX_TYPE_LOCAL - */ - void loadSlidBallTextureDisabled(const char* disabled,TextureResType texType = UI_TEX_TYPE_LOCAL); - - /** - * Load dark state texture for slider progress bar. - * - * @param fileName file path of texture. - * - * @param texType @see UI_TEX_TYPE_LOCAL - */ - void loadProgressBarTexture(const char* fileName, TextureResType texType = UI_TEX_TYPE_LOCAL); - - /** - * Changes the progress direction of slider. - * - * @param percent percent value from 1 to 100. - */ - void setPercent(int percent); - - /** - * Gets the progress direction of slider. - * - * @return percent percent value from 1 to 100. - */ - int getPercent(); - - /** - * Add call back function called when slider's percent has changed to slider. - */ - void addEventListenerSlider(CCObject* target,SEL_SlidPercentChangedEvent selector); - - virtual bool onTouchBegan(CCTouch *touch, CCEvent *unused_event); - virtual void onTouchMoved(CCTouch *touch, CCEvent *unused_event); - virtual void onTouchEnded(CCTouch *touch, CCEvent *unused_event); - virtual void onTouchCancelled(CCTouch *touch, CCEvent *unused_event); - - //override "getContentSize" method of widget. - virtual const CCSize& getContentSize() const; - - //override "getVirtualRenderer" method of widget. - virtual CCNode* getVirtualRenderer(); - - //override "ignoreContentAdaptWithSize" method of widget. - virtual void ignoreContentAdaptWithSize(bool ignore); - - /** - * Returns the "class name" of widget. - */ - virtual std::string getDescription() const; - -protected: - virtual bool init(); - virtual void initRenderer(); - float getPercentWithBallPos(float location); - void percentChangedEvent(); - virtual void onPressStateChangedToNormal(); - virtual void onPressStateChangedToPressed(); - virtual void onPressStateChangedToDisabled(); - virtual void onSizeChanged(); - virtual void updateTextureColor(); - virtual void updateTextureOpacity(); - virtual void updateTextureRGBA(); - void barRendererScaleChangedWithSize(); - void progressBarRendererScaleChangedWithSize(); - virtual Widget* createCloneInstance(); - virtual void copySpecialProperties(Widget* model); -protected: - CCNode* _barRenderer; - CCNode* _progressBarRenderer; - CCSize _progressBarTextureSize; - - CCSprite* _slidBallNormalRenderer; - CCSprite* _slidBallPressedRenderer; - CCSprite* _slidBallDisabledRenderer; - CCNode* _slidBallRenderer; - - float _barLength; - int _percent; - - bool _scale9Enabled; - bool _prevIgnoreSize; - std::string _textureFile; - std::string _progressBarTextureFile; - std::string _slidBallNormalTextureFile; - std::string _slidBallPressedTextureFile; - std::string _slidBallDisabledTextureFile; - - CCRect _capInsetsBarRenderer; - CCRect _capInsetsProgressBarRenderer; - - CCObject* _sliderEventListener; - SEL_SlidPercentChangedEvent _sliderEventSelector; - TextureResType _barTexType; - TextureResType _progressBarTexType; - TextureResType _ballNTexType; - TextureResType _ballPTexType; - TextureResType _ballDTexType; -}; - -} -NS_CC_END - -#endif /* defined(__CocoGUI__Slider__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UITextField.h b/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UITextField.h deleted file mode 100644 index d2c0c90..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/GUI/UIWidgets/UITextField.h +++ /dev/null @@ -1,195 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __UITEXTFIELD_H__ -#define __UITEXTFIELD_H__ - -#include "../BaseClasses/UIWidget.h" - -NS_CC_BEGIN - -namespace ui { - -/** - * @js NA - * @lua NA - */ -class UICCTextField: public CCTextFieldTTF, public CCTextFieldDelegate -{ -public: - UICCTextField(); - ~UICCTextField(); - - virtual void onEnter(); - - // static - static UICCTextField* create(const char *placeholder, const char *fontName, float fontSize); - - // CCTextFieldDelegate - virtual bool onTextFieldAttachWithIME(CCTextFieldTTF *pSender); - virtual bool onTextFieldDetachWithIME(CCTextFieldTTF * pSender); - virtual bool onTextFieldInsertText(CCTextFieldTTF * pSender, const char * text, int nLen); - virtual bool onTextFieldDeleteBackward(CCTextFieldTTF * pSender, const char * delText, int nLen); - - void insertText(const char* text, int len); - void deleteBackward(); - - void openIME(); - void closeIME(); - - void setMaxLengthEnabled(bool enable); - bool isMaxLengthEnabled(); - void setMaxLength(int length); - int getMaxLength(); - int getCharCount(); - void setPasswordEnabled(bool enable); - bool isPasswordEnabled(); - void setPasswordStyleText(const char* styleText); - void setPasswordText(const char* text); - void setAttachWithIME(bool attach); - bool getAttachWithIME(); - void setDetachWithIME(bool detach); - bool getDetachWithIME(); - void setInsertText(bool insert); - bool getInsertText(); - void setDeleteBackward(bool deleteBackward); - bool getDeleteBackward(); -protected: - bool _maxLengthEnabled; - int _maxLength; - bool _passwordEnabled; - std::string _passwordStyleText; - bool _attachWithIME; - bool _detachWithIME; - bool _insertText; - bool _deleteBackward; -}; - -typedef enum -{ - TEXTFIELD_EVENT_ATTACH_WITH_IME, - TEXTFIELD_EVENT_DETACH_WITH_IME, - TEXTFIELD_EVENT_INSERT_TEXT, - TEXTFIELD_EVENT_DELETE_BACKWARD, -}TextFiledEventType; - -typedef void (CCObject::*SEL_TextFieldEvent)(CCObject*, TextFiledEventType); -#define textfieldeventselector(_SELECTOR) (SEL_TextFieldEvent)(&_SELECTOR) - -/** class UITextField : public Widget -* @js NA -* @lua NA -*/ -class TextField : public Widget -{ - - DECLARE_CLASS_GUI_INFO - -public: - TextField(); - virtual ~TextField(); - static TextField* create(); - void setTouchSize(const CCSize &size); - CCSize getTouchSize(); - void setTouchAreaEnabled(bool enable); - virtual bool hitTest(const CCPoint &pt); - void setText(const std::string& text); - void setPlaceHolder(const std::string& value); - const char* getPlaceHolder(); - void setFontSize(int size); - int getFontSize(); - void setFontName(const std::string& name); - const char* getFontName(); - virtual void didNotSelectSelf(); - const char* getStringValue(); - virtual bool onTouchBegan(CCTouch *touch, CCEvent *unused_event); - void setMaxLengthEnabled(bool enable); - bool isMaxLengthEnabled(); - void setMaxLength(int length); - int getMaxLength(); - void setPasswordEnabled(bool enable); - bool isPasswordEnabled(); - void setPasswordStyleText(const char* styleText); - const char* getPasswordStyleText(); - virtual void update(float dt); - bool getAttachWithIME(); - void setAttachWithIME(bool attach); - bool getDetachWithIME(); - void setDetachWithIME(bool detach); - bool getInsertText(); - void setInsertText(bool insertText); - bool getDeleteBackward(); - void setDeleteBackward(bool deleteBackward); - void addEventListenerTextField(CCObject* target, SEL_TextFieldEvent selecor); - - virtual void setAnchorPoint(const CCPoint &pt); - - /** - * Returns the "class name" of widget. - */ - virtual std::string getDescription() const; - - virtual const CCSize& getContentSize() const; - virtual CCNode* getVirtualRenderer(); - void attachWithIME(); - virtual void onEnter(); - - void setTextAreaSize(const CCSize &size); - void setTextHorizontalAlignment(CCTextAlignment alignment); - void setTextVerticalAlignment(CCVerticalTextAlignment alignment); - /*=*/ - -protected: - virtual bool init(); - virtual void initRenderer(); - // event - void attachWithIMEEvent(); - void detachWithIMEEvent(); - void insertTextEvent(); - void deleteBackwardEvent(); - virtual void onSizeChanged(); - virtual void updateTextureColor(); - virtual void updateTextureOpacity(); - virtual void updateTextureRGBA(); - void textfieldRendererScaleChangedWithSize(); - virtual Widget* createCloneInstance(); - virtual void copySpecialProperties(Widget* model); -protected: - UICCTextField* _textFieldRenderer; - - float _touchWidth; - float _touchHeight; - bool _useTouchArea; - - CCObject* _textFieldEventListener; - SEL_TextFieldEvent _textFieldEventSelector; - - std::string _passwordStyleText; -}; - -} - -NS_CC_END - -#endif /* defined(__TextField__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Json/DictionaryHelper.h b/cappuccino-sdk/incl/extensions/CocoStudio/Json/DictionaryHelper.h deleted file mode 100644 index 6fd94f8..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Json/DictionaryHelper.h +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __DICTIONARYHELPER_H__ -#define __DICTIONARYHELPER_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include "rapidjson/document.h" - -#define DICTOOL DictionaryHelper::shareHelper() - -NS_CC_EXT_BEGIN -/** -* @js NA -* @lua NA -*/ -class DictionaryHelper -{ -public: - DictionaryHelper(); - ~DictionaryHelper(); - static DictionaryHelper* shareHelper(); - static void purgeDictionaryHelper(); - cocos2d::CCDictionary* getSubDictionary(cocos2d::CCDictionary* root,const char* key); - int getIntValue(cocos2d::CCDictionary* root,const char* key); - float getFloatValue(cocos2d::CCDictionary* root,const char* key); - const char* getStringValue(cocos2d::CCDictionary* root,const char* key); - bool getBooleanValue(cocos2d::CCDictionary* root,const char* key); - cocos2d::CCArray* getArrayValue(cocos2d::CCDictionary* root,const char* key); - cocos2d::CCObject* checkObjectExist(cocos2d::CCDictionary* root,const char* key); - int objectToIntValue(cocos2d::CCObject* obj); - float objectToFloatValue(cocos2d::CCObject* obj); - const char* objectToStringValue(cocos2d::CCObject* obj); - bool objectToBooleanValue(cocos2d::CCObject* obj); - cocos2d::CCArray* objectToCCArray(cocos2d::CCObject* obj); - - const rapidjson::Value& getSubDictionary_json(const rapidjson::Value &root, const char* key); - const rapidjson::Value& getSubDictionary_json(const rapidjson::Value &root, const char* key, int idx); - const rapidjson::Value& getSubDictionary_json(const rapidjson::Value &root, int idx); - - int getIntValue_json(const rapidjson::Value& root, const char* key, int def = 0); - float getFloatValue_json(const rapidjson::Value& root,const char* key, float def = 0.0f); - bool getBooleanValue_json(const rapidjson::Value& root,const char* key, bool def = false); - const char* getStringValue_json(const rapidjson::Value& root,const char* key, const char *def = NULL); - int getArrayCount_json(const rapidjson::Value& root,const char* key, int def = 0); - - int getIntValueFromArray_json(const rapidjson::Value& root,const char* arrayKey,int idx, int def = 0); - float getFloatValueFromArray_json(const rapidjson::Value& root,const char* arrayKey,int idx, float def = 0.0f); - bool getBoolValueFromArray_json(const rapidjson::Value& root,const char* arrayKey,int idx, bool def = false); - const char* getStringValueFromArray_json(const rapidjson::Value& root,const char* arrayKey,int idx, const char *def = NULL); - const rapidjson::Value &getDictionaryFromArray_json(const rapidjson::Value &root, const char* key,int idx); - bool checkObjectExist_json(const rapidjson::Value &root); - bool checkObjectExist_json(const rapidjson::Value &root, const char* key); - bool checkObjectExist_json(const rapidjson::Value &root, int index); -}; - -NS_CC_EXT_END - -#endif /* defined(__CocoGUI__DictionaryHelper__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/document.h b/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/document.h deleted file mode 100644 index c70e618..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/document.h +++ /dev/null @@ -1,821 +0,0 @@ -#ifndef RAPIDJSON_DOCUMENT_H_ -#define RAPIDJSON_DOCUMENT_H_ - -#include "reader.h" -#include "internal/strfunc.h" -#include // placement new - -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4127) // conditional expression is constant -#endif - -namespace rapidjson { - -/////////////////////////////////////////////////////////////////////////////// -// GenericValue - -//! Represents a JSON value. Use Value for UTF8 encoding and default allocator. -/*! - A JSON value can be one of 7 types. This class is a variant type supporting - these types. - - Use the Value if UTF8 and default allocator - - \tparam Encoding Encoding of the value. (Even non-string values need to have the same encoding in a document) - \tparam Allocator Allocator type for allocating memory of object, array and string. -*/ -#pragma pack (push, 4) -template > -class GenericValue { -public: - //! Name-value pair in an object. - struct Member { - GenericValue name; //!< name of member (must be a string) - GenericValue value; //!< value of member. - }; - - typedef Encoding EncodingType; //!< Encoding type from template parameter. - typedef Allocator AllocatorType; //!< Allocator type from template parameter. - typedef typename Encoding::Ch Ch; //!< Character type derived from Encoding. - typedef Member* MemberIterator; //!< Member iterator for iterating in object. - typedef const Member* ConstMemberIterator; //!< Constant member iterator for iterating in object. - typedef GenericValue* ValueIterator; //!< Value iterator for iterating in array. - typedef const GenericValue* ConstValueIterator; //!< Constant value iterator for iterating in array. - - //!@name Constructors and destructor. - //@{ - - //! Default constructor creates a null value. - GenericValue() : flags_(kNullFlag) {} - - //! Copy constructor is not permitted. -private: - GenericValue(const GenericValue& rhs); - -public: - - //! Constructor with JSON value type. - /*! This creates a Value of specified type with default content. - \param type Type of the value. - \note Default content for number is zero. - */ - GenericValue(Type type) { - static const unsigned defaultFlags[7] = { - kNullFlag, kFalseFlag, kTrueFlag, kObjectFlag, kArrayFlag, kConstStringFlag, - kNumberFlag | kIntFlag | kUintFlag | kInt64Flag | kUint64Flag | kDoubleFlag - }; - RAPIDJSON_ASSERT(type <= kNumberType); - flags_ = defaultFlags[type]; - memset(&data_, 0, sizeof(data_)); - } - - //! Constructor for boolean value. - GenericValue(bool b) : flags_(b ? kTrueFlag : kFalseFlag) {} - - //! Constructor for int value. - GenericValue(int i) : flags_(kNumberIntFlag) { - data_.n.i64 = i; - if (i >= 0) - flags_ |= kUintFlag | kUint64Flag; - } - - //! Constructor for unsigned value. - GenericValue(unsigned u) : flags_(kNumberUintFlag) { - data_.n.u64 = u; - if (!(u & 0x80000000)) - flags_ |= kIntFlag | kInt64Flag; - } - - //! Constructor for int64_t value. - GenericValue(int64_t i64) : flags_(kNumberInt64Flag) { - data_.n.i64 = i64; - if (i64 >= 0) { - flags_ |= kNumberUint64Flag; - if (!(i64 & 0xFFFFFFFF00000000LL)) - flags_ |= kUintFlag; - if (!(i64 & 0xFFFFFFFF80000000LL)) - flags_ |= kIntFlag; - } - else if (i64 >= -2147483648LL) - flags_ |= kIntFlag; - } - - //! Constructor for uint64_t value. - GenericValue(uint64_t u64) : flags_(kNumberUint64Flag) { - data_.n.u64 = u64; - if (!(u64 & 0x8000000000000000ULL)) - flags_ |= kInt64Flag; - if (!(u64 & 0xFFFFFFFF00000000ULL)) - flags_ |= kUintFlag; - if (!(u64 & 0xFFFFFFFF80000000ULL)) - flags_ |= kIntFlag; - } - - //! Constructor for double value. - GenericValue(double d) : flags_(kNumberDoubleFlag) { data_.n.d = d; } - - //! Constructor for constant string (i.e. do not make a copy of string) - GenericValue(const Ch* s, SizeType length) { - RAPIDJSON_ASSERT(s != NULL); - flags_ = kConstStringFlag; - data_.s.str = s; - data_.s.length = length; - } - - //! Constructor for constant string (i.e. do not make a copy of string) - GenericValue(const Ch* s) { SetStringRaw(s, internal::StrLen(s)); } - - //! Constructor for copy-string (i.e. do make a copy of string) - GenericValue(const Ch* s, SizeType length, Allocator& allocator) { SetStringRaw(s, length, allocator); } - - //! Constructor for copy-string (i.e. do make a copy of string) - GenericValue(const Ch*s, Allocator& allocator) { SetStringRaw(s, internal::StrLen(s), allocator); } - - //! Destructor. - /*! Need to destruct elements of array, members of object, or copy-string. - */ - ~GenericValue() { - if (Allocator::kNeedFree) { // Shortcut by Allocator's trait - switch(flags_) { - case kArrayFlag: - for (GenericValue* v = data_.a.elements; v != data_.a.elements + data_.a.size; ++v) - v->~GenericValue(); - Allocator::Free(data_.a.elements); - break; - - case kObjectFlag: - for (Member* m = data_.o.members; m != data_.o.members + data_.o.size; ++m) { - m->name.~GenericValue(); - m->value.~GenericValue(); - } - Allocator::Free(data_.o.members); - break; - - case kCopyStringFlag: - Allocator::Free(const_cast(data_.s.str)); - break; - } - } - } - - //@} - - //!@name Assignment operators - //@{ - - //! Assignment with move semantics. - /*! \param rhs Source of the assignment. It will become a null value after assignment. - */ - GenericValue& operator=(GenericValue& rhs) { - RAPIDJSON_ASSERT(this != &rhs); - this->~GenericValue(); - memcpy(this, &rhs, sizeof(GenericValue)); - rhs.flags_ = kNullFlag; - return *this; - } - - //! Assignment with primitive types. - /*! \tparam T Either Type, int, unsigned, int64_t, uint64_t, const Ch* - \param value The value to be assigned. - */ - template - GenericValue& operator=(T value) { - this->~GenericValue(); - new (this) GenericValue(value); - return *this; - } - //@} - - //!@name Type - //@{ - - Type GetType() const { return static_cast(flags_ & kTypeMask); } - bool IsNull() const { return flags_ == kNullFlag; } - bool IsFalse() const { return flags_ == kFalseFlag; } - bool IsTrue() const { return flags_ == kTrueFlag; } - bool IsBool() const { return (flags_ & kBoolFlag) != 0; } - bool IsObject() const { return flags_ == kObjectFlag; } - bool IsArray() const { return flags_ == kArrayFlag; } - bool IsNumber() const { return (flags_ & kNumberFlag) != 0; } - bool IsInt() const { return (flags_ & kIntFlag) != 0; } - bool IsUint() const { return (flags_ & kUintFlag) != 0; } - bool IsInt64() const { return (flags_ & kInt64Flag) != 0; } - bool IsUint64() const { return (flags_ & kUint64Flag) != 0; } - bool IsDouble() const { return (flags_ & kDoubleFlag) != 0; } - bool IsString() const { return (flags_ & kStringFlag) != 0; } - - //@} - - //!@name Null - //@{ - - GenericValue& SetNull() { this->~GenericValue(); new (this) GenericValue(); return *this; } - - //@} - - //!@name Bool - //@{ - - bool GetBool() const { RAPIDJSON_ASSERT(IsBool()); return flags_ == kTrueFlag; } - GenericValue& SetBool(bool b) { this->~GenericValue(); new (this) GenericValue(b); return *this; } - - //@} - - //!@name Object - //@{ - - //! Set this value as an empty object. - GenericValue& SetObject() { this->~GenericValue(); new (this) GenericValue(kObjectType); return *this; } - - //! Get the value associated with the object's name. - GenericValue& operator[](const Ch* name) { - if (Member* member = FindMember(name)) - return member->value; - else { - static GenericValue NullValue; - return NullValue; - } - } - const GenericValue& operator[](const Ch* name) const { return const_cast(*this)[name]; } - - //! Member iterators. - ConstMemberIterator MemberonBegin() const { RAPIDJSON_ASSERT(IsObject()); return data_.o.members; } - ConstMemberIterator MemberonEnd() const { RAPIDJSON_ASSERT(IsObject()); return data_.o.members + data_.o.size; } - MemberIterator MemberonBegin() { RAPIDJSON_ASSERT(IsObject()); return data_.o.members; } - MemberIterator MemberonEnd() { RAPIDJSON_ASSERT(IsObject()); return data_.o.members + data_.o.size; } - - //! Check whether a member exists in the object. - bool HasMember(const Ch* name) const { return FindMember(name) != 0; } - - //! Add a member (name-value pair) to the object. - /*! \param name A string value as name of member. - \param value Value of any type. - \param allocator Allocator for reallocating memory. - \return The value itself for fluent API. - \note The ownership of name and value will be transfered to this object if success. - */ - GenericValue& AddMember(GenericValue& name, GenericValue& value, Allocator& allocator) { - RAPIDJSON_ASSERT(IsObject()); - RAPIDJSON_ASSERT(name.IsString()); - Object& o = data_.o; - if (o.size >= o.capacity) { - if (o.capacity == 0) { - o.capacity = kDefaultObjectCapacity; - o.members = (Member*)allocator.Malloc(o.capacity * sizeof(Member)); - } - else { - SizeType oldCapacity = o.capacity; - o.capacity *= 2; - o.members = (Member*)allocator.Realloc(o.members, oldCapacity * sizeof(Member), o.capacity * sizeof(Member)); - } - } - o.members[o.size].name.RawAssign(name); - o.members[o.size].value.RawAssign(value); - o.size++; - return *this; - } - - GenericValue& AddMember(const Ch* name, Allocator& nameAllocator, GenericValue& value, Allocator& allocator) { - GenericValue n(name, internal::StrLen(name), nameAllocator); - return AddMember(n, value, allocator); - } - - GenericValue& AddMember(const Ch* name, GenericValue& value, Allocator& allocator) { - GenericValue n(name, internal::StrLen(name)); - return AddMember(n, value, allocator); - } - - template - GenericValue& AddMember(const Ch* name, T value, Allocator& allocator) { - GenericValue n(name, internal::StrLen(name)); - GenericValue v(value); - return AddMember(n, v, allocator); - } - - //! Remove a member in object by its name. - /*! \param name Name of member to be removed. - \return Whether the member existed. - \note Removing member is implemented by moving the last member. So the ordering of members is changed. - */ - bool RemoveMember(const Ch* name) { - RAPIDJSON_ASSERT(IsObject()); - if (Member* m = FindMember(name)) { - RAPIDJSON_ASSERT(data_.o.size > 0); - RAPIDJSON_ASSERT(data_.o.members != 0); - - Member* last = data_.o.members + (data_.o.size - 1); - if (data_.o.size > 1 && m != last) { - // Move the last one to this place - m->name = last->name; - m->value = last->value; - } - else { - // Only one left, just destroy - m->name.~GenericValue(); - m->value.~GenericValue(); - } - --data_.o.size; - return true; - } - return false; - } - - //@} - - //!@name Array - //@{ - - //! Set this value as an empty array. - GenericValue& SetArray() { this->~GenericValue(); new (this) GenericValue(kArrayType); return *this; } - - //! Get the number of elements in array. - SizeType Size() const { RAPIDJSON_ASSERT(IsArray()); return data_.a.size; } - - //! Get the capacity of array. - SizeType Capacity() const { RAPIDJSON_ASSERT(IsArray()); return data_.a.capacity; } - - //! Check whether the array is empty. - bool Empty() const { RAPIDJSON_ASSERT(IsArray()); return data_.a.size == 0; } - - //! Remove all elements in the array. - /*! This function do not deallocate memory in the array, i.e. the capacity is unchanged. - */ - void Clear() { - RAPIDJSON_ASSERT(IsArray()); - for (SizeType i = 0; i < data_.a.size; ++i) - data_.a.elements[i].~GenericValue(); - data_.a.size = 0; - } - - //! Get an element from array by index. - /*! \param index Zero-based index of element. - \note -\code -Value a(kArrayType); -a.PushBack(123); -int x = a[0].GetInt(); // Error: operator[ is ambiguous, as 0 also mean a null pointer of const char* type. -int y = a[SizeType(0)].GetInt(); // Cast to SizeType will work. -int z = a[0u].GetInt(); // This works too. -\endcode - */ - GenericValue& operator[](SizeType index) { - RAPIDJSON_ASSERT(IsArray()); - RAPIDJSON_ASSERT(index < data_.a.size); - return data_.a.elements[index]; - } - const GenericValue& operator[](SizeType index) const { return const_cast(*this)[index]; } - - //! Element iterator - ValueIterator onBegin() { RAPIDJSON_ASSERT(IsArray()); return data_.a.elements; } - ValueIterator onEnd() { RAPIDJSON_ASSERT(IsArray()); return data_.a.elements + data_.a.size; } - ConstValueIterator onBegin() const { return const_cast(*this).onBegin(); } - ConstValueIterator onEnd() const { return const_cast(*this).onEnd(); } - - //! Request the array to have enough capacity to store elements. - /*! \param newCapacity The capacity that the array at least need to have. - \param allocator The allocator for allocating memory. It must be the same one use previously. - \return The value itself for fluent API. - */ - GenericValue& Reserve(SizeType newCapacity, Allocator &allocator) { - RAPIDJSON_ASSERT(IsArray()); - if (newCapacity > data_.a.capacity) { - data_.a.elements = (GenericValue*)allocator.Realloc(data_.a.elements, data_.a.capacity * sizeof(GenericValue), newCapacity * sizeof(GenericValue)); - data_.a.capacity = newCapacity; - } - return *this; - } - - //! Append a value at the end of the array. - /*! \param value The value to be appended. - \param allocator The allocator for allocating memory. It must be the same one use previously. - \return The value itself for fluent API. - \note The ownership of the value will be transfered to this object if success. - \note If the number of elements to be appended is known, calls Reserve() once first may be more efficient. - */ - GenericValue& PushBack(GenericValue& value, Allocator& allocator) { - RAPIDJSON_ASSERT(IsArray()); - if (data_.a.size >= data_.a.capacity) - Reserve(data_.a.capacity == 0 ? kDefaultArrayCapacity : data_.a.capacity * 2, allocator); - data_.a.elements[data_.a.size++].RawAssign(value); - return *this; - } - - template - GenericValue& PushBack(T value, Allocator& allocator) { - GenericValue v(value); - return PushBack(v, allocator); - } - - //! Remove the last element in the array. - GenericValue& PopBack() { - RAPIDJSON_ASSERT(IsArray()); - RAPIDJSON_ASSERT(!Empty()); - data_.a.elements[--data_.a.size].~GenericValue(); - return *this; - } - //@} - - //!@name Number - //@{ - - int GetInt() const { RAPIDJSON_ASSERT(flags_ & kIntFlag); return data_.n.i.i; } - unsigned GetUint() const { RAPIDJSON_ASSERT(flags_ & kUintFlag); return data_.n.u.u; } - int64_t GetInt64() const { RAPIDJSON_ASSERT(flags_ & kInt64Flag); return data_.n.i64; } - uint64_t GetUint64() const { RAPIDJSON_ASSERT(flags_ & kUint64Flag); return data_.n.u64; } - - double GetDouble() const { - RAPIDJSON_ASSERT(IsNumber()); - if ((flags_ & kDoubleFlag) != 0) return data_.n.d; // exact type, no conversion. - if ((flags_ & kIntFlag) != 0) return data_.n.i.i; // int -> double - if ((flags_ & kUintFlag) != 0) return data_.n.u.u; // unsigned -> double - if ((flags_ & kInt64Flag) != 0) return (double)data_.n.i64; // int64_t -> double (may lose precision) - RAPIDJSON_ASSERT((flags_ & kUint64Flag) != 0); return (double)data_.n.u64; // uint64_t -> double (may lose precision) - } - - GenericValue& SetInt(int i) { this->~GenericValue(); new (this) GenericValue(i); return *this; } - GenericValue& SetUint(unsigned u) { this->~GenericValue(); new (this) GenericValue(u); return *this; } - GenericValue& SetInt64(int64_t i64) { this->~GenericValue(); new (this) GenericValue(i64); return *this; } - GenericValue& SetUint64(uint64_t u64) { this->~GenericValue(); new (this) GenericValue(u64); return *this; } - GenericValue& SetDouble(double d) { this->~GenericValue(); new (this) GenericValue(d); return *this; } - - //@} - - //!@name String - //@{ - - const Ch* GetString() const { RAPIDJSON_ASSERT(IsString()); return data_.s.str; } - - //! Get the length of string. - /*! Since rapidjson permits "\u0000" in the json string, strlen(v.GetString()) may not equal to v.GetStringLength(). - */ - SizeType GetStringLength() const { RAPIDJSON_ASSERT(IsString()); return data_.s.length; } - - //! Set this value as a string without copying source string. - /*! This version has better performance with supplied length, and also support string containing null character. - \param s source string pointer. - \param length The length of source string, excluding the trailing null terminator. - \return The value itself for fluent API. - */ - GenericValue& SetString(const Ch* s, SizeType length) { this->~GenericValue(); SetStringRaw(s, length); return *this; } - - //! Set this value as a string without copying source string. - /*! \param s source string pointer. - \return The value itself for fluent API. - */ - GenericValue& SetString(const Ch* s) { return SetString(s, internal::StrLen(s)); } - - //! Set this value as a string by copying from source string. - /*! This version has better performance with supplied length, and also support string containing null character. - \param s source string. - \param length The length of source string, excluding the trailing null terminator. - \param allocator Allocator for allocating copied buffer. Commonly use document.GetAllocator(). - \return The value itself for fluent API. - */ - GenericValue& SetString(const Ch* s, SizeType length, Allocator& allocator) { this->~GenericValue(); SetStringRaw(s, length, allocator); return *this; } - - //! Set this value as a string by copying from source string. - /*! \param s source string. - \param allocator Allocator for allocating copied buffer. Commonly use document.GetAllocator(). - \return The value itself for fluent API. - */ - GenericValue& SetString(const Ch* s, Allocator& allocator) { SetString(s, internal::StrLen(s), allocator); return *this; } - - //@} - - //! Generate events of this value to a Handler. - /*! This function adopts the GoF visitor pattern. - Typical usage is to output this JSON value as JSON text via Writer, which is a Handler. - It can also be used to deep clone this value via GenericDocument, which is also a Handler. - \tparam Handler type of handler. - \param handler An object implementing concept Handler. - */ - template - const GenericValue& Accept(Handler& handler) const { - switch(GetType()) { - case kNullType: handler.Null(); break; - case kFalseType: handler.Bool(false); break; - case kTrueType: handler.Bool(true); break; - - case kObjectType: - handler.StartObject(); - for (Member* m = data_.o.members; m != data_.o.members + data_.o.size; ++m) { - handler.String(m->name.data_.s.str, m->name.data_.s.length, false); - m->value.Accept(handler); - } - handler.EndObject(data_.o.size); - break; - - case kArrayType: - handler.StartArray(); - for (GenericValue* v = data_.a.elements; v != data_.a.elements + data_.a.size; ++v) - v->Accept(handler); - handler.EndArray(data_.a.size); - break; - - case kStringType: - handler.String(data_.s.str, data_.s.length, false); - break; - - case kNumberType: - if (IsInt()) handler.Int(data_.n.i.i); - else if (IsUint()) handler.Uint(data_.n.u.u); - else if (IsInt64()) handler.Int64(data_.n.i64); - else if (IsUint64()) handler.Uint64(data_.n.u64); - else handler.Double(data_.n.d); - break; - } - return *this; - } - -private: - template - friend class GenericDocument; - - enum { - kBoolFlag = 0x100, - kNumberFlag = 0x200, - kIntFlag = 0x400, - kUintFlag = 0x800, - kInt64Flag = 0x1000, - kUint64Flag = 0x2000, - kDoubleFlag = 0x4000, - kStringFlag = 0x100000, - kCopyFlag = 0x200000, - - // Initial flags of different types. - kNullFlag = kNullType, - kTrueFlag = kTrueType | kBoolFlag, - kFalseFlag = kFalseType | kBoolFlag, - kNumberIntFlag = kNumberType | kNumberFlag | kIntFlag | kInt64Flag, - kNumberUintFlag = kNumberType | kNumberFlag | kUintFlag | kUint64Flag | kInt64Flag, - kNumberInt64Flag = kNumberType | kNumberFlag | kInt64Flag, - kNumberUint64Flag = kNumberType | kNumberFlag | kUint64Flag, - kNumberDoubleFlag = kNumberType | kNumberFlag | kDoubleFlag, - kConstStringFlag = kStringType | kStringFlag, - kCopyStringFlag = kStringType | kStringFlag | kCopyFlag, - kObjectFlag = kObjectType, - kArrayFlag = kArrayType, - - kTypeMask = 0xFF // bitwise-and with mask of 0xFF can be optimized by compiler - }; - - static const SizeType kDefaultArrayCapacity = 16; - static const SizeType kDefaultObjectCapacity = 16; - - struct String { - const Ch* str; - SizeType length; - unsigned hashcode; //!< reserved - }; // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode - - // By using proper binary layout, retrieval of different integer types do not need conversions. - union Number { -#if RAPIDJSON_ENDIAN == RAPIDJSON_LITTLEENDIAN - struct I { - int i; - char padding[4]; - }i; - struct U { - unsigned u; - char padding2[4]; - }u; -#else - struct I { - char padding[4]; - int i; - }i; - struct U { - char padding2[4]; - unsigned u; - }u; -#endif - int64_t i64; - uint64_t u64; - double d; - }; // 8 bytes - - struct Object { - Member* members; - SizeType size; - SizeType capacity; - }; // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode - - struct Array { - GenericValue* elements; - SizeType size; - SizeType capacity; - }; // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode - - union Data { - String s; - Number n; - Object o; - Array a; - }; // 12 bytes in 32-bit mode, 16 bytes in 64-bit mode - - //! Find member by name. - Member* FindMember(const Ch* name) { - RAPIDJSON_ASSERT(name); - RAPIDJSON_ASSERT(IsObject()); - - SizeType length = internal::StrLen(name); - - Object& o = data_.o; - for (Member* member = o.members; member != data_.o.members + data_.o.size; ++member) - if (length == member->name.data_.s.length && memcmp(member->name.data_.s.str, name, length * sizeof(Ch)) == 0) - return member; - - return 0; - } - const Member* FindMember(const Ch* name) const { return const_cast(*this).FindMember(name); } - - // Initialize this value as array with initial data, without calling destructor. - void SetArrayRaw(GenericValue* values, SizeType count, Allocator& alloctaor) { - flags_ = kArrayFlag; - data_.a.elements = (GenericValue*)alloctaor.Malloc(count * sizeof(GenericValue)); - memcpy(data_.a.elements, values, count * sizeof(GenericValue)); - data_.a.size = data_.a.capacity = count; - } - - //! Initialize this value as object with initial data, without calling destructor. - void SetObjectRaw(Member* members, SizeType count, Allocator& alloctaor) { - flags_ = kObjectFlag; - data_.o.members = (Member*)alloctaor.Malloc(count * sizeof(Member)); - memcpy(data_.o.members, members, count * sizeof(Member)); - data_.o.size = data_.o.capacity = count; - } - - //! Initialize this value as constant string, without calling destructor. - void SetStringRaw(const Ch* s, SizeType length) { - RAPIDJSON_ASSERT(s != NULL); - flags_ = kConstStringFlag; - data_.s.str = s; - data_.s.length = length; - } - - //! Initialize this value as copy string with initial data, without calling destructor. - void SetStringRaw(const Ch* s, SizeType length, Allocator& allocator) { - RAPIDJSON_ASSERT(s != NULL); - flags_ = kCopyStringFlag; - data_.s.str = (Ch *)allocator.Malloc((length + 1) * sizeof(Ch)); - data_.s.length = length; - memcpy(const_cast(data_.s.str), s, length * sizeof(Ch)); - const_cast(data_.s.str)[length] = '\0'; - } - - //! Assignment without calling destructor - void RawAssign(GenericValue& rhs) { - memcpy(this, &rhs, sizeof(GenericValue)); - rhs.flags_ = kNullFlag; - } - - Data data_; - unsigned flags_; -}; -#pragma pack (pop) - -//! Value with UTF8 encoding. -typedef GenericValue > Value; - -/////////////////////////////////////////////////////////////////////////////// -// GenericDocument - -//! A document for parsing JSON text as DOM. -/*! - \implements Handler - \tparam Encoding encoding for both parsing and string storage. - \tparam Alloactor allocator for allocating memory for the DOM, and the stack during parsing. -*/ -template > -class GenericDocument : public GenericValue { -public: - typedef typename Encoding::Ch Ch; //!< Character type derived from Encoding. - typedef GenericValue ValueType; //!< Value type of the document. - typedef Allocator AllocatorType; //!< Allocator type from template parameter. - - //! Constructor - /*! \param allocator Optional allocator for allocating stack memory. - \param stackCapacity Initial capacity of stack in bytes. - */ - GenericDocument(Allocator* allocator = 0, size_t stackCapacity = kDefaultStackCapacity) : stack_(allocator, stackCapacity), parseError_(0), errorOffset_(0) {} - - //! Parse JSON text from an input stream. - /*! \tparam parseFlags Combination of ParseFlag. - \param stream Input stream to be parsed. - \return The document itself for fluent API. - */ - template - GenericDocument& ParseStream(Stream& stream) { - ValueType::SetNull(); // Remove existing root if exist - GenericReader reader; - if (reader.template Parse(stream, *this)) { - RAPIDJSON_ASSERT(stack_.GetSize() == sizeof(ValueType)); // Got one and only one root object - this->RawAssign(*stack_.template Pop(1)); // Add this-> to prevent issue 13. - parseError_ = 0; - errorOffset_ = 0; - } - else { - parseError_ = reader.GetParseError(); - errorOffset_ = reader.GetErrorOffset(); - ClearStack(); - } - return *this; - } - - //! Parse JSON text from a mutable string. - /*! \tparam parseFlags Combination of ParseFlag. - \param str Mutable zero-terminated string to be parsed. - \return The document itself for fluent API. - */ - template - GenericDocument& ParseInsitu(Ch* str) { - GenericInsituStringStream s(str); - return ParseStream(s); - } - - //! Parse JSON text from a read-only string. - /*! \tparam parseFlags Combination of ParseFlag (must not contain kParseInsituFlag). - \param str Read-only zero-terminated string to be parsed. - */ - template - GenericDocument& Parse(const Ch* str) { - RAPIDJSON_ASSERT(!(parseFlags & kParseInsituFlag)); - GenericStringStream s(str); - return ParseStream(s); - } - - //! Whether a parse error was occured in the last parsing. - bool HasParseError() const { return parseError_ != 0; } - - //! Get the message of parsing error. - const char* GetParseError() const { return parseError_; } - - //! Get the offset in character of the parsing error. - size_t GetErrorOffset() const { return errorOffset_; } - - //! Get the allocator of this document. - Allocator& GetAllocator() { return stack_.GetAllocator(); } - - //! Get the capacity of stack in bytes. - size_t GetStackCapacity() const { return stack_.GetCapacity(); } - -private: - // Prohibit assignment - GenericDocument& operator=(const GenericDocument&); - - friend class GenericReader; // for Reader to call the following private handler functions - - // Implementation of Handler - void Null() { new (stack_.template Push()) ValueType(); } - void Bool(bool b) { new (stack_.template Push()) ValueType(b); } - void Int(int i) { new (stack_.template Push()) ValueType(i); } - void Uint(unsigned i) { new (stack_.template Push()) ValueType(i); } - void Int64(int64_t i) { new (stack_.template Push()) ValueType(i); } - void Uint64(uint64_t i) { new (stack_.template Push()) ValueType(i); } - void Double(double d) { new (stack_.template Push()) ValueType(d); } - - void String(const Ch* str, SizeType length, bool copy) { - if (copy) - new (stack_.template Push()) ValueType(str, length, GetAllocator()); - else - new (stack_.template Push()) ValueType(str, length); - } - - void StartObject() { new (stack_.template Push()) ValueType(kObjectType); } - - void EndObject(SizeType memberCount) { - typename ValueType::Member* members = stack_.template Pop(memberCount); - stack_.template Top()->SetObjectRaw(members, (SizeType)memberCount, GetAllocator()); - } - - void StartArray() { new (stack_.template Push()) ValueType(kArrayType); } - - void EndArray(SizeType elementCount) { - ValueType* elements = stack_.template Pop(elementCount); - stack_.template Top()->SetArrayRaw(elements, elementCount, GetAllocator()); - } - - void ClearStack() { - if (Allocator::kNeedFree) - while (stack_.GetSize() > 0) // Here assumes all elements in stack array are GenericValue (Member is actually 2 GenericValue objects) - (stack_.template Pop(1))->~ValueType(); - else - stack_.Clear(); - } - - static const size_t kDefaultStackCapacity = 1024; - internal::Stack stack_; - const char* parseError_; - size_t errorOffset_; -}; - -typedef GenericDocument > Document; - -} // namespace rapidjson - -#ifdef _MSC_VER -#pragma warning(pop) -#endif - -#endif // RAPIDJSON_DOCUMENT_H_ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/filestream.h b/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/filestream.h deleted file mode 100644 index 8858949..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/filestream.h +++ /dev/null @@ -1,46 +0,0 @@ -#ifndef RAPIDJSON_FILESTREAM_H_ -#define RAPIDJSON_FILESTREAM_H_ - -#include - -namespace rapidjson { - -//! Wrapper of C file stream for input or output. -/*! - This simple wrapper does not check the validity of the stream. - \implements Stream -*/ -class FileStream { -public: - typedef char Ch; //!< Character type. Only support char. - - FileStream(FILE* fp) : fp_(fp), count_(0) { Read(); } - char Peek() const { return current_; } - char Take() { char c = current_; Read(); return c; } - size_t Tell() const { return count_; } - void Put(char c) { fputc(c, fp_); } - - // Not implemented - char* PutBegin() { return 0; } - size_t PutEnd(char*) { return 0; } - -private: - void Read() { - RAPIDJSON_ASSERT(fp_ != 0); - int c = fgetc(fp_); - if (c != EOF) { - current_ = (char)c; - count_++; - } - else - current_ = '\0'; - } - - FILE* fp_; - char current_; - size_t count_; -}; - -} // namespace rapidjson - -#endif // RAPIDJSON_FILESTREAM_H_ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/internal/pow10.h b/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/internal/pow10.h deleted file mode 100644 index bf3a9af..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/internal/pow10.h +++ /dev/null @@ -1,54 +0,0 @@ -#ifndef RAPIDJSON_POW10_ -#define RAPIDJSON_POW10_ - -namespace rapidjson { -namespace internal { - -//! Computes integer powers of 10 in double (10.0^n). -/*! This function uses lookup table for fast and accurate results. - \param n positive/negative exponent. Must <= 308. - \return 10.0^n -*/ -inline double Pow10(int n) { - static const double e[] = { // 1e-308...1e308: 617 * 8 bytes = 4936 bytes - 1e-308,1e-307,1e-306,1e-305,1e-304,1e-303,1e-302,1e-301,1e-300, - 1e-299,1e-298,1e-297,1e-296,1e-295,1e-294,1e-293,1e-292,1e-291,1e-290,1e-289,1e-288,1e-287,1e-286,1e-285,1e-284,1e-283,1e-282,1e-281,1e-280, - 1e-279,1e-278,1e-277,1e-276,1e-275,1e-274,1e-273,1e-272,1e-271,1e-270,1e-269,1e-268,1e-267,1e-266,1e-265,1e-264,1e-263,1e-262,1e-261,1e-260, - 1e-259,1e-258,1e-257,1e-256,1e-255,1e-254,1e-253,1e-252,1e-251,1e-250,1e-249,1e-248,1e-247,1e-246,1e-245,1e-244,1e-243,1e-242,1e-241,1e-240, - 1e-239,1e-238,1e-237,1e-236,1e-235,1e-234,1e-233,1e-232,1e-231,1e-230,1e-229,1e-228,1e-227,1e-226,1e-225,1e-224,1e-223,1e-222,1e-221,1e-220, - 1e-219,1e-218,1e-217,1e-216,1e-215,1e-214,1e-213,1e-212,1e-211,1e-210,1e-209,1e-208,1e-207,1e-206,1e-205,1e-204,1e-203,1e-202,1e-201,1e-200, - 1e-199,1e-198,1e-197,1e-196,1e-195,1e-194,1e-193,1e-192,1e-191,1e-190,1e-189,1e-188,1e-187,1e-186,1e-185,1e-184,1e-183,1e-182,1e-181,1e-180, - 1e-179,1e-178,1e-177,1e-176,1e-175,1e-174,1e-173,1e-172,1e-171,1e-170,1e-169,1e-168,1e-167,1e-166,1e-165,1e-164,1e-163,1e-162,1e-161,1e-160, - 1e-159,1e-158,1e-157,1e-156,1e-155,1e-154,1e-153,1e-152,1e-151,1e-150,1e-149,1e-148,1e-147,1e-146,1e-145,1e-144,1e-143,1e-142,1e-141,1e-140, - 1e-139,1e-138,1e-137,1e-136,1e-135,1e-134,1e-133,1e-132,1e-131,1e-130,1e-129,1e-128,1e-127,1e-126,1e-125,1e-124,1e-123,1e-122,1e-121,1e-120, - 1e-119,1e-118,1e-117,1e-116,1e-115,1e-114,1e-113,1e-112,1e-111,1e-110,1e-109,1e-108,1e-107,1e-106,1e-105,1e-104,1e-103,1e-102,1e-101,1e-100, - 1e-99, 1e-98, 1e-97, 1e-96, 1e-95, 1e-94, 1e-93, 1e-92, 1e-91, 1e-90, 1e-89, 1e-88, 1e-87, 1e-86, 1e-85, 1e-84, 1e-83, 1e-82, 1e-81, 1e-80, - 1e-79, 1e-78, 1e-77, 1e-76, 1e-75, 1e-74, 1e-73, 1e-72, 1e-71, 1e-70, 1e-69, 1e-68, 1e-67, 1e-66, 1e-65, 1e-64, 1e-63, 1e-62, 1e-61, 1e-60, - 1e-59, 1e-58, 1e-57, 1e-56, 1e-55, 1e-54, 1e-53, 1e-52, 1e-51, 1e-50, 1e-49, 1e-48, 1e-47, 1e-46, 1e-45, 1e-44, 1e-43, 1e-42, 1e-41, 1e-40, - 1e-39, 1e-38, 1e-37, 1e-36, 1e-35, 1e-34, 1e-33, 1e-32, 1e-31, 1e-30, 1e-29, 1e-28, 1e-27, 1e-26, 1e-25, 1e-24, 1e-23, 1e-22, 1e-21, 1e-20, - 1e-19, 1e-18, 1e-17, 1e-16, 1e-15, 1e-14, 1e-13, 1e-12, 1e-11, 1e-10, 1e-9, 1e-8, 1e-7, 1e-6, 1e-5, 1e-4, 1e-3, 1e-2, 1e-1, 1e+0, - 1e+1, 1e+2, 1e+3, 1e+4, 1e+5, 1e+6, 1e+7, 1e+8, 1e+9, 1e+10, 1e+11, 1e+12, 1e+13, 1e+14, 1e+15, 1e+16, 1e+17, 1e+18, 1e+19, 1e+20, - 1e+21, 1e+22, 1e+23, 1e+24, 1e+25, 1e+26, 1e+27, 1e+28, 1e+29, 1e+30, 1e+31, 1e+32, 1e+33, 1e+34, 1e+35, 1e+36, 1e+37, 1e+38, 1e+39, 1e+40, - 1e+41, 1e+42, 1e+43, 1e+44, 1e+45, 1e+46, 1e+47, 1e+48, 1e+49, 1e+50, 1e+51, 1e+52, 1e+53, 1e+54, 1e+55, 1e+56, 1e+57, 1e+58, 1e+59, 1e+60, - 1e+61, 1e+62, 1e+63, 1e+64, 1e+65, 1e+66, 1e+67, 1e+68, 1e+69, 1e+70, 1e+71, 1e+72, 1e+73, 1e+74, 1e+75, 1e+76, 1e+77, 1e+78, 1e+79, 1e+80, - 1e+81, 1e+82, 1e+83, 1e+84, 1e+85, 1e+86, 1e+87, 1e+88, 1e+89, 1e+90, 1e+91, 1e+92, 1e+93, 1e+94, 1e+95, 1e+96, 1e+97, 1e+98, 1e+99, 1e+100, - 1e+101,1e+102,1e+103,1e+104,1e+105,1e+106,1e+107,1e+108,1e+109,1e+110,1e+111,1e+112,1e+113,1e+114,1e+115,1e+116,1e+117,1e+118,1e+119,1e+120, - 1e+121,1e+122,1e+123,1e+124,1e+125,1e+126,1e+127,1e+128,1e+129,1e+130,1e+131,1e+132,1e+133,1e+134,1e+135,1e+136,1e+137,1e+138,1e+139,1e+140, - 1e+141,1e+142,1e+143,1e+144,1e+145,1e+146,1e+147,1e+148,1e+149,1e+150,1e+151,1e+152,1e+153,1e+154,1e+155,1e+156,1e+157,1e+158,1e+159,1e+160, - 1e+161,1e+162,1e+163,1e+164,1e+165,1e+166,1e+167,1e+168,1e+169,1e+170,1e+171,1e+172,1e+173,1e+174,1e+175,1e+176,1e+177,1e+178,1e+179,1e+180, - 1e+181,1e+182,1e+183,1e+184,1e+185,1e+186,1e+187,1e+188,1e+189,1e+190,1e+191,1e+192,1e+193,1e+194,1e+195,1e+196,1e+197,1e+198,1e+199,1e+200, - 1e+201,1e+202,1e+203,1e+204,1e+205,1e+206,1e+207,1e+208,1e+209,1e+210,1e+211,1e+212,1e+213,1e+214,1e+215,1e+216,1e+217,1e+218,1e+219,1e+220, - 1e+221,1e+222,1e+223,1e+224,1e+225,1e+226,1e+227,1e+228,1e+229,1e+230,1e+231,1e+232,1e+233,1e+234,1e+235,1e+236,1e+237,1e+238,1e+239,1e+240, - 1e+241,1e+242,1e+243,1e+244,1e+245,1e+246,1e+247,1e+248,1e+249,1e+250,1e+251,1e+252,1e+253,1e+254,1e+255,1e+256,1e+257,1e+258,1e+259,1e+260, - 1e+261,1e+262,1e+263,1e+264,1e+265,1e+266,1e+267,1e+268,1e+269,1e+270,1e+271,1e+272,1e+273,1e+274,1e+275,1e+276,1e+277,1e+278,1e+279,1e+280, - 1e+281,1e+282,1e+283,1e+284,1e+285,1e+286,1e+287,1e+288,1e+289,1e+290,1e+291,1e+292,1e+293,1e+294,1e+295,1e+296,1e+297,1e+298,1e+299,1e+300, - 1e+301,1e+302,1e+303,1e+304,1e+305,1e+306,1e+307,1e+308 - }; - RAPIDJSON_ASSERT(n <= 308); - return n < -308 ? 0.0 : e[n + 308]; -} - -} // namespace internal -} // namespace rapidjson - -#endif // RAPIDJSON_POW10_ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/internal/stack.h b/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/internal/stack.h deleted file mode 100644 index 966893b..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/internal/stack.h +++ /dev/null @@ -1,82 +0,0 @@ -#ifndef RAPIDJSON_INTERNAL_STACK_H_ -#define RAPIDJSON_INTERNAL_STACK_H_ - -namespace rapidjson { -namespace internal { - -/////////////////////////////////////////////////////////////////////////////// -// Stack - -//! A type-unsafe stack for storing different types of data. -/*! \tparam Allocator Allocator for allocating stack memory. -*/ -template -class Stack { -public: - Stack(Allocator* allocator, size_t stack_capacity) : allocator_(allocator), own_allocator_(0), stack_(0), stack_top_(0), stack_end_(0), stack_capacity_(stack_capacity) { - RAPIDJSON_ASSERT(stack_capacity_ > 0); - if (!allocator_) - own_allocator_ = allocator_ = new Allocator(); - stack_top_ = stack_ = (char*)allocator_->Malloc(stack_capacity_); - stack_end_ = stack_ + stack_capacity_; - } - - ~Stack() { - Allocator::Free(stack_); - delete own_allocator_; // Only delete if it is owned by the stack - } - - void Clear() { /*stack_top_ = 0;*/ stack_top_ = stack_; } - - template - T* Push(size_t count = 1) { - // Expand the stack if needed - if (stack_top_ + sizeof(T) * count >= stack_end_) { - size_t new_capacity = stack_capacity_ * 2; - size_t size = GetSize(); - size_t new_size = GetSize() + sizeof(T) * count; - if (new_capacity < new_size) - new_capacity = new_size; - stack_ = (char*)allocator_->Realloc(stack_, stack_capacity_, new_capacity); - stack_capacity_ = new_capacity; - stack_top_ = stack_ + size; - stack_end_ = stack_ + stack_capacity_; - } - T* ret = (T*)stack_top_; - stack_top_ += sizeof(T) * count; - return ret; - } - - template - T* Pop(size_t count) { - RAPIDJSON_ASSERT(GetSize() >= count * sizeof(T)); - stack_top_ -= count * sizeof(T); - return (T*)stack_top_; - } - - template - T* Top() { - RAPIDJSON_ASSERT(GetSize() >= sizeof(T)); - return (T*)(stack_top_ - sizeof(T)); - } - - template - T* Bottom() { return (T*)stack_; } - - Allocator& GetAllocator() { return *allocator_; } - size_t GetSize() const { return stack_top_ - stack_; } - size_t GetCapacity() const { return stack_capacity_; } - -private: - Allocator* allocator_; - Allocator* own_allocator_; - char *stack_; - char *stack_top_; - char *stack_end_; - size_t stack_capacity_; -}; - -} // namespace internal -} // namespace rapidjson - -#endif // RAPIDJSON_STACK_H_ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/internal/strfunc.h b/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/internal/strfunc.h deleted file mode 100644 index bbf444f..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/internal/strfunc.h +++ /dev/null @@ -1,24 +0,0 @@ -#ifndef RAPIDJSON_INTERNAL_STRFUNC_H_ -#define RAPIDJSON_INTERNAL_STRFUNC_H_ - -namespace rapidjson { -namespace internal { - -//! Custom strlen() which works on different character types. -/*! \tparam Ch Character type (e.g. char, wchar_t, short) - \param s Null-terminated input string. - \return Number of characters in the string. - \note This has the same semantics as strlen(), the return value is not number of Unicode codepoints. -*/ -template -inline SizeType StrLen(const Ch* s) { - const Ch* p = s; - while (*p != '\0') - ++p; - return SizeType(p - s); -} - -} // namespace internal -} // namespace rapidjson - -#endif // RAPIDJSON_INTERNAL_STRFUNC_H_ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/prettywriter.h b/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/prettywriter.h deleted file mode 100644 index 238ff5f..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/prettywriter.h +++ /dev/null @@ -1,156 +0,0 @@ -#ifndef RAPIDJSON_PRETTYWRITER_H_ -#define RAPIDJSON_PRETTYWRITER_H_ - -#include "writer.h" - -namespace rapidjson { - -//! Writer with indentation and spacing. -/*! - \tparam Stream Type of ouptut stream. - \tparam Encoding Encoding of both source strings and output. - \tparam Allocator Type of allocator for allocating memory of stack. -*/ -template, typename Allocator = MemoryPoolAllocator<> > -class PrettyWriter : public Writer { -public: - typedef Writer Base; - typedef typename Base::Ch Ch; - - //! Constructor - /*! \param stream Output stream. - \param allocator User supplied allocator. If it is null, it will create a private one. - \param levelDepth Initial capacity of - */ - PrettyWriter(Stream& stream, Allocator* allocator = 0, size_t levelDepth = Base::kDefaultLevelDepth) : - Base(stream, allocator, levelDepth), indentChar_(' '), indentCharCount_(4) {} - - //! Set custom indentation. - /*! \param indentChar Character for indentation. Must be whitespace character (' ', '\t', '\n', '\r'). - \param indentCharCount Number of indent characters for each indentation level. - \note The default indentation is 4 spaces. - */ - PrettyWriter& SetIndent(Ch indentChar, unsigned indentCharCount) { - RAPIDJSON_ASSERT(indentChar == ' ' || indentChar == '\t' || indentChar == '\n' || indentChar == '\r'); - indentChar_ = indentChar; - indentCharCount_ = indentCharCount; - return *this; - } - - //@name Implementation of Handler. - //@{ - - PrettyWriter& Null() { PrettyPrefix(kNullType); Base::WriteNull(); return *this; } - PrettyWriter& Bool(bool b) { PrettyPrefix(b ? kTrueType : kFalseType); Base::WriteBool(b); return *this; } - PrettyWriter& Int(int i) { PrettyPrefix(kNumberType); Base::WriteInt(i); return *this; } - PrettyWriter& Uint(unsigned u) { PrettyPrefix(kNumberType); Base::WriteUint(u); return *this; } - PrettyWriter& Int64(int64_t i64) { PrettyPrefix(kNumberType); Base::WriteInt64(i64); return *this; } - PrettyWriter& Uint64(uint64_t u64) { PrettyPrefix(kNumberType); Base::WriteUint64(u64); return *this; } - PrettyWriter& Double(double d) { PrettyPrefix(kNumberType); Base::WriteDouble(d); return *this; } - - PrettyWriter& String(const Ch* str, SizeType length, bool copy = false) { - (void)copy; - PrettyPrefix(kStringType); - Base::WriteString(str, length); - return *this; - } - - PrettyWriter& StartObject() { - PrettyPrefix(kObjectType); - new (Base::level_stack_.template Push()) typename Base::Level(false); - Base::WriteStartObject(); - return *this; - } - - PrettyWriter& EndObject(SizeType memberCount = 0) { - (void)memberCount; - RAPIDJSON_ASSERT(Base::level_stack_.GetSize() >= sizeof(typename Base::Level)); - RAPIDJSON_ASSERT(!Base::level_stack_.template Top()->inArray); - bool empty = Base::level_stack_.template Pop(1)->valueCount == 0; - - if (!empty) { - Base::stream_.Put('\n'); - WriteIndent(); - } - Base::WriteEndObject(); - return *this; - } - - PrettyWriter& StartArray() { - PrettyPrefix(kArrayType); - new (Base::level_stack_.template Push()) typename Base::Level(true); - Base::WriteStartArray(); - return *this; - } - - PrettyWriter& EndArray(SizeType memberCount = 0) { - (void)memberCount; - RAPIDJSON_ASSERT(Base::level_stack_.GetSize() >= sizeof(typename Base::Level)); - RAPIDJSON_ASSERT(Base::level_stack_.template Top()->inArray); - bool empty = Base::level_stack_.template Pop(1)->valueCount == 0; - - if (!empty) { - Base::stream_.Put('\n'); - WriteIndent(); - } - Base::WriteEndArray(); - return *this; - } - - //@} - - //! Simpler but slower overload. - PrettyWriter& String(const Ch* str) { return String(str, internal::StrLen(str)); } - -protected: - void PrettyPrefix(Type type) { - (void)type; - if (Base::level_stack_.GetSize() != 0) { // this value is not at root - typename Base::Level* level = Base::level_stack_.template Top(); - - if (level->inArray) { - if (level->valueCount > 0) { - Base::stream_.Put(','); // add comma if it is not the first element in array - Base::stream_.Put('\n'); - } - else - Base::stream_.Put('\n'); - WriteIndent(); - } - else { // in object - if (level->valueCount > 0) { - if (level->valueCount % 2 == 0) { - Base::stream_.Put(','); - Base::stream_.Put('\n'); - } - else { - Base::stream_.Put(':'); - Base::stream_.Put(' '); - } - } - else - Base::stream_.Put('\n'); - - if (level->valueCount % 2 == 0) - WriteIndent(); - } - if (!level->inArray && level->valueCount % 2 == 0) - RAPIDJSON_ASSERT(type == kStringType); // if it's in object, then even number should be a name - level->valueCount++; - } - else - RAPIDJSON_ASSERT(type == kObjectType || type == kArrayType); - } - - void WriteIndent() { - size_t count = (Base::level_stack_.GetSize() / sizeof(typename Base::Level)) * indentCharCount_; - PutN(Base::stream_, indentChar_, count); - } - - Ch indentChar_; - unsigned indentCharCount_; -}; - -} // namespace rapidjson - -#endif // RAPIDJSON_RAPIDJSON_H_ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/rapidjson.h b/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/rapidjson.h deleted file mode 100644 index 7acb2aa..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/rapidjson.h +++ /dev/null @@ -1,525 +0,0 @@ -#ifndef RAPIDJSON_RAPIDJSON_H_ -#define RAPIDJSON_RAPIDJSON_H_ - -// Copyright (c) 2011-2012 Milo Yip (miloyip@gmail.com) -// Version 0.11 - -#include // malloc(), realloc(), free() -#include // memcpy() - -/////////////////////////////////////////////////////////////////////////////// -// RAPIDJSON_NO_INT64DEFINE - -// Here defines int64_t and uint64_t types in global namespace. -// If user have their own definition, can define RAPIDJSON_NO_INT64DEFINE to disable this. -#ifndef RAPIDJSON_NO_INT64DEFINE -#ifdef _MSC_VER -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -#else -#include -#endif -#endif // RAPIDJSON_NO_INT64TYPEDEF - -/////////////////////////////////////////////////////////////////////////////// -// RAPIDJSON_ENDIAN -#define RAPIDJSON_LITTLEENDIAN 0 //!< Little endian machine -#define RAPIDJSON_BIGENDIAN 1 //!< Big endian machine - -//! Endianness of the machine. -/*! GCC provided macro for detecting endianness of the target machine. But other - compilers may not have this. User can define RAPIDJSON_ENDIAN to either - RAPIDJSON_LITTLEENDIAN or RAPIDJSON_BIGENDIAN. -*/ -#ifndef RAPIDJSON_ENDIAN -#ifdef __BYTE_ORDER__ -#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ -#define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN -#else -#define RAPIDJSON_ENDIAN RAPIDJSON_BIGENDIAN -#endif // __BYTE_ORDER__ -#else -#define RAPIDJSON_ENDIAN RAPIDJSON_LITTLEENDIAN // Assumes little endian otherwise. -#endif -#endif // RAPIDJSON_ENDIAN - -/////////////////////////////////////////////////////////////////////////////// -// RAPIDJSON_SSE2/RAPIDJSON_SSE42/RAPIDJSON_SIMD - -// Enable SSE2 optimization. -//#define RAPIDJSON_SSE2 - -// Enable SSE4.2 optimization. -//#define RAPIDJSON_SSE42 - -#if defined(RAPIDJSON_SSE2) || defined(RAPIDJSON_SSE42) -#define RAPIDJSON_SIMD -#endif - -/////////////////////////////////////////////////////////////////////////////// -// RAPIDJSON_NO_SIZETYPEDEFINE - -#ifndef RAPIDJSON_NO_SIZETYPEDEFINE -namespace rapidjson { -//! Use 32-bit array/string indices even for 64-bit platform, instead of using size_t. -/*! User may override the SizeType by defining RAPIDJSON_NO_SIZETYPEDEFINE. -*/ -typedef unsigned SizeType; -} // namespace rapidjson -#endif - -/////////////////////////////////////////////////////////////////////////////// -// RAPIDJSON_ASSERT - -//! Assertion. -/*! By default, rapidjson uses C assert() for assertion. - User can override it by defining RAPIDJSON_ASSERT(x) macro. -*/ -#ifndef RAPIDJSON_ASSERT -#include -#define RAPIDJSON_ASSERT(x) assert(x) -#endif // RAPIDJSON_ASSERT - -/////////////////////////////////////////////////////////////////////////////// -// Helpers - -#define RAPIDJSON_MULTILINEMACRO_BEGIN do { -#define RAPIDJSON_MULTILINEMACRO_END \ -} while((void)0, 0) - -namespace rapidjson { - -/////////////////////////////////////////////////////////////////////////////// -// Allocator - -/*! \class rapidjson::Allocator - \brief Concept for allocating, resizing and freeing memory block. - - Note that Malloc() and Realloc() are non-static but Free() is static. - - So if an allocator need to support Free(), it needs to put its pointer in - the header of memory block. - -\code -concept Allocator { - static const bool kNeedFree; //!< Whether this allocator needs to call Free(). - - // Allocate a memory block. - // \param size of the memory block in bytes. - // \returns pointer to the memory block. - void* Malloc(size_t size); - - // Resize a memory block. - // \param originalPtr The pointer to current memory block. Null pointer is permitted. - // \param originalSize The current size in bytes. (Design issue: since some allocator may not book-keep this, explicitly pass to it can save memory.) - // \param newSize the new size in bytes. - void* Realloc(void* originalPtr, size_t originalSize, size_t newSize); - - // Free a memory block. - // \param pointer to the memory block. Null pointer is permitted. - static void Free(void *ptr); -}; -\endcode -*/ - -/////////////////////////////////////////////////////////////////////////////// -// CrtAllocator - -//! C-runtime library allocator. -/*! This class is just wrapper for standard C library memory routines. - \implements Allocator -*/ -class CrtAllocator { -public: - static const bool kNeedFree = true; - void* Malloc(size_t size) { return malloc(size); } - void* Realloc(void* originalPtr, size_t originalSize, size_t newSize) { (void)originalSize; return realloc(originalPtr, newSize); } - static void Free(void *ptr) { free(ptr); } -}; - -/////////////////////////////////////////////////////////////////////////////// -// MemoryPoolAllocator - -//! Default memory allocator used by the parser and DOM. -/*! This allocator allocate memory blocks from pre-allocated memory chunks. - - It does not free memory blocks. And Realloc() only allocate new memory. - - The memory chunks are allocated by BaseAllocator, which is CrtAllocator by default. - - User may also supply a buffer as the first chunk. - - If the user-buffer is full then additional chunks are allocated by BaseAllocator. - - The user-buffer is not deallocated by this allocator. - - \tparam BaseAllocator the allocator type for allocating memory chunks. Default is CrtAllocator. - \implements Allocator -*/ -template -class MemoryPoolAllocator { -public: - static const bool kNeedFree = false; //!< Tell users that no need to call Free() with this allocator. (concept Allocator) - - //! Constructor with chunkSize. - /*! \param chunkSize The size of memory chunk. The default is kDefaultChunkSize. - \param baseAllocator The allocator for allocating memory chunks. - */ - MemoryPoolAllocator(size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocator = 0) : - chunkHead_(0), chunk_capacity_(chunkSize), userBuffer_(0), baseAllocator_(baseAllocator), ownBaseAllocator_(0) - { - if (!baseAllocator_) - ownBaseAllocator_ = baseAllocator_ = new BaseAllocator(); - AddChunk(chunk_capacity_); - } - - //! Constructor with user-supplied buffer. - /*! The user buffer will be used firstly. When it is full, memory pool allocates new chunk with chunk size. - - The user buffer will not be deallocated when this allocator is destructed. - - \param buffer User supplied buffer. - \param size Size of the buffer in bytes. It must at least larger than sizeof(ChunkHeader). - \param chunkSize The size of memory chunk. The default is kDefaultChunkSize. - \param baseAllocator The allocator for allocating memory chunks. - */ - MemoryPoolAllocator(char *buffer, size_t size, size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocator = 0) : - chunkHead_(0), chunk_capacity_(chunkSize), userBuffer_(buffer), baseAllocator_(baseAllocator), ownBaseAllocator_(0) - { - RAPIDJSON_ASSERT(buffer != 0); - RAPIDJSON_ASSERT(size > sizeof(ChunkHeader)); - chunkHead_ = (ChunkHeader*)buffer; - chunkHead_->capacity = size - sizeof(ChunkHeader); - chunkHead_->size = 0; - chunkHead_->next = 0; - } - - //! Destructor. - /*! This deallocates all memory chunks, excluding the user-supplied buffer. - */ - ~MemoryPoolAllocator() { - Clear(); - delete ownBaseAllocator_; - } - - //! Deallocates all memory chunks, excluding the user-supplied buffer. - void Clear() { - while(chunkHead_ != 0 && chunkHead_ != (ChunkHeader *)userBuffer_) { - ChunkHeader* next = chunkHead_->next; - baseAllocator_->Free(chunkHead_); - chunkHead_ = next; - } - } - - //! Computes the total capacity of allocated memory chunks. - /*! \return total capacity in bytes. - */ - size_t Capacity() { - size_t capacity = 0; - for (ChunkHeader* c = chunkHead_; c != 0; c = c->next) - capacity += c->capacity; - return capacity; - } - - //! Computes the memory blocks allocated. - /*! \return total used bytes. - */ - size_t Size() { - size_t size = 0; - for (ChunkHeader* c = chunkHead_; c != 0; c = c->next) - size += c->size; - return size; - } - - //! Allocates a memory block. (concept Allocator) - void* Malloc(size_t size) { - size = (size + 3) & ~3; // Force aligning size to 4 - - if (chunkHead_->size + size > chunkHead_->capacity) - AddChunk(chunk_capacity_ > size ? chunk_capacity_ : size); - - char *buffer = (char *)(chunkHead_ + 1) + chunkHead_->size; - RAPIDJSON_ASSERT(((uintptr_t)buffer & 3) == 0); // returned buffer is aligned to 4 - chunkHead_->size += size; - - return buffer; - } - - //! Resizes a memory block (concept Allocator) - void* Realloc(void* originalPtr, size_t originalSize, size_t newSize) { - if (originalPtr == 0) - return Malloc(newSize); - - // Do not shrink if new size is smaller than original - if (originalSize >= newSize) - return originalPtr; - - // Simply expand it if it is the last allocation and there is sufficient space - if (originalPtr == (char *)(chunkHead_ + 1) + chunkHead_->size - originalSize) { - size_t increment = newSize - originalSize; - increment = (increment + 3) & ~3; // Force aligning size to 4 - if (chunkHead_->size + increment <= chunkHead_->capacity) { - chunkHead_->size += increment; - RAPIDJSON_ASSERT(((uintptr_t)originalPtr & 3) == 0); // returned buffer is aligned to 4 - return originalPtr; - } - } - - // Realloc process: allocate and copy memory, do not free original buffer. - void* newBuffer = Malloc(newSize); - RAPIDJSON_ASSERT(newBuffer != 0); // Do not handle out-of-memory explicitly. - return memcpy(newBuffer, originalPtr, originalSize); - } - - //! Frees a memory block (concept Allocator) - static void Free(void *) {} // Do nothing - -private: - //! Creates a new chunk. - /*! \param capacity Capacity of the chunk in bytes. - */ - void AddChunk(size_t capacity) { - ChunkHeader* chunk = (ChunkHeader*)baseAllocator_->Malloc(sizeof(ChunkHeader) + capacity); - chunk->capacity = capacity; - chunk->size = 0; - chunk->next = chunkHead_; - chunkHead_ = chunk; - } - - static const int kDefaultChunkCapacity = 64 * 1024; //!< Default chunk capacity. - - //! Chunk header for perpending to each chunk. - /*! Chunks are stored as a singly linked list. - */ - struct ChunkHeader { - size_t capacity; //!< Capacity of the chunk in bytes (excluding the header itself). - size_t size; //!< Current size of allocated memory in bytes. - ChunkHeader *next; //!< Next chunk in the linked list. - }; - - ChunkHeader *chunkHead_; //!< Head of the chunk linked-list. Only the head chunk serves allocation. - size_t chunk_capacity_; //!< The minimum capacity of chunk when they are allocated. - char *userBuffer_; //!< User supplied buffer. - BaseAllocator* baseAllocator_; //!< base allocator for allocating memory chunks. - BaseAllocator* ownBaseAllocator_; //!< base allocator created by this object. -}; - -/////////////////////////////////////////////////////////////////////////////// -// Encoding - -/*! \class rapidjson::Encoding - \brief Concept for encoding of Unicode characters. - -\code -concept Encoding { - typename Ch; //! Type of character. - - //! \brief Encode a Unicode codepoint to a buffer. - //! \param buffer pointer to destination buffer to store the result. It should have sufficient size of encoding one character. - //! \param codepoint An unicode codepoint, ranging from 0x0 to 0x10FFFF inclusively. - //! \returns the pointer to the next character after the encoded data. - static Ch* Encode(Ch *buffer, unsigned codepoint); -}; -\endcode -*/ - -/////////////////////////////////////////////////////////////////////////////// -// UTF8 - -//! UTF-8 encoding. -/*! http://en.wikipedia.org/wiki/UTF-8 - \tparam CharType Type for storing 8-bit UTF-8 data. Default is char. - \implements Encoding -*/ -template -struct UTF8 { - typedef CharType Ch; - - static Ch* Encode(Ch *buffer, unsigned codepoint) { - if (codepoint <= 0x7F) - *buffer++ = codepoint & 0xFF; - else if (codepoint <= 0x7FF) { - *buffer++ = 0xC0 | ((codepoint >> 6) & 0xFF); - *buffer++ = 0x80 | ((codepoint & 0x3F)); - } - else if (codepoint <= 0xFFFF) { - *buffer++ = 0xE0 | ((codepoint >> 12) & 0xFF); - *buffer++ = 0x80 | ((codepoint >> 6) & 0x3F); - *buffer++ = 0x80 | (codepoint & 0x3F); - } - else { - RAPIDJSON_ASSERT(codepoint <= 0x10FFFF); - *buffer++ = 0xF0 | ((codepoint >> 18) & 0xFF); - *buffer++ = 0x80 | ((codepoint >> 12) & 0x3F); - *buffer++ = 0x80 | ((codepoint >> 6) & 0x3F); - *buffer++ = 0x80 | (codepoint & 0x3F); - } - return buffer; - } -}; - -/////////////////////////////////////////////////////////////////////////////// -// UTF16 - -//! UTF-16 encoding. -/*! http://en.wikipedia.org/wiki/UTF-16 - \tparam CharType Type for storing 16-bit UTF-16 data. Default is wchar_t. C++11 may use char16_t instead. - \implements Encoding -*/ -template -struct UTF16 { - typedef CharType Ch; - - static Ch* Encode(Ch* buffer, unsigned codepoint) { - if (codepoint <= 0xFFFF) { - RAPIDJSON_ASSERT(codepoint < 0xD800 || codepoint > 0xDFFF); // Code point itself cannot be surrogate pair - *buffer++ = static_cast(codepoint); - } - else { - RAPIDJSON_ASSERT(codepoint <= 0x10FFFF); - unsigned v = codepoint - 0x10000; - *buffer++ = static_cast((v >> 10) + 0xD800); - *buffer++ = (v & 0x3FF) + 0xDC00; - } - return buffer; - } -}; - -/////////////////////////////////////////////////////////////////////////////// -// UTF32 - -//! UTF-32 encoding. -/*! http://en.wikipedia.org/wiki/UTF-32 - \tparam Ch Type for storing 32-bit UTF-32 data. Default is unsigned. C++11 may use char32_t instead. - \implements Encoding -*/ -template -struct UTF32 { - typedef CharType Ch; - - static Ch *Encode(Ch* buffer, unsigned codepoint) { - RAPIDJSON_ASSERT(codepoint <= 0x10FFFF); - *buffer++ = codepoint; - return buffer; - } -}; - -/////////////////////////////////////////////////////////////////////////////// -// Stream - -/*! \class rapidjson::Stream - \brief Concept for reading and writing characters. - - For read-only stream, no need to implement PutBegin(), Put() and PutEnd(). - - For write-only stream, only need to implement Put(). - -\code -concept Stream { - typename Ch; //!< Character type of the stream. - - //! Read the current character from stream without moving the read cursor. - Ch Peek() const; - - //! Read the current character from stream and moving the read cursor to next character. - Ch Take(); - - //! Get the current read cursor. - //! \return Number of characters read from start. - size_t Tell(); - - //! Begin writing operation at the current read pointer. - //! \return The begin writer pointer. - Ch* PutBegin(); - - //! Write a character. - void Put(Ch c); - - //! End the writing operation. - //! \param begin The begin write pointer returned by PutBegin(). - //! \return Number of characters written. - size_t PutEnd(Ch* begin); -} -\endcode -*/ - -//! Put N copies of a character to a stream. -template -inline void PutN(Stream& stream, Ch c, size_t n) { - for (size_t i = 0; i < n; i++) - stream.Put(c); -} - -/////////////////////////////////////////////////////////////////////////////// -// StringStream - -//! Read-only string stream. -/*! \implements Stream -*/ -template -struct GenericStringStream { - typedef typename Encoding::Ch Ch; - - GenericStringStream(const Ch *src) : src_(src), head_(src) {} - - Ch Peek() const { return *src_; } - Ch Take() { return *src_++; } - size_t Tell() const { return src_ - head_; } - - Ch* PutBegin() { RAPIDJSON_ASSERT(false); return 0; } - void Put(Ch) { RAPIDJSON_ASSERT(false); } - size_t PutEnd(Ch*) { RAPIDJSON_ASSERT(false); return 0; } - - const Ch* src_; //!< Current read position. - const Ch* head_; //!< Original head of the string. -}; - -typedef GenericStringStream > StringStream; - -/////////////////////////////////////////////////////////////////////////////// -// InsituStringStream - -//! A read-write string stream. -/*! This string stream is particularly designed for in-situ parsing. - \implements Stream -*/ -template -struct GenericInsituStringStream { - typedef typename Encoding::Ch Ch; - - GenericInsituStringStream(Ch *src) : src_(src), dst_(0), head_(src) {} - - // Read - Ch Peek() { return *src_; } - Ch Take() { return *src_++; } - size_t Tell() { return src_ - head_; } - - // Write - Ch* PutBegin() { return dst_ = src_; } - void Put(Ch c) { RAPIDJSON_ASSERT(dst_ != 0); *dst_++ = c; } - size_t PutEnd(Ch* begin) { return dst_ - begin; } - - Ch* src_; - Ch* dst_; - Ch* head_; -}; - -typedef GenericInsituStringStream > InsituStringStream; - -/////////////////////////////////////////////////////////////////////////////// -// Type - -//! Type of JSON value -enum Type { - kNullType = 0, //!< null - kFalseType = 1, //!< false - kTrueType = 2, //!< true - kObjectType = 3, //!< object - kArrayType = 4, //!< array - kStringType = 5, //!< string - kNumberType = 6, //!< number -}; - -} // namespace rapidjson - -#endif // RAPIDJSON_RAPIDJSON_H_ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/reader.h b/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/reader.h deleted file mode 100644 index b87486b..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/reader.h +++ /dev/null @@ -1,683 +0,0 @@ -#ifndef RAPIDJSON_READER_H_ -#define RAPIDJSON_READER_H_ - -// Copyright (c) 2011 Milo Yip (miloyip@gmail.com) -// Version 0.1 - -#include "rapidjson.h" -#include "internal/pow10.h" -#include "internal/stack.h" -#include - -#ifdef RAPIDJSON_SSE42 -#include -#elif defined(RAPIDJSON_SSE2) -#include -#endif - -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4127) // conditional expression is constant -#endif - -#ifndef RAPIDJSON_PARSE_ERROR -#define RAPIDJSON_PARSE_ERROR(msg, offset) \ - RAPIDJSON_MULTILINEMACRO_BEGIN \ - parseError_ = msg; \ - errorOffset_ = offset; \ - longjmp(jmpbuf_, 1); \ - RAPIDJSON_MULTILINEMACRO_END -#endif - -namespace rapidjson { - -/////////////////////////////////////////////////////////////////////////////// -// ParseFlag - -//! Combination of parseFlags -enum ParseFlag { - kParseDefaultFlags = 0, //!< Default parse flags. Non-destructive parsing. Text strings are decoded into allocated buffer. - kParseInsituFlag = 1 //!< In-situ(destructive) parsing. -}; - -/////////////////////////////////////////////////////////////////////////////// -// Handler - -/*! \class rapidjson::Handler - \brief Concept for receiving events from GenericReader upon parsing. -\code -concept Handler { - typename Ch; - - void Null(); - void Bool(bool b); - void Int(int i); - void Uint(unsigned i); - void Int64(int64_t i); - void Uint64(uint64_t i); - void Double(double d); - void String(const Ch* str, SizeType length, bool copy); - void StartObject(); - void EndObject(SizeType memberCount); - void StartArray(); - void EndArray(SizeType elementCount); -}; -\endcode -*/ -/////////////////////////////////////////////////////////////////////////////// -// BaseReaderHandler - -//! Default implementation of Handler. -/*! This can be used as base class of any reader handler. - \implements Handler -*/ -template > -struct BaseReaderHandler { - typedef typename Encoding::Ch Ch; - - void Default() {} - void Null() { Default(); } - void Bool(bool) { Default(); } - void Int(int) { Default(); } - void Uint(unsigned) { Default(); } - void Int64(int64_t) { Default(); } - void Uint64(uint64_t) { Default(); } - void Double(double) { Default(); } - void String(const Ch*, SizeType, bool) { Default(); } - void StartObject() { Default(); } - void EndObject(SizeType) { Default(); } - void StartArray() { Default(); } - void EndArray(SizeType) { Default(); } -}; - -/////////////////////////////////////////////////////////////////////////////// -// SkipWhitespace - -//! Skip the JSON white spaces in a stream. -/*! \param stream A input stream for skipping white spaces. - \note This function has SSE2/SSE4.2 specialization. -*/ -template -void SkipWhitespace(Stream& stream) { - Stream s = stream; // Use a local copy for optimization - while (s.Peek() == ' ' || s.Peek() == '\n' || s.Peek() == '\r' || s.Peek() == '\t') - s.Take(); - stream = s; -} - -#ifdef RAPIDJSON_SSE42 -//! Skip whitespace with SSE 4.2 pcmpistrm instruction, testing 16 8-byte characters at once. -inline const char *SkipWhitespace_SIMD(const char* p) { - static const char whitespace[16] = " \n\r\t"; - __m128i w = _mm_loadu_si128((const __m128i *)&whitespace[0]); - - for (;;) { - __m128i s = _mm_loadu_si128((const __m128i *)p); - unsigned r = _mm_cvtsi128_si32(_mm_cmpistrm(w, s, _SIDD_UBYTE_OPS | _SIDD_CMP_EQUAL_ANY | _SIDD_BIT_MASK | _SIDD_NEGATIVE_POLARITY)); - if (r == 0) // all 16 characters are whitespace - p += 16; - else { // some of characters may be non-whitespace -#ifdef _MSC_VER // Find the index of first non-whitespace - unsigned long offset; - if (_BitScanForward(&offset, r)) - return p + offset; -#else - if (r != 0) - return p + __builtin_ffs(r) - 1; -#endif - } - } -} - -#elif defined(RAPIDJSON_SSE2) - -//! Skip whitespace with SSE2 instructions, testing 16 8-byte characters at once. -inline const char *SkipWhitespace_SIMD(const char* p) { - static const char whitespaces[4][17] = { - " ", - "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n", - "\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r\r", - "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"}; - - __m128i w0 = _mm_loadu_si128((const __m128i *)&whitespaces[0][0]); - __m128i w1 = _mm_loadu_si128((const __m128i *)&whitespaces[1][0]); - __m128i w2 = _mm_loadu_si128((const __m128i *)&whitespaces[2][0]); - __m128i w3 = _mm_loadu_si128((const __m128i *)&whitespaces[3][0]); - - for (;;) { - __m128i s = _mm_loadu_si128((const __m128i *)p); - __m128i x = _mm_cmpeq_epi8(s, w0); - x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w1)); - x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w2)); - x = _mm_or_si128(x, _mm_cmpeq_epi8(s, w3)); - unsigned short r = ~_mm_movemask_epi8(x); - if (r == 0) // all 16 characters are whitespace - p += 16; - else { // some of characters may be non-whitespace -#ifdef _MSC_VER // Find the index of first non-whitespace - unsigned long offset; - if (_BitScanForward(&offset, r)) - return p + offset; -#else - if (r != 0) - return p + __builtin_ffs(r) - 1; -#endif - } - } -} - -#endif // RAPIDJSON_SSE2 - -#ifdef RAPIDJSON_SIMD -//! Template function specialization for InsituStringStream -template<> inline void SkipWhitespace(InsituStringStream& stream) { - stream.src_ = const_cast(SkipWhitespace_SIMD(stream.src_)); -} - -//! Template function specialization for StringStream -template<> inline void SkipWhitespace(StringStream& stream) { - stream.src_ = SkipWhitespace_SIMD(stream.src_); -} -#endif // RAPIDJSON_SIMD - -/////////////////////////////////////////////////////////////////////////////// -// GenericReader - -//! SAX-style JSON parser. Use Reader for UTF8 encoding and default allocator. -/*! GenericReader parses JSON text from a stream, and send events synchronously to an - object implementing Handler concept. - - It needs to allocate a stack for storing a single decoded string during - non-destructive parsing. - - For in-situ parsing, the decoded string is directly written to the source - text string, no temporary buffer is required. - - A GenericReader object can be reused for parsing multiple JSON text. - - \tparam Encoding Encoding of both the stream and the parse output. - \tparam Allocator Allocator type for stack. -*/ -template > -class GenericReader { -public: - typedef typename Encoding::Ch Ch; - - //! Constructor. - /*! \param allocator Optional allocator for allocating stack memory. (Only use for non-destructive parsing) - \param stackCapacity stack capacity in bytes for storing a single decoded string. (Only use for non-destructive parsing) - */ - GenericReader(Allocator* allocator = 0, size_t stackCapacity = kDefaultStackCapacity) : stack_(allocator, stackCapacity), parseError_(0), errorOffset_(0) {} - - //! Parse JSON text. - /*! \tparam parseFlags Combination of ParseFlag. - \tparam Stream Type of input stream. - \tparam Handler Type of handler which must implement Handler concept. - \param stream Input stream to be parsed. - \param handler The handler to receive events. - \return Whether the parsing is successful. - */ - template - bool Parse(Stream& stream, Handler& handler) { - parseError_ = 0; - errorOffset_ = 0; - -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4611) // interaction between '_setjmp' and C++ object destruction is non-portable -#endif - if (setjmp(jmpbuf_)) { -#ifdef _MSC_VER -#pragma warning(pop) -#endif - stack_.Clear(); - return false; - } - - SkipWhitespace(stream); - - if (stream.Peek() == '\0') - RAPIDJSON_PARSE_ERROR("Text only contains white space(s)", stream.Tell()); - else { - switch (stream.Peek()) { - case '{': ParseObject(stream, handler); break; - case '[': ParseArray(stream, handler); break; - default: RAPIDJSON_PARSE_ERROR("Expect either an object or array at root", stream.Tell()); - } - SkipWhitespace(stream); - - if (stream.Peek() != '\0') - RAPIDJSON_PARSE_ERROR("Nothing should follow the root object or array.", stream.Tell()); - } - - return true; - } - - bool HasParseError() const { return parseError_ != 0; } - const char* GetParseError() const { return parseError_; } - size_t GetErrorOffset() const { return errorOffset_; } - -private: - // Parse object: { string : value, ... } - template - void ParseObject(Stream& stream, Handler& handler) { - RAPIDJSON_ASSERT(stream.Peek() == '{'); - stream.Take(); // Skip '{' - handler.StartObject(); - SkipWhitespace(stream); - - if (stream.Peek() == '}') { - stream.Take(); - handler.EndObject(0); // empty object - return; - } - - for (SizeType memberCount = 0;;) { - if (stream.Peek() != '"') { - RAPIDJSON_PARSE_ERROR("Name of an object member must be a string", stream.Tell()); - break; - } - - ParseString(stream, handler); - SkipWhitespace(stream); - - if (stream.Take() != ':') { - RAPIDJSON_PARSE_ERROR("There must be a colon after the name of object member", stream.Tell()); - break; - } - SkipWhitespace(stream); - - ParseValue(stream, handler); - SkipWhitespace(stream); - - ++memberCount; - - switch(stream.Take()) { - case ',': SkipWhitespace(stream); break; - case '}': handler.EndObject(memberCount); return; - default: RAPIDJSON_PARSE_ERROR("Must be a comma or '}' after an object member", stream.Tell()); - } - } - } - - // Parse array: [ value, ... ] - template - void ParseArray(Stream& stream, Handler& handler) { - RAPIDJSON_ASSERT(stream.Peek() == '['); - stream.Take(); // Skip '[' - handler.StartArray(); - SkipWhitespace(stream); - - if (stream.Peek() == ']') { - stream.Take(); - handler.EndArray(0); // empty array - return; - } - - for (SizeType elementCount = 0;;) { - ParseValue(stream, handler); - ++elementCount; - SkipWhitespace(stream); - - switch (stream.Take()) { - case ',': SkipWhitespace(stream); break; - case ']': handler.EndArray(elementCount); return; - default: RAPIDJSON_PARSE_ERROR("Must be a comma or ']' after an array element.", stream.Tell()); - } - } - } - - template - void ParseNull(Stream& stream, Handler& handler) { - RAPIDJSON_ASSERT(stream.Peek() == 'n'); - stream.Take(); - - if (stream.Take() == 'u' && stream.Take() == 'l' && stream.Take() == 'l') - handler.Null(); - else - RAPIDJSON_PARSE_ERROR("Invalid value", stream.Tell() - 1); - } - - template - void ParseTrue(Stream& stream, Handler& handler) { - RAPIDJSON_ASSERT(stream.Peek() == 't'); - stream.Take(); - - if (stream.Take() == 'r' && stream.Take() == 'u' && stream.Take() == 'e') - handler.Bool(true); - else - RAPIDJSON_PARSE_ERROR("Invalid value", stream.Tell()); - } - - template - void ParseFalse(Stream& stream, Handler& handler) { - RAPIDJSON_ASSERT(stream.Peek() == 'f'); - stream.Take(); - - if (stream.Take() == 'a' && stream.Take() == 'l' && stream.Take() == 's' && stream.Take() == 'e') - handler.Bool(false); - else - RAPIDJSON_PARSE_ERROR("Invalid value", stream.Tell() - 1); - } - - // Helper function to parse four hexidecimal digits in \uXXXX in ParseString(). - template - unsigned ParseHex4(Stream& stream) { - Stream s = stream; // Use a local copy for optimization - unsigned codepoint = 0; - for (int i = 0; i < 4; i++) { - Ch c = s.Take(); - codepoint <<= 4; - codepoint += c; - if (c >= '0' && c <= '9') - codepoint -= '0'; - else if (c >= 'A' && c <= 'F') - codepoint -= 'A' - 10; - else if (c >= 'a' && c <= 'f') - codepoint -= 'a' - 10; - else - RAPIDJSON_PARSE_ERROR("Incorrect hex digit after \\u escape", s.Tell() - 1); - } - stream = s; // Restore stream - return codepoint; - } - - // Parse string, handling the prefix and suffix double quotes and escaping. - template - void ParseString(Stream& stream, Handler& handler) { -#define Z16 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - static const Ch escape[256] = { - Z16, Z16, 0, 0,'\"', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'/', - Z16, Z16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'\\', 0, 0, 0, - 0, 0,'\b', 0, 0, 0,'\f', 0, 0, 0, 0, 0, 0, 0,'\n', 0, - 0, 0,'\r', 0,'\t', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16 - }; -#undef Z16 - - Stream s = stream; // Use a local copy for optimization - RAPIDJSON_ASSERT(s.Peek() == '\"'); - s.Take(); // Skip '\"' - Ch *head; - SizeType len; - if (parseFlags & kParseInsituFlag) - head = s.PutBegin(); - else - len = 0; - -#define RAPIDJSON_PUT(x) \ - do { \ - if (parseFlags & kParseInsituFlag) \ - s.Put(x); \ - else { \ - *stack_.template Push() = x; \ - ++len; \ - } \ - } while(false) - - for (;;) { - Ch c = s.Take(); - if (c == '\\') { // Escape - Ch e = s.Take(); - if ((sizeof(Ch) == 1 || e < 256) && escape[(unsigned char)e]) - RAPIDJSON_PUT(escape[(unsigned char)e]); - else if (e == 'u') { // Unicode - unsigned codepoint = ParseHex4(s); - if (codepoint >= 0xD800 && codepoint <= 0xDBFF) { // Handle UTF-16 surrogate pair - if (s.Take() != '\\' || s.Take() != 'u') { - RAPIDJSON_PARSE_ERROR("Missing the second \\u in surrogate pair", s.Tell() - 2); - return; - } - unsigned codepoint2 = ParseHex4(s); - if (codepoint2 < 0xDC00 || codepoint2 > 0xDFFF) { - RAPIDJSON_PARSE_ERROR("The second \\u in surrogate pair is invalid", s.Tell() - 2); - return; - } - codepoint = (((codepoint - 0xD800) << 10) | (codepoint2 - 0xDC00)) + 0x10000; - } - - Ch buffer[4]; - SizeType count = SizeType(Encoding::Encode(buffer, codepoint) - &buffer[0]); - - if (parseFlags & kParseInsituFlag) - for (SizeType i = 0; i < count; i++) - s.Put(buffer[i]); - else { - memcpy(stack_.template Push(count), buffer, count * sizeof(Ch)); - len += count; - } - } - else { - RAPIDJSON_PARSE_ERROR("Unknown escape character", stream.Tell() - 1); - return; - } - } - else if (c == '"') { // Closing double quote - if (parseFlags & kParseInsituFlag) { - size_t length = s.PutEnd(head); - RAPIDJSON_ASSERT(length <= 0xFFFFFFFF); - RAPIDJSON_PUT('\0'); // null-terminate the string - handler.String(head, SizeType(length), false); - } - else { - RAPIDJSON_PUT('\0'); - handler.String(stack_.template Pop(len), len - 1, true); - } - stream = s; // restore stream - return; - } - else if (c == '\0') { - RAPIDJSON_PARSE_ERROR("lacks ending quotation before the end of string", stream.Tell() - 1); - return; - } - else if ((unsigned)c < 0x20) { // RFC 4627: unescaped = %x20-21 / %x23-5B / %x5D-10FFFF - RAPIDJSON_PARSE_ERROR("Incorrect unescaped character in string", stream.Tell() - 1); - return; - } - else - RAPIDJSON_PUT(c); // Normal character, just copy - } -#undef RAPIDJSON_PUT - } - - template - void ParseNumber(Stream& stream, Handler& handler) { - Stream s = stream; // Local copy for optimization - // Parse minus - bool minus = false; - if (s.Peek() == '-') { - minus = true; - s.Take(); - } - - // Parse int: zero / ( digit1-9 *DIGIT ) - unsigned i; - bool try64bit = false; - if (s.Peek() == '0') { - i = 0; - s.Take(); - } - else if (s.Peek() >= '1' && s.Peek() <= '9') { - i = s.Take() - '0'; - - if (minus) - while (s.Peek() >= '0' && s.Peek() <= '9') { - if (i >= 214748364) { // 2^31 = 2147483648 - if (i != 214748364 || s.Peek() > '8') { - try64bit = true; - break; - } - } - i = i * 10 + (s.Take() - '0'); - } - else - while (s.Peek() >= '0' && s.Peek() <= '9') { - if (i >= 429496729) { // 2^32 - 1 = 4294967295 - if (i != 429496729 || s.Peek() > '5') { - try64bit = true; - break; - } - } - i = i * 10 + (s.Take() - '0'); - } - } - else { - RAPIDJSON_PARSE_ERROR("Expect a value here.", stream.Tell()); - return; - } - - // Parse 64bit int - uint64_t i64 = 0; - bool useDouble = false; - if (try64bit) { - i64 = i; - if (minus) - while (s.Peek() >= '0' && s.Peek() <= '9') { - if (i64 >= 922337203685477580uLL) // 2^63 = 9223372036854775808 - if (i64 != 922337203685477580uLL || s.Peek() > '8') { - useDouble = true; - break; - } - i64 = i64 * 10 + (s.Take() - '0'); - } - else - while (s.Peek() >= '0' && s.Peek() <= '9') { - if (i64 >= 1844674407370955161uLL) // 2^64 - 1 = 18446744073709551615 - if (i64 != 1844674407370955161uLL || s.Peek() > '5') { - useDouble = true; - break; - } - i64 = i64 * 10 + (s.Take() - '0'); - } - } - - // Force double for big integer - double d = 0.0; - if (useDouble) { - d = (double)i64; - while (s.Peek() >= '0' && s.Peek() <= '9') { - if (d >= 1E307) { - RAPIDJSON_PARSE_ERROR("Number too big to store in double", stream.Tell()); - return; - } - d = d * 10 + (s.Take() - '0'); - } - } - - // Parse frac = decimal-point 1*DIGIT - int expFrac = 0; - if (s.Peek() == '.') { - if (!useDouble) { - d = try64bit ? (double)i64 : (double)i; - useDouble = true; - } - s.Take(); - - if (s.Peek() >= '0' && s.Peek() <= '9') { - d = d * 10 + (s.Take() - '0'); - --expFrac; - } - else { - RAPIDJSON_PARSE_ERROR("At least one digit in fraction part", stream.Tell()); - return; - } - - while (s.Peek() >= '0' && s.Peek() <= '9') { - if (expFrac > -16) { - d = d * 10 + (s.Peek() - '0'); - --expFrac; - } - s.Take(); - } - } - - // Parse exp = e [ minus / plus ] 1*DIGIT - int exp = 0; - if (s.Peek() == 'e' || s.Peek() == 'E') { - if (!useDouble) { - d = try64bit ? (double)i64 : (double)i; - useDouble = true; - } - s.Take(); - - bool expMinus = false; - if (s.Peek() == '+') - s.Take(); - else if (s.Peek() == '-') { - s.Take(); - expMinus = true; - } - - if (s.Peek() >= '0' && s.Peek() <= '9') { - exp = s.Take() - '0'; - while (s.Peek() >= '0' && s.Peek() <= '9') { - exp = exp * 10 + (s.Take() - '0'); - if (exp > 308) { - RAPIDJSON_PARSE_ERROR("Number too big to store in double", stream.Tell()); - return; - } - } - } - else { - RAPIDJSON_PARSE_ERROR("At least one digit in exponent", s.Tell()); - return; - } - - if (expMinus) - exp = -exp; - } - - // Finish parsing, call event according to the type of number. - if (useDouble) { - d *= internal::Pow10(exp + expFrac); - handler.Double(minus ? -d : d); - } - else { - if (try64bit) { - if (minus) - handler.Int64(-(int64_t)i64); - else - handler.Uint64(i64); - } - else { - if (minus) - handler.Int(-(int)i); - else - handler.Uint(i); - } - } - - stream = s; // restore stream - } - - // Parse any JSON value - template - void ParseValue(Stream& stream, Handler& handler) { - switch (stream.Peek()) { - case 'n': ParseNull (stream, handler); break; - case 't': ParseTrue (stream, handler); break; - case 'f': ParseFalse (stream, handler); break; - case '"': ParseString(stream, handler); break; - case '{': ParseObject(stream, handler); break; - case '[': ParseArray (stream, handler); break; - default : ParseNumber(stream, handler); - } - } - - static const size_t kDefaultStackCapacity = 256; //!< Default stack capacity in bytes for storing a single decoded string. - internal::Stack stack_; //!< A stack for storing decoded string temporarily during non-destructive parsing. - jmp_buf jmpbuf_; //!< setjmp buffer for fast exit from nested parsing function calls. - const char* parseError_; - size_t errorOffset_; -}; // class GenericReader - -//! Reader with UTF8 encoding and default allocator. -typedef GenericReader > Reader; - -} // namespace rapidjson - -#ifdef _MSC_VER -#pragma warning(pop) -#endif - -#endif // RAPIDJSON_READER_H_ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/stringbuffer.h b/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/stringbuffer.h deleted file mode 100644 index 269ae10..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/stringbuffer.h +++ /dev/null @@ -1,49 +0,0 @@ -#ifndef RAPIDJSON_STRINGBUFFER_H_ -#define RAPIDJSON_STRINGBUFFER_H_ - -#include "rapidjson.h" -#include "internal/stack.h" - -namespace rapidjson { - -//! Represents an in-memory output stream. -/*! - \tparam Encoding Encoding of the stream. - \tparam Allocator type for allocating memory buffer. - \implements Stream -*/ -template -struct GenericStringBuffer { - typedef typename Encoding::Ch Ch; - - GenericStringBuffer(Allocator* allocator = 0, size_t capacity = kDefaultCapacity) : stack_(allocator, capacity) {} - - void Put(Ch c) { *stack_.template Push() = c; } - - void Clear() { stack_.Clear(); } - - const char* GetString() const { - // Push and pop a null terminator. This is safe. - *stack_.template Push() = '\0'; - stack_.template Pop(1); - - return stack_.template Bottom(); - } - - size_t Size() const { return stack_.GetSize(); } - - static const size_t kDefaultCapacity = 256; - mutable internal::Stack stack_; -}; - -typedef GenericStringBuffer > StringBuffer; - -//! Implement specialized version of PutN() with memset() for better performance. -template<> -inline void PutN(GenericStringBuffer >& stream, char c, size_t n) { - memset(stream.stack_.Push(n), c, n * sizeof(c)); -} - -} // namespace rapidjson - -#endif // RAPIDJSON_STRINGBUFFER_H_ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/writer.h b/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/writer.h deleted file mode 100644 index d96f208..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Json/rapidjson/writer.h +++ /dev/null @@ -1,241 +0,0 @@ -#ifndef RAPIDJSON_WRITER_H_ -#define RAPIDJSON_WRITER_H_ - -#include "rapidjson.h" -#include "internal/stack.h" -#include "internal/strfunc.h" -#include // snprintf() or _sprintf_s() -#include // placement new - -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable : 4127) // conditional expression is constant -#endif - -namespace rapidjson { - -//! JSON writer -/*! Writer implements the concept Handler. - It generates JSON text by events to an output stream. - - User may programmatically calls the functions of a writer to generate JSON text. - - On the other side, a writer can also be passed to objects that generates events, - - for example Reader::Parse() and Document::Accept(). - - \tparam Stream Type of ouptut stream. - \tparam Encoding Encoding of both source strings and output. - \implements Handler -*/ -template, typename Allocator = MemoryPoolAllocator<> > -class Writer { -public: - typedef typename Encoding::Ch Ch; - - Writer(Stream& stream, Allocator* allocator = 0, size_t levelDepth = kDefaultLevelDepth) : - stream_(stream), level_stack_(allocator, levelDepth * sizeof(Level)) {} - - //@name Implementation of Handler - //@{ - Writer& Null() { Prefix(kNullType); WriteNull(); return *this; } - Writer& Bool(bool b) { Prefix(b ? kTrueType : kFalseType); WriteBool(b); return *this; } - Writer& Int(int i) { Prefix(kNumberType); WriteInt(i); return *this; } - Writer& Uint(unsigned u) { Prefix(kNumberType); WriteUint(u); return *this; } - Writer& Int64(int64_t i64) { Prefix(kNumberType); WriteInt64(i64); return *this; } - Writer& Uint64(uint64_t u64) { Prefix(kNumberType); WriteUint64(u64); return *this; } - Writer& Double(double d) { Prefix(kNumberType); WriteDouble(d); return *this; } - - Writer& String(const Ch* str, SizeType length, bool copy = false) { - (void)copy; - Prefix(kStringType); - WriteString(str, length); - return *this; - } - - Writer& StartObject() { - Prefix(kObjectType); - new (level_stack_.template Push()) Level(false); - WriteStartObject(); - return *this; - } - - Writer& EndObject(SizeType memberCount = 0) { - (void)memberCount; - RAPIDJSON_ASSERT(level_stack_.GetSize() >= sizeof(Level)); - RAPIDJSON_ASSERT(!level_stack_.template Top()->inArray); - level_stack_.template Pop(1); - WriteEndObject(); - return *this; - } - - Writer& StartArray() { - Prefix(kArrayType); - new (level_stack_.template Push()) Level(true); - WriteStartArray(); - return *this; - } - - Writer& EndArray(SizeType elementCount = 0) { - (void)elementCount; - RAPIDJSON_ASSERT(level_stack_.GetSize() >= sizeof(Level)); - RAPIDJSON_ASSERT(level_stack_.template Top()->inArray); - level_stack_.template Pop(1); - WriteEndArray(); - return *this; - } - //@} - - //! Simpler but slower overload. - Writer& String(const Ch* str) { return String(str, internal::StrLen(str)); } - -protected: - //! Information for each nested level - struct Level { - Level(bool inArray_) : inArray(inArray_), valueCount(0) {} - bool inArray; //!< true if in array, otherwise in object - size_t valueCount; //!< number of values in this level - }; - - static const size_t kDefaultLevelDepth = 32; - - void WriteNull() { - stream_.Put('n'); stream_.Put('u'); stream_.Put('l'); stream_.Put('l'); - } - - void WriteBool(bool b) { - if (b) { - stream_.Put('t'); stream_.Put('r'); stream_.Put('u'); stream_.Put('e'); - } - else { - stream_.Put('f'); stream_.Put('a'); stream_.Put('l'); stream_.Put('s'); stream_.Put('e'); - } - } - - void WriteInt(int i) { - if (i < 0) { - stream_.Put('-'); - i = -i; - } - WriteUint((unsigned)i); - } - - void WriteUint(unsigned u) { - char buffer[10]; - char *p = buffer; - do { - *p++ = (u % 10) + '0'; - u /= 10; - } while (u > 0); - - do { - --p; - stream_.Put(*p); - } while (p != buffer); - } - - void WriteInt64(int64_t i64) { - if (i64 < 0) { - stream_.Put('-'); - i64 = -i64; - } - WriteUint64((uint64_t)i64); - } - - void WriteUint64(uint64_t u64) { - char buffer[20]; - char *p = buffer; - do { - *p++ = char(u64 % 10) + '0'; - u64 /= 10; - } while (u64 > 0); - - do { - --p; - stream_.Put(*p); - } while (p != buffer); - } - - //! \todo Optimization with custom double-to-string converter. - void WriteDouble(double d) { - char buffer[100]; -#if _MSC_VER - int ret = sprintf_s(buffer, sizeof(buffer), "%g", d); -#else - int ret = snprintf(buffer, sizeof(buffer), "%g", d); -#endif - RAPIDJSON_ASSERT(ret >= 1); - for (int i = 0; i < ret; i++) - stream_.Put(buffer[i]); - } - - void WriteString(const Ch* str, SizeType length) { - static const char hexDigits[] = "0123456789ABCDEF"; - static const char escape[256] = { -#define Z16 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 - //0 1 2 3 4 5 6 7 8 9 A B C D E F - 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'b', 't', 'n', 'u', 'f', 'r', 'u', 'u', // 00 - 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', 'u', // 10 - 0, 0, '"', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 20 - Z16, Z16, // 30~4F - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,'\\', 0, 0, 0, // 50 - Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16, Z16 // 60~FF -#undef Z16 - }; - - stream_.Put('\"'); - for (const Ch* p = str; p != str + length; ++p) { - if ((sizeof(Ch) == 1 || *p < 256) && escape[(unsigned char)*p]) { - stream_.Put('\\'); - stream_.Put(escape[(unsigned char)*p]); - if (escape[(unsigned char)*p] == 'u') { - stream_.Put('0'); - stream_.Put('0'); - stream_.Put(hexDigits[(*p) >> 4]); - stream_.Put(hexDigits[(*p) & 0xF]); - } - } - else - stream_.Put(*p); - } - stream_.Put('\"'); - } - - void WriteStartObject() { stream_.Put('{'); } - void WriteEndObject() { stream_.Put('}'); } - void WriteStartArray() { stream_.Put('['); } - void WriteEndArray() { stream_.Put(']'); } - - void Prefix(Type type) { - (void)type; - if (level_stack_.GetSize() != 0) { // this value is not at root - Level* level = level_stack_.template Top(); - if (level->valueCount > 0) { - if (level->inArray) - stream_.Put(','); // add comma if it is not the first element in array - else // in object - stream_.Put((level->valueCount % 2 == 0) ? ',' : ':'); - } - if (!level->inArray && level->valueCount % 2 == 0) - RAPIDJSON_ASSERT(type == kStringType); // if it's in object, then even number should be a name - level->valueCount++; - } - else - RAPIDJSON_ASSERT(type == kObjectType || type == kArrayType); - } - - Stream& stream_; - internal::Stack level_stack_; - -private: - // Prohibit assignment for VC C4512 warning - Writer& operator=(const Writer& w); -}; - -} // namespace rapidjson - -#ifdef _MSC_VER -#pragma warning(pop) -#endif - -#endif // RAPIDJSON_RAPIDJSON_H_ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/GUIReader.h b/cappuccino-sdk/incl/extensions/CocoStudio/Reader/GUIReader.h deleted file mode 100644 index 7330396..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/GUIReader.h +++ /dev/null @@ -1,185 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCSGUIREADER_H__ -#define __CCSGUIREADER_H__ - -#include "../GUI/BaseClasses/UIWidget.h" -#include "../Json/rapidjson/document.h" -#include "cocos-ext.h" -#include "WidgetReader/WidgetReaderProtocol.h" -#include "../Trigger/ObjectFactory.h" - -NS_CC_EXT_BEGIN - -typedef void (CCObject::*SEL_ParseEvent)(const std::string&, CCObject*, const rapidjson::Value&); -#define parseselector(_SELECTOR) (SEL_ParseEvent)(&_SELECTOR) - -#define kCCSVersion 1.0 -/** - * @js NA - * @lua NA - */ -class GUIReader : public CCObject -{ -public: - /** - * @js ctor - */ - GUIReader(); - /** - * @js NA - */ - ~GUIReader(); - /** - * @js getInstance - */ - static GUIReader* shareReader(); - /** - * @js pure - */ - static void purge(); - - cocos2d::ui::Widget* widgetFromJsonFile(const char* fileName); - int getVersionInteger(const char* str); - void storeFileDesignSize(const char* fileName, const cocos2d::CCSize &size); - const cocos2d::CCSize getFileDesignSize(const char* fileName) const; - - const std::string& getFilePath() const { return m_strFilePath; }; - - void registerTypeAndCallBack(const std::string& classType, - ObjectFactory::Instance ins, - CCObject* object, - SEL_ParseEvent callBack); -protected: - std::string m_strFilePath; - CCDictionary* _fileDesignSizes; - - typedef std::map ParseCallBackMap; - ParseCallBackMap _mapParseSelector; - typedef std::map ParseObjectMap; - ParseObjectMap _mapObject; - -public: - ParseCallBackMap getParseCallBackMap() { return _mapParseSelector; }; - ParseObjectMap getParseObjectMap() { return _mapObject; }; -}; - -class WidgetPropertiesReader : public CCObject -{ -public: - virtual cocos2d::ui::Widget* createWidget(const rapidjson::Value& dic, const char* fullPath, const char* fileName)=0; - virtual cocos2d::ui::Widget* widgetFromJsonDictionary(const rapidjson::Value& data) = 0; - virtual void setPropsForAllWidgetFromJsonDictionary(WidgetReaderProtocol* reader, cocos2d::ui::Widget* widget, const rapidjson::Value& options) = 0; - - virtual void setPropsForAllCustomWidgetFromJsonDictionary(const std::string& classType, - cocos2d::ui::Widget* widget, - const rapidjson::Value& customOptions) = 0; - -protected: - std::string m_strFilePath; -}; - - - -/** - * @js NA - * @lua NA - */ -class WidgetPropertiesReader0250 : public WidgetPropertiesReader -{ - - -public: - WidgetPropertiesReader0250(){}; - virtual ~WidgetPropertiesReader0250(){}; - - virtual cocos2d::ui::Widget* createWidget(const rapidjson::Value& dic, const char* fullPath, const char* fileName); - virtual cocos2d::ui::Widget* widgetFromJsonDictionary(const rapidjson::Value& dic); - virtual void setPropsForWidgetFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - - virtual void setColorPropsForWidgetFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForButtonFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForCheckBoxFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForImageViewFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForLabelFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForLabelAtlasFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForLabelBMFontFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForLoadingBarFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForSliderFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForTextFieldFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - - virtual void setPropsForLayoutFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForScrollViewFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - - virtual void setPropsForAllWidgetFromJsonDictionary(WidgetReaderProtocol* reader, cocos2d::ui::Widget* widget, const rapidjson::Value& options); - - virtual void setPropsForAllCustomWidgetFromJsonDictionary(const std::string& classType, - cocos2d::ui::Widget* widget, - const rapidjson::Value& customOptions); -}; - -/** - * @js NA - * @lua NA - */ -class WidgetPropertiesReader0300 : public WidgetPropertiesReader -{ - - -public: - WidgetPropertiesReader0300(){}; - virtual ~WidgetPropertiesReader0300(){}; - - virtual cocos2d::ui::Widget* createWidget(const rapidjson::Value& dic, const char* fullPath, const char* fileName); - virtual cocos2d::ui::Widget* widgetFromJsonDictionary(const rapidjson::Value& dic); - virtual void setPropsForWidgetFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - - virtual void setColorPropsForWidgetFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForButtonFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForCheckBoxFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForImageViewFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForLabelFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForLabelAtlasFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForLabelBMFontFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForLoadingBarFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForSliderFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForTextFieldFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - - virtual void setPropsForLayoutFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForPageViewFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForScrollViewFromJsonDictionary(cocos2d::ui::Widget*widget,const rapidjson::Value& options); - virtual void setPropsForListViewFromJsonDictionary(cocos2d::ui::Widget* widget, const rapidjson::Value& options); - - virtual void setPropsForAllWidgetFromJsonDictionary(WidgetReaderProtocol* reader, cocos2d::ui::Widget* widget, const rapidjson::Value& options); - - virtual void setPropsForAllCustomWidgetFromJsonDictionary(const std::string& classType, - cocos2d::ui::Widget* widget, - const rapidjson::Value& customOptions); -}; - -NS_CC_EXT_END - - -#endif /* defined(__CCSGUIReader__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/SceneReader.h b/cappuccino-sdk/incl/extensions/CocoStudio/Reader/SceneReader.h deleted file mode 100644 index 8558d54..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/SceneReader.h +++ /dev/null @@ -1,70 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __SceneReader_H__ -#define __SceneReader_H__ - -#include "cocos2d.h" -#include "cocos-ext.h" -#include "ExtensionMacros.h" - -NS_CC_EXT_BEGIN - - -typedef void (CCObject::*SEL_CallFuncOD)(CCObject*, void*); -#define callfuncOD_selector(_SELECTOR) (SEL_CallFuncOD)(&_SELECTOR) - -/** -* @js NA -* @lua NA -*/ -class SceneReader -{ -public: - SceneReader(void); - virtual ~SceneReader(void); - -public: - static SceneReader* sharedSceneReader(); - static void purge(); - static const char* sceneReaderVersion(); - cocos2d::CCNode* createNodeWithSceneFile(const char *pszFileName); - static void setTarget(CCObject *rec, SEL_CallFuncOD selector); - cocos2d::CCNode* getNodeByTag(int nTag); -private: - cocos2d::CCNode* createObject(const rapidjson::Value &root, cocos2d::CCNode* parent); - void setPropertyFromJsonDict(const rapidjson::Value &root, cocos2d::CCNode *node); - bool readJson(const char *pszFileName, rapidjson::Document &doc); - cocos2d::CCNode* nodeByTag(cocos2d::CCNode *pParent, int nTag); -private: - static SceneReader* _sharedReader; - static CCObject* _pListener; - static SEL_CallFuncOD _pfnSelector; - cocos2d::CCNode *_pNode; -}; - - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/ButtonReader/ButtonReader.h b/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/ButtonReader/ButtonReader.h deleted file mode 100644 index 02b0a22..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/ButtonReader/ButtonReader.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __TestCpp__ButtonReader__ -#define __TestCpp__ButtonReader__ - -#include "../WidgetReader.h" - -NS_CC_EXT_BEGIN - -class ButtonReader : public WidgetReader -{ -public: - DECLARE_CLASS_WIDGET_READER_INFO - - ButtonReader(); - virtual ~ButtonReader(); - - static ButtonReader* getInstance(); - static void purge(); - - virtual void setPropsFromJsonDictionary(ui::Widget* widget, const rapidjson::Value& options); -}; - -NS_CC_EXT_END - -#endif /* defined(__TestCpp__ButtonReader__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/CheckBoxReader/CheckBoxReader.h b/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/CheckBoxReader/CheckBoxReader.h deleted file mode 100644 index 4a756b1..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/CheckBoxReader/CheckBoxReader.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __TestCpp__CheckBoxReader__ -#define __TestCpp__CheckBoxReader__ - -#include "../WidgetReader.h" - -NS_CC_EXT_BEGIN - -class CheckBoxReader : public WidgetReader -{ -public: - DECLARE_CLASS_WIDGET_READER_INFO - - CheckBoxReader(); - virtual ~CheckBoxReader(); - - static CheckBoxReader* getInstance(); - static void purge(); - - virtual void setPropsFromJsonDictionary(ui::Widget* widget, const rapidjson::Value& options); -}; - -NS_CC_EXT_END - -#endif /* defined(__TestCpp__CheckBoxReader__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/ImageViewReader/ImageViewReader.h b/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/ImageViewReader/ImageViewReader.h deleted file mode 100644 index 7db7cc3..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/ImageViewReader/ImageViewReader.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __TestCpp__ImageViewReader__ -#define __TestCpp__ImageViewReader__ - -#include "../WidgetReader.h" - -NS_CC_EXT_BEGIN - -class ImageViewReader : public WidgetReader -{ -public: - DECLARE_CLASS_WIDGET_READER_INFO - - ImageViewReader(); - virtual ~ImageViewReader(); - - static ImageViewReader* getInstance(); - static void purge(); - - virtual void setPropsFromJsonDictionary(ui::Widget* widget, const rapidjson::Value& options); -}; - -NS_CC_EXT_END - -#endif /* defined(__TestCpp__ImageViewReader__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LabelAtlasReader/LabelAtlasReader.h b/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LabelAtlasReader/LabelAtlasReader.h deleted file mode 100644 index 80d99fd..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LabelAtlasReader/LabelAtlasReader.h +++ /dev/null @@ -1,47 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __TestCpp__LabelAtlasReader__ -#define __TestCpp__LabelAtlasReader__ - -#include "../WidgetReader.h" - -NS_CC_EXT_BEGIN - -class LabelAtlasReader : public WidgetReader -{ -public: - DECLARE_CLASS_WIDGET_READER_INFO - - LabelAtlasReader(); - virtual ~LabelAtlasReader(); - - static LabelAtlasReader* getInstance(); - - virtual void setPropsFromJsonDictionary(ui::Widget* widget, const rapidjson::Value& options); -}; - -NS_CC_EXT_END - -#endif /* defined(__TestCpp__LabelAtlasReader__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LabelBMFontReader/LabelBMFontReader.h b/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LabelBMFontReader/LabelBMFontReader.h deleted file mode 100644 index 4cbb76b..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LabelBMFontReader/LabelBMFontReader.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __TestCpp__LabelBMFontReader__ -#define __TestCpp__LabelBMFontReader__ - -#include "../WidgetReader.h" - -NS_CC_EXT_BEGIN - -class LabelBMFontReader : public WidgetReader -{ -public: - DECLARE_CLASS_WIDGET_READER_INFO - - LabelBMFontReader(); - virtual ~LabelBMFontReader(); - - static LabelBMFontReader* getInstance(); - static void purge(); - - virtual void setPropsFromJsonDictionary(ui::Widget* widget, const rapidjson::Value& options); -}; - -NS_CC_EXT_END - -#endif /* defined(__TestCpp__LabelBMFontReader__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LabelReader/LabelReader.h b/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LabelReader/LabelReader.h deleted file mode 100644 index 4269fed..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LabelReader/LabelReader.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __TestCpp__LabelReader__ -#define __TestCpp__LabelReader__ - -#include "../WidgetReader.h" - -NS_CC_EXT_BEGIN - -class LabelReader : public WidgetReader -{ -public: - DECLARE_CLASS_WIDGET_READER_INFO - - LabelReader(); - virtual ~LabelReader(); - - static LabelReader* getInstance(); - static void purge(); - - virtual void setPropsFromJsonDictionary(ui::Widget* widget, const rapidjson::Value& options); -}; - -NS_CC_EXT_END - -#endif /* defined(__TestCpp__LabelReader__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LayoutReader/LayoutReader.h b/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LayoutReader/LayoutReader.h deleted file mode 100644 index 69b3154..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LayoutReader/LayoutReader.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __TestCpp__LayoutReader__ -#define __TestCpp__LayoutReader__ - -#include "../WidgetReader.h" - -NS_CC_EXT_BEGIN - -class LayoutReader : public WidgetReader -{ -public: - DECLARE_CLASS_WIDGET_READER_INFO - - LayoutReader(); - virtual ~LayoutReader(); - - static LayoutReader* getInstance(); - static void purge(); - - virtual void setPropsFromJsonDictionary(ui::Widget* widget, const rapidjson::Value& options); -}; - -NS_CC_EXT_END - -#endif /* defined(__TestCpp__LayoutReader__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/ListViewReader/ListViewReader.h b/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/ListViewReader/ListViewReader.h deleted file mode 100644 index 08f8299..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/ListViewReader/ListViewReader.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __TestCpp__ListViewReader__ -#define __TestCpp__ListViewReader__ - -#include "../ScrollViewReader/ScrollViewReader.h" - -NS_CC_EXT_BEGIN - -class ListViewReader : public ScrollViewReader -{ -public: - DECLARE_CLASS_WIDGET_READER_INFO - - ListViewReader(); - virtual ~ListViewReader(); - - static ListViewReader* getInstance(); - static void purge(); - - virtual void setPropsFromJsonDictionary(ui::Widget* widget, const rapidjson::Value& options); -}; - -NS_CC_EXT_END - -#endif /* defined(__TestCpp__ListViewReader__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LoadingBarReader/LoadingBarReader.h b/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LoadingBarReader/LoadingBarReader.h deleted file mode 100644 index 04ae627..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/LoadingBarReader/LoadingBarReader.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __TestCpp__LoadingBarReader__ -#define __TestCpp__LoadingBarReader__ - -#include "../WidgetReader.h" - -NS_CC_EXT_BEGIN - -class LoadingBarReader : public WidgetReader -{ -public: - DECLARE_CLASS_WIDGET_READER_INFO - - LoadingBarReader(); - virtual ~LoadingBarReader(); - - static LoadingBarReader* getInstance(); - static void purge(); - - virtual void setPropsFromJsonDictionary(ui::Widget* widget, const rapidjson::Value& options); -}; - -NS_CC_EXT_END - -#endif /* defined(__TestCpp__LoadingBarReader__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/PageViewReader/PageViewReader.h b/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/PageViewReader/PageViewReader.h deleted file mode 100644 index 75a764b..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/PageViewReader/PageViewReader.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __TestCpp__PageViewReader__ -#define __TestCpp__PageViewReader__ - -#include "../LayoutReader/LayoutReader.h" - -NS_CC_EXT_BEGIN - -class PageViewReader : public LayoutReader -{ -public: - DECLARE_CLASS_WIDGET_READER_INFO - - PageViewReader(); - virtual ~PageViewReader(); - - static PageViewReader* getInstance(); - static void purge(); - - virtual void setPropsFromJsonDictionary(ui::Widget* widget, const rapidjson::Value& options); -}; - -NS_CC_EXT_END - -#endif /* defined(__TestCpp__PageViewReader__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/ScrollViewReader/ScrollViewReader.h b/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/ScrollViewReader/ScrollViewReader.h deleted file mode 100644 index 73fb024..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/ScrollViewReader/ScrollViewReader.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __TestCpp__ScrollViewReader__ -#define __TestCpp__ScrollViewReader__ - -#include "../LayoutReader/LayoutReader.h" - -NS_CC_EXT_BEGIN - -class ScrollViewReader : public LayoutReader -{ -public: - DECLARE_CLASS_WIDGET_READER_INFO - - ScrollViewReader(); - virtual ~ScrollViewReader(); - - static ScrollViewReader* getInstance(); - static void purge(); - - virtual void setPropsFromJsonDictionary(ui::Widget* widget, const rapidjson::Value& options); -}; - -NS_CC_EXT_END - -#endif /* defined(__TestCpp__ScrollViewReader__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/SliderReader/SliderReader.h b/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/SliderReader/SliderReader.h deleted file mode 100644 index 35dc936..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/SliderReader/SliderReader.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __TestCpp__SliderReader__ -#define __TestCpp__SliderReader__ - -#include "../WidgetReader.h" - -NS_CC_EXT_BEGIN - -class SliderReader : public WidgetReader -{ -public: - DECLARE_CLASS_WIDGET_READER_INFO - - SliderReader(); - virtual ~SliderReader(); - - static SliderReader* getInstance(); - static void purge(); - - virtual void setPropsFromJsonDictionary(ui::Widget* widget, const rapidjson::Value& options); -}; - -NS_CC_EXT_END - -#endif /* defined(__TestCpp__SliderReader__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/TextFieldReader/TextFieldReader.h b/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/TextFieldReader/TextFieldReader.h deleted file mode 100644 index 28fa6fd..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/TextFieldReader/TextFieldReader.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __TestCpp__TextFieldReader__ -#define __TestCpp__TextFieldReader__ - -#include "../WidgetReader.h" - -NS_CC_EXT_BEGIN - -class TextFieldReader : public WidgetReader -{ -public: - DECLARE_CLASS_WIDGET_READER_INFO - - TextFieldReader(); - virtual ~TextFieldReader(); - - static TextFieldReader* getInstance(); - static void purge(); - - virtual void setPropsFromJsonDictionary(ui::Widget* widget, const rapidjson::Value& options); -}; - -NS_CC_EXT_END - -#endif /* defined(__TestCpp__TextFieldReader__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/WidgetReader.h b/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/WidgetReader.h deleted file mode 100644 index df3ce84..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/WidgetReader.h +++ /dev/null @@ -1,52 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __TestCpp__WidgetReader__ -#define __TestCpp__WidgetReader__ - -#include "WidgetReaderProtocol.h" -#include "../GUIReader.h" -#include "../../GUI/System/GUIDefine.h" -#include "../../GUI/BaseClasses/UIWidget.h" - -NS_CC_EXT_BEGIN - -class WidgetReader : public CCObject, public WidgetReaderProtocol -{ -public: - DECLARE_CLASS_WIDGET_READER_INFO - - WidgetReader(); - virtual ~WidgetReader(); - - static WidgetReader* getInstance(); - static void purge(); - - virtual void setPropsFromJsonDictionary(ui::Widget* widget, const rapidjson::Value& options); - virtual void setColorPropsFromJsonDictionary(ui::Widget* widget, const rapidjson::Value& options); -}; - -NS_CC_EXT_END - -#endif /* defined(__TestCpp__WidgetReader__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/WidgetReaderProtocol.h b/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/WidgetReaderProtocol.h deleted file mode 100644 index ee7bb9f..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Reader/WidgetReader/WidgetReaderProtocol.h +++ /dev/null @@ -1,48 +0,0 @@ -/**************************************************************************** - Copyright (c) 2014 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __TestCpp__WidgetReaderProtocol__ -#define __TestCpp__WidgetReaderProtocol__ - -#include "../../Json/DictionaryHelper.h" - -namespace cocos2d -{ - namespace ui - { - class Widget; - } -} - -NS_CC_EXT_BEGIN - -class WidgetReaderProtocol -{ -public: - virtual void setPropsFromJsonDictionary(ui::Widget* widget, const rapidjson::Value& options) = 0; -}; - -NS_CC_EXT_END - -#endif /* defined(__TestCpp__WidgetReaderProtocol__) */ diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Trigger/ObjectFactory.h b/cappuccino-sdk/incl/extensions/CocoStudio/Trigger/ObjectFactory.h deleted file mode 100644 index 3bda1e9..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Trigger/ObjectFactory.h +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __TRIGGERFACTORY_H__ -#define __TRIGGERFACTORY_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include -#include - -namespace cocos2d -{ - namespace ui - { - class Widget; - } - namespace extension - { - class WidgetReaderProtocol; - } -} - - -NS_CC_EXT_BEGIN - -class ObjectFactory -{ -public: - typedef cocos2d::CCObject* (*Instance)(void); - struct TInfo - { - TInfo(void); - TInfo(const std::string& type, Instance ins = NULL); - TInfo(const TInfo &t); - ~TInfo(void); - TInfo& operator= (const TInfo &t); - std::string _class; - Instance _fun; - }; - typedef std::map FactoryMap; - ObjectFactory(void); - virtual ~ObjectFactory(void); - static ObjectFactory* getInstance(); - void destroyInstance(); - CCObject* createObject(std::string name); - CCComponent* createComponent(std::string name); - ui::Widget* createGUI(std::string name); - WidgetReaderProtocol* createWidgetReaderProtocol(std::string name); - void registerType(const TInfo &t); - void removeAll(); -private: - static ObjectFactory *_sharedFactory; - FactoryMap _typeMap; -}; - - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Trigger/TriggerBase.h b/cappuccino-sdk/incl/extensions/CocoStudio/Trigger/TriggerBase.h deleted file mode 100644 index c9fa19f..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Trigger/TriggerBase.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __TRIGGEREVENT_H__ -#define __TRIGGEREVENT_H__ - -#include "cocos2d.h" -#include "cocos-ext.h" -#include "ExtensionMacros.h" -#include "ObjectFactory.h" -#include "TriggerObj.h" -#include "TriggerMng.h" - -NS_CC_EXT_BEGIN - -#define DECLARE_CLASS_INFO \ - public: \ - static cocos2d::extension::ObjectFactory::TInfo Type; \ - static cocos2d::CCObject* createInstance(void); \ - -#define IMPLEMENT_CLASS_INFO(className) \ - cocos2d::CCObject* className::createInstance(void) \ - { \ - return new className; \ - } \ - cocos2d::extension::ObjectFactory::TInfo className::Type(#className, &className::createInstance); \ - - -void sendEvent(unsigned int event); - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Trigger/TriggerMng.h b/cappuccino-sdk/incl/extensions/CocoStudio/Trigger/TriggerMng.h deleted file mode 100644 index df7904d..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Trigger/TriggerMng.h +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __TRIGGERMNG_H__ -#define __TRIGGERMNG_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include "../Json/DictionaryHelper.h" -#include "../Armature/CCArmature.h" - -NS_CC_EXT_BEGIN - -class TriggerObj; - -class ArmatureMovementDispatcher : public CCObject -{ -public: - ArmatureMovementDispatcher(void); - ~ArmatureMovementDispatcher(void); -public: - void addAnimationEventCallBack(CCObject*pTarget, SEL_MovementEventCallFunc mecf); - void removeAnnimationEventCallBack(CCObject*pTarget, SEL_MovementEventCallFunc mecf); - void animationEvent(cocos2d::extension::CCArmature *armature, cocos2d::extension::MovementEventType movementType, const char *movementID); - std::map *_mapEventAnimation; - -}; - -class TriggerMng -{ -public: - TriggerMng(void); - virtual ~TriggerMng(void); - -public: - static TriggerMng* getInstance(); - static const char* triggerMngVersion(); - void destroyInstance(); - -public: - void parse(const rapidjson::Value &root); - void removeAll(void); - CCArray* get(unsigned int event) const; - TriggerObj* getTriggerObj(unsigned int id) const; - bool add(unsigned int event, TriggerObj *pObj); - bool remove(unsigned int event); - bool remove(unsigned int event, TriggerObj *pObj); - bool removeTriggerObj(unsigned int id); - bool isEmpty(void) const; - void addArmatureMovementCallBack(CCArmature *pAr, CCObject *pTarget, SEL_MovementEventCallFunc mecf); - void removeArmatureMovementCallBack(CCArmature *pAr, CCObject *pTarget, SEL_MovementEventCallFunc mecf); - void removeArmatureAllMovementCallBack(CCArmature *pAr); - void removeAllArmatureMovementCallBack(); -private: - void alloc(void); -private: - CCDictionary *_eventTriggers; - static TriggerMng *_sharedTriggerMng; - CCDictionary *_triggerObjs; - std::map *_movementDispatches; -}; - -NS_CC_EXT_END - -#endif diff --git a/cappuccino-sdk/incl/extensions/CocoStudio/Trigger/TriggerObj.h b/cappuccino-sdk/incl/extensions/CocoStudio/Trigger/TriggerObj.h deleted file mode 100644 index 6cdafcc..0000000 --- a/cappuccino-sdk/incl/extensions/CocoStudio/Trigger/TriggerObj.h +++ /dev/null @@ -1,89 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __TRIGGEROBJ_H__ -#define __TRIGGEROBJ_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include "../Json/DictionaryHelper.h" -#include - -NS_CC_EXT_BEGIN - - -class BaseTriggerCondition : public CCObject -{ -protected: - BaseTriggerCondition(void); -public: - virtual ~BaseTriggerCondition(void); - virtual bool init(); - virtual bool detect(); - virtual void serialize(const rapidjson::Value &val); - virtual void removeAll(); -}; - -class BaseTriggerAction : public CCObject -{ -protected: - BaseTriggerAction(void); -public: - virtual ~BaseTriggerAction(void); - virtual bool init(); - virtual void done(); - virtual void serialize(const rapidjson::Value &val); - virtual void removeAll(); -}; - - -class TriggerObj : public CCObject -{ -public: - TriggerObj(void); - virtual ~TriggerObj(void); - virtual bool init(); - static TriggerObj* create(void); - - virtual bool detect(); - virtual void done(); - virtual void removeAll(); - virtual void serialize(const rapidjson::Value &val); - unsigned int getId(); - void setEnable(bool bEnable); - std::vector& getEvents(); - -private: - CCArray *_cons; - CCArray *_acts; - unsigned int _id; - bool _bEnable; - std::vector _vInt; -}; - -NS_CC_EXT_END - -#endif - - diff --git a/cappuccino-sdk/incl/extensions/ExtensionMacros.h b/cappuccino-sdk/incl/extensions/ExtensionMacros.h deleted file mode 100644 index 618a1f5..0000000 --- a/cappuccino-sdk/incl/extensions/ExtensionMacros.h +++ /dev/null @@ -1,34 +0,0 @@ -/**************************************************************************** - Copyright (c) 2012 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __EXTENSIONMARCROS_H__ -#define __EXTENSIONMARCROS_H__ - -#define NS_CC_EXT_BEGIN namespace cocos2d { namespace extension { -#define NS_CC_EXT_END }} -#define USING_NS_CC_EXT using namespace cocos2d::extension - - -#endif /* __EXTENSIONMARCROS_H__ */ - diff --git a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControl.h b/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControl.h deleted file mode 100644 index b843504..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControl.h +++ /dev/null @@ -1,292 +0,0 @@ -/* - * Copyright (c) 2012 cocos2d-x.org - * http://www.cocos2d-x.org - * - * Copyright 2011 Yannick Loriot. - * http://yannickloriot.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - * Converted to c++ / cocos2d-x by Angus C - */ - - -#ifndef __CCCONTROL_H__ -#define __CCCONTROL_H__ - -#include "CCInvocation.h" -#include "CCControlUtils.h" -#include "cocos2d.h" - -NS_CC_EXT_BEGIN - -class CCInvocation; - -/** - * @addtogroup GUI - * @{ - * @addtogroup control_extension - * @{ - */ - -/** Number of kinds of control event. */ -#define kControlEventTotalNumber 9 - -/** Kinds of possible events for the control objects. */ -enum -{ - CCControlEventTouchDown = 1 << 0, // A touch-down event in the control. - CCControlEventTouchDragInside = 1 << 1, // An event where a finger is dragged inside the bounds of the control. - CCControlEventTouchDragOutside = 1 << 2, // An event where a finger is dragged just outside the bounds of the control. - CCControlEventTouchDragEnter = 1 << 3, // An event where a finger is dragged into the bounds of the control. - CCControlEventTouchDragExit = 1 << 4, // An event where a finger is dragged from within a control to outside its bounds. - CCControlEventTouchUpInside = 1 << 5, // A touch-up event in the control where the finger is inside the bounds of the control. - CCControlEventTouchUpOutside = 1 << 6, // A touch-up event in the control where the finger is outside the bounds of the control. - CCControlEventTouchCancel = 1 << 7, // A system event canceling the current touches for the control. - CCControlEventValueChanged = 1 << 8 // A touch dragging or otherwise manipulating a control, causing it to emit a series of different values. -}; -typedef unsigned int CCControlEvent; - -/** The possible state for a control. */ -enum -{ - CCControlStateNormal = 1 << 0, // The normal, or default state of a control¡ªthat is, enabled but neither selected nor highlighted. - CCControlStateHighlighted = 1 << 1, // Highlighted state of a control. A control enters this state when a touch down, drag inside or drag enter is performed. You can retrieve and set this value through the highlighted property. - CCControlStateDisabled = 1 << 2, // Disabled state of a control. This state indicates that the control is currently disabled. You can retrieve and set this value through the enabled property. - CCControlStateSelected = 1 << 3 // Selected state of a control. This state indicates that the control is currently selected. You can retrieve and set this value through the selected property. -}; -typedef unsigned int CCControlState; - -/* - * @class - * CCControl is inspired by the UIControl API class from the UIKit library of - * CocoaTouch. It provides a base class for control CCSprites such as CCButton - * or CCSlider that convey user intent to the application. - * - * The goal of CCControl is to define an interface and base implementation for - * preparing action messages and initially dispatching them to their targets when - * certain events occur. - * - * To use the CCControl you have to subclass it. - */ -class CCControl : public CCLayerRGBA -{ - - //CCRGBAProtocol - bool m_bIsOpacityModifyRGB; - - /** The current control state constant. */ - CC_SYNTHESIZE_READONLY(CCControlState, m_eState, State); - - /** True if all of the controls parents are visible */ -protected: - bool m_hasVisibleParents; - -public: - /** Tells whether the control is enabled. */ - virtual void setEnabled(bool bEnabled); - virtual bool isEnabled(); - /** A Boolean value that determines the control selected state. */ - virtual void setSelected(bool bSelected); - virtual bool isSelected(); - /** A Boolean value that determines whether the control is highlighted. */ - virtual void setHighlighted(bool bHighlighted); - virtual bool isHighlighted(); - bool hasVisibleParents(); - /** - * Updates the control layout using its current internal state. - */ - virtual void needsLayout(); - - virtual bool isOpacityModifyRGB(); - virtual void setOpacityModifyRGB(bool bOpacityModifyRGB); - -protected: - bool m_bEnabled; - bool m_bSelected; - bool m_bHighlighted; - - /** - * Table of connection between the CCControlEvents and their associated - * target-actions pairs. For each CCButtonEvents a list of NSInvocation - * (which contains the target-action pair) is linked. - */ - CCDictionary* m_pDispatchTable; - -public: - /** - * @js ctor - */ - CCControl(); - virtual bool init(void); - /** - * @js NA - * @lua NA - */ - virtual ~CCControl(); - - /** - * @js NA - * @lua NA - */ - virtual void onEnter(); - /** - * @js NA - * @lua NA - */ - virtual void onExit(); - virtual void registerWithTouchDispatcher(); - - /** - * Sends action messages for the given control events. - * - * @param controlEvents A bitmask whose set flags specify the control events for - * which action messages are sent. See "CCControlEvent" for bitmask constants. - */ - virtual void sendActionsForControlEvents(CCControlEvent controlEvents); - - /** - * Adds a target and action for a particular event (or events) to an internal - * dispatch table. - * The action message may optionnaly include the sender and the event as - * parameters, in that order. - * When you call this method, target is not retained. - * - * @param target The target object that is, the object to which the action - * message is sent. It cannot be nil. The target is not retained. - * @param action A selector identifying an action message. It cannot be NULL. - * @param controlEvents A bitmask specifying the control events for which the - * action message is sent. See "CCControlEvent" for bitmask constants. - */ - virtual void addTargetWithActionForControlEvents(CCObject* target, SEL_CCControlHandler action, CCControlEvent controlEvents); - - /** - * Removes a target and action for a particular event (or events) from an - * internal dispatch table. - * - * @param target The target object—that is, the object to which the action - * message is sent. Pass nil to remove all targets paired with action and the - * specified control events. - * @param action A selector identifying an action message. Pass NULL to remove - * all action messages paired with target. - * @param controlEvents A bitmask specifying the control events associated with - * target and action. See "CCControlEvent" for bitmask constants. - */ - virtual void removeTargetWithActionForControlEvents(CCObject* target, SEL_CCControlHandler action, CCControlEvent controlEvents); - - /** - * Returns a point corresponding to the touh location converted into the - * control space coordinates. - * @param touch A CCTouch object that represents a touch. - */ - virtual CCPoint getTouchLocation(CCTouch* touch); - - - /** - * Returns a boolean value that indicates whether a touch is inside the bounds - * of the receiver. The given touch must be relative to the world. - * - * @param touch A CCTouch object that represents a touch. - * - * @return YES whether a touch is inside the receiver¡¯s rect. - */ - virtual bool isTouchInside(CCTouch * touch); - - -protected: - /** - * Returns an CCInvocation object able to construct messages using a given - * target-action pair. (The invocation may optionnaly include the sender and - * the event as parameters, in that order) - * - * @param target The target object. - * @param action A selector identifying an action message. - * @param controlEvent A control events for which the action message is sent. - * See "CCControlEvent" for constants. - * - * @return an CCInvocation object able to construct messages using a given - * target-action pair. - */ - CCInvocation* invocationWithTargetAndActionForControlEvent(CCObject* target, SEL_CCControlHandler action, CCControlEvent controlEvent); - - - - /** - * Returns the CCInvocation list for the given control event. If the list does - * not exist, it'll create an empty array before returning it. - * - * @param controlEvent A control events for which the action message is sent. - * See "CCControlEvent" for constants. - * - * @return the CCInvocation list for the given control event. - */ - // - CCArray* dispatchListforControlEvent(CCControlEvent controlEvent); - /** - * Adds a target and action for a particular event to an internal dispatch - * table. - * The action message may optionnaly include the sender and the event as - * parameters, in that order. - * When you call this method, target is not retained. - * - * @param target The target object¡ªthat is, the object to which the action - * message is sent. It cannot be nil. The target is not retained. - * @param action A selector identifying an action message. It cannot be NULL. - * @param controlEvent A control event for which the action message is sent. - * See "CCControlEvent" for constants. - */ - void addTargetWithActionForControlEvent(CCObject* target, SEL_CCControlHandler action, CCControlEvent controlEvent); - - /** - * Removes a target and action for a particular event from an internal dispatch - * table. - * - * @param target The target object¡ªthat is, the object to which the action - * message is sent. Pass nil to remove all targets paired with action and the - * specified control events. - * @param action A selector identifying an action message. Pass NULL to remove - * all action messages paired with target. - * @param controlEvent A control event for which the action message is sent. - * See "CCControlEvent" for constants. - */ - void removeTargetWithActionForControlEvent(CCObject* target, SEL_CCControlHandler action, CCControlEvent controlEvent); - - static CCControl* create(); -public: - /** - * @js NA - */ - void addHandleOfControlEvent(int nFunID,CCControlEvent controlEvent); - /** - * @js NA - */ - void removeHandleOfControlEvent(CCControlEvent controlEvent); -private: - int getHandleOfControlEvent(CCControlEvent controlEvent); -private: - std::map m_mapHandleOfControlEvent; -}; - -// end of GUI group -/// @} -/// @} - -NS_CC_EXT_END - -#endif \ No newline at end of file diff --git a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlButton.h b/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlButton.h deleted file mode 100644 index 046f87a..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlButton.h +++ /dev/null @@ -1,253 +0,0 @@ -/* - * Copyright (c) 2012 cocos2d-x.org - * http://www.cocos2d-x.org - * - * Copyright 2011 Yannick Loriot. All rights reserved. - * http://yannickloriot.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - * Converted to c++ / cocos2d-x by Angus C - */ - - -#ifndef __CCCONTROL_BUTTON_H__ -#define __CCCONTROL_BUTTON_H__ - -#include "CCControl.h" -#include "CCInvocation.h" -#include "CCScale9Sprite.h" - -NS_CC_EXT_BEGIN - -/* Define the button margin for Left/Right edge */ -#define CCControlButtonMarginLR 8 // px -/* Define the button margin for Top/Bottom edge */ -#define CCControlButtonMarginTB 2 // px - - -/** - * @addtogroup GUI - * @{ - * @addtogroup control_extension - * @{ - */ - -/** @class CCControlButton Button control for Cocos2D. */ -class CCControlButton : public CCControl -{ -public: - CCControlButton(); - virtual ~CCControlButton(); - virtual void needsLayout(void); - - virtual void setEnabled(bool enabled); - virtual void setSelected(bool enabled); - virtual void setHighlighted(bool enabled); -protected: - // CCRGBAProtocol - //bool m_bIsOpacityModifyRGB; - - /** The current title that is displayed on the button. */ - CC_SYNTHESIZE_READONLY(CCString*, m_currentTitle, CurrentTitle); - - /** The current color used to display the title. */ - CC_SYNTHESIZE_READONLY_PASS_BY_REF(ccColor3B, m_currentTitleColor, CurrentTitleColor); - - /** Adjust the background image. YES by default. If the property is set to NO, the - background will use the prefered size of the background image. */ - bool doesAdjustBackgroundImage(); - void setAdjustBackgroundImage(bool adjustBackgroundImage); - bool m_doesAdjustBackgroundImage; - - /** The current title label. */ - CC_SYNTHESIZE_RETAIN(CCNode*, m_titleLabel, TitleLabel); - - /** The current background sprite. */ - CC_SYNTHESIZE_RETAIN(CCScale9Sprite*, m_backgroundSprite, BackgroundSprite); - - /** The prefered size of the button, if label is larger it will be expanded. */ - CC_PROPERTY(CCSize, m_preferredSize, PreferredSize); - - /** Adjust the button zooming on touchdown. Default value is YES. */ - CC_PROPERTY(bool, m_zoomOnTouchDown, ZoomOnTouchDown); - - CC_PROPERTY(CCPoint, m_labelAnchorPoint, LabelAnchorPoint); - - /* Override setter to affect a background sprite too */ - virtual GLubyte getOpacity(void); - virtual void setOpacity(GLubyte var); - virtual const ccColor3B& getColor(void); - virtual void setColor(const ccColor3B&); - - /** Flag to know if the button is currently pushed. */ -protected: - bool m_isPushed; - bool m_bParentInited; -public: - bool isPushed() { return m_isPushed; } - - // - CC_SYNTHESIZE_RETAIN(CCDictionary*, m_titleDispatchTable, TitleDispatchTable); - // - CC_SYNTHESIZE_RETAIN(CCDictionary*, m_titleColorDispatchTable, TitleColorDispatchTable); - // - CC_SYNTHESIZE_RETAIN(CCDictionary*, m_titleLabelDispatchTable, TitleLabelDispatchTable); - // - CC_SYNTHESIZE_RETAIN(CCDictionary*, m_backgroundSpriteDispatchTable, BackgroundSpriteDispatchTable); - - /* Define the button margin for Top/Bottom edge */ - CC_SYNTHESIZE_READONLY(int, m_marginV, VerticalMargin); - /* Define the button margin for Left/Right edge */ - CC_SYNTHESIZE_READONLY(int, m_marginH, HorizontalOrigin); - //set the margins at once (so we only have to do one call of needsLayout) - virtual void setMargins(int marginH, int marginV); - - -public: - virtual bool init(); - virtual bool initWithLabelAndBackgroundSprite(CCNode* label, CCScale9Sprite* backgroundSprite); - - static CCControlButton* create(CCNode* label, CCScale9Sprite* backgroundSprite); - - virtual bool initWithTitleAndFontNameAndFontSize(std::string title, const char * fontName, float fontSize); - - static CCControlButton* create(std::string title, const char * fontName, float fontSize); - - virtual bool initWithBackgroundSprite(CCScale9Sprite* sprite); - - static CCControlButton* create(CCScale9Sprite* sprite); - - //events - virtual bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent); - - /** - * Returns the title used for a state. - * - * @param state The state that uses the title. Possible values are described in - * "CCControlState". - * - * @return The title for the specified state. - */ - virtual CCString* getTitleForState(CCControlState state); - - /** - * Sets the title string to use for the specified state. - * If a property is not specified for a state, the default is to use - * the CCButtonStateNormal value. - * - * @param title The title string to use for the specified state. - * @param state The state that uses the specified title. The values are described - * in "CCControlState". - */ - virtual void setTitleForState(CCString* title, CCControlState state); - - /** - * Returns the title color used for a state. - * - * @param state The state that uses the specified color. The values are described - * in "CCControlState". - * - * @return The color of the title for the specified state. - */ - - virtual const ccColor3B getTitleColorForState(CCControlState state); - - /** - * Sets the color of the title to use for the specified state. - * - * @param color The color of the title to use for the specified state. - * @param state The state that uses the specified color. The values are described - * in "CCControlState". - */ - virtual void setTitleColorForState(ccColor3B color, CCControlState state); - - /** - * Returns the title label used for a state. - * - * @param state The state that uses the title label. Possible values are described - * in "CCControlState". - */ - virtual CCNode* getTitleLabelForState(CCControlState state); - - /** - * Sets the title label to use for the specified state. - * If a property is not specified for a state, the default is to use - * the CCButtonStateNormal value. - * - * @param title The title label to use for the specified state. - * @param state The state that uses the specified title. The values are described - * in "CCControlState". - */ - virtual void setTitleLabelForState(CCNode* label, CCControlState state); - - virtual void setTitleTTFForState(const char * fntFile, CCControlState state); - virtual const char * getTitleTTFForState(CCControlState state); - - virtual void setTitleTTFSizeForState(float size, CCControlState state); - virtual float getTitleTTFSizeForState(CCControlState state); - - /** - * Sets the font of the label, changes the label to a CCLabelBMFont if neccessary. - * @param fntFile The name of the font to change to - * @param state The state that uses the specified fntFile. The values are described - * in "CCControlState". - */ - virtual void setTitleBMFontForState(const char * fntFile, CCControlState state); - virtual const char * getTitleBMFontForState(CCControlState state); - - /** - * Returns the background sprite used for a state. - * - * @param state The state that uses the background sprite. Possible values are - * described in "CCControlState". - */ - virtual CCScale9Sprite* getBackgroundSpriteForState(CCControlState state); - - /** - * Sets the background sprite to use for the specified button state. - * - * @param sprite The background sprite to use for the specified state. - * @param state The state that uses the specified image. The values are described - * in "CCControlState". - */ - virtual void setBackgroundSpriteForState(CCScale9Sprite* sprite, CCControlState state); - - /** - * Sets the background spriteFrame to use for the specified button state. - * - * @param spriteFrame The background spriteFrame to use for the specified state. - * @param state The state that uses the specified image. The values are described - * in "CCControlState". - */ - virtual void setBackgroundSpriteFrameForState(CCSpriteFrame * spriteFrame, CCControlState state); - - static CCControlButton* create(); -}; - -// end of GUI group -/// @} -/// @} - -NS_CC_EXT_END - -#endif \ No newline at end of file diff --git a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlColourPicker.h b/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlColourPicker.h deleted file mode 100644 index b9445f3..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlColourPicker.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2012 cocos2d-x.org - * http://www.cocos2d-x.org - * - * Copyright 2012 Stewart Hamilton-Arrandale. - * http://creativewax.co.uk - * - * Modified by Yannick Loriot. - * http://yannickloriot.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - * Converted to c++ / cocos2d-x by Angus C - */ - -#ifndef __CCCONTROL_COLOUR_PICKER_H__ -#define __CCCONTROL_COLOUR_PICKER_H__ - - -#include "CCControl.h" -#include "CCControlUtils.h" -#include "CCControlHuePicker.h" -#include "CCControlSaturationBrightnessPicker.h" - -NS_CC_EXT_BEGIN - -/** - * @addtogroup GUI - * @{ - * @addtogroup control_extension - * @{ - */ - -class CCControlColourPicker: public CCControl -{ -public: - CCControlColourPicker(); - virtual ~CCControlColourPicker(); - virtual void setColor(const ccColor3B& colorValue); - virtual void setEnabled(bool bEnabled); -protected: - HSV m_hsv; - CC_SYNTHESIZE_RETAIN(CCControlSaturationBrightnessPicker*, m_colourPicker, colourPicker) - CC_SYNTHESIZE_RETAIN(CCControlHuePicker*, m_huePicker, HuePicker) - CC_SYNTHESIZE_RETAIN(CCSprite*, m_background, Background) - -public: - - static CCControlColourPicker* create(); - - virtual bool init(); - //virtual ~CCControlColourPicker(); - void hueSliderValueChanged(CCObject * sender, CCControlEvent controlEvent); - void colourSliderValueChanged(CCObject * sender, CCControlEvent controlEvent); - -protected: - void updateControlPicker(); - void updateHueAndControlPicker(); - virtual bool ccTouchBegan(CCTouch* touch, CCEvent* pEvent); - -}; - -// end of GUI group -/// @} -/// @} - -NS_CC_EXT_END - -#endif \ No newline at end of file diff --git a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlExtensions.h b/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlExtensions.h deleted file mode 100644 index 1ae106f..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlExtensions.h +++ /dev/null @@ -1,37 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCCONTROL_EXTENSIONS_H__ -#define __CCCONTROL_EXTENSIONS_H__ - -#include "CCScale9Sprite.h" -#include "CCControl.h" -#include "CCControlButton.h" -#include "CCControlColourPicker.h" -#include "CCControlPotentiometer.h" -#include "CCControlSlider.h" -#include "CCControlStepper.h" -#include "CCControlSwitch.h" - -#endif \ No newline at end of file diff --git a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlHuePicker.h b/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlHuePicker.h deleted file mode 100644 index 9466894..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlHuePicker.h +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2012 cocos2d-x.org - * http://www.cocos2d-x.org - * - * Copyright 2012 Stewart Hamilton-Arrandale. - * http://creativewax.co.uk - * - * Modified by Yannick Loriot. - * http://yannickloriot.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - * Converted to c++ / cocos2d-x by Angus C - */ - - -#ifndef __CCCONTROL_HUE_PICKER_H__ -#define __CCCONTROL_HUE_PICKER_H__ - -#include "CCControl.h" -#include "CCInvocation.h" - -NS_CC_EXT_BEGIN - -/** - * @addtogroup GUI - * @{ - * @addtogroup control_extension - * @{ - */ - -class CCControlHuePicker : public CCControl -{ - //maunally put in the setters - CC_SYNTHESIZE_READONLY(float, m_hue, Hue); - virtual void setHue(float val); - CC_SYNTHESIZE_READONLY(float, m_huePercentage, HuePercentage); - virtual void setHuePercentage(float val); - - - //not sure if these need to be there actually. I suppose someone might want to access the sprite? - CC_SYNTHESIZE_RETAIN(CCSprite*, m_background, Background); - CC_SYNTHESIZE_RETAIN(CCSprite*, m_slider, Slider); - CC_SYNTHESIZE_READONLY(CCPoint, m_startPos, StartPos); - -public: - CCControlHuePicker(); - virtual ~CCControlHuePicker(); - virtual bool initWithTargetAndPos(CCNode* target, CCPoint pos); - - static CCControlHuePicker* create(CCNode* target, CCPoint pos); - virtual void setEnabled(bool enabled); -protected: - void updateSliderPosition(CCPoint location); - bool checkSliderPosition(CCPoint location); - - virtual bool ccTouchBegan(CCTouch* touch, CCEvent* pEvent); - virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent); -}; - -// end of GUI group -/// @} -/// @} - -NS_CC_EXT_END - -#endif \ No newline at end of file diff --git a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlPotentiometer.h b/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlPotentiometer.h deleted file mode 100644 index 98a6d4d..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlPotentiometer.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright (c) 2012 cocos2d-x.org - * http://www.cocos2d-x.org - * - * Copyright 2012 Yannick Loriot. All rights reserved. - * http://yannickloriot.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - */ -#ifndef __CCCONTROLPOTENTIOMETER_H__ -#define __CCCONTROLPOTENTIOMETER_H__ - -#include "CCControl.h" - -NS_CC_EXT_BEGIN - -/** - * @addtogroup GUI - * @{ - * @addtogroup control_extension - * @{ - */ - -/** @class CCControlPotentiometer Potentiometer control for Cocos2D. */ -class CCControlPotentiometer : public CCControl -{ -public: - CCControlPotentiometer(); - virtual ~CCControlPotentiometer(); - /** - * Creates potentiometer with a track filename and a progress filename. - */ - static CCControlPotentiometer* create(const char* backgroundFile, const char* progressFile, const char* thumbFile); - - /** - * Initializes a potentiometer with a track sprite and a progress bar. - * - * @param trackSprite CCSprite, that is used as a background. - * @param progressSprite CCProgressTimer, that is used as a progress bar. - */ - bool initWithTrackSprite_ProgressTimer_ThumbSprite(CCSprite* trackSprite, CCProgressTimer* progressTimer, CCSprite* thumbSprite); - void setValue(float value); - float getValue(); - - void setMinimumValue(float minimumValue); - float getMinimumValue(); - - void setMaximumValue(float maximumValue); - float getMaximumValue(); - - void setEnabled(bool enabled); - - virtual bool isTouchInside(CCTouch * touch); - - virtual bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent); - -protected: - CC_SYNTHESIZE_RETAIN(CCSprite*, m_pThumbSprite, ThumbSprite) - CC_SYNTHESIZE_RETAIN(CCProgressTimer*, m_pProgressTimer, ProgressTimer) - CC_SYNTHESIZE(CCPoint, m_tPreviousLocation, PreviousLocation) - /** Contains the receiver’s current value. */ - float m_fValue; - /** Contains the minimum value of the receiver. - * The default value of this property is 0.0. */ - float m_fMinimumValue; - /** Contains the maximum value of the receiver. - * The default value of this property is 1.0. */ - float m_fMaximumValue; - /** Factorize the event dispath into these methods. */ - void potentiometerBegan(CCPoint location); - void potentiometerMoved(CCPoint location); - void potentiometerEnded(CCPoint location); - - /** Returns the distance between the point1 and point2. */ - float distanceBetweenPointAndPoint(CCPoint point1, CCPoint point2); - /** Returns the angle in degree between line1 and line2. */ - float angleInDegreesBetweenLineFromPoint_toPoint_toLineFromPoint_toPoint( - CCPoint beginLineA, - CCPoint endLineA, - CCPoint beginLineB, - CCPoint endLineB); - -}; - -// end of GUI group -/// @} -/// @} - -NS_CC_EXT_END - -#endif /* __CCCONTROLPOTENTIOMETER_H__ */ diff --git a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlSaturationBrightnessPicker.h b/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlSaturationBrightnessPicker.h deleted file mode 100644 index 9e0a5de..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlSaturationBrightnessPicker.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) 2012 cocos2d-x.org - * http://www.cocos2d-x.org - * - * Copyright 2012 Stewart Hamilton-Arrandale. - * http://creativewax.co.uk - * - * Modified by Yannick Loriot. - * http://yannickloriot.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - * Converted to c++ / cocos2d-x by Angus C - */ - - -#ifndef __CCCONTROL_SATURATION_PICKER_H__ -#define __CCCONTROL_SATURATION_PICKER_H__ - -#include "CCControl.h" -#include "CCInvocation.h" - -NS_CC_EXT_BEGIN - -/** - * @addtogroup GUI - * @{ - * @addtogroup control_extension - * @{ - */ - -class CCControlSaturationBrightnessPicker : public CCControl -{ - /** Contains the receiver¡¯s current saturation value. */ - CC_SYNTHESIZE_READONLY(float, m_saturation, Saturation); - /** Contains the receiver¡¯s current brightness value. */ - CC_SYNTHESIZE_READONLY(float, m_brightness, Brightness); - - //not sure if these need to be there actually. I suppose someone might want to access the sprite? - CC_SYNTHESIZE_READONLY(CCSprite*, m_background, Background); - CC_SYNTHESIZE_READONLY(CCSprite*, m_overlay, Overlay); - CC_SYNTHESIZE_READONLY(CCSprite*, m_shadow, Shadow); - CC_SYNTHESIZE_READONLY(CCSprite*, m_slider, Slider); - CC_SYNTHESIZE_READONLY(CCPoint, m_startPos, StartPos); - -protected: - int boxPos; - int boxSize; - -public: - CCControlSaturationBrightnessPicker(); - virtual ~CCControlSaturationBrightnessPicker(); - virtual bool initWithTargetAndPos(CCNode* target, CCPoint pos); - - static CCControlSaturationBrightnessPicker* create(CCNode* target, CCPoint pos); - - virtual void setEnabled(bool enabled); - virtual void updateWithHSV(HSV hsv); - virtual void updateDraggerWithHSV(HSV hsv); - -protected: - void updateSliderPosition(CCPoint location); - bool checkSliderPosition(CCPoint location); - - virtual bool ccTouchBegan(CCTouch* touch, CCEvent* pEvent); - virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent); -}; - -// end of GUI group -/// @} -/// @} - -NS_CC_EXT_END - -#endif \ No newline at end of file diff --git a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlSlider.h b/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlSlider.h deleted file mode 100644 index 446d2cf..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlSlider.h +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2012 cocos2d-x.org - * http://www.cocos2d-x.org - * - * Copyright 2011 Yannick Loriot. All rights reserved. - * http://yannickloriot.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - * Converted to c++ / cocos2d-x by Angus C - */ - - -#ifndef __CCCONTROL_SLIDER_H__ -#define __CCCONTROL_SLIDER_H__ - -#include "CCControl.h" -#include "CCInvocation.h" - -NS_CC_EXT_BEGIN - -/** - * @addtogroup GUI - * @{ - * @addtogroup control_extension - * @{ - */ - -class CCControlSlider: public CCControl -{ - //maunally put in the setters - /** Contains the receiver¡¯s current value. */ - CC_SYNTHESIZE_READONLY(float, m_value, Value); - virtual void setValue(float val); - /** Contains the minimum value of the receiver. - * The default value of this property is 0.0. */ - CC_SYNTHESIZE_READONLY(float, m_minimumValue, MinimumValue); - virtual void setMinimumValue(float val); - /** Contains the maximum value of the receiver. - * The default value of this property is 1.0. */ - CC_SYNTHESIZE_READONLY(float, m_maximumValue, MaximumValue); - virtual void setMaximumValue(float val); - virtual void setEnabled(bool enabled); - virtual bool isTouchInside(CCTouch * touch); - CCPoint locationFromTouch(CCTouch* touch); - - CC_SYNTHESIZE(float, m_minimumAllowedValue, MinimumAllowedValue); - CC_SYNTHESIZE(float, m_maximumAllowedValue, MaximumAllowedValue); - - // maybe this should be read-only - CC_SYNTHESIZE_RETAIN(CCSprite*, m_thumbSprite, ThumbSprite); - CC_SYNTHESIZE_RETAIN(CCSprite*, m_progressSprite, ProgressSprite); - CC_SYNTHESIZE_RETAIN(CCSprite*, m_backgroundSprite, BackgroundSprite); - -public: - CCControlSlider(); - virtual ~CCControlSlider(); - - /** - * Initializes a slider with a background sprite, a progress bar and a thumb - * item. - * - * @param backgroundSprite CCSprite, that is used as a background. - * @param progressSprite CCSprite, that is used as a progress bar. - * @param thumbItem CCSprite, that is used as a thumb. - */ - virtual bool initWithSprites(CCSprite * backgroundSprite, CCSprite* progressSprite, CCSprite* thumbSprite); - - /** - * Creates slider with a background filename, a progress filename and a - * thumb image filename. - */ - static CCControlSlider* create(const char* bgFile, const char* progressFile, const char* thumbFile); - - /** - * Creates a slider with a given background sprite and a progress bar and a - * thumb item. - * - * @see initWithBackgroundSprite:progressSprite:thumbMenuItem: - */ - static CCControlSlider* create(CCSprite * backgroundSprite, CCSprite* pogressSprite, CCSprite* thumbSprite); - - virtual void needsLayout(); -protected: - void sliderBegan(CCPoint location); - void sliderMoved(CCPoint location); - void sliderEnded(CCPoint location); - - virtual bool ccTouchBegan(CCTouch* touch, CCEvent* pEvent); - virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent); - -/** Returns the value for the given location. */ - float valueForLocation(CCPoint location); -}; - -// end of GUI group -/// @} -/// @} - -NS_CC_EXT_END - -#endif \ No newline at end of file diff --git a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlStepper.h b/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlStepper.h deleted file mode 100644 index 662cfc9..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlStepper.h +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright (c) 2012 cocos2d-x.org - * http://www.cocos2d-x.org - * - * Copyright 2012 Yannick Loriot. All rights reserved. - * http://yannickloriot.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - */ - -#ifndef __CCCONTROLSTEPPER_H__ -#define __CCCONTROLSTEPPER_H__ - -#include "CCControl.h" - -NS_CC_EXT_BEGIN - -/** - * @addtogroup GUI - * @{ - * @addtogroup control_extension - * @{ - */ - -typedef enum -{ - kCCControlStepperPartMinus, - kCCControlStepperPartPlus, - kCCControlStepperPartNone, -} CCControlStepperPart; - -class CCControlStepper : public CCControl -{ -public: - CCControlStepper(); - virtual ~CCControlStepper(); - - bool initWithMinusSpriteAndPlusSprite(CCSprite *minusSprite, CCSprite *plusSprite); - static CCControlStepper* create(CCSprite *minusSprite, CCSprite *plusSprite); - virtual void setWraps(bool wraps); - virtual void setMinimumValue(double minimumValue); - virtual void setMaximumValue(double maximumValue); - virtual void setValue(double value); - virtual double getValue(); - virtual void setStepValue(double stepValue); - /** Set the numeric value of the stepper. If send is true, the CCControlEventValueChanged is sent. */ - virtual void setValueWithSendingEvent(double value, bool send); - virtual bool isContinuous(); - void update(float dt); - - //events - virtual bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent); - -protected: - // Weak links to children - CC_SYNTHESIZE_RETAIN(CCSprite*, m_pMinusSprite, MinusSprite) - CC_SYNTHESIZE_RETAIN(CCSprite*, m_pPlusSprite, PlusSprite) - CC_SYNTHESIZE_RETAIN(CCLabelTTF*, m_pMinusLabel, MinusLabel) - CC_SYNTHESIZE_RETAIN(CCLabelTTF*, m_pPlusLabel, PlusLabel) - - /** Update the layout of the stepper with the given touch location. */ - void updateLayoutUsingTouchLocation(CCPoint location); - - /** Start the autorepeat increment/decrement. */ - void startAutorepeat(); - - /** Stop the autorepeat. */ - void stopAutorepeat(); - - /** The numeric value of the stepper. */ - double m_dValue; - /** The continuous vs. noncontinuous state of the stepper. */ - bool m_bContinuous; - /** The automatic vs. nonautomatic repeat state of the stepper. */ - bool m_bAutorepeat; - /** The wrap vs. no-wrap state of the stepper. */ - bool m_bWraps; - /** The lowest possible numeric value for the stepper. */ - double m_dMinimumValue; - /** The highest possible numeric value for the stepper. */ - double m_dMaximumValue; - /** The step, or increment, value for the stepper. */ - double m_dStepValue; - bool m_bTouchInsideFlag; - CCControlStepperPart m_eTouchedPart; - int m_nAutorepeatCount; -}; - -// end of GUI group -/// @} -/// @} - -NS_CC_EXT_END - -#endif /* __CCCONTROLSTEPPER_H__ */ diff --git a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlSwitch.h b/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlSwitch.h deleted file mode 100644 index c2116f1..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlSwitch.h +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2012 cocos2d-x.org - * http://www.cocos2d-x.org - * - * Copyright 2012 Yannick Loriot. All rights reserved. - * http://yannickloriot.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - */ - -#ifndef __CCCONTROLSWITCH_H__ -#define __CCCONTROLSWITCH_H__ - -#include "CCControl.h" - - -namespace cocos2d { class CCSprite; } -namespace cocos2d { class CCLabelTTF; } - -NS_CC_EXT_BEGIN - -class CCControlSwitchSprite; - -/** - * @addtogroup GUI - * @{ - * @addtogroup control_extension - * @{ - */ - -/** @class CCControlSwitch Switch control for Cocos2D. */ -class CCControlSwitch : public CCControl -{ -public: - CCControlSwitch(); - virtual ~CCControlSwitch(); - /** Initializes a switch with a mask sprite, on/off sprites for on/off states and a thumb sprite. */ - bool initWithMaskSprite(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite); - - /** Creates a switch with a mask sprite, on/off sprites for on/off states and a thumb sprite. */ - static CCControlSwitch* create(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite); - - - /** Initializes a switch with a mask sprite, on/off sprites for on/off states, a thumb sprite and an on/off labels. */ - bool initWithMaskSprite(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite, CCLabelTTF* onLabel, CCLabelTTF* offLabel); - - /** Creates a switch with a mask sprite, on/off sprites for on/off states, a thumb sprite and an on/off labels. */ - static CCControlSwitch* create(CCSprite *maskSprite, CCSprite * onSprite, CCSprite * offSprite, CCSprite * thumbSprite, CCLabelTTF* onLabel, CCLabelTTF* offLabel); - - - /** - * Set the state of the switch to On or Off, optionally animating the transition. - * - * @param isOn YES if the switch should be turned to the On position; NO if it - * should be turned to the Off position. If the switch is already in the - * designated position, nothing happens. - * @param animated YES to animate the "flipping" of the switch; otherwise NO. - */ - void setOn(bool isOn, bool animated); - void setOn(bool isOn); - bool isOn(void) { return m_bOn; } - bool hasMoved() { return m_bMoved; } - virtual void setEnabled(bool enabled); - - CCPoint locationFromTouch(CCTouch* touch); - //events - virtual bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent); - -protected: - /** Sprite which represents the view. */ - CCControlSwitchSprite* m_pSwitchSprite; - float m_fInitialTouchXPosition; - - bool m_bMoved; - /** A Boolean value that determines the off/on state of the switch. */ - bool m_bOn; -}; - -// end of GUI group -/// @} -/// @} - -NS_CC_EXT_END - -#endif /* __CCCONTROLSWITCH_H__ */ - diff --git a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlUtils.h b/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlUtils.h deleted file mode 100644 index b383629..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCControlUtils.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2012 cocos2d-x.org - * http://www.cocos2d-x.org - * - * - * Copyright 2012 Stewart Hamilton-Arrandale. - * http://creativewax.co.uk - * - * Modified by Yannick Loriot. - * http://yannickloriot.com - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - * - * Converted to c++ / cocos2d-x by Angus C - */ - -#ifndef __CCCONTROL_UTILS_H__ -#define __CCCONTROL_UTILS_H__ - -#include "sprite_nodes/CCSprite.h" -#include "../../ExtensionMacros.h" - -NS_CC_EXT_BEGIN - -typedef struct -{ - double r; // percent - double g; // percent - double b; // percent - double a; // percent -} RGBA; - -typedef struct -{ - double h; // angle in degrees - double s; // percent - double v; // percent -} HSV; - -/** - * @addtogroup GUI - * @{ - * @addtogroup control_extension - * @{ - */ - -/**helper class to store ccColor3B's in mutable arrays - * @js NA - * @lua NA - **/ -class CCColor3bObject : public CCObject -{ -public: - ccColor3B value; - CCColor3bObject(ccColor3B s_value):value(s_value){} -}; - -class CCControlUtils -{ -public: - static CCSprite* addSpriteToTargetWithPosAndAnchor(const char* spriteName, CCNode * target, CCPoint pos, CCPoint anchor); - static HSV HSVfromRGB(RGBA value); - static RGBA RGBfromHSV(HSV value); - static CCRect CCRectUnion(const CCRect& src1, const CCRect& src2); -}; - -// end of GUI group -/// @} -/// @} - -NS_CC_EXT_END - -#endif \ No newline at end of file diff --git a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCInvocation.h b/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCInvocation.h deleted file mode 100644 index 60f1741..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCInvocation.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * Copyright (c) 2012 cocos2d-x.org - * http://www.cocos2d-x.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - * - * - * Converted to c++ / cocos2d-x by Angus C - */ -/* - * - * Helper class to store targets and selectors (and eventually, params?) in the same CCMutableArray. Basically a very crude form of a NSInvocation - */ -#ifndef __CCINVOCATION_H__ -#define __CCINVOCATION_H__ - -#include "cocoa/CCObject.h" -#include "../../ExtensionMacros.h" - -NS_CC_EXT_BEGIN - -/** - * @addtogroup GUI - * @{ - * @addtogroup control_extension - * @{ - */ - -typedef unsigned int CCControlEvent; - -typedef void (CCObject::*SEL_CCControlHandler)(CCObject*, CCControlEvent); - -#define cccontrol_selector(_SELECTOR) (SEL_CCControlHandler)(&_SELECTOR) - -/** - * @js NA - * @lua NA - */ -class CCInvocation : public CCObject -{ - CC_SYNTHESIZE_READONLY(SEL_CCControlHandler, m_action, Action); - CC_SYNTHESIZE_READONLY(CCObject*, m_target, Target); - CC_SYNTHESIZE_READONLY(CCControlEvent, m_controlEvent, ControlEvent); - -public: - static CCInvocation* create(CCObject* target, SEL_CCControlHandler action, CCControlEvent controlEvent); - CCInvocation(CCObject* target, SEL_CCControlHandler action, CCControlEvent controlEvent); - - void invoke(CCObject* sender); -}; - -// end of GUI group -/// @} -/// @} - -NS_CC_EXT_END - -#endif \ No newline at end of file diff --git a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCScale9Sprite.h b/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCScale9Sprite.h deleted file mode 100644 index 57e7c36..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCControlExtension/CCScale9Sprite.h +++ /dev/null @@ -1,332 +0,0 @@ -/**************************************************************************** -Copyright (c) 2012 cocos2d-x.org - -http://www.cocos2d-x.org - -Created by Jung Sang-Taik on 12. 3. 16.. -Copyright (c) 2012 Neofect. All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __CCScale9Sprite_H__ -#define __CCScale9Sprite_H__ - -#include "cocos2d.h" -#include "../../ExtensionMacros.h" - -NS_CC_EXT_BEGIN - -/** - * @addtogroup GUI - * @{ - * @addtogroup control_extension - * @{ - */ - -/** - * A 9-slice sprite for cocos2d. - * - * 9-slice scaling allows you to specify how scaling is applied - * to specific areas of a sprite. With 9-slice scaling (3x3 grid), - * you can ensure that the sprite does not become distorted when - * scaled. - * - * @see http://yannickloriot.com/library/ios/cccontrolextension/Classes/CCScale9Sprite.html - */ -class CCScale9Sprite : public CCNodeRGBA -{ -public: - CCScale9Sprite(); - virtual ~CCScale9Sprite(); - -public: - /** Original sprite's size. */ - CC_SYNTHESIZE_READONLY(CCSize, m_originalSize, OriginalSize); - /** Prefered sprite's size. By default the prefered size is the original size. */ - - //if the preferredSize component is given as -1, it is ignored - CC_PROPERTY(CCSize, m_preferredSize, PreferredSize); - /** - * The end-cap insets. - * On a non-resizeable sprite, this property is set to CGRectZero; the sprite - * does not use end caps and the entire sprite is subject to stretching. - */ - CC_PROPERTY(CCRect, m_capInsets, CapInsets); - /** Sets the left side inset */ - CC_PROPERTY(float, m_insetLeft, InsetLeft); - /** Sets the top side inset */ - CC_PROPERTY(float, m_insetTop, InsetTop); - /** Sets the right side inset */ - CC_PROPERTY(float, m_insetRight, InsetRight); - /** Sets the bottom side inset */ - CC_PROPERTY(float, m_insetBottom, InsetBottom); - -protected: - bool m_bSpritesGenerated; - CCRect m_spriteRect; - bool m_bSpriteFrameRotated; - CCRect m_capInsetsInternal; - bool m_positionsAreDirty; - - CCSpriteBatchNode* _scale9Image; - CCSprite* _topLeft; - CCSprite* _top; - CCSprite* _topRight; - CCSprite* _left; - CCSprite* _centre; - CCSprite* _right; - CCSprite* _bottomLeft; - CCSprite* _bottom; - CCSprite* _bottomRight; - - bool _opacityModifyRGB; - GLubyte _opacity; - ccColor3B _color; - - void updateCapInset(); - void updatePositions(); - -public: - - virtual void setContentSize(const CCSize & size); - /** - * @js NA - */ - virtual void visit(); - - virtual bool init(); - - virtual bool initWithBatchNode(CCSpriteBatchNode* batchnode, CCRect rect, bool rotated, CCRect capInsets); - virtual bool initWithBatchNode(CCSpriteBatchNode* batchnode, CCRect rect, CCRect capInsets); - /** - * Initializes a 9-slice sprite with a texture file, a delimitation zone and - * with the specified cap insets. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @param file The name of the texture file. - * @param rect The rectangle that describes the sub-part of the texture that - * is the whole image. If the shape is the whole texture, set this to the - * texture's full rect. - * @param capInsets The values to use for the cap insets. - */ - virtual bool initWithFile(const char* file, CCRect rect, CCRect capInsets); - - /** - * Creates a 9-slice sprite with a texture file, a delimitation zone and - * with the specified cap insets. - * - * @see initWithFile:rect:centerRegion: - */ - static CCScale9Sprite* create(const char* file, CCRect rect, CCRect capInsets); - - /** - * Initializes a 9-slice sprite with a texture file and a delimitation zone. The - * texture will be broken down into a 3×3 grid of equal blocks. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @param file The name of the texture file. - * @param rect The rectangle that describes the sub-part of the texture that - * is the whole image. If the shape is the whole texture, set this to the - * texture's full rect. - */ - virtual bool initWithFile(const char* file, CCRect rect); - - /** - * Creates a 9-slice sprite with a texture file and a delimitation zone. The - * texture will be broken down into a 3×3 grid of equal blocks. - * - * @see initWithFile:rect: - */ - static CCScale9Sprite* create(const char* file, CCRect rect); - - /** - * Initializes a 9-slice sprite with a texture file and with the specified cap - * insets. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @param file The name of the texture file. - * @param capInsets The values to use for the cap insets. - */ - virtual bool initWithFile(CCRect capInsets, const char* file); - - /** - * Creates a 9-slice sprite with a texture file. The whole texture will be - * broken down into a 3×3 grid of equal blocks. - * - * @see initWithFile:capInsets: - */ - static CCScale9Sprite* create(CCRect capInsets, const char* file); - - - /** - * Initializes a 9-slice sprite with a texture file. The whole texture will be - * broken down into a 3×3 grid of equal blocks. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @param file The name of the texture file. - */ - virtual bool initWithFile(const char* file); - - /** - * Creates a 9-slice sprite with a texture file. The whole texture will be - * broken down into a 3×3 grid of equal blocks. - * - * @see initWithFile: - */ - static CCScale9Sprite* create(const char* file); - - /** - * Initializes a 9-slice sprite with an sprite frame and with the specified - * cap insets. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @param spriteFrame The sprite frame object. - * @param capInsets The values to use for the cap insets. - */ - virtual bool initWithSpriteFrame(CCSpriteFrame* spriteFrame, CCRect capInsets); - - /** - * Creates a 9-slice sprite with an sprite frame and the centre of its zone. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @see initWithSpriteFrame:centerRegion: - */ - static CCScale9Sprite* createWithSpriteFrame(CCSpriteFrame* spriteFrame, CCRect capInsets); - /** - * Initializes a 9-slice sprite with an sprite frame. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @param spriteFrame The sprite frame object. - */ - virtual bool initWithSpriteFrame(CCSpriteFrame* spriteFrame); - - /** - * Creates a 9-slice sprite with an sprite frame. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @see initWithSpriteFrame: - */ - static CCScale9Sprite* createWithSpriteFrame(CCSpriteFrame* spriteFrame); - - /** - * Initializes a 9-slice sprite with an sprite frame name and with the specified - * cap insets. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @param spriteFrameName The sprite frame name. - * @param capInsets The values to use for the cap insets. - */ - virtual bool initWithSpriteFrameName(const char*spriteFrameName, CCRect capInsets); - - /** - * Creates a 9-slice sprite with an sprite frame name and the centre of its - * zone. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @see initWithSpriteFrameName:centerRegion: - */ - static CCScale9Sprite* createWithSpriteFrameName(const char*spriteFrameName, CCRect capInsets); - - /** - * Initializes a 9-slice sprite with an sprite frame name. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @param spriteFrameName The sprite frame name. - */ - virtual bool initWithSpriteFrameName(const char*spriteFrameName); - - /** - * Creates a 9-slice sprite with an sprite frame name. - * Once the sprite is created, you can then call its "setContentSize:" method - * to resize the sprite will all it's 9-slice goodness intract. - * It respects the anchorPoint too. - * - * @see initWithSpriteFrameName: - */ - static CCScale9Sprite* createWithSpriteFrameName(const char*spriteFrameName); - - /** - * Creates and returns a new sprite object with the specified cap insets. - * You use this method to add cap insets to a sprite or to change the existing - * cap insets of a sprite. In both cases, you get back a new image and the - * original sprite remains untouched. - * - * @param capInsets The values to use for the cap insets. - */ - CCScale9Sprite* resizableSpriteWithCapInsets(CCRect capInsets); - - static CCScale9Sprite* create(); - - // optional - - /** sets the premultipliedAlphaOpacity property. - If set to NO then opacity will be applied as: glColor(R,G,B,opacity); - If set to YES then oapcity will be applied as: glColor(opacity, opacity, opacity, opacity ); - Textures with premultiplied alpha will have this property by default on YES. Otherwise the default value is NO - @since v0.8 - */ - virtual void setOpacityModifyRGB(bool bValue); - - /** returns whether or not the opacity will be applied using glColor(R,G,B,opacity) or glColor(opacity, opacity, opacity, opacity); - @since v0.8 - */ - virtual bool isOpacityModifyRGB(void); - virtual void setOpacity(GLubyte opacity); - virtual GLubyte getOpacity(); - virtual void setColor(const ccColor3B& color); - virtual const ccColor3B& getColor(); - - virtual bool updateWithBatchNode(CCSpriteBatchNode* batchnode, CCRect rect, bool rotated, CCRect capInsets); - - virtual void setSpriteFrame(CCSpriteFrame * spriteFrame); - - virtual void updateDisplayedOpacity(GLubyte parentOpacity); - virtual void updateDisplayedColor(const cocos2d::ccColor3B& parentColor); -}; - -// end of GUI group -/// @} -/// @} - -NS_CC_EXT_END - -#endif // __CCScale9Sprite_H__ diff --git a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBox.h b/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBox.h deleted file mode 100644 index 2256f0f..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBox.h +++ /dev/null @@ -1,429 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2012 James Chen - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCEDITTEXT_H__ -#define __CCEDITTEXT_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include "../CCControlExtension/CCControlExtensions.h" - -NS_CC_EXT_BEGIN - - -enum KeyboardReturnType { - kKeyboardReturnTypeDefault = 0, - kKeyboardReturnTypeDone, - kKeyboardReturnTypeSend, - kKeyboardReturnTypeSearch, - kKeyboardReturnTypeGo -}; - - -/** - * \brief The EditBoxInputMode defines the type of text that the user is allowed - * to enter. - */ -enum EditBoxInputMode -{ - /** - * The user is allowed to enter any text, including line breaks. - */ - kEditBoxInputModeAny = 0, - - /** - * The user is allowed to enter an e-mail address. - */ - kEditBoxInputModeEmailAddr, - - /** - * The user is allowed to enter an integer value. - */ - kEditBoxInputModeNumeric, - - /** - * The user is allowed to enter a phone number. - */ - kEditBoxInputModePhoneNumber, - - /** - * The user is allowed to enter a URL. - */ - kEditBoxInputModeUrl, - - /** - * The user is allowed to enter a real number value. - * This extends kEditBoxInputModeNumeric by allowing a decimal point. - */ - kEditBoxInputModeDecimal, - - /** - * The user is allowed to enter any text, except for line breaks. - */ - kEditBoxInputModeSingleLine -}; - -/** - * \brief The EditBoxInputFlag defines how the input text is displayed/formatted. - */ -enum EditBoxInputFlag -{ - /** - * Indicates that the text entered is confidential data that should be - * obscured whenever possible. This implies EDIT_BOX_INPUT_FLAG_SENSITIVE. - */ - kEditBoxInputFlagPassword = 0, - - /** - * Indicates that the text entered is sensitive data that the - * implementation must never store into a dictionary or table for use - * in predictive, auto-completing, or other accelerated input schemes. - * A credit card number is an example of sensitive data. - */ - kEditBoxInputFlagSensitive, - - /** - * This flag is a hint to the implementation that during text editing, - * the initial letter of each word should be capitalized. - */ - kEditBoxInputFlagInitialCapsWord, - - /** - * This flag is a hint to the implementation that during text editing, - * the initial letter of each sentence should be capitalized. - */ - kEditBoxInputFlagInitialCapsSentence, - - /** - * Capitalize all characters automatically. - */ - kEditBoxInputFlagInitialCapsAllCharacters - -}; - - -class CCEditBox; -class CCEditBoxImpl; - -/** - * @js NA - * @lua NA - */ -class CCEditBoxDelegate -{ -public: - virtual ~CCEditBoxDelegate() {}; - - /** - * This method is called when an edit box gains focus after keyboard is shown. - * @param editBox The edit box object that generated the event. - */ - virtual void editBoxEditingDidBegin(CCEditBox* editBox) {}; - - - /** - * This method is called when an edit box loses focus after keyboard is hidden. - * @param editBox The edit box object that generated the event. - */ - virtual void editBoxEditingDidEnd(CCEditBox* editBox) {}; - - /** - * This method is called when the edit box text was changed. - * @param editBox The edit box object that generated the event. - * @param text The new text. - */ - virtual void editBoxTextChanged(CCEditBox* editBox, const std::string& text) {}; - - /** - * This method is called when the return button was pressed or the outside area of keyboard was touched. - * @param editBox The edit box object that generated the event. - */ - virtual void editBoxReturn(CCEditBox* editBox) = 0; - -}; - -/** - * \brief Class for edit box. - * - * You can use this widget to gather small amounts of text from the user. - * - */ - -class CCEditBox -: public CCControlButton -, public CCIMEDelegate -{ -public: - /** - * Constructor. - */ - CCEditBox(void); - - /** - * Destructor. - */ - virtual ~CCEditBox(void); - - /** - * create a edit box with size. - * @return An autorelease pointer of CCEditBox, you don't need to release it only if you retain it again. - */ - static CCEditBox* create(const CCSize& size, CCScale9Sprite* pNormal9SpriteBg, CCScale9Sprite* pPressed9SpriteBg = NULL, CCScale9Sprite* pDisabled9SpriteBg = NULL); - - /** - * Init edit box with specified size. This method should be invoked right after constructor. - * @param size The size of edit box. - */ - bool initWithSizeAndBackgroundSprite(const CCSize& size, CCScale9Sprite* pNormal9SpriteBg); - - /** - * Gets/Sets the delegate for edit box. - * @lua NA - */ - void setDelegate(CCEditBoxDelegate* pDelegate); - /** - * @js NA - * @lua NA - */ - CCEditBoxDelegate* getDelegate(); - /** - * Registers a script function that will be called for EditBox events. - * - * This handler will be removed automatically after onExit() called. - * @code - * -- lua sample - * local function editboxEventHandler(eventType) - * if eventType == "began" then - * -- triggered when an edit box gains focus after keyboard is shown - * elseif eventType == "ended" then - * -- triggered when an edit box loses focus after keyboard is hidden. - * elseif eventType == "changed" then - * -- triggered when the edit box text was changed. - * elseif eventType == "return" then - * -- triggered when the return button was pressed or the outside area of keyboard was touched. - * end - * end - * - * local editbox = CCEditBox:create(CCSize(...), CCScale9Sprite:create(...)) - * editbox = registerScriptEditBoxHandler(editboxEventHandler) - * @endcode - * - * @param handler A number that indicates a lua function. - * @js NA - */ - void registerScriptEditBoxHandler(int handler); - - /** - * Unregisters a script function that will be called for EditBox events. - * @js NA - */ - void unregisterScriptEditBoxHandler(void); - /** - * get a script Handler - * @js NA - */ - int getScriptEditBoxHandler(void){ return m_nScriptEditBoxHandler ;} - /** - * Set the text entered in the edit box. - * @param pText The given text. - */ - void setText(const char* pText); - - /** - * Get the text entered in the edit box. - * @return The text entered in the edit box. - */ - const char* getText(void); - - /** - * Set the font. - * @param pFontName The font name. - * @param fontSize The font size. - */ - void setFont(const char* pFontName, int fontSize); - - /** - * Set the font name. - * @param pFontName The font name. - */ - void setFontName(const char* pFontName); - - /** - * Set the font size. - * @param fontSize The font size. - */ - void setFontSize(int fontSize); - - /** - * Set the font color of the widget's text. - */ - void setFontColor(const ccColor3B& color); - - /** - * Set the placeholder's font. - * @param pFontName The font name. - * @param fontSize The font size. - */ - void setPlaceholderFont(const char* pFontName, int fontSize); - - /** - * Set the placeholder's font name. - * @param pFontName The font name. - */ - void setPlaceholderFontName(const char* pFontName); - - /** - * Set the placeholder's font size. - * @param fontSize The font size. - */ - void setPlaceholderFontSize(int fontSize); - - /** - * Set the font color of the placeholder text when the edit box is empty. - * Not supported on IOS. - */ - void setPlaceholderFontColor(const ccColor3B& color); - - /** - * Set a text in the edit box that acts as a placeholder when an - * edit box is empty. - * @param pText The given text. - */ - void setPlaceHolder(const char* pText); - - /** - * Get a text in the edit box that acts as a placeholder when an - * edit box is empty. - */ - const char* getPlaceHolder(void); - - /** - * Set the input mode of the edit box. - * @param inputMode One of the EditBoxInputMode constants. - */ - void setInputMode(EditBoxInputMode inputMode); - - /** - * Sets the maximum input length of the edit box. - * Setting this value enables multiline input mode by default. - * Available on Android, iOS and Windows Phone. - * - * @param maxLength The maximum length. - */ - void setMaxLength(int maxLength); - - /** - * Gets the maximum input length of the edit box. - * - * @return Maximum input length. - */ - int getMaxLength(); - - /** - * Set the input flags that are to be applied to the edit box. - * @param inputFlag One of the EditBoxInputFlag constants. - */ - void setInputFlag(EditBoxInputFlag inputFlag); - - /** - * Set the return type that are to be applied to the edit box. - * @param returnType One of the CCKeyboardReturnType constants. - */ - void setReturnType(KeyboardReturnType returnType); - - /* override functions */ - virtual void setPosition(const CCPoint& pos); - virtual void setVisible(bool visible); - virtual void setContentSize(const CCSize& size); - virtual void setAnchorPoint(const CCPoint& anchorPoint); - /** - * @js NA - */ - virtual void visit(void); - /** - * @js NA - * @lua NA - */ - virtual void onEnter(void); - /** - * @js NA - * @lua NA - */ - virtual void onExit(void); - /** - * @js NA - * @lua NA - */ - virtual void keyboardWillShow(CCIMEKeyboardNotificationInfo& info); - /** - * @js NA - * @lua NA - */ - virtual void keyboardDidShow(CCIMEKeyboardNotificationInfo& info); - /** - * @js NA - * @lua NA - */ - virtual void keyboardWillHide(CCIMEKeyboardNotificationInfo& info); - /** - * @js NA - * @lua NA - */ - virtual void keyboardDidHide(CCIMEKeyboardNotificationInfo& info); - - /** callback funtions - * @js NA - */ - void touchDownAction(CCObject *sender, CCControlEvent controlEvent); - -protected: - CCEditBoxImpl* m_pEditBoxImpl; - CCEditBoxDelegate* m_pDelegate; - - EditBoxInputMode m_eEditBoxInputMode; - EditBoxInputFlag m_eEditBoxInputFlag; - KeyboardReturnType m_eKeyboardReturnType; - - std::string m_strText; - std::string m_strPlaceHolder; - - std::string m_strFontName; - std::string m_strPlaceholderFontName; - - int m_nFontSize; - int m_nPlaceholderFontSize; - - ccColor3B m_colText; - ccColor3B m_colPlaceHolder; - - int m_nMaxLength; - float m_fAdjustHeight; - int m_nScriptEditBoxHandler; -}; - -NS_CC_EXT_END - -#endif /* __CCEDITTEXT_H__ */ - diff --git a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImpl.h b/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImpl.h deleted file mode 100644 index 118a725..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImpl.h +++ /dev/null @@ -1,90 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2012 James Chen - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCEditBoxIMPL_H__ -#define __CCEditBoxIMPL_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include "CCEditBox.h" - -NS_CC_EXT_BEGIN - - -class CCEditBoxImpl -{ -public: - CCEditBoxImpl(CCEditBox* pEditBox) : m_pDelegate(NULL),m_pEditBox(pEditBox) {} - virtual ~CCEditBoxImpl() {} - - virtual bool initWithSize(const CCSize& size) = 0; - virtual void setFont(const char* pFontName, int fontSize) = 0; - virtual void setFontColor(const ccColor3B& color) = 0; - virtual void setPlaceholderFont(const char* pFontName, int fontSize) = 0; - virtual void setPlaceholderFontColor(const ccColor3B& color) = 0; - virtual void setInputMode(EditBoxInputMode inputMode) = 0; - virtual void setInputFlag(EditBoxInputFlag inputFlag) = 0; - virtual void setMaxLength(int maxLength) = 0; - virtual int getMaxLength() = 0; - virtual void setReturnType(KeyboardReturnType returnType) = 0; - virtual bool isEditing() = 0; - - virtual void setText(const char* pText) = 0; - virtual const char* getText(void) = 0; - virtual void setPlaceHolder(const char* pText) = 0; - virtual void doAnimationWhenKeyboardMove(float duration, float distance) = 0; - - virtual void openKeyboard() = 0; - virtual void closeKeyboard() = 0; - - virtual void setPosition(const CCPoint& pos) = 0; - virtual void setVisible(bool visible) = 0; - virtual void setContentSize(const CCSize& size) = 0; - virtual void setAnchorPoint(const CCPoint& anchorPoint) = 0; - /** - * @js NA - */ - virtual void visit(void) = 0; - /** - * @js NA - */ - virtual void onEnter(void) = 0; - - - void setDelegate(CCEditBoxDelegate* pDelegate) { m_pDelegate = pDelegate; }; - CCEditBoxDelegate* getDelegate() { return m_pDelegate; }; - CCEditBox* getCCEditBox() { return m_pEditBox; }; -protected: - CCEditBoxDelegate* m_pDelegate; - CCEditBox* m_pEditBox; -}; - -// This method must be implemented at each subclass of CCEditBoxImpl. -extern CCEditBoxImpl* __createSystemEditBox(CCEditBox* pEditBox); - - -NS_CC_EXT_END - -#endif /* __CCEditBoxIMPL_H__ */ diff --git a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplAndroid.h b/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplAndroid.h deleted file mode 100644 index 6c26ddf..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplAndroid.h +++ /dev/null @@ -1,97 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2012 James Chen - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCEDITBOXIMPLANDROID_H__ -#define __CCEDITBOXIMPLANDROID_H__ - -#include "cocos2d.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) - -#include "ExtensionMacros.h" -#include "CCEditBoxImpl.h" - -NS_CC_EXT_BEGIN - -class CCEditBox; - -class CCEditBoxImplAndroid : public CCEditBoxImpl -{ -public: - CCEditBoxImplAndroid(CCEditBox* pEditText); - virtual ~CCEditBoxImplAndroid(); - - virtual bool initWithSize(const CCSize& size); - virtual void setFont(const char* pFontName, int fontSize); - virtual void setFontColor(const ccColor3B& color); - virtual void setPlaceholderFont(const char* pFontName, int fontSize); - virtual void setPlaceholderFontColor(const ccColor3B& color); - virtual void setInputMode(EditBoxInputMode inputMode); - virtual void setInputFlag(EditBoxInputFlag inputFlag); - virtual void setMaxLength(int maxLength); - virtual int getMaxLength(); - virtual void setReturnType(KeyboardReturnType returnType); - virtual bool isEditing(); - - virtual void setText(const char* pText); - virtual const char* getText(void); - virtual void setPlaceHolder(const char* pText); - virtual void setPosition(const CCPoint& pos); - virtual void setVisible(bool visible); - virtual void setContentSize(const CCSize& size); - virtual void setAnchorPoint(const CCPoint& anchorPoint); - /** - * @js NA - */ - virtual void visit(void); - virtual void onEnter(void); - virtual void doAnimationWhenKeyboardMove(float duration, float distance); - virtual void openKeyboard(); - virtual void closeKeyboard(); - -private: - CCLabelTTF* m_pLabel; - CCLabelTTF* m_pLabelPlaceHolder; - EditBoxInputMode m_eEditBoxInputMode; - EditBoxInputFlag m_eEditBoxInputFlag; - KeyboardReturnType m_eKeyboardReturnType; - - std::string m_strText; - std::string m_strPlaceHolder; - - ccColor3B m_colText; - ccColor3B m_colPlaceHolder; - - int m_nMaxLength; - CCSize m_EditSize; -}; - - -NS_CC_EXT_END - -#endif /* #if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID) */ - -#endif /* __CCEDITBOXIMPLANDROID_H__ */ - diff --git a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplIOS.h b/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplIOS.h deleted file mode 100644 index 2cf7b0d..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplIOS.h +++ /dev/null @@ -1,130 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2012 James Chen - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCEditBoxIMPLIOS_H__ -#define __CCEditBoxIMPLIOS_H__ - -#include "cocos2d.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) - -#include "ExtensionMacros.h" -#include "CCEditBoxImpl.h" - -#import -#import - -@interface CustomUITextField : UITextField -{ -} - -@end - - -@interface EditBoxImplIOS : NSObject -{ - CustomUITextField* textField_; - void* editBox_; - BOOL editState_; -} - -@property(nonatomic, retain) UITextField* textField; -@property(nonatomic, readonly, getter = isEditState) BOOL editState; -@property(nonatomic, assign) void* editBox; - --(id) initWithFrame: (CGRect) frameRect editBox: (void*) editBox; --(void) doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance; --(void) setPosition:(CGPoint) pos; --(void) setContentSize:(CGSize) size; --(void) visit; --(void) openKeyboard; --(void) closeKeyboard; - -@end - -NS_CC_EXT_BEGIN - -class CCEditBox; -/** - * @js NA - * @lua NA - */ -class CCEditBoxImplIOS : public CCEditBoxImpl -{ -public: - CCEditBoxImplIOS(CCEditBox* pEditText); - virtual ~CCEditBoxImplIOS(); - - virtual bool initWithSize(const CCSize& size); - virtual void setFont(const char* pFontName, int fontSize); - virtual void setFontColor(const ccColor3B& color); - virtual void setPlaceholderFont(const char* pFontName, int fontSize); - virtual void setPlaceholderFontColor(const ccColor3B& color); - virtual void setInputMode(EditBoxInputMode inputMode); - virtual void setInputFlag(EditBoxInputFlag inputFlag); - virtual void setMaxLength(int maxLength); - virtual int getMaxLength(); - virtual void setReturnType(KeyboardReturnType returnType); - virtual bool isEditing(); - - virtual void setText(const char* pText); - virtual const char* getText(void); - virtual void setPlaceHolder(const char* pText); - virtual void setPosition(const CCPoint& pos); - virtual void setVisible(bool visible); - virtual void setContentSize(const CCSize& size); - virtual void setAnchorPoint(const CCPoint& anchorPoint); - virtual void visit(void); - virtual void onEnter(void); - virtual void doAnimationWhenKeyboardMove(float duration, float distance); - virtual void openKeyboard(); - virtual void closeKeyboard(); - - virtual void onEndEditing(); - -private: - void initInactiveLabels(const CCSize& size); - void setInactiveText(const char* pText); - void adjustTextFieldPosition(); - void placeInactiveLabels(); - - CCLabelTTF* m_pLabel; - CCLabelTTF* m_pLabelPlaceHolder; - CCSize m_tContentSize; - CCPoint m_obPosition; - CCPoint m_obAnchorPoint; - EditBoxImplIOS* m_systemControl; - int m_nMaxTextLength; - bool m_bInRetinaMode; -}; - - -NS_CC_EXT_END - - -#endif /* #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) */ - -#endif /* __CCEditBoxIMPLIOS_H__ */ - diff --git a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm b/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm deleted file mode 100644 index 7b62faf..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm +++ /dev/null @@ -1,622 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2012 James Chen - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ -#include "CCEditBoxImplIOS.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) - -#define kLabelZOrder 9999 - -#include "CCEditBox.h" -#import "EAGLView.h" - -#define getEditBoxImplIOS() ((cocos2d::extension::CCEditBoxImplIOS*)editBox_) - -static const int CC_EDIT_BOX_PADDING = 5; - -@implementation CustomUITextField -- (CGRect)textRectForBounds:(CGRect)bounds { - float padding = CC_EDIT_BOX_PADDING * cocos2d::CCEGLView::sharedOpenGLView()->getScaleX() / [[EAGLView sharedEGLView] contentScaleFactor ]; - return CGRectMake(bounds.origin.x + padding, bounds.origin.y + padding, - bounds.size.width - padding*2, bounds.size.height - padding*2); -} -- (CGRect)editingRectForBounds:(CGRect)bounds { - return [self textRectForBounds:bounds]; -} -@end - - -@implementation EditBoxImplIOS - -@synthesize textField = textField_; -@synthesize editState = editState_; -@synthesize editBox = editBox_; - -- (void)dealloc -{ - [textField_ resignFirstResponder]; - [textField_ removeFromSuperview]; - self.textField = NULL; - [super dealloc]; -} - --(id) initWithFrame: (CGRect) frameRect editBox: (void*) editBox -{ - self = [super init]; - - do - { - if (self == nil) break; - editState_ = NO; - self.textField = [[[CustomUITextField alloc] initWithFrame: frameRect] autorelease]; - if (!textField_) break; - [textField_ setTextColor:[UIColor whiteColor]]; - textField_.font = [UIFont systemFontOfSize:frameRect.size.height*2/3]; //TODO need to delete hard code here. - textField_.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter; - textField_.backgroundColor = [UIColor clearColor]; - textField_.borderStyle = UITextBorderStyleNone; - textField_.delegate = self; - textField_.hidden = true; - textField_.returnKeyType = UIReturnKeyDefault; - [textField_ addTarget:self action:@selector(textChanged) forControlEvents:UIControlEventEditingChanged]; - self.editBox = editBox; - - - - return self; - }while(0); - - return nil; -} - --(void) doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance -{ - id eglView = [EAGLView sharedEGLView]; - [eglView doAnimationWhenKeyboardMoveWithDuration:duration distance:distance]; -} - --(void) setPosition:(CGPoint) pos -{ - CGRect frame = [textField_ frame]; - frame.origin = pos; - [textField_ setFrame:frame]; -} - --(void) setContentSize:(CGSize) size -{ - CGRect frame = [textField_ frame]; - frame.size = size; - [textField_ setFrame:frame]; -} - --(void) visit -{ - -} - --(void) openKeyboard -{ - [[EAGLView sharedEGLView] addSubview:textField_]; - [textField_ becomeFirstResponder]; -} - --(void) closeKeyboard -{ - [textField_ resignFirstResponder]; - [textField_ removeFromSuperview]; -} - -- (BOOL)textFieldShouldReturn:(UITextField *)sender -{ - if (sender == textField_) { - [sender resignFirstResponder]; - } - return NO; -} - --(void)animationSelector -{ - id eglView = [EAGLView sharedEGLView]; - [eglView doAnimationWhenAnotherEditBeClicked]; -} - -- (BOOL)textFieldShouldBeginEditing:(UITextField *)sender // return NO to disallow editing. -{ - CCLOG("textFieldShouldBeginEditing..."); - editState_ = YES; - id eglView = [EAGLView sharedEGLView]; - if ([eglView isKeyboardShown]) - { - [self performSelector:@selector(animationSelector) withObject:nil afterDelay:0.0f]; - } - cocos2d::extension::CCEditBoxDelegate* pDelegate = getEditBoxImplIOS()->getDelegate(); - if (pDelegate != NULL) - { - pDelegate->editBoxEditingDidBegin(getEditBoxImplIOS()->getCCEditBox()); - } - - cocos2d::extension::CCEditBox* pEditBox= getEditBoxImplIOS()->getCCEditBox(); - if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) - { - cocos2d::CCScriptEngineProtocol* pEngine = cocos2d::CCScriptEngineManager::sharedManager()->getScriptEngine(); - pEngine->executeEvent(pEditBox->getScriptEditBoxHandler(), "began",pEditBox); - } - return YES; -} - -- (BOOL)textFieldShouldEndEditing:(UITextField *)sender -{ - CCLOG("textFieldShouldEndEditing..."); - editState_ = NO; - getEditBoxImplIOS()->setText(getEditBoxImplIOS()->getText()); - - cocos2d::extension::CCEditBoxDelegate* pDelegate = getEditBoxImplIOS()->getDelegate(); - if (pDelegate != NULL) - { - pDelegate->editBoxEditingDidEnd(getEditBoxImplIOS()->getCCEditBox()); - pDelegate->editBoxReturn(getEditBoxImplIOS()->getCCEditBox()); - } - - cocos2d::extension::CCEditBox* pEditBox= getEditBoxImplIOS()->getCCEditBox(); - if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) - { - cocos2d::CCScriptEngineProtocol* pEngine = cocos2d::CCScriptEngineManager::sharedManager()->getScriptEngine(); - pEngine->executeEvent(pEditBox->getScriptEditBoxHandler(), "ended",pEditBox); - pEngine->executeEvent(pEditBox->getScriptEditBoxHandler(), "return",pEditBox); - } - - if(editBox_ != nil) - { - getEditBoxImplIOS()->onEndEditing(); - } - return YES; -} - -/** - * Delegate method called before the text has been changed. - * @param textField The text field containing the text. - * @param range The range of characters to be replaced. - * @param string The replacement string. - * @return YES if the specified text range should be replaced; otherwise, NO to keep the old text. - */ -- (BOOL)textField:(UITextField *) textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string -{ - if (getEditBoxImplIOS()->getMaxLength() < 0) - { - return YES; - } - - NSUInteger oldLength = [textField.text length]; - NSUInteger replacementLength = [string length]; - NSUInteger rangeLength = range.length; - - NSUInteger newLength = oldLength - rangeLength + replacementLength; - - return newLength <= getEditBoxImplIOS()->getMaxLength(); -} - -/** - * Called each time when the text field's text has changed. - */ -- (void) textChanged -{ - // NSLog(@"text is %@", self.textField.text); - cocos2d::extension::CCEditBoxDelegate* pDelegate = getEditBoxImplIOS()->getDelegate(); - if (pDelegate != NULL) - { - pDelegate->editBoxTextChanged(getEditBoxImplIOS()->getCCEditBox(), getEditBoxImplIOS()->getText()); - } - - cocos2d::extension::CCEditBox* pEditBox= getEditBoxImplIOS()->getCCEditBox(); - if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) - { - cocos2d::CCScriptEngineProtocol* pEngine = cocos2d::CCScriptEngineManager::sharedManager()->getScriptEngine(); - pEngine->executeEvent(pEditBox->getScriptEditBoxHandler(), "changed",pEditBox); - } - -} - -@end - - -NS_CC_EXT_BEGIN - -CCEditBoxImpl* __createSystemEditBox(CCEditBox* pEditBox) -{ - return new CCEditBoxImplIOS(pEditBox); -} - -CCEditBoxImplIOS::CCEditBoxImplIOS(CCEditBox* pEditText) -: CCEditBoxImpl(pEditText) -, m_pLabel(NULL) -, m_pLabelPlaceHolder(NULL) -, m_systemControl(NULL) -, m_obAnchorPoint(ccp(0.5f, 0.5f)) -, m_nMaxTextLength(-1) -{ - m_bInRetinaMode = [[EAGLView sharedEGLView] contentScaleFactor] == 2.0f ? true : false; -} - -CCEditBoxImplIOS::~CCEditBoxImplIOS() -{ - [m_systemControl release]; -} - -void CCEditBoxImplIOS::doAnimationWhenKeyboardMove(float duration, float distance) -{ - if ([m_systemControl isEditState] || distance < 0.0f) - { - [m_systemControl doAnimationWhenKeyboardMoveWithDuration:duration distance:distance]; - } -} - -bool CCEditBoxImplIOS::initWithSize(const CCSize& size) -{ - do - { - CCEGLViewProtocol* eglView = CCEGLView::sharedOpenGLView(); - - CGRect rect = CGRectMake(0, 0, size.width * eglView->getScaleX(),size.height * eglView->getScaleY()); - - if (m_bInRetinaMode) - { - rect.size.width /= 2.0f; - rect.size.height /= 2.0f; - } - - m_systemControl = [[EditBoxImplIOS alloc] initWithFrame:rect editBox:this]; - if (!m_systemControl) break; - - initInactiveLabels(size); - setContentSize(size); - - return true; - }while (0); - - return false; -} - -void CCEditBoxImplIOS::initInactiveLabels(const CCSize& size) -{ - const char* pDefaultFontName = [[m_systemControl.textField.font fontName] UTF8String]; - - m_pLabel = CCLabelTTF::create("", "", 0.0f); - m_pLabel->setAnchorPoint(ccp(0, 0.5f)); - m_pLabel->setColor(ccWHITE); - m_pLabel->setVisible(false); - m_pEditBox->addChild(m_pLabel, kLabelZOrder); - - m_pLabelPlaceHolder = CCLabelTTF::create("", "", 0.0f); - // align the text vertically center - m_pLabelPlaceHolder->setAnchorPoint(ccp(0, 0.5f)); - m_pLabelPlaceHolder->setColor(ccGRAY); - m_pEditBox->addChild(m_pLabelPlaceHolder, kLabelZOrder); - - setFont(pDefaultFontName, size.height*2/3); - setPlaceholderFont(pDefaultFontName, size.height*2/3); -} - -void CCEditBoxImplIOS::placeInactiveLabels() { - m_pLabel->setPosition(ccp(CC_EDIT_BOX_PADDING, m_tContentSize.height / 2.0f)); - m_pLabelPlaceHolder->setPosition(ccp(CC_EDIT_BOX_PADDING, m_tContentSize.height / 2.0f)); -} - -void CCEditBoxImplIOS::setInactiveText(const char* pText) -{ - if(m_systemControl.textField.secureTextEntry == YES) - { - std::string passwordString; - for(int i = 0; i < strlen(pText); ++i) - passwordString.append("\u25CF"); - m_pLabel->setString(passwordString.c_str()); - } - else - m_pLabel->setString(getText()); - - // Clip the text width to fit to the text box - float fMaxWidth = m_pEditBox->getContentSize().width - CC_EDIT_BOX_PADDING * 2; - CCRect clippingRect = m_pLabel->getTextureRect(); - if(clippingRect.size.width > fMaxWidth) { - clippingRect.size.width = fMaxWidth; - m_pLabel->setTextureRect(clippingRect); - } -} - -void CCEditBoxImplIOS::setFont(const char* pFontName, int fontSize) -{ - bool isValidFontName = true; - if(pFontName == NULL || strlen(pFontName) == 0) { - isValidFontName = false; - } - - float retinaFactor = m_bInRetinaMode ? 2.0f : 1.0f; - NSString * fntName = [NSString stringWithUTF8String:pFontName]; - float scaleFactor = CCEGLView::sharedOpenGLView()->getScaleX(); - UIFont *textFont = nil; - if (isValidFontName) { - textFont = [UIFont fontWithName:fntName size:fontSize * scaleFactor / retinaFactor]; - } - - if (!isValidFontName || textFont == nil){ - textFont = [UIFont systemFontOfSize:fontSize * scaleFactor / retinaFactor]; - } - - if(textFont != nil) { - [m_systemControl.textField setFont:textFont]; - } - - m_pLabel->setFontName(pFontName); - m_pLabel->setFontSize(fontSize); - m_pLabelPlaceHolder->setFontName(pFontName); - m_pLabelPlaceHolder->setFontSize(fontSize); -} - -void CCEditBoxImplIOS::setFontColor(const ccColor3B& color) -{ - m_systemControl.textField.textColor = [UIColor colorWithRed:color.r / 255.0f green:color.g / 255.0f blue:color.b / 255.0f alpha:1.0f]; - m_pLabel->setColor(color); -} - -void CCEditBoxImplIOS::setPlaceholderFont(const char* pFontName, int fontSize) -{ - // TODO need to be implemented. -} - -void CCEditBoxImplIOS::setPlaceholderFontColor(const ccColor3B& color) -{ - m_pLabelPlaceHolder->setColor(color); -} - -void CCEditBoxImplIOS::setInputMode(EditBoxInputMode inputMode) -{ - switch (inputMode) - { - case kEditBoxInputModeEmailAddr: - m_systemControl.textField.keyboardType = UIKeyboardTypeEmailAddress; - break; - case kEditBoxInputModeNumeric: - m_systemControl.textField.keyboardType = UIKeyboardTypeNumbersAndPunctuation; - break; - case kEditBoxInputModePhoneNumber: - m_systemControl.textField.keyboardType = UIKeyboardTypePhonePad; - break; - case kEditBoxInputModeUrl: - m_systemControl.textField.keyboardType = UIKeyboardTypeURL; - break; - case kEditBoxInputModeDecimal: - m_systemControl.textField.keyboardType = UIKeyboardTypeDecimalPad; - break; - case kEditBoxInputModeSingleLine: - m_systemControl.textField.keyboardType = UIKeyboardTypeDefault; - break; - default: - m_systemControl.textField.keyboardType = UIKeyboardTypeDefault; - break; - } -} - -void CCEditBoxImplIOS::setMaxLength(int maxLength) -{ - m_nMaxTextLength = maxLength; -} - -int CCEditBoxImplIOS::getMaxLength() -{ - return m_nMaxTextLength; -} - -void CCEditBoxImplIOS::setInputFlag(EditBoxInputFlag inputFlag) -{ - switch (inputFlag) - { - case kEditBoxInputFlagPassword: - m_systemControl.textField.secureTextEntry = YES; - break; - case kEditBoxInputFlagInitialCapsWord: - m_systemControl.textField.autocapitalizationType = UITextAutocapitalizationTypeWords; - break; - case kEditBoxInputFlagInitialCapsSentence: - m_systemControl.textField.autocapitalizationType = UITextAutocapitalizationTypeSentences; - break; - case kEditBoxInputFlagInitialCapsAllCharacters: - m_systemControl.textField.autocapitalizationType = UITextAutocapitalizationTypeAllCharacters; - break; - case kEditBoxInputFlagSensitive: - m_systemControl.textField.autocorrectionType = UITextAutocorrectionTypeNo; - break; - default: - break; - } -} - -void CCEditBoxImplIOS::setReturnType(KeyboardReturnType returnType) -{ - switch (returnType) { - case kKeyboardReturnTypeDefault: - m_systemControl.textField.returnKeyType = UIReturnKeyDefault; - break; - case kKeyboardReturnTypeDone: - m_systemControl.textField.returnKeyType = UIReturnKeyDone; - break; - case kKeyboardReturnTypeSend: - m_systemControl.textField.returnKeyType = UIReturnKeySend; - break; - case kKeyboardReturnTypeSearch: - m_systemControl.textField.returnKeyType = UIReturnKeySearch; - break; - case kKeyboardReturnTypeGo: - m_systemControl.textField.returnKeyType = UIReturnKeyGo; - break; - default: - m_systemControl.textField.returnKeyType = UIReturnKeyDefault; - break; - } -} - -bool CCEditBoxImplIOS::isEditing() -{ - return [m_systemControl isEditState] ? true : false; -} - -void CCEditBoxImplIOS::setText(const char* pText) -{ - m_systemControl.textField.text = [NSString stringWithUTF8String:pText]; - if(m_systemControl.textField.hidden == YES) { - setInactiveText(pText); - if(strlen(pText) == 0) - { - m_pLabel->setVisible(false); - m_pLabelPlaceHolder->setVisible(true); - } - else - { - m_pLabel->setVisible(true); - m_pLabelPlaceHolder->setVisible(false); - } - } -} - -const char* CCEditBoxImplIOS::getText(void) -{ - return [m_systemControl.textField.text UTF8String]; -} - -void CCEditBoxImplIOS::setPlaceHolder(const char* pText) -{ - m_systemControl.textField.placeholder = [NSString stringWithUTF8String:pText]; - m_pLabelPlaceHolder->setString(pText); -} - -static CGPoint convertDesignCoordToScreenCoord(const CCPoint& designCoord, bool bInRetinaMode) -{ - CCEGLViewProtocol* eglView = CCEGLView::sharedOpenGLView(); - float viewH = (float)[[EAGLView sharedEGLView] getHeight]; - - CCPoint visiblePos = ccp(designCoord.x * eglView->getScaleX(), designCoord.y * eglView->getScaleY()); - CCPoint screenGLPos = ccpAdd(visiblePos, eglView->getViewPortRect().origin); - - CGPoint screenPos = CGPointMake(screenGLPos.x, viewH - screenGLPos.y); - - if (bInRetinaMode) - { - screenPos.x = screenPos.x / 2.0f; - screenPos.y = screenPos.y / 2.0f; - } - CCLOG("[EditBox] pos x = %f, y = %f", screenGLPos.x, screenGLPos.y); - return screenPos; -} - -void CCEditBoxImplIOS::setPosition(const CCPoint& pos) -{ - m_obPosition = pos; - adjustTextFieldPosition(); -} - -void CCEditBoxImplIOS::setVisible(bool visible) -{ -// m_systemControl.textField.hidden = !visible; -} - -void CCEditBoxImplIOS::setContentSize(const CCSize& size) -{ - m_tContentSize = size; - CCLOG("[Edit text] content size = (%f, %f)", size.width, size.height); - placeInactiveLabels(); - CCEGLViewProtocol* eglView = CCEGLView::sharedOpenGLView(); - CGSize controlSize = CGSizeMake(size.width * eglView->getScaleX(),size.height * eglView->getScaleY()); - - if (m_bInRetinaMode) - { - controlSize.width /= 2.0f; - controlSize.height /= 2.0f; - } - [m_systemControl setContentSize:controlSize]; -} - -void CCEditBoxImplIOS::setAnchorPoint(const CCPoint& anchorPoint) -{ - CCLOG("[Edit text] anchor point = (%f, %f)", anchorPoint.x, anchorPoint.y); - m_obAnchorPoint = anchorPoint; - setPosition(m_obPosition); -} - -void CCEditBoxImplIOS::visit(void) -{ - -} - -void CCEditBoxImplIOS::onEnter(void) -{ - adjustTextFieldPosition(); - const char* pText = getText(); - if (pText) { - setInactiveText(pText); - } -} - -void CCEditBoxImplIOS::adjustTextFieldPosition() -{ - CCSize contentSize = m_pEditBox->getContentSize(); - CCRect rect = CCRectMake(0, 0, contentSize.width, contentSize.height); - rect = CCRectApplyAffineTransform(rect, m_pEditBox->nodeToWorldTransform()); - - CCPoint designCoord = ccp(rect.origin.x, rect.origin.y + rect.size.height); - [m_systemControl setPosition:convertDesignCoordToScreenCoord(designCoord, m_bInRetinaMode)]; -} - -void CCEditBoxImplIOS::openKeyboard() -{ - m_pLabel->setVisible(false); - m_pLabelPlaceHolder->setVisible(false); - - m_systemControl.textField.hidden = NO; - [m_systemControl openKeyboard]; -} - -void CCEditBoxImplIOS::closeKeyboard() -{ - [m_systemControl closeKeyboard]; -} - -void CCEditBoxImplIOS::onEndEditing() -{ - m_systemControl.textField.hidden = YES; - if(strlen(getText()) == 0) - { - m_pLabel->setVisible(false); - m_pLabelPlaceHolder->setVisible(true); - } - else - { - m_pLabel->setVisible(true); - m_pLabelPlaceHolder->setVisible(false); - setInactiveText(getText()); - } -} - -NS_CC_EXT_END - -#endif /* #if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) */ - - diff --git a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplMac.h b/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplMac.h deleted file mode 100644 index cdbff56..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplMac.h +++ /dev/null @@ -1,120 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2012 Jozef Pridavok - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCEditBoxIMPLMAC_H__ -#define __CCEditBoxIMPLMAC_H__ - -#include "cocos2d.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) - -#import -#import - -#include "ExtensionMacros.h" -#include "CCEditBoxImpl.h" - -@interface CustomNSTextField : NSTextField -{ -} - -@end - -@interface EditBoxImplMac : NSObject -{ - CustomNSTextField* textField_; - void* editBox_; - BOOL editState_; -} - -@property(nonatomic, retain) NSTextField* textField; -@property(nonatomic, readonly, getter = isEditState) BOOL editState; -@property(nonatomic, assign) void* editBox; - --(id) initWithFrame: (NSRect) frameRect editBox: (void*) editBox; --(void) doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance; --(void) setPosition:(NSPoint) pos; --(void) setContentSize:(NSSize) size; --(void) visit; --(void) openKeyboard; --(void) closeKeyboard; - -@end - -NS_CC_EXT_BEGIN - -class CCEditBox; -/** - * @js NA - * @lua NA - */ -class CCEditBoxImplMac : public CCEditBoxImpl -{ -public: - CCEditBoxImplMac(CCEditBox* pEditText); - virtual ~CCEditBoxImplMac(); - - virtual bool initWithSize(const CCSize& size); - virtual void setFont(const char* pFontName, int fontSize); - virtual void setFontColor(const ccColor3B& color); - virtual void setPlaceholderFont(const char* pFontName, int fontSize); - virtual void setPlaceholderFontColor(const ccColor3B& color); - virtual void setInputMode(EditBoxInputMode inputMode); - virtual void setInputFlag(EditBoxInputFlag inputFlag); - virtual void setMaxLength(int maxLength); - virtual int getMaxLength(); - virtual void setReturnType(KeyboardReturnType returnType); - virtual bool isEditing(); - - virtual void setText(const char* pText); - virtual const char* getText(void); - virtual void setPlaceHolder(const char* pText); - virtual void setPosition(const CCPoint& pos); - virtual void setVisible(bool visible); - virtual void setContentSize(const CCSize& size); - virtual void setAnchorPoint(const CCPoint& anchorPoint); - virtual void visit(void); - virtual void doAnimationWhenKeyboardMove(float duration, float distance); - virtual void openKeyboard(); - virtual void closeKeyboard(); - virtual void onEnter(void); -private: - NSPoint convertDesignCoordToScreenCoord(const CCPoint& designCoord, bool bInRetinaMode); - void adjustTextFieldPosition(); - CCSize m_tContentSize; - CCPoint m_obPosition; - CCPoint m_obAnchorPoint; - int m_nMaxTextLength; - bool m_bInRetinaMode; - EditBoxImplMac* m_pSysEdit; -}; - - -NS_CC_EXT_END - -#endif // #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) - -#endif /* __CCEditBoxIMPLMAC_H__ */ - diff --git a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm b/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm deleted file mode 100644 index 8bfce4f..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm +++ /dev/null @@ -1,419 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2012 Jozef Pridavok - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "CCEditBoxImplMac.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) - -#include "CCEditBox.h" -#import "EAGLView.h" - -#define getEditBoxImplMac() ((cocos2d::extension::CCEditBoxImplMac*)editBox_) - -@implementation CustomNSTextField - -- (CGRect)textRectForBounds:(CGRect)bounds { - float padding = 5.0f; - return CGRectMake(bounds.origin.x + padding, bounds.origin.y + padding, - bounds.size.width - padding*2, bounds.size.height - padding*2); -} -- (CGRect)editingRectForBounds:(CGRect)bounds { - return [self textRectForBounds:bounds]; -} - -- (void)setup { - [self setBordered:NO]; - [self setHidden:NO]; - [self setWantsLayer:YES]; -} - -@end - - -@implementation EditBoxImplMac - -@synthesize textField = textField_; -@synthesize editState = editState_; -@synthesize editBox = editBox_; - -- (void)dealloc -{ - [textField_ resignFirstResponder]; - [textField_ removeFromSuperview]; - self.textField = NULL; - [super dealloc]; -} - --(id) initWithFrame: (NSRect) frameRect editBox: (void*) editBox -{ - self = [super init]; - - do - { - if (self == nil) break; - editState_ = NO; - self.textField = [[[CustomNSTextField alloc] initWithFrame: frameRect] autorelease]; - if (!textField_) break; - [textField_ setTextColor:[NSColor whiteColor]]; - textField_.font = [NSFont systemFontOfSize:frameRect.size.height*2/3]; //TODO need to delete hard code here. - textField_.backgroundColor = [NSColor clearColor]; - [textField_ setup]; - textField_.delegate = self; - [textField_ setDelegate:self]; - self.editBox = editBox; - - [[EAGLView sharedEGLView] addSubview:textField_]; - - return self; - }while(0); - - return nil; -} - --(void) doAnimationWhenKeyboardMoveWithDuration:(float)duration distance:(float)distance -{ - id eglView = [EAGLView sharedEGLView]; - [eglView doAnimationWhenKeyboardMoveWithDuration:duration distance:distance]; -} - --(void) setPosition:(NSPoint) pos -{ - NSRect frame = [textField_ frame]; - frame.origin = pos; - [textField_ setFrame:frame]; -} - --(void) setContentSize:(NSSize) size -{ - -} - --(void) visit -{ - -} - --(void) openKeyboard -{ - [textField_ becomeFirstResponder]; -} - --(void) closeKeyboard -{ - [textField_ resignFirstResponder]; - [textField_ removeFromSuperview]; -} - -- (BOOL)textFieldShouldReturn:(NSTextField *)sender -{ - if (sender == textField_) { - [sender resignFirstResponder]; - } - return NO; -} - --(void)animationSelector -{ -} - -- (BOOL)textFieldShouldBeginEditing:(NSTextField *)sender // return NO to disallow editing. -{ - editState_ = YES; - cocos2d::extension::CCEditBoxDelegate* pDelegate = getEditBoxImplMac()->getDelegate(); - if (pDelegate != NULL) - { - pDelegate->editBoxEditingDidBegin(getEditBoxImplMac()->getCCEditBox()); - } - - cocos2d::extension::CCEditBox* pEditBox= getEditBoxImplMac()->getCCEditBox(); - if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) - { - cocos2d::CCScriptEngineProtocol* pEngine = cocos2d::CCScriptEngineManager::sharedManager()->getScriptEngine(); - pEngine->executeEvent(pEditBox->getScriptEditBoxHandler(), "began",pEditBox); - } - return YES; -} - -- (BOOL)textFieldShouldEndEditing:(NSTextField *)sender -{ - editState_ = NO; - cocos2d::extension::CCEditBoxDelegate* pDelegate = getEditBoxImplMac()->getDelegate(); - if (pDelegate != NULL) - { - pDelegate->editBoxEditingDidEnd(getEditBoxImplMac()->getCCEditBox()); - pDelegate->editBoxReturn(getEditBoxImplMac()->getCCEditBox()); - } - - cocos2d::extension::CCEditBox* pEditBox= getEditBoxImplMac()->getCCEditBox(); - if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) - { - cocos2d::CCScriptEngineProtocol* pEngine = cocos2d::CCScriptEngineManager::sharedManager()->getScriptEngine(); - pEngine->executeEvent(pEditBox->getScriptEditBoxHandler(), "ended",pEditBox); - pEngine->executeEvent(pEditBox->getScriptEditBoxHandler(), "return",pEditBox); - } - return YES; -} - -/** - * Delegate method called before the text has been changed. - * @param textField The text field containing the text. - * @param range The range of characters to be replaced. - * @param string The replacement string. - * @return YES if the specified text range should be replaced; otherwise, NO to keep the old text. - */ -- (BOOL)textField:(NSTextField *) textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string -{ - if (getEditBoxImplMac()->getMaxLength() < 0) - { - return YES; - } - - NSUInteger oldLength = [[textField stringValue] length]; - NSUInteger replacementLength = [string length]; - NSUInteger rangeLength = range.length; - - NSUInteger newLength = oldLength - rangeLength + replacementLength; - - return newLength <= getEditBoxImplMac()->getMaxLength(); -} - -/** - * Called each time when the text field's text has changed. - */ -- (void)controlTextDidChange:(NSNotification *)notification -{ - cocos2d::extension::CCEditBoxDelegate* pDelegate = getEditBoxImplMac()->getDelegate(); - if (pDelegate != NULL) - { - pDelegate->editBoxTextChanged(getEditBoxImplMac()->getCCEditBox(), getEditBoxImplMac()->getText()); - } - - cocos2d::extension::CCEditBox* pEditBox= getEditBoxImplMac()->getCCEditBox(); - if (NULL != pEditBox && 0 != pEditBox->getScriptEditBoxHandler()) - { - cocos2d::CCScriptEngineProtocol* pEngine = cocos2d::CCScriptEngineManager::sharedManager()->getScriptEngine(); - pEngine->executeEvent(pEditBox->getScriptEditBoxHandler(), "changed",pEditBox); - } -} - -@end - -NS_CC_EXT_BEGIN - -CCEditBoxImpl* __createSystemEditBox(CCEditBox* pEditBox) -{ - return new CCEditBoxImplMac(pEditBox); -} - -CCEditBoxImplMac::CCEditBoxImplMac(CCEditBox* pEditText) -: CCEditBoxImpl(pEditText), m_pSysEdit(NULL), m_nMaxTextLength(-1) -, m_obAnchorPoint(ccp(0.5f, 0.5f)) -{ - //! TODO: Retina on Mac - //! m_bInRetinaMode = [[EAGLView sharedEGLView] contentScaleFactor] == 2.0f ? true : false; - m_bInRetinaMode = false; -} - -CCEditBoxImplMac::~CCEditBoxImplMac() -{ - [m_pSysEdit release]; -} - -void CCEditBoxImplMac::doAnimationWhenKeyboardMove(float duration, float distance) -{ - if ([m_pSysEdit isEditState] || distance < 0.0f) - [m_pSysEdit doAnimationWhenKeyboardMoveWithDuration:duration distance:distance]; -} - -bool CCEditBoxImplMac::initWithSize(const CCSize& size) -{ - CCEGLViewProtocol* eglView = CCEGLView::sharedOpenGLView(); - - NSRect rect = NSMakeRect(0, 0, size.width * eglView->getScaleX(),size.height * eglView->getScaleY()); - - if (m_bInRetinaMode) { - rect.size.width /= 2.0f; - rect.size.height /= 2.0f; - } - - m_pSysEdit = [[EditBoxImplMac alloc] initWithFrame:rect editBox:this]; - - if (!m_pSysEdit) - return false; - - return true; -} - -void CCEditBoxImplMac::setFont(const char* pFontName, int fontSize) -{ - //TODO: -// if(pFontName == NULL) -// return; -// NSString * fntName = [NSString stringWithUTF8String:pFontName]; -// UIFont *textFont = [UIFont fontWithName:fntName size:fontSize]; -// if(textFont != nil) -// [m_pSysEdit.textField setFont:textFont]; -} - -void CCEditBoxImplMac::setPlaceholderFont(const char* pFontName, int fontSize) -{ - // TODO need to be implemented. -} - -void CCEditBoxImplMac::setFontColor(const ccColor3B& color) -{ - m_pSysEdit.textField.textColor = [NSColor colorWithCalibratedRed:color.r / 255.0f green:color.g / 255.0f blue:color.b / 255.0f alpha:1.0f]; -} - -void CCEditBoxImplMac::setPlaceholderFontColor(const ccColor3B& color) -{ - // TODO need to be implemented. -} - -void CCEditBoxImplMac::setInputMode(EditBoxInputMode inputMode) -{ -} - -void CCEditBoxImplMac::setMaxLength(int maxLength) -{ - m_nMaxTextLength = maxLength; -} - -int CCEditBoxImplMac::getMaxLength() -{ - return m_nMaxTextLength; -} - -void CCEditBoxImplMac::setInputFlag(EditBoxInputFlag inputFlag) -{ - // TODO: NSSecureTextField -} - -void CCEditBoxImplMac::setReturnType(KeyboardReturnType returnType) -{ -} - -bool CCEditBoxImplMac::isEditing() -{ - return [m_pSysEdit isEditState] ? true : false; -} - -void CCEditBoxImplMac::setText(const char* pText) -{ - m_pSysEdit.textField.stringValue = [NSString stringWithUTF8String:pText]; -} - -const char* CCEditBoxImplMac::getText(void) -{ - return [m_pSysEdit.textField.stringValue UTF8String]; -} - -void CCEditBoxImplMac::setPlaceHolder(const char* pText) -{ - [[m_pSysEdit.textField cell] setPlaceholderString:[NSString stringWithUTF8String:pText]]; -} - -NSPoint CCEditBoxImplMac::convertDesignCoordToScreenCoord(const CCPoint& designCoord, bool bInRetinaMode) -{ - NSRect frame = [m_pSysEdit.textField frame]; - CGFloat height = frame.size.height; - - CCEGLViewProtocol* eglView = CCEGLView::sharedOpenGLView(); - - CCPoint visiblePos = ccp(designCoord.x * eglView->getScaleX(), designCoord.y * eglView->getScaleY()); - CCPoint screenGLPos = ccpAdd(visiblePos, eglView->getViewPortRect().origin); - - //TODO: I don't know why here needs to substract `height`. - NSPoint screenPos = NSMakePoint(screenGLPos.x, screenGLPos.y-height); - - if (bInRetinaMode) { - screenPos.x = screenPos.x / 2.0f; - screenPos.y = screenPos.y / 2.0f; - } - - CCLOG("[EditBox] pos x = %f, y = %f", screenGLPos.x, screenGLPos.y); - return screenPos; -} - -void CCEditBoxImplMac::adjustTextFieldPosition() -{ - CCSize contentSize = m_pEditBox->getContentSize(); - CCRect rect = CCRectMake(0, 0, contentSize.width, contentSize.height); - - rect = CCRectApplyAffineTransform(rect, m_pEditBox->nodeToWorldTransform()); - - CCPoint designCoord = ccp(rect.origin.x, rect.origin.y + rect.size.height); - [m_pSysEdit setPosition:convertDesignCoordToScreenCoord(designCoord, m_bInRetinaMode)]; -} - -void CCEditBoxImplMac::setPosition(const CCPoint& pos) -{ - m_obPosition = pos; - adjustTextFieldPosition(); -} - -void CCEditBoxImplMac::setVisible(bool visible) -{ - [m_pSysEdit.textField setHidden:!visible]; -} - -void CCEditBoxImplMac::setContentSize(const CCSize& size) -{ - m_tContentSize = size; - CCLOG("[Edit text] content size = (%f, %f)", size.width, size.height); -} - -void CCEditBoxImplMac::setAnchorPoint(const CCPoint& anchorPoint) -{ - CCLOG("[Edit text] anchor point = (%f, %f)", anchorPoint.x, anchorPoint.y); - m_obAnchorPoint = anchorPoint; - setPosition(m_obPosition); -} - -void CCEditBoxImplMac::visit(void) -{ - -} - -void CCEditBoxImplMac::openKeyboard() -{ - [m_pSysEdit openKeyboard]; -} - -void CCEditBoxImplMac::closeKeyboard() -{ - [m_pSysEdit closeKeyboard]; -} - -void CCEditBoxImplMac::onEnter(void) -{ - adjustTextFieldPosition(); -} - -NS_CC_EXT_END - -#endif // #if (CC_TARGET_PLATFORM == CC_PLATFORM_MAC) - - diff --git a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplTizen.h b/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplTizen.h deleted file mode 100644 index a458a6c..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplTizen.h +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2012 James Chen - Copyright (c) 2013 Lee, Jae-Hong - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCEDITBOXIMPLTIZEN_H__ -#define __CCEDITBOXIMPLTIZEN_H__ - -#include "cocos2d.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN) - -#include "ExtensionMacros.h" -#include "CCEditBoxImpl.h" - -NS_CC_EXT_BEGIN - -class CCEditBox; -/** - * @js NA - * @lua NA - */ -class CCEditBoxImplTizen : public CCEditBoxImpl -{ -public: - CCEditBoxImplTizen(CCEditBox* pEditText); - virtual ~CCEditBoxImplTizen(); - - virtual bool initWithSize(const CCSize& size); - virtual void setFont(const char* pFontName, int fontSize); - virtual void setFontColor(const ccColor3B& color); - virtual void setPlaceholderFont(const char* pFontName, int fontSize); - virtual void setPlaceholderFontColor(const ccColor3B& color); - virtual void setInputMode(EditBoxInputMode inputMode); - virtual void setInputFlag(EditBoxInputFlag inputFlag); - virtual void setMaxLength(int maxLength); - virtual int getMaxLength(); - virtual void setReturnType(KeyboardReturnType returnType); - virtual bool isEditing(); - - virtual void setText(const char* pText); - virtual const char* getText(void); - virtual void setPlaceHolder(const char* pText); - virtual void setPosition(const CCPoint& pos); - virtual void setVisible(bool visible); - virtual void setContentSize(const CCSize& size); - virtual void setAnchorPoint(const CCPoint& anchorPoint); - virtual void visit(void); - virtual void onEnter(void); - virtual void doAnimationWhenKeyboardMove(float duration, float distance); - virtual void openKeyboard(); - virtual void closeKeyboard(); - -private: - CCLabelTTF* m_pLabel; - CCLabelTTF* m_pLabelPlaceHolder; - EditBoxInputMode m_eEditBoxInputMode; - EditBoxInputFlag m_eEditBoxInputFlag; - KeyboardReturnType m_eKeyboardReturnType; - - std::string m_strText; - std::string m_strPlaceHolder; - - ccColor3B m_colText; - ccColor3B m_colPlaceHolder; - - int m_nMaxLength; - CCSize m_EditSize; -}; - - -NS_CC_EXT_END - -#endif /* #if (CC_TARGET_PLATFORM == CC_PLATFORM_TIZEN) */ - -#endif /* __CCEDITBOXIMPLTIZEN_H__ */ - diff --git a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplWin.h b/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplWin.h deleted file mode 100644 index 5639af5..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplWin.h +++ /dev/null @@ -1,103 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2013 Jozef Pridavok - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCEditBoxIMPLWIN_H__ -#define __CCEditBoxIMPLWIN_H__ - -#include "cocos2d.h" - -#if (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) - -#include "ExtensionMacros.h" -#include "CCEditBoxImpl.h" - -NS_CC_EXT_BEGIN - -class CCEditBox; -/** - * @js NA - * @lua NA - */ -class CCEditBoxImplWin : public CCEditBoxImpl -{ -public: - CCEditBoxImplWin(CCEditBox* pEditText); - virtual ~CCEditBoxImplWin(); - - virtual bool initWithSize(const CCSize& size); - virtual void setFont(const char* pFontName, int fontSize); - virtual void setFontColor(const ccColor3B& color); - virtual void setPlaceholderFont(const char* pFontName, int fontSize); - virtual void setPlaceholderFontColor(const ccColor3B& color); - virtual void setInputMode(EditBoxInputMode inputMode); - virtual void setInputFlag(EditBoxInputFlag inputFlag); - virtual void setMaxLength(int maxLength); - virtual int getMaxLength(); - virtual void setReturnType(KeyboardReturnType returnType); - virtual bool isEditing(); - - virtual void setText(const char* pText); - virtual const char* getText(void); - virtual void setPlaceHolder(const char* pText); - virtual void setPosition(const CCPoint& pos); - virtual void setVisible(bool visible); - virtual void setContentSize(const CCSize& size); - virtual void setAnchorPoint(const CCPoint& anchorPoint); - virtual void visit(void); - virtual void doAnimationWhenKeyboardMove(float duration, float distance); - virtual void openKeyboard(); - virtual void closeKeyboard(); - virtual void onEnter(void); -private: - - CCLabelTTF* m_pLabel; - CCLabelTTF* m_pLabelPlaceHolder; - EditBoxInputMode m_eEditBoxInputMode; - EditBoxInputFlag m_eEditBoxInputFlag; - KeyboardReturnType m_eKeyboardReturnType; - - std::string m_strText; - std::string m_strPlaceHolder; - - ccColor3B m_colText; - ccColor3B m_colPlaceHolder; - - int m_nMaxLength; - CCSize m_EditSize; - - /* - CCSize m_tContentSize; - HWND m_pSysEdit; - int m_nMaxTextLength; - */ -}; - - -NS_CC_EXT_END - -#endif /* (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) */ - -#endif /* __CCEditBoxIMPLWIN_H__ */ - diff --git a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplWp8.h b/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplWp8.h deleted file mode 100644 index fe6d51a..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCEditBox/CCEditBoxImplWp8.h +++ /dev/null @@ -1,87 +0,0 @@ -/**************************************************************************** -Copyright (c) 2014 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ -#ifndef __CCEditBoxIMPLWP8_H__ -#define __CCEditBoxIMPLWP8_H__ - -#include "ExtensionMacros.h" -#include "CCEditBoxImpl.h" - -NS_CC_EXT_BEGIN - -class CCEditBox; - -class CCEditBoxImplWp8 : public CCEditBoxImpl -{ -public: - CCEditBoxImplWp8(CCEditBox* pEditText); - virtual ~CCEditBoxImplWp8(); - - virtual bool initWithSize(const CCSize& size); - virtual void setFont(const char* pFontName, int fontSize); - virtual void setFontColor(const ccColor3B& color); - virtual void setPlaceholderFont(const char* pFontName, int fontSize); - virtual void setPlaceholderFontColor(const ccColor3B& color); - virtual void setInputMode(EditBoxInputMode inputMode); - virtual void setInputFlag(EditBoxInputFlag inputFlag); - virtual void setMaxLength(int maxLength); - virtual int getMaxLength(); - virtual void setReturnType(KeyboardReturnType returnType); - virtual bool isEditing(); - - virtual void setText(const char* pText); - virtual const char* getText(void); - virtual void setPlaceHolder(const char* pText); - virtual void setPosition(const CCPoint& pos); - virtual void setVisible(bool visible); - virtual void setContentSize(const CCSize& size); - virtual void setAnchorPoint(const CCPoint& anchorPoint); - virtual void visit(void); - virtual void doAnimationWhenKeyboardMove(float duration, float distance); - virtual void openKeyboard(); - virtual void closeKeyboard(); - virtual void onEnter(void); -private: - Platform::String^ stringToPlatformString(std::string strSrc); - std::string PlatformStringTostring(Platform::String^ strSrc); -private: - - CCLabelTTF* m_pLabel; - CCLabelTTF* m_pLabelPlaceHolder; - EditBoxInputMode m_eEditBoxInputMode; - EditBoxInputFlag m_eEditBoxInputFlag; - KeyboardReturnType m_eKeyboardReturnType; - - std::string m_strText; - std::string m_strPlaceHolder; - - ccColor3B m_colText; - ccColor3B m_colPlaceHolder; - - int m_nMaxLength; - CCSize m_EditSize; -}; - -NS_CC_EXT_END - -#endif \ No newline at end of file diff --git a/cappuccino-sdk/incl/extensions/GUI/CCScrollView/CCScrollView.h b/cappuccino-sdk/incl/extensions/GUI/CCScrollView/CCScrollView.h deleted file mode 100644 index 538a72e..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCScrollView/CCScrollView.h +++ /dev/null @@ -1,356 +0,0 @@ -/**************************************************************************** - Copyright (c) 2012 cocos2d-x.org - Copyright (c) 2010 Sangwoo Im - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCSCROLLVIEW_H__ -#define __CCSCROLLVIEW_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" - -NS_CC_EXT_BEGIN - -/** - * @addtogroup GUI - * @{ - */ - -typedef enum { - kCCScrollViewDirectionNone = -1, - kCCScrollViewDirectionHorizontal = 0, - kCCScrollViewDirectionVertical, - kCCScrollViewDirectionBoth -} CCScrollViewDirection; - -class CCScrollView; -/** - * @js NA - * @lua NA - */ -class CCScrollViewDelegate -{ -public: - virtual ~CCScrollViewDelegate() {} - virtual void scrollViewDidScroll(CCScrollView* view) = 0; - virtual void scrollViewDidZoom(CCScrollView* view) = 0; -}; - - -/** - * ScrollView support for cocos2d for iphone. - * It provides scroll view functionalities to cocos2d projects natively. - * @lua NA - */ -class CCScrollView : public CCLayer -{ -public: - /** - * @js ctor - */ - CCScrollView(); - /** - * @js NA - * @lua NA - */ - virtual ~CCScrollView(); - - bool init(); - virtual void registerWithTouchDispatcher(); - - /** - * Returns an autoreleased scroll view object. - * - * @param size view size - * @param container parent object - * @return autoreleased scroll view object - */ - static CCScrollView* create(CCSize size, CCNode* container = NULL); - - /** - * Returns an autoreleased scroll view object. - * - * @param size view size - * @param container parent object - * @return autoreleased scroll view object - */ - static CCScrollView* create(); - - /** - * Returns a scroll view object - * - * @param size view size - * @param container parent object - * @return scroll view object - */ - bool initWithViewSize(CCSize size, CCNode* container = NULL); - - - /** - * Sets a new content offset. It ignores max/min offset. It just sets what's given. (just like UIKit's UIScrollView) - * - * @param offset new offset - * @param If YES, the view scrolls to the new offset - */ - void setContentOffset(CCPoint offset, bool animated = false); - CCPoint getContentOffset(); - /** - * Sets a new content offset. It ignores max/min offset. It just sets what's given. (just like UIKit's UIScrollView) - * You can override the animation duration with this method. - * - * @param offset new offset - * @param animation duration - */ - void setContentOffsetInDuration(CCPoint offset, float dt); - - void setZoomScale(float s); - /** - * Sets a new scale and does that for a predefined duration. - * - * @param s a new scale vale - * @param animated if YES, scaling is animated - */ - void setZoomScale(float s, bool animated); - - float getZoomScale(); - - /** - * Sets a new scale for container in a given duration. - * - * @param s a new scale value - * @param animation duration - */ - void setZoomScaleInDuration(float s, float dt); - /** - * Returns the current container's minimum offset. You may want this while you animate scrolling by yourself - */ - CCPoint minContainerOffset(); - /** - * Returns the current container's maximum offset. You may want this while you animate scrolling by yourself - */ - CCPoint maxContainerOffset(); - /** - * Determines if a given node's bounding box is in visible bounds - * - * @return YES if it is in visible bounds - */ - bool isNodeVisible(CCNode * node); - /** - * Provided to make scroll view compatible with SWLayer's pause method - */ - void pause(CCObject* sender); - /** - * Provided to make scroll view compatible with SWLayer's resume method - */ - void resume(CCObject* sender); - - - bool isDragging() {return m_bDragging;} - bool isTouchMoved() { return m_bTouchMoved; } - bool isBounceable() { return m_bBounceable; } - void setBounceable(bool bBounceable) { m_bBounceable = bBounceable; } - - /** - * size to clip. CCNode boundingBox uses contentSize directly. - * It's semantically different what it actually means to common scroll views. - * Hence, this scroll view will use a separate size property. - */ - CCSize getViewSize() { return m_tViewSize; } - void setViewSize(CCSize size); - - CCNode * getContainer(); - void setContainer(CCNode * pContainer); - - /** - * direction allowed to scroll. CCScrollViewDirectionBoth by default. - */ - CCScrollViewDirection getDirection() { return m_eDirection; } - virtual void setDirection(CCScrollViewDirection eDirection) { m_eDirection = eDirection; } - - CCScrollViewDelegate* getDelegate() { return m_pDelegate; } - void setDelegate(CCScrollViewDelegate* pDelegate) { m_pDelegate = pDelegate; } - - /** override functions */ - // optional - virtual bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent); - - virtual void setContentSize(const CCSize & size); - virtual const CCSize& getContentSize() const; - - void updateInset(); - /** - * Determines whether it clips its children or not. - */ - bool isClippingToBounds() { return m_bClippingToBounds; } - void setClippingToBounds(bool bClippingToBounds) { m_bClippingToBounds = bClippingToBounds; } - /** - * @js NA - */ - virtual void visit(); - virtual void addChild(CCNode * child, int zOrder, int tag); - virtual void addChild(CCNode * child, int zOrder); - virtual void addChild(CCNode * child); - void setTouchEnabled(bool e); -private: - /** - * Relocates the container at the proper offset, in bounds of max/min offsets. - * - * @param animated If YES, relocation is animated - */ - void relocateContainer(bool animated); - /** - * implements auto-scrolling behavior. change SCROLL_DEACCEL_RATE as needed to choose - * deacceleration speed. it must be less than 1.0f. - * - * @param dt delta - */ - void deaccelerateScrolling(float dt); - /** - * This method makes sure auto scrolling causes delegate to invoke its method - */ - void performedAnimatedScroll(float dt); - /** - * Expire animated scroll delegate calls - */ - void stoppedAnimatedScroll(CCNode* node); - /** - * clip this view so that outside of the visible bounds can be hidden. - */ - void beforeDraw(); - /** - * retract what's done in beforeDraw so that there's no side effect to - * other nodes. - */ - void afterDraw(); - /** - * Zoom handling - */ - void handleZoom(); - -protected: - CCRect getViewRect(); - - /** - * current zoom scale - */ - float m_fZoomScale; - /** - * min zoom scale - */ - float m_fMinZoomScale; - /** - * max zoom scale - */ - float m_fMaxZoomScale; - /** - * scroll view delegate - */ - CCScrollViewDelegate* m_pDelegate; - - CCScrollViewDirection m_eDirection; - /** - * If YES, the view is being dragged. - */ - bool m_bDragging; - - /** - * Content offset. Note that left-bottom point is the origin - */ - CCPoint m_tContentOffset; - - /** - * Container holds scroll view contents, Sets the scrollable container object of the scroll view - */ - CCNode* m_pContainer; - /** - * Determiens whether user touch is moved after begin phase. - */ - bool m_bTouchMoved; - /** - * max inset point to limit scrolling by touch - */ - CCPoint m_fMaxInset; - /** - * min inset point to limit scrolling by touch - */ - CCPoint m_fMinInset; - /** - * Determines whether the scroll view is allowed to bounce or not. - */ - bool m_bBounceable; - - bool m_bClippingToBounds; - - /** - * scroll speed - */ - CCPoint m_tScrollDistance; - /** - * Touch point - */ - CCPoint m_tTouchPoint; - /** - * length between two fingers - */ - float m_fTouchLength; - /** - * UITouch objects to detect multitouch - */ - CCArray* m_pTouches; - /** - * size to clip. CCNode boundingBox uses contentSize directly. - * It's semantically different what it actually means to common scroll views. - * Hence, this scroll view will use a separate size property. - */ - CCSize m_tViewSize; - /** - * max and min scale - */ - float m_fMinScale, m_fMaxScale; - /** - * scissor rect for parent, just for restoring GL_SCISSOR_BOX - */ - CCRect m_tParentScissorRect; - bool m_bScissorRestored; -public: - enum ScrollViewScriptEventType - { - kScrollViewScroll = 0, - kScrollViewZoom, - }; - void registerScriptHandler(int nFunID,int nScriptEventType); - void unregisterScriptHandler(int nScriptEventType); - int getScriptHandler(int nScriptEventType); -private: - std::map m_mapScriptHandler; -}; - -// end of GUI group -/// @} - -NS_CC_EXT_END - -#endif /* __CCSCROLLVIEW_H__ */ diff --git a/cappuccino-sdk/incl/extensions/GUI/CCScrollView/CCSorting.h b/cappuccino-sdk/incl/extensions/GUI/CCScrollView/CCSorting.h deleted file mode 100644 index 76cb7b5..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCScrollView/CCSorting.h +++ /dev/null @@ -1,116 +0,0 @@ -/**************************************************************************** - Copyright (c) 2012 cocos2d-x.org - Copyright (c) 2010 Sangwoo Im - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCSORTING_H__ -#define __CCSORTING_H__ - -#include "cocoa/CCArray.h" -#include "ExtensionMacros.h" - -NS_CC_EXT_BEGIN -/** - * @js NA - * @lua NA - */ -class CCSortableObject -{ -public: - virtual ~CCSortableObject() {} - virtual void setObjectID(unsigned int objectID) = 0; - virtual unsigned int getObjectID() = 0; -}; -/** - * @js NA - * @lua NA - */ -class CCArrayForObjectSorting : public CCArray -{ -public: - CCArrayForObjectSorting() : CCArray() {} - /*! - * Inserts a given object into array. - * - * Inserts a given object into array with key and value that are used in - * sorting. "value" must respond to message, compare:, which returns - * (NSComparisonResult). If it does not respond to the message, it is appended. - * If the compare message does not result NSComparisonResult, sorting behavior - * is not defined. It ignores duplicate entries and inserts next to it. - * - * @param object to insert - */ - void insertSortedObject(CCSortableObject* object); - - /*! - * Removes an object in array. - * - * Removes an object with given key and value. If no object is found in array - * with the key and value, no action is taken. - * - * @param value to remove - */ - void removeSortedObject(CCSortableObject* object); - /*! - * Sets a new value of the key for the given object. - * - * In case where sorting value must be changed, this message must be sent to - * keep consistency of being sorted. If it is changed externally, it must be - * sorted completely again. - * - * @param value to set - * @param object the object which has the value - */ - void setObjectID_ofSortedObject(unsigned int tag, CCSortableObject* object); - - CCSortableObject* objectWithObjectID(unsigned int tag); - /*! - * Returns an object with given key and value. - * - * Returns an object with given key and value. If no object is found, - * it returns nil. - * - * @param value to locate object - * @return object found or nil. - */ - CCSortableObject* getObjectWithObjectID(unsigned int tag); - - /*! - * Returns an index of the object with given key and value. - * - * Returns the index of an object with given key and value. - * If no object is found, it returns an index at which the given object value - * would have been located. If object must be located at the end of array, - * it returns the length of the array, which is out of bound. - * - * @param value to locate object - * @return index of an object found - */ - unsigned int indexOfSortedObject(CCSortableObject* obj); - -}; - -NS_CC_EXT_END - -#endif /* __CCSORTING_H__ */ - diff --git a/cappuccino-sdk/incl/extensions/GUI/CCScrollView/CCTableView.h b/cappuccino-sdk/incl/extensions/GUI/CCScrollView/CCTableView.h deleted file mode 100644 index 4295a37..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCScrollView/CCTableView.h +++ /dev/null @@ -1,305 +0,0 @@ -/**************************************************************************** - Copyright (c) 2012 cocos2d-x.org - Copyright (c) 2010 Sangwoo Im - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCTABLEVIEW_H__ -#define __CCTABLEVIEW_H__ - -#include "CCScrollView.h" -#include "CCTableViewCell.h" - -#include -#include - -NS_CC_EXT_BEGIN - -class CCTableView; -class CCArrayForObjectSorting; - -typedef enum { - kCCTableViewFillTopDown, - kCCTableViewFillBottomUp -} CCTableViewVerticalFillOrder; - -/** - * Sole purpose of this delegate is to single touch event in this version. - * @js NA - * @lua NA - */ -class CCTableViewDelegate : public CCScrollViewDelegate -{ -public: - /** - * Delegate to respond touch event - * - * @param table table contains the given cell - * @param cell cell that is touched - */ - virtual void tableCellTouched(CCTableView* table, CCTableViewCell* cell) = 0; - - /** - * Delegate to respond a table cell press event. - * - * @param table table contains the given cell - * @param cell cell that is pressed - */ - virtual void tableCellHighlight(CCTableView* table, CCTableViewCell* cell){}; - - /** - * Delegate to respond a table cell release event - * - * @param table table contains the given cell - * @param cell cell that is pressed - */ - virtual void tableCellUnhighlight(CCTableView* table, CCTableViewCell* cell){}; - - /** - * Delegate called when the cell is about to be recycled. Immediately - * after this call the cell will be removed from the scene graph and - * recycled. - * - * @param table table contains the given cell - * @param cell cell that is pressed - */ - virtual void tableCellWillRecycle(CCTableView* table, CCTableViewCell* cell){}; - -}; - - -/** - * Data source that governs table backend data. - * @lua NA - */ -class CCTableViewDataSource -{ -public: - virtual ~CCTableViewDataSource() {} - - /** - * cell size for a given index - * - * @param idx the index of a cell to get a size - * @return size of a cell at given index - */ - virtual CCSize tableCellSizeForIndex(CCTableView *table, unsigned int idx) { - return cellSizeForTable(table); - }; - /** - * cell height for a given table. - * - * @param table table to hold the instances of Class - * @return cell size - */ - virtual CCSize cellSizeForTable(CCTableView *table) { - return CCSizeZero; - }; - /** - * a cell instance at a given index - * - * @param idx index to search for a cell - * @return cell found at idx - */ - virtual CCTableViewCell* tableCellAtIndex(CCTableView *table, unsigned int idx) = 0; - /** - * Returns number of cells in a given table view. - * - * @return number of cells - */ - virtual unsigned int numberOfCellsInTableView(CCTableView *table) = 0; - -}; - - -/** - * UITableView counterpart for cocos2d for iphone. - * - * this is a very basic, minimal implementation to bring UITableView-like component into cocos2d world. - * @lua NA - */ -class CCTableView : public CCScrollView, public CCScrollViewDelegate -{ -public: - /** - * @js ctor - */ - CCTableView(); - /** - * @js NA - */ - virtual ~CCTableView(); - - /** - * An intialized table view object - * - * @param dataSource data source - * @param size view size - * @return table view - */ - static CCTableView* create(CCTableViewDataSource* dataSource, CCSize size); - /** - * An initialized table view object - * - * @param dataSource data source; - * @param size view size - * @param container parent object for cells - * @return table view - */ - static CCTableView* create(CCTableViewDataSource* dataSource, CCSize size, CCNode *container); - - /** - * data source - * @js NA - */ - CCTableViewDataSource* getDataSource() { return m_pDataSource; } - void setDataSource(CCTableViewDataSource* source) { m_pDataSource = source; } - /** - * delegate - * @js NA - */ - CCTableViewDelegate* getDelegate() { return m_pTableViewDelegate; } - void setDelegate(CCTableViewDelegate* pDelegate) { m_pTableViewDelegate = pDelegate; } - - /** - * determines how cell is ordered and filled in the view. - */ - void setVerticalFillOrder(CCTableViewVerticalFillOrder order); - CCTableViewVerticalFillOrder getVerticalFillOrder(); - - - bool initWithViewSize(CCSize size, CCNode* container = NULL); - /** - * Updates the content of the cell at a given index. - * - * @param idx index to find a cell - */ - void updateCellAtIndex(unsigned int idx); - /** - * Inserts a new cell at a given index - * - * @param idx location to insert - */ - void insertCellAtIndex(unsigned int idx); - /** - * Removes a cell at a given index - * - * @param idx index to find a cell - */ - void removeCellAtIndex(unsigned int idx); - /** - * reloads data from data source. the view will be refreshed. - */ - void reloadData(); - /** - * Dequeues a free cell if available. nil if not. - * - * @return free cell - */ - CCTableViewCell *dequeueCell(); - - /** - * Returns an existing cell at a given index. Returns nil if a cell is nonexistent at the moment of query. - * - * @param idx index - * @return a cell at a given index - */ - CCTableViewCell *cellAtIndex(unsigned int idx); - - - virtual void scrollViewDidScroll(CCScrollView* view); - virtual void scrollViewDidZoom(CCScrollView* view) {} - - virtual bool ccTouchBegan(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchMoved(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchEnded(CCTouch *pTouch, CCEvent *pEvent); - virtual void ccTouchCancelled(CCTouch *pTouch, CCEvent *pEvent); - -protected: - - CCTableViewCell *m_pTouchedCell; - /** - * vertical direction of cell filling - */ - CCTableViewVerticalFillOrder m_eVordering; - - /** - * index set to query the indexes of the cells used. - */ - std::set* m_pIndices; - - /** - * vector with all cell positions - */ - std::vector m_vCellsPositions; - //NSMutableIndexSet *indices_; - /** - * cells that are currently in the table - */ - CCArrayForObjectSorting* m_pCellsUsed; - /** - * free list of cells - */ - CCArrayForObjectSorting* m_pCellsFreed; - /** - * weak link to the data source object - */ - CCTableViewDataSource* m_pDataSource; - /** - * weak link to the delegate object - */ - CCTableViewDelegate* m_pTableViewDelegate; - - CCScrollViewDirection m_eOldDirection; - - int __indexFromOffset(CCPoint offset); - unsigned int _indexFromOffset(CCPoint offset); - CCPoint __offsetFromIndex(unsigned int index); - CCPoint _offsetFromIndex(unsigned int index); - - void _moveCellOutOfSight(CCTableViewCell *cell); - void _setIndexForCell(unsigned int index, CCTableViewCell *cell); - void _addCellIfNecessary(CCTableViewCell * cell); - - void _updateCellPositions(); -public: - void _updateContentSize(); - - enum TableViewScriptEventType - { - kTableViewScroll = 0, - kTableViewZoom, - kTableCellTouched, - kTableCellHighLight, - kTableCellUnhighLight, - kTableCellWillRecycle, - kTableCellSizeForIndex, - kTableCellSizeAtIndex, - kNumberOfCellsInTableView, - }; - void unregisterAllScriptHandler(); -}; - - -NS_CC_EXT_END - -#endif /* __CCTABLEVIEW_H__ */ diff --git a/cappuccino-sdk/incl/extensions/GUI/CCScrollView/CCTableViewCell.h b/cappuccino-sdk/incl/extensions/GUI/CCScrollView/CCTableViewCell.h deleted file mode 100644 index bc9a042..0000000 --- a/cappuccino-sdk/incl/extensions/GUI/CCScrollView/CCTableViewCell.h +++ /dev/null @@ -1,60 +0,0 @@ -/**************************************************************************** - Copyright (c) 2012 cocos2d-x.org - Copyright (c) 2010 Sangwoo Im - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCTABLEVIEWCELL_H__ -#define __CCTABLEVIEWCELL_H__ - -#include "base_nodes/CCNode.h" -#include "CCSorting.h" - -NS_CC_EXT_BEGIN - -/** - * Abstract class for SWTableView cell node - * @lua NA - */ -class CCTableViewCell: public CCNode, public CCSortableObject -{ -public: - CCTableViewCell() {} - /** - * The index used internally by SWTableView and its subclasses - */ - unsigned int getIdx(); - void setIdx(unsigned int uIdx); - /** - * Cleans up any resources linked to this cell and resets idx property. - */ - void reset(); - - void setObjectID(unsigned int uIdx); - unsigned int getObjectID(); -private: - unsigned int m_uIdx; -}; - -NS_CC_EXT_END - -#endif /* __CCTABLEVIEWCELL_H__ */ diff --git a/cappuccino-sdk/incl/extensions/LocalStorage/LocalStorage.h b/cappuccino-sdk/incl/extensions/LocalStorage/LocalStorage.h deleted file mode 100644 index c387046..0000000 --- a/cappuccino-sdk/incl/extensions/LocalStorage/LocalStorage.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - -Copyright (c) 2012 - Zynga Inc. - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -*/ - -/* - Local Storage support for the JS Bindings for iOS. - Works on cocos2d-iphone and cocos2d-x. - */ - -#ifndef __JSB_LOCALSTORAGE_H -#define __JSB_LOCALSTORAGE_H - -#include -#include - -/** Initializes the database. If path is null, it will create an in-memory DB */ -void localStorageInit( const char *fullpath); - -/** Frees the allocated resources */ -void localStorageFree(); - -/** sets an item in the LS */ -void localStorageSetItem( const char *key, const char *value); - -/** gets an item from the LS */ -const char* localStorageGetItem( const char *key ); - -/** removes an item from the LS */ -void localStorageRemoveItem( const char *key ); - -#endif // __JSB_LOCALSTORAGE_H diff --git a/cappuccino-sdk/incl/extensions/cocos-ext.h b/cappuccino-sdk/incl/extensions/cocos-ext.h deleted file mode 100644 index f53686b..0000000 --- a/cappuccino-sdk/incl/extensions/cocos-ext.h +++ /dev/null @@ -1,83 +0,0 @@ -#ifndef __COCOS2D_EXT_H__ -#define __COCOS2D_EXT_H__ - -#include "ExtensionMacros.h" - -#include "CCBReader/CCBFileLoader.h" -#include "CCBReader/CCBMemberVariableAssigner.h" -#include "CCBReader/CCBReader.h" -#include "CCBReader/CCBSelectorResolver.h" -#include "CCBReader/CCControlButtonLoader.h" -#include "CCBReader/CCControlLoader.h" -#include "CCBReader/CCLabelBMFontLoader.h" -#include "CCBReader/CCLabelTTFLoader.h" -#include "CCBReader/CCLayerColorLoader.h" -#include "CCBReader/CCLayerGradientLoader.h" -#include "CCBReader/CCLayerLoader.h" -#include "CCBReader/CCMenuItemImageLoader.h" -#include "CCBReader/CCMenuItemLoader.h" -#include "CCBReader/CCMenuLoader.h" -#include "CCBReader/CCNodeLoader.h" -#include "CCBReader/CCNodeLoaderLibrary.h" -#include "CCBReader/CCNodeLoaderListener.h" -#include "CCBReader/CCParticleSystemQuadLoader.h" -#include "CCBReader/CCScale9SpriteLoader.h" -#include "CCBReader/CCScrollViewLoader.h" -#include "CCBReader/CCSpriteLoader.h" -#include "CCBReader/CCBAnimationManager.h" -#include "CCBReader/CCBKeyframe.h" -#include "CCBReader/CCBSequence.h" -#include "CCBReader/CCBSequenceProperty.h" -#include "CCBReader/CCBValue.h" -#include "CCBReader/CCData.h" -#include "CCBReader/CCNode+CCBRelativePositioning.h" - -#include "GUI/CCControlExtension/CCControlExtensions.h" -#include "GUI/CCScrollView/CCScrollView.h" -#include "GUI/CCScrollView/CCTableView.h" -#include "GUI/CCEditBox/CCEditBox.h" - -#include "network/HttpRequest.h" -#include "network/HttpResponse.h" -#include "network/HttpClient.h" - -#include "CocoStudio/Armature/CCArmature.h" -#include "CocoStudio/Armature/CCBone.h" -#include "CocoStudio/Armature/animation/CCArmatureAnimation.h" -#include "CocoStudio/Armature/datas/CCDatas.h" -#include "CocoStudio/Armature/display/CCBatchNode.h" -#include "CocoStudio/Armature/display/CCDecorativeDisplay.h" -#include "CocoStudio/Armature/display/CCDisplayManager.h" -#include "CocoStudio/Armature/display/CCSkin.h" -#include "CocoStudio/Armature/physics/CCColliderDetector.h" -#include "CocoStudio/Armature/utils/CCArmatureDataManager.h" -#include "CocoStudio/Armature/utils/CCDataReaderHelper.h" -#include "CocoStudio/Armature/utils/CCTweenFunction.h" -#include "CocoStudio/Armature/external_tool/sigslot.h" - -#include "CocoStudio/Trigger/TriggerBase.h" - -#include "CocoStudio/Components/CCComBase.h" -#include "CocoStudio/Components/CCComAttribute.h" -#include "CocoStudio/Components/CCComAudio.h" -#include "CocoStudio/Components/CCComController.h" -#include "CocoStudio/Components/CCComRender.h" - -#include "CocoStudio/GUI/System/CocosGUI.h" - -#include "CocoStudio/Json/DictionaryHelper.h" - -#include "CocoStudio/Reader/SceneReader.h" - -#include "CocoStudio/Action/CCActionManager.h" - - -// Physics integration -#if CC_ENABLE_CHIPMUNK_INTEGRATION || CC_ENABLE_BOX2D_INTEGRATION -#include "physics_nodes/CCPhysicsDebugNode.h" -#include "physics_nodes/CCPhysicsSprite.h" -#endif - -#include "spine/spine-cocos2dx.h" - -#endif /* __COCOS2D_EXT_H__ */ diff --git a/cappuccino-sdk/incl/extensions/network/HttpClient.h b/cappuccino-sdk/incl/extensions/network/HttpClient.h deleted file mode 100644 index 9470517..0000000 --- a/cappuccino-sdk/incl/extensions/network/HttpClient.h +++ /dev/null @@ -1,120 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - Copyright (c) 2012 greathqy - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __CCHTTPREQUEST_H__ -#define __CCHTTPREQUEST_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" - -#include "HttpRequest.h" -#include "HttpResponse.h" - -NS_CC_EXT_BEGIN - -/** - * @addtogroup Network - * @{ - */ - - -/** @brief Singleton that handles asynchrounous http requests - * Once the request completed, a callback will issued in main thread when it provided during make request - * @js NA - * @lua NA - */ -class CCHttpClient : public CCObject -{ -public: - /** Return the shared instance **/ - static CCHttpClient *getInstance(); - - /** Relase the shared instance **/ - static void destroyInstance(); - - /** - * Add a get request to task queue - * @param request a CCHttpRequest object, which includes url, response callback etc. - please make sure request->_requestData is clear before calling "send" here. - * @return NULL - */ - void send(CCHttpRequest* request); - - - /** - * Change the connect timeout - * @param timeout - * @return NULL - */ - inline void setTimeoutForConnect(int value) {_timeoutForConnect = value;}; - - /** - * Get connect timeout - * @return int - * - */ - inline int getTimeoutForConnect() {return _timeoutForConnect;} - - - /** - * Change the download timeout - * @param value - * @return NULL - */ - inline void setTimeoutForRead(int value) {_timeoutForRead = value;}; - - - /** - * Get download timeout - * @return int - */ - inline int getTimeoutForRead() {return _timeoutForRead;}; - -private: - CCHttpClient(); - virtual ~CCHttpClient(); - bool init(void); - - /** - * Init pthread mutex, semaphore, and create new thread for http requests - * @return bool - */ - bool lazyInitThreadSemphore(); - /** Poll function called from main thread to dispatch callbacks when http requests finished **/ - void dispatchResponseCallbacks(float delta); - -private: - int _timeoutForConnect; - int _timeoutForRead; - - // std::string reqId; -}; - -// end of Network group -/// @} - -NS_CC_EXT_END - -#endif //__CCHTTPREQUEST_H__ diff --git a/cappuccino-sdk/incl/extensions/network/HttpRequest.h b/cappuccino-sdk/incl/extensions/network/HttpRequest.h deleted file mode 100644 index 30097d7..0000000 --- a/cappuccino-sdk/incl/extensions/network/HttpRequest.h +++ /dev/null @@ -1,235 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __HTTP_REQUEST_H__ -#define __HTTP_REQUEST_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" - -NS_CC_EXT_BEGIN - -class CCHttpClient; -class CCHttpResponse; -typedef void (CCObject::*SEL_HttpResponse)(CCHttpClient* client, CCHttpResponse* response); -#define httpresponse_selector(_SELECTOR) (cocos2d::extension::SEL_HttpResponse)(&_SELECTOR) - -/** - @brief defines the object which users must packed for CCHttpClient::send(HttpRequest*) method. - Please refer to samples/TestCpp/Classes/ExtensionTest/NetworkTest/HttpClientTest.cpp as a sample - @since v2.0.2 - @js NA - @lua NA - */ - -class CCHttpRequest : public CCObject -{ -public: - /** Use this enum type as param in setReqeustType(param) */ - typedef enum - { - kHttpGet, - kHttpPost, - kHttpPut, - kHttpDelete, - kHttpUnkown, - } HttpRequestType; - - /** Constructor - Because HttpRequest object will be used between UI thead and network thread, - requestObj->autorelease() is forbidden to avoid crashes in CCAutoreleasePool - new/retain/release still works, which means you need to release it manually - Please refer to HttpRequestTest.cpp to find its usage - */ - CCHttpRequest() - { - _requestType = kHttpUnkown; - _url.clear(); - _requestData.clear(); - _tag.clear(); - _pTarget = NULL; - _pSelector = NULL; - _pUserData = NULL; - }; - - /** Destructor */ - virtual ~CCHttpRequest() - { - if (_pTarget) - { - _pTarget->release(); - } - }; - - /** Override autorelease method to avoid developers to call it */ - CCObject* autorelease(void) - { - CCAssert(false, "HttpResponse is used between network thread and ui thread \ - therefore, autorelease is forbidden here"); - return NULL; - } - - // setter/getters for properties - - /** Required field for HttpRequest object before being sent. - kHttpGet & kHttpPost is currently supported - */ - inline void setRequestType(HttpRequestType type) - { - _requestType = type; - }; - /** Get back the kHttpGet/Post/... enum value */ - inline HttpRequestType getRequestType() - { - return _requestType; - }; - - /** Required field for HttpRequest object before being sent. - */ - inline void setUrl(const char* url) - { - _url = url; - }; - /** Get back the setted url */ - inline const char* getUrl() - { - return _url.c_str(); - }; - - /** Option field. You can set your post data here - */ - inline void setRequestData(const char* buffer, unsigned int len) - { - _requestData.assign(buffer, buffer + len); - }; - /** Get the request data pointer back */ - inline char* getRequestData() - { - return &(_requestData.front()); - } - /** Get the size of request data back */ - inline int getRequestDataSize() - { - return _requestData.size(); - } - - /** Option field. You can set a string tag to identify your request, this tag can be found in HttpResponse->getHttpRequest->getTag() - */ - inline void setTag(const char* tag) - { - _tag = tag; - }; - /** Get the string tag back to identify the request. - The best practice is to use it in your MyClass::onMyHttpRequestCompleted(sender, HttpResponse*) callback - */ - inline const char* getTag() - { - return _tag.c_str(); - }; - - /** Option field. You can attach a customed data in each request, and get it back in response callback. - But you need to new/delete the data pointer manully - */ - inline void setUserData(void* pUserData) - { - _pUserData = pUserData; - }; - /** Get the pre-setted custom data pointer back. - Don't forget to delete it. HttpClient/HttpResponse/HttpRequest will do nothing with this pointer - */ - inline void* getUserData() - { - return _pUserData; - }; - - /** Required field. You should set the callback selector function at ack the http request completed - */ - CC_DEPRECATED_ATTRIBUTE inline void setResponseCallback(CCObject* pTarget, SEL_CallFuncND pSelector) - { - setResponseCallback(pTarget, (SEL_HttpResponse) pSelector); - } - - inline void setResponseCallback(CCObject* pTarget, SEL_HttpResponse pSelector) - { - _pTarget = pTarget; - _pSelector = pSelector; - - if (_pTarget) - { - _pTarget->retain(); - } - } - /** Get the target of callback selector funtion, mainly used by CCHttpClient */ - inline CCObject* getTarget() - { - return _pTarget; - } - - /* This sub class is just for migration SEL_CallFuncND to SEL_HttpResponse, - someday this way will be removed */ - class _prxy - { - public: - _prxy( SEL_HttpResponse cb ) :_cb(cb) {} - ~_prxy(){}; - operator SEL_HttpResponse() const { return _cb; } - CC_DEPRECATED_ATTRIBUTE operator SEL_CallFuncND() const { return (SEL_CallFuncND) _cb; } - protected: - SEL_HttpResponse _cb; - }; - - /** Get the selector function pointer, mainly used by CCHttpClient */ - inline _prxy getSelector() - { - return _prxy(_pSelector); - } - - /** Set any custom headers **/ - inline void setHeaders(std::vector pHeaders) - { - _headers=pHeaders; - } - - /** Get custom headers **/ - inline std::vector getHeaders() - { - return _headers; - } - - -protected: - // properties - HttpRequestType _requestType; /// kHttpRequestGet, kHttpRequestPost or other enums - std::string _url; /// target url that this request is sent to - std::vector _requestData; /// used for POST - std::string _tag; /// user defined tag, to identify different requests in response callback - CCObject* _pTarget; /// callback target of pSelector function - SEL_HttpResponse _pSelector; /// callback function, e.g. MyLayer::onHttpResponse(CCHttpClient *sender, CCHttpResponse * response) - void* _pUserData; /// You can add your customed data here - std::vector _headers; /// custom http headers -}; - -NS_CC_EXT_END - -#endif //__HTTP_REQUEST_H__ diff --git a/cappuccino-sdk/incl/extensions/network/HttpResponse.h b/cappuccino-sdk/incl/extensions/network/HttpResponse.h deleted file mode 100644 index 89e7d77..0000000 --- a/cappuccino-sdk/incl/extensions/network/HttpResponse.h +++ /dev/null @@ -1,185 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#ifndef __HTTP_RESPONSE__ -#define __HTTP_RESPONSE__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" -#include "HttpRequest.h" - -NS_CC_EXT_BEGIN - -/** - @brief defines the object which users will receive at onHttpCompleted(sender, HttpResponse) callback - Please refer to samples/TestCpp/Classes/ExtensionTest/NetworkTest/HttpClientTest.cpp as a sample - @since v2.0.2 - @js NA - @lua NA - */ -class CCHttpResponse : public CCObject -{ -public: - /** Constructor, it's used by CCHttpClient internal, users don't need to create HttpResponse manually - @param request the corresponding HttpRequest which leads to this response - */ - CCHttpResponse(CCHttpRequest* request) - { - _pHttpRequest = request; - if (_pHttpRequest) - { - _pHttpRequest->retain(); - } - - _succeed = false; - _responseData.clear(); - _errorBuffer.clear(); - } - - /** Destructor, it will be called in CCHttpClient internal, - users don't need to desturct HttpResponse object manully - */ - virtual ~CCHttpResponse() - { - if (_pHttpRequest) - { - _pHttpRequest->release(); - } - } - - /** Override autorelease method to prevent developers from calling it */ - CCObject* autorelease(void) - { - CCAssert(false, "HttpResponse is used between network thread and ui thread \ - therefore, autorelease is forbidden here"); - return NULL; - } - - // getters, will be called by users - - /** Get the corresponding HttpRequest object which leads to this response - There's no paired setter for it, coz it's already setted in class constructor - */ - inline CCHttpRequest* getHttpRequest() - { - return _pHttpRequest; - } - - /** To see if the http reqeust is returned successfully, - Althrough users can judge if (http return code = 200), we want an easier way - If this getter returns false, you can call getResponseCode and getErrorBuffer to find more details - */ - inline bool isSucceed() - { - return _succeed; - }; - - /** Get the http response raw data */ - inline std::vector* getResponseData() - { - return &_responseData; - } - - /** get the Rawheader **/ - inline std::vector* getResponseHeader() - { - return &_responseHeader; - } - - /** Get the http response errorCode - * I know that you want to see http 200 :) - */ - inline int getResponseCode() - { - return _responseCode; - } - - /** Get the rror buffer which will tell you more about the reason why http request failed - */ - inline const char* getErrorBuffer() - { - return _errorBuffer.c_str(); - } - - // setters, will be called by CCHttpClient - // users should avoid invoking these methods - - - /** Set if the http request is returned successfully, - Althrough users can judge if (http code == 200), we want a easier way - This setter is mainly used in CCHttpClient, users mustn't set it directly - */ - inline void setSucceed(bool value) - { - _succeed = value; - }; - - - /** Set the http response raw buffer, is used by CCHttpClient - */ - inline void setResponseData(std::vector* data) - { - _responseData = *data; - } - - /** Set the http response Header raw buffer, is used by CCHttpClient - */ - inline void setResponseHeader(std::vector* data) - { - _responseHeader = *data; - } - - - /** Set the http response errorCode - */ - inline void setResponseCode(int value) - { - _responseCode = value; - } - - - /** Set the error buffer which will tell you more the reason why http request failed - */ - inline void setErrorBuffer(const char* value) - { - _errorBuffer.clear(); - _errorBuffer.assign(value); - }; - -protected: - bool initWithRequest(CCHttpRequest* request); - - // properties - CCHttpRequest* _pHttpRequest; /// the corresponding HttpRequest pointer who leads to this response - bool _succeed; /// to indecate if the http reqeust is successful simply - std::vector _responseData; /// the returned raw data. You can also dump it as a string - std::vector _responseHeader; /// the returned raw header data. You can also dump it as a string - int _responseCode; /// the status code returned from libcurl, e.g. 200, 404 - std::string _errorBuffer; /// if _responseCode != 200, please read _errorBuffer to find the reason - -}; - -NS_CC_EXT_END - -#endif //__HTTP_RESPONSE_H__ diff --git a/cappuccino-sdk/incl/extensions/network/WebSocket.h b/cappuccino-sdk/incl/extensions/network/WebSocket.h deleted file mode 100644 index 33aed3d..0000000 --- a/cappuccino-sdk/incl/extensions/network/WebSocket.h +++ /dev/null @@ -1,166 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2013 cocos2d-x.org - Copyright (c) 2013 James Chen - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - -"[WebSocket module] is based in part on the work of the libwebsockets project -(http://libwebsockets.org)" - - ****************************************************************************/ - -#ifndef __CC_WEBSOCKET_H__ -#define __CC_WEBSOCKET_H__ - -#include "ExtensionMacros.h" -#include "cocos2d.h" -#include "libwebsockets.h" -#include - -NS_CC_EXT_BEGIN - -class WsThreadHelper; -class WsMessage; - -class WebSocket -{ -public: - /** - * @js ctor - */ - WebSocket(); - /** - * @js NA - * @lua NA - */ - virtual ~WebSocket(); - - /** - * @brief Data structure for message - */ - struct Data - { - Data():bytes(NULL), len(0), isBinary(false){} - char* bytes; - int len; - bool isBinary; - }; - - /** - * @brief Errors in websocket - */ - enum ErrorCode - { - kErrorTimeout = 0, - kErrorConnectionFailure, - kErrorUnknown - }; - - /** - * @brief The delegate class to process websocket events. - * @js NA - * @lua NA - */ - class Delegate - { - public: - virtual ~Delegate() {} - virtual void onOpen(WebSocket* ws) = 0; - virtual void onMessage(WebSocket* ws, const Data& data) = 0; - virtual void onClose(WebSocket* ws) = 0; - virtual void onError(WebSocket* ws, const ErrorCode& error) = 0; - }; - - - /** - * @brief The initialized method for websocket. - * It needs to be invoked right after websocket instance is allocated. - * @param delegate The delegate which want to receive event from websocket. - * @param url The URL of websocket server. - * @return true: Success, false: Failure - * @js NA - */ - bool init(const Delegate& delegate, - const std::string& url, - const std::vector* protocols = NULL); - - /** - * @brief Sends string data to websocket server. - */ - void send(const std::string& message); - - /** - * @brief Sends binary data to websocket server. - */ - void send(const unsigned char* binaryMsg, unsigned int len); - - /** - * @brief Closes the connection to server. - */ - void close(); - - /** - * Websocket state - */ - enum State - { - kStateConnecting = 0, - kStateOpen, - kStateClosing, - kStateClosed - }; - - /** - * @brief Gets current state of connection. - */ - State getReadyState(); -private: - virtual void onSubThreadStarted(); - virtual int onSubThreadLoop(); - virtual void onSubThreadEnded(); - virtual void onUIThreadReceiveMessage(WsMessage* msg); - - - friend class WebSocketCallbackWrapper; - int onSocketCallback(struct libwebsocket_context *ctx, - struct libwebsocket *wsi, - enum libwebsocket_callback_reasons reason, - void *user, void *in, size_t len); - -private: - State _readyState; - std::string _host; - unsigned int _port; - std::string _path; - - friend class WsThreadHelper; - WsThreadHelper* _wsHelper; - - struct libwebsocket* _wsInstance; - struct libwebsocket_context* _wsContext; - Delegate* _delegate; - int _SSLConnection; - struct libwebsocket_protocols* _wsProtocols; -}; - -NS_CC_EXT_END - -#endif /* defined(__CC_JSB_WEBSOCKET_H__) */ diff --git a/cappuccino-sdk/incl/extensions/physics_nodes/CCPhysicsDebugNode.h b/cappuccino-sdk/incl/extensions/physics_nodes/CCPhysicsDebugNode.h deleted file mode 100644 index 4bb2868..0000000 --- a/cappuccino-sdk/incl/extensions/physics_nodes/CCPhysicsDebugNode.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (c) 2012 Scott Lembcke and Howling Moon Software - * Copyright (c) 2012 cocos2d-x.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -#ifndef __PHYSICSNODES_DEBUGNODE_H__ -#define __PHYSICSNODES_DEBUGNODE_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" - -#if CC_ENABLE_CHIPMUNK_INTEGRATION - -#include "chipmunk.h" - -NS_CC_EXT_BEGIN - -/** - A CCBaseData that draws the components of a physics engine. - - Supported physics engines: - - Chipmunk - - Objective-Chipmunk - - @since v2.1 - @js NA - @lua NA - */ - -class CCPhysicsDebugNode : public CCDrawNode -{ -protected: - cpSpace *m_pSpacePtr; - -public: - /** Create a debug node for a regular Chipmunk space. */ - static CCPhysicsDebugNode* create(cpSpace *space); - - virtual ~CCPhysicsDebugNode(); - - virtual void draw(); - - cpSpace* getSpace() const; - void setSpace(cpSpace *space); - - CCPhysicsDebugNode(); -}; - -NS_CC_EXT_END - -#endif // CC_ENABLE_CHIPMUNK_INTEGRATION - -#endif // __PHYSICSNODES_DEBUGNODE_H__ diff --git a/cappuccino-sdk/incl/extensions/physics_nodes/CCPhysicsSprite.h b/cappuccino-sdk/incl/extensions/physics_nodes/CCPhysicsSprite.h deleted file mode 100644 index 7db8b50..0000000 --- a/cappuccino-sdk/incl/extensions/physics_nodes/CCPhysicsSprite.h +++ /dev/null @@ -1,134 +0,0 @@ -/* Copyright (c) 2012 Scott Lembcke and Howling Moon Software - * Copyright (c) 2012 cocos2d-x.org - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ -#ifndef __PHYSICSNODES_CCPHYSICSSPRITE_H__ -#define __PHYSICSNODES_CCPHYSICSSPRITE_H__ - -#include "cocos2d.h" -#include "ExtensionMacros.h" - -#if CC_ENABLE_CHIPMUNK_INTEGRATION -#include "chipmunk.h" -#elif CC_ENABLE_BOX2D_INTEGRATION -class b2Body; -#else // CC_ENABLE_BOX2D_INTEGRATION -#error "You must define either CC_ENABLE_CHIPMUNK_INTEGRATION or CC_ENABLE_BOX2D_INTEGRATION to use CCPhysicsSprite.h" -#endif - -NS_CC_EXT_BEGIN -/** A CCSprite subclass that is bound to a physics body. - It works with: - - Chipmunk: Preprocessor macro CC_ENABLE_CHIPMUNK_INTEGRATION should be defined - - Objective-Chipmunk: Preprocessor macro CC_ENABLE_CHIPMUNK_INTEGRATION should be defined - - Box2d: Preprocessor macro CC_ENABLE_BOX2D_INTEGRATION should be defined - - Features and Limitations: - - Scale and Skew properties are ignored. - - Position and rotation are going to updated from the physics body - - If you update the rotation or position manually, the physics body will be updated - - You can't enble both Chipmunk support and Box2d support at the same time. Only one can be enabled at compile time - * @js NA - * @lua NA - */ -class CCPhysicsSprite : public CCSprite -{ -protected: - bool m_bIgnoreBodyRotation; -#if CC_ENABLE_CHIPMUNK_INTEGRATION - cpBody *m_pCPBody; - -#elif CC_ENABLE_BOX2D_INTEGRATION - b2Body *m_pB2Body; - - // Pixels to Meters ratio - float m_fPTMRatio; -#endif // CC_ENABLE_CHIPMUNK_INTEGRATION -public: - CCPhysicsSprite(); - - static CCPhysicsSprite* create(); - /** Creates an sprite with a texture. - The rect used will be the size of the texture. - The offset will be (0,0). - */ - static CCPhysicsSprite* createWithTexture(CCTexture2D *pTexture); - - /** Creates an sprite with a texture and a rect. - The offset will be (0,0). - */ - static CCPhysicsSprite* createWithTexture(CCTexture2D *pTexture, const CCRect& rect); - - /** Creates an sprite with an sprite frame. */ - static CCPhysicsSprite* createWithSpriteFrame(CCSpriteFrame *pSpriteFrame); - - /** Creates an sprite with an sprite frame name. - An CCSpriteFrame will be fetched from the CCSpriteFrameCache by name. - If the CCSpriteFrame doesn't exist it will raise an exception. - @since v0.9 - */ - static CCPhysicsSprite* createWithSpriteFrameName(const char *pszSpriteFrameName); - - /** Creates an sprite with an image filename. - The rect used will be the size of the image. - The offset will be (0,0). - */ - static CCPhysicsSprite* create(const char *pszFileName); - - /** Creates an sprite with an image filename and a rect. - The offset will be (0,0). - */ - static CCPhysicsSprite* create(const char *pszFileName, const CCRect& rect); - - virtual bool isDirty(); - - /** Keep the sprite's rotation separate from the body. */ - bool isIgnoreBodyRotation() const; - void setIgnoreBodyRotation(bool bIgnoreBodyRotation); - - virtual const CCPoint& getPosition(); - virtual void getPosition(float* x, float* y); - virtual float getPositionX(); - virtual float getPositionY(); - virtual void setPosition(const CCPoint &position); - virtual float getRotation(); - virtual void setRotation(float fRotation); - virtual CCAffineTransform nodeToParentTransform(); - -#if CC_ENABLE_CHIPMUNK_INTEGRATION - /** Body accessor when using regular Chipmunk */ - cpBody* getCPBody() const; - void setCPBody(cpBody *pBody); -#elif CC_ENABLE_BOX2D_INTEGRATION - /** Body accessor when using box2d */ - b2Body* getB2Body() const; - void setB2Body(b2Body *pBody); - - float getPTMRatio() const; - void setPTMRatio(float fPTMRatio); -#endif // CC_ENABLE_BOX2D_INTEGRATION - -protected: - void updatePosFromPhysics(); -}; - -NS_CC_EXT_END - -#endif // __PHYSICSNODES_CCPHYSICSSPRITE_H__ diff --git a/cappuccino-sdk/incl/extensions/spine/Animation.h b/cappuccino-sdk/incl/extensions/spine/Animation.h deleted file mode 100644 index b7d922c..0000000 --- a/cappuccino-sdk/incl/extensions/spine/Animation.h +++ /dev/null @@ -1,132 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_ANIMATION_H_ -#define SPINE_ANIMATION_H_ - -namespace cocos2d { namespace extension { - -typedef struct Timeline Timeline; -struct Skeleton; - -typedef struct { - const char* const name; - float duration; - - int timelineCount; - Timeline** timelines; -} Animation; - -Animation* Animation_create (const char* name, int timelineCount); -void Animation_dispose (Animation* self); - -void Animation_apply (const Animation* self, struct Skeleton* skeleton, float time, int/*bool*/loop); -void Animation_mix (const Animation* self, struct Skeleton* skeleton, float time, int/*bool*/loop, float alpha); - -/**/ - -struct Timeline { - const void* const vtable; -}; - -void Timeline_dispose (Timeline* self); -void Timeline_apply (const Timeline* self, struct Skeleton* skeleton, float time, float alpha); - -/**/ - -typedef struct { - Timeline super; - float* curves; /* dfx, dfy, ddfx, ddfy, dddfx, dddfy, ... */ -} CurveTimeline; - -void CurveTimeline_setLinear (CurveTimeline* self, int frameIndex); -void CurveTimeline_setStepped (CurveTimeline* self, int frameIndex); - -/* Sets the control handle positions for an interpolation bezier curve used to transition from this keyframe to the next. - * cx1 and cx2 are from 0 to 1, representing the percent of time between the two keyframes. cy1 and cy2 are the percent of - * the difference between the keyframe's values. */ -void CurveTimeline_setCurve (CurveTimeline* self, int frameIndex, float cx1, float cy1, float cx2, float cy2); -float CurveTimeline_getCurvePercent (const CurveTimeline* self, int frameIndex, float percent); - -/**/ - -typedef struct BaseTimeline { - CurveTimeline super; - int const framesLength; - float* const frames; /* time, angle, ... for rotate. time, x, y, ... for translate and scale. */ - int boneIndex; -} RotateTimeline; - -RotateTimeline* RotateTimeline_create (int frameCount); - -void RotateTimeline_setFrame (RotateTimeline* self, int frameIndex, float time, float angle); - -/**/ - -typedef struct BaseTimeline TranslateTimeline; - -TranslateTimeline* TranslateTimeline_create (int frameCount); - -void TranslateTimeline_setFrame (TranslateTimeline* self, int frameIndex, float time, float x, float y); - -/**/ - -typedef struct BaseTimeline ScaleTimeline; - -ScaleTimeline* ScaleTimeline_create (int frameCount); - -void ScaleTimeline_setFrame (ScaleTimeline* self, int frameIndex, float time, float x, float y); - -/**/ - -typedef struct { - CurveTimeline super; - int const framesLength; - float* const frames; /* time, r, g, b, a, ... */ - int slotIndex; -} ColorTimeline; - -ColorTimeline* ColorTimeline_create (int frameCount); - -void ColorTimeline_setFrame (ColorTimeline* self, int frameIndex, float time, float r, float g, float b, float a); - -/**/ - -typedef struct { - Timeline super; - int const framesLength; - float* const frames; /* time, ... */ - int slotIndex; - const char** const attachmentNames; -} AttachmentTimeline; - -AttachmentTimeline* AttachmentTimeline_create (int frameCount); - -/* @param attachmentName May be 0. */ -void AttachmentTimeline_setFrame (AttachmentTimeline* self, int frameIndex, float time, const char* attachmentName); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_ANIMATION_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/AnimationState.h b/cappuccino-sdk/incl/extensions/spine/AnimationState.h deleted file mode 100644 index 5362281..0000000 --- a/cappuccino-sdk/incl/extensions/spine/AnimationState.h +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_ANIMATIONSTATE_H_ -#define SPINE_ANIMATIONSTATE_H_ - -#include - -namespace cocos2d { namespace extension { - -typedef struct { - AnimationStateData* const data; - Animation* const animation; - float time; - int/*bool*/loop; -} AnimationState; - -/* @param data May be 0 for no mixing. */ -AnimationState* AnimationState_create (AnimationStateData* data); -void AnimationState_dispose (AnimationState* self); - -void AnimationState_update (AnimationState* self, float delta); - -void AnimationState_apply (AnimationState* self, struct Skeleton* skeleton); - -/* @param animationName May be 0. */ -void AnimationState_setAnimationByName (AnimationState* self, const char* animationName, int/*bool*/loop); -/* @param animation May be 0. */ -void AnimationState_setAnimation (AnimationState* self, Animation* animation, int/*bool*/loop); - -/** @param animationName May be 0. - * @param delay May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay. */ -void AnimationState_addAnimationByName (AnimationState* self, const char* animationName, int/*bool*/loop, float delay); -/** @param animation May be 0. - * @param delay May be <= 0 to use duration of previous animation minus any mix duration plus the negative delay. */ -void AnimationState_addAnimation (AnimationState* self, Animation* animation, int/*bool*/loop, float delay); - -void AnimationState_clearAnimation (AnimationState* self); - -int/*bool*/AnimationState_isComplete (AnimationState* self); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_ANIMATIONSTATE_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/AnimationStateData.h b/cappuccino-sdk/incl/extensions/spine/AnimationStateData.h deleted file mode 100644 index ea45653..0000000 --- a/cappuccino-sdk/incl/extensions/spine/AnimationStateData.h +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_ANIMATIONSTATEDATA_H_ -#define SPINE_ANIMATIONSTATEDATA_H_ - -#include -#include - -namespace cocos2d { namespace extension { - -typedef struct { - SkeletonData* const skeletonData; - const void* const entries; -} AnimationStateData; - -AnimationStateData* AnimationStateData_create (SkeletonData* skeletonData); -void AnimationStateData_dispose (AnimationStateData* self); - -void AnimationStateData_setMixByName (AnimationStateData* self, const char* fromName, const char* toName, float duration); -void AnimationStateData_setMix (AnimationStateData* self, Animation* from, Animation* to, float duration); -/* Returns 0 if there is no mixing between the animations. */ -float AnimationStateData_getMix (AnimationStateData* self, Animation* from, Animation* to); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_ANIMATIONSTATEDATA_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/Atlas.h b/cappuccino-sdk/incl/extensions/spine/Atlas.h deleted file mode 100644 index ea5ca9b..0000000 --- a/cappuccino-sdk/incl/extensions/spine/Atlas.h +++ /dev/null @@ -1,106 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_ATLAS_H_ -#define SPINE_ATLAS_H_ - -namespace cocos2d { namespace extension { - -typedef enum { - ATLAS_ALPHA, ATLAS_INTENSITY, ATLAS_LUMINANCE_ALPHA, ATLAS_RGB565, ATLAS_RGBA4444, ATLAS_RGB888, ATLAS_RGBA8888 -} AtlasFormat; - -typedef enum { - ATLAS_NEAREST, - ATLAS_LINEAR, - ATLAS_MIPMAP, - ATLAS_MIPMAP_NEAREST_NEAREST, - ATLAS_MIPMAP_LINEAR_NEAREST, - ATLAS_MIPMAP_NEAREST_LINEAR, - ATLAS_MIPMAP_LINEAR_LINEAR -} AtlasFilter; - -typedef enum { - ATLAS_MIRROREDREPEAT, ATLAS_CLAMPTOEDGE, ATLAS_REPEAT -} AtlasWrap; - -typedef struct AtlasPage AtlasPage; -struct AtlasPage { - const char* name; - AtlasFormat format; - AtlasFilter minFilter, magFilter; - AtlasWrap uWrap, vWrap; - - void* rendererObject; - int width, height; - - AtlasPage* next; -}; - -AtlasPage* AtlasPage_create (const char* name); -void AtlasPage_dispose (AtlasPage* self); - -/**/ - -typedef struct AtlasRegion AtlasRegion; -struct AtlasRegion { - const char* name; - int x, y, width, height; - float u, v, u2, v2; - int offsetX, offsetY; - int originalWidth, originalHeight; - int index; - int/*bool*/rotate; - int/*bool*/flip; - int* splits; - int* pads; - - AtlasPage* page; - - AtlasRegion* next; -}; - -AtlasRegion* AtlasRegion_create (); -void AtlasRegion_dispose (AtlasRegion* self); - -/**/ - -typedef struct { - AtlasPage* pages; - AtlasRegion* regions; -} Atlas; - -/* Image files referenced in the atlas file will be prefixed with dir. */ -Atlas* Atlas_readAtlas (const char* data, int length, const char* dir); -/* Image files referenced in the atlas file will be prefixed with the directory containing the atlas file. */ -Atlas* Atlas_readAtlasFile (const char* path); -void Atlas_dispose (Atlas* atlas); - -/* Returns 0 if the region was not found. */ -AtlasRegion* Atlas_findRegion (const Atlas* self, const char* name); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_ATLAS_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/AtlasAttachmentLoader.h b/cappuccino-sdk/incl/extensions/spine/AtlasAttachmentLoader.h deleted file mode 100644 index 20e9046..0000000 --- a/cappuccino-sdk/incl/extensions/spine/AtlasAttachmentLoader.h +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_ATLASATTACHMENTLOADER_H_ -#define SPINE_ATLASATTACHMENTLOADER_H_ - -#include -#include - -namespace cocos2d { namespace extension { - -typedef struct { - AttachmentLoader super; - Atlas* atlas; -} AtlasAttachmentLoader; - -AtlasAttachmentLoader* AtlasAttachmentLoader_create (Atlas* atlas); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_ATLASATTACHMENTLOADER_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/Attachment.h b/cappuccino-sdk/incl/extensions/spine/Attachment.h deleted file mode 100644 index 7be7cf0..0000000 --- a/cappuccino-sdk/incl/extensions/spine/Attachment.h +++ /dev/null @@ -1,49 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_ATTACHMENT_H_ -#define SPINE_ATTACHMENT_H_ - -namespace cocos2d { namespace extension { - -struct Slot; - -typedef enum { - ATTACHMENT_REGION, ATTACHMENT_REGION_SEQUENCE -} AttachmentType; - -typedef struct Attachment Attachment; -struct Attachment { - const char* const name; - AttachmentType type; - - const void* const vtable; -}; - -void Attachment_dispose (Attachment* self); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_ATTACHMENT_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/AttachmentLoader.h b/cappuccino-sdk/incl/extensions/spine/AttachmentLoader.h deleted file mode 100644 index 5fd81f5..0000000 --- a/cappuccino-sdk/incl/extensions/spine/AttachmentLoader.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_ATTACHMENTLOADER_H_ -#define SPINE_ATTACHMENTLOADER_H_ - -#include -#include - -namespace cocos2d { namespace extension { - -typedef struct AttachmentLoader AttachmentLoader; -struct AttachmentLoader { - const char* error1; - const char* error2; - - const void* const vtable; -#ifdef __cplusplus - AttachmentLoader () : error1(0), error2(0), vtable(0) {} -#endif -}; - -void AttachmentLoader_dispose (AttachmentLoader* self); - -/* Returns 0 to not load an attachment. If 0 is returned and AttachmentLoader.error1 is set, an error occurred. */ -Attachment* AttachmentLoader_newAttachment (AttachmentLoader* self, Skin* skin, AttachmentType type, const char* name); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_ATTACHMENTLOADER_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/Bone.h b/cappuccino-sdk/incl/extensions/spine/Bone.h deleted file mode 100644 index 3f4688a..0000000 --- a/cappuccino-sdk/incl/extensions/spine/Bone.h +++ /dev/null @@ -1,59 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_BONE_H_ -#define SPINE_BONE_H_ - -#include - -namespace cocos2d { namespace extension { - -typedef struct Bone Bone; -struct Bone { - BoneData* const data; - Bone* const parent; - float x, y; - float rotation; - float scaleX, scaleY; - - float const m00, m01, worldX; /* a b x */ - float const m10, m11, worldY; /* c d y */ - float const worldRotation; - float const worldScaleX, worldScaleY; -}; - -void Bone_setYDown (int/*bool*/yDown); - -/* @param parent May be 0. */ -Bone* Bone_create (BoneData* data, Bone* parent); -void Bone_dispose (Bone* self); - -void Bone_setToSetupPose (Bone* self); - -void Bone_updateWorldTransform (Bone* self, int/*bool*/flipX, int/*bool*/flipY); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_BONE_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/BoneData.h b/cappuccino-sdk/incl/extensions/spine/BoneData.h deleted file mode 100644 index 54126a7..0000000 --- a/cappuccino-sdk/incl/extensions/spine/BoneData.h +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_BONEDATA_H_ -#define SPINE_BONEDATA_H_ - -namespace cocos2d { namespace extension { - -typedef struct BoneData BoneData; -struct BoneData { - const char* const name; - BoneData* const parent; - float length; - float x, y; - float rotation; - float scaleX, scaleY; -}; - -BoneData* BoneData_create (const char* name, BoneData* parent); -void BoneData_dispose (BoneData* self); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_BONEDATA_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/CCSkeleton.h b/cappuccino-sdk/incl/extensions/spine/CCSkeleton.h deleted file mode 100644 index 12bc666..0000000 --- a/cappuccino-sdk/incl/extensions/spine/CCSkeleton.h +++ /dev/null @@ -1,100 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_CCSKELETON_H_ -#define SPINE_CCSKELETON_H_ - -#include -#include "cocos2d.h" - -namespace cocos2d { namespace extension { - -/** -Draws a skeleton. -*/ -class CCSkeleton: public cocos2d::CCNodeRGBA, public cocos2d::CCBlendProtocol { -public: - Skeleton* skeleton; - Bone* rootBone; - float timeScale; - bool debugSlots; - bool debugBones; - bool premultipliedAlpha; - - static CCSkeleton* createWithData (SkeletonData* skeletonData, bool ownsSkeletonData = false); - static CCSkeleton* createWithFile (const char* skeletonDataFile, Atlas* atlas, float scale = 1); - static CCSkeleton* createWithFile (const char* skeletonDataFile, const char* atlasFile, float scale = 1); - - CCSkeleton (SkeletonData* skeletonData, bool ownsSkeletonData = false); - CCSkeleton (const char* skeletonDataFile, Atlas* atlas, float scale = 1); - CCSkeleton (const char* skeletonDataFile, const char* atlasFile, float scale = 1); - - virtual ~CCSkeleton (); - - virtual void update (float deltaTime); - virtual void draw (); - virtual cocos2d::CCRect boundingBox (); - - // --- Convenience methods for common Skeleton_* functions. - void updateWorldTransform (); - - void setToSetupPose (); - void setBonesToSetupPose (); - void setSlotsToSetupPose (); - - /* Returns 0 if the bone was not found. */ - Bone* findBone (const char* boneName) const; - /* Returns 0 if the slot was not found. */ - Slot* findSlot (const char* slotName) const; - - /* Sets the skin used to look up attachments not found in the SkeletonData defaultSkin. Attachments from the new skin are - * attached if the corresponding attachment from the old skin was attached. Returns false if the skin was not found. - * @param skin May be 0.*/ - bool setSkin (const char* skinName); - - /* Returns 0 if the slot or attachment was not found. */ - Attachment* getAttachment (const char* slotName, const char* attachmentName) const; - /* Returns false if the slot or attachment was not found. */ - bool setAttachment (const char* slotName, const char* attachmentName); - - // --- CCBlendProtocol - CC_PROPERTY(cocos2d::ccBlendFunc, blendFunc, BlendFunc); - virtual void setOpacityModifyRGB (bool value); - virtual bool isOpacityModifyRGB (); - -protected: - CCSkeleton (); - void setSkeletonData (SkeletonData* skeletonData, bool ownsSkeletonData); - cocos2d::CCTextureAtlas* getTextureAtlas (RegionAttachment* regionAttachment) const; - -private: - bool ownsSkeletonData; - Atlas* atlas; - void initialize (); -}; - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_CCSKELETON_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/CCSkeletonAnimation.h b/cappuccino-sdk/incl/extensions/spine/CCSkeletonAnimation.h deleted file mode 100644 index e38ef9c..0000000 --- a/cappuccino-sdk/incl/extensions/spine/CCSkeletonAnimation.h +++ /dev/null @@ -1,73 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_CCSKELETONANIMATION_H_ -#define SPINE_CCSKELETONANIMATION_H_ - -#include -#include -#include "cocos2d.h" - -namespace cocos2d { namespace extension { - -/** -Draws an animated skeleton, providing a simple API for applying one or more animations and queuing animations to be played later. -*/ -class CCSkeletonAnimation: public CCSkeleton { -public: - std::vector states; - - static CCSkeletonAnimation* createWithData (SkeletonData* skeletonData); - static CCSkeletonAnimation* createWithFile (const char* skeletonDataFile, Atlas* atlas, float scale = 1); - static CCSkeletonAnimation* createWithFile (const char* skeletonDataFile, const char* atlasFile, float scale = 1); - - CCSkeletonAnimation (SkeletonData* skeletonData); - CCSkeletonAnimation (const char* skeletonDataFile, Atlas* atlas, float scale = 1); - CCSkeletonAnimation (const char* skeletonDataFile, const char* atlasFile, float scale = 1); - - virtual ~CCSkeletonAnimation (); - - virtual void update (float deltaTime); - - void addAnimationState (AnimationStateData* stateData = 0); - void setAnimationStateData (AnimationStateData* stateData, int stateIndex = 0); - void setMix (const char* fromAnimation, const char* toAnimation, float duration, int stateIndex = 0); - void setAnimation (const char* name, bool loop, int stateIndex = 0); - void addAnimation (const char* name, bool loop, float delay = 0, int stateIndex = 0); - void clearAnimation (int stateIndex = 0); - -protected: - CCSkeletonAnimation (); - -private: - typedef CCSkeleton super; - std::vector stateDatas; - - void initialize (); -}; - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_CCSKELETONANIMATION_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/Json.h b/cappuccino-sdk/incl/extensions/spine/Json.h deleted file mode 100644 index 35cccd6..0000000 --- a/cappuccino-sdk/incl/extensions/spine/Json.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - Copyright (c) 2009 Dave Gamble - - Permission is hereby granted, dispose of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - */ - -/* Esoteric Software: Removed everything except parsing, shorter method names, more get methods, double to float, formatted. */ - -#ifndef SPINE_JSON_H_ -#define SPINE_JSON_H_ - -namespace cocos2d { namespace extension { - -/* Json Types: */ -#define Json_False 0 -#define Json_True 1 -#define Json_NULL 2 -#define Json_Number 3 -#define Json_String 4 -#define Json_Array 5 -#define Json_Object 6 - -/* The Json structure: */ -typedef struct Json { - struct Json* next; - struct Json* prev; /* next/prev allow you to walk array/object chains. Alternatively, use getSize/getItemAt/getItem */ - struct Json* child; /* An array or object item will have a child pointer pointing to a chain of the items in the array/object. */ - - int type; /* The type of the item, as above. */ - - const char* valuestring; /* The item's string, if type==Json_String */ - int valueint; /* The item's number, if type==Json_Number */ - float valuefloat; /* The item's number, if type==Json_Number */ - - const char* name; /* The item's name string, if this item is the child of, or is in the list of subitems of an object. */ -} Json; - -/* Supply a block of JSON, and this returns a Json object you can interrogate. Call Json_dispose when finished. */ -Json* Json_create (const char* value); - -/* Delete a Json entity and all subentities. */ -void Json_dispose (Json* json); - -/* Returns the number of items in an array (or object). */ -int Json_getSize (Json* json); - -/* Retrieve item number "item" from array "array". Returns NULL if unsuccessful. */ -Json* Json_getItemAt (Json* json, int item); - -/* Get item "string" from object. Case insensitive. */ -Json* Json_getItem (Json* json, const char* string); -const char* Json_getString (Json* json, const char* name, const char* defaultValue); -float Json_getFloat (Json* json, const char* name, float defaultValue); -int Json_getInt (Json* json, const char* name, int defaultValue); - -/* For analysing failed parses. This returns a pointer to the parse error. You'll probably need to look a few chars back to make sense of it. Defined when Json_create() returns 0. 0 when Json_create() succeeds. */ -const char* Json_getError (void); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_JSON_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/RegionAttachment.h b/cappuccino-sdk/incl/extensions/spine/RegionAttachment.h deleted file mode 100644 index 8374c81..0000000 --- a/cappuccino-sdk/incl/extensions/spine/RegionAttachment.h +++ /dev/null @@ -1,60 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_REGIONATTACHMENT_H_ -#define SPINE_REGIONATTACHMENT_H_ - -#include -#include -#include - -namespace cocos2d { namespace extension { - -typedef enum { - VERTEX_X1 = 0, VERTEX_Y1, VERTEX_X2, VERTEX_Y2, VERTEX_X3, VERTEX_Y3, VERTEX_X4, VERTEX_Y4 -} VertexIndex; - -typedef struct RegionAttachment RegionAttachment; -struct RegionAttachment { - Attachment super; - float x, y, scaleX, scaleY, rotation, width, height; - - void* rendererObject; - int regionOffsetX, regionOffsetY; /* Pixels stripped from the bottom left, unrotated. */ - int regionWidth, regionHeight; /* Unrotated, stripped pixel size. */ - int regionOriginalWidth, regionOriginalHeight; /* Unrotated, unstripped pixel size. */ - - float offset[8]; - float uvs[8]; -}; - -RegionAttachment* RegionAttachment_create (const char* name); -void RegionAttachment_setUVs (RegionAttachment* self, float u, float v, float u2, float v2, int/*bool*/rotate); -void RegionAttachment_updateOffset (RegionAttachment* self); -void RegionAttachment_computeVertices (RegionAttachment* self, float x, float y, Bone* bone, float* vertices); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_REGIONATTACHMENT_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/Skeleton.h b/cappuccino-sdk/incl/extensions/spine/Skeleton.h deleted file mode 100644 index 54fa5aa..0000000 --- a/cappuccino-sdk/incl/extensions/spine/Skeleton.h +++ /dev/null @@ -1,92 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_SKELETON_H_ -#define SPINE_SKELETON_H_ - -#include -#include -#include - -namespace cocos2d { namespace extension { - -typedef struct Skeleton Skeleton; -struct Skeleton { - SkeletonData* const data; - - int boneCount; - Bone** bones; - Bone* const root; - - int slotCount; - Slot** slots; - Slot** drawOrder; - - Skin* const skin; - float r, g, b, a; - float time; - int/*bool*/flipX, flipY; - float x, y; -}; - -Skeleton* Skeleton_create (SkeletonData* data); -void Skeleton_dispose (Skeleton* self); - -void Skeleton_updateWorldTransform (const Skeleton* self); - -void Skeleton_setToSetupPose (const Skeleton* self); -void Skeleton_setBonesToSetupPose (const Skeleton* self); -void Skeleton_setSlotsToSetupPose (const Skeleton* self); - -/* Returns 0 if the bone was not found. */ -Bone* Skeleton_findBone (const Skeleton* self, const char* boneName); -/* Returns -1 if the bone was not found. */ -int Skeleton_findBoneIndex (const Skeleton* self, const char* boneName); - -/* Returns 0 if the slot was not found. */ -Slot* Skeleton_findSlot (const Skeleton* self, const char* slotName); -/* Returns -1 if the slot was not found. */ -int Skeleton_findSlotIndex (const Skeleton* self, const char* slotName); - -/* Sets the skin used to look up attachments not found in the SkeletonData defaultSkin. Attachments from the new skin are - * attached if the corresponding attachment from the old skin was attached. - * @param skin May be 0.*/ -void Skeleton_setSkin (Skeleton* self, Skin* skin); -/* Returns 0 if the skin was not found. See Skeleton_setSkin. - * @param skinName May be 0. */ -int Skeleton_setSkinByName (Skeleton* self, const char* skinName); - -/* Returns 0 if the slot or attachment was not found. */ -Attachment* Skeleton_getAttachmentForSlotName (const Skeleton* self, const char* slotName, const char* attachmentName); -/* Returns 0 if the slot or attachment was not found. */ -Attachment* Skeleton_getAttachmentForSlotIndex (const Skeleton* self, int slotIndex, const char* attachmentName); -/* Returns 0 if the slot or attachment was not found. */ -int Skeleton_setAttachment (Skeleton* self, const char* slotName, const char* attachmentName); - -void Skeleton_update (Skeleton* self, float deltaTime); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_SKELETON_H_*/ diff --git a/cappuccino-sdk/incl/extensions/spine/SkeletonData.h b/cappuccino-sdk/incl/extensions/spine/SkeletonData.h deleted file mode 100644 index b05bc45..0000000 --- a/cappuccino-sdk/incl/extensions/spine/SkeletonData.h +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_SKELETONDATA_H_ -#define SPINE_SKELETONDATA_H_ - -#include -#include -#include -#include - -namespace cocos2d { namespace extension { - -typedef struct { - int boneCount; - BoneData** bones; - - int slotCount; - SlotData** slots; - - int skinCount; - Skin** skins; - Skin* defaultSkin; - - int animationCount; - Animation** animations; -} SkeletonData; - -SkeletonData* SkeletonData_create (); -void SkeletonData_dispose (SkeletonData* self); - -BoneData* SkeletonData_findBone (const SkeletonData* self, const char* boneName); -int SkeletonData_findBoneIndex (const SkeletonData* self, const char* boneName); - -SlotData* SkeletonData_findSlot (const SkeletonData* self, const char* slotName); -int SkeletonData_findSlotIndex (const SkeletonData* self, const char* slotName); - -Skin* SkeletonData_findSkin (const SkeletonData* self, const char* skinName); - -Animation* SkeletonData_findAnimation (const SkeletonData* self, const char* animationName); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_SKELETONDATA_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/SkeletonJson.h b/cappuccino-sdk/incl/extensions/spine/SkeletonJson.h deleted file mode 100644 index 1fd9b28..0000000 --- a/cappuccino-sdk/incl/extensions/spine/SkeletonJson.h +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_SKELETONJSON_H_ -#define SPINE_SKELETONJSON_H_ - -#include -#include -#include -#include -#include - -namespace cocos2d { namespace extension { - -typedef struct { - float scale; - AttachmentLoader* attachmentLoader; - const char* const error; -} SkeletonJson; - -SkeletonJson* SkeletonJson_createWithLoader (AttachmentLoader* attachmentLoader); -SkeletonJson* SkeletonJson_create (Atlas* atlas); -void SkeletonJson_dispose (SkeletonJson* self); - -SkeletonData* SkeletonJson_readSkeletonData (SkeletonJson* self, const char* json); -SkeletonData* SkeletonJson_readSkeletonDataFile (SkeletonJson* self, const char* path); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_SKELETONJSON_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/Skin.h b/cappuccino-sdk/incl/extensions/spine/Skin.h deleted file mode 100644 index f8d76a5..0000000 --- a/cappuccino-sdk/incl/extensions/spine/Skin.h +++ /dev/null @@ -1,55 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_SKIN_H_ -#define SPINE_SKIN_H_ - -#include - -namespace cocos2d { namespace extension { - -struct Skeleton; - -typedef struct { - const char* const name; -} Skin; - -Skin* Skin_create (const char* name); -void Skin_dispose (Skin* self); - -/* The Skin owns the attachment. */ -void Skin_addAttachment (Skin* self, int slotIndex, const char* name, Attachment* attachment); -/* Returns 0 if the attachment was not found. */ -Attachment* Skin_getAttachment (const Skin* self, int slotIndex, const char* name); - -/* Returns 0 if the slot or attachment was not found. */ -const char* Skin_getAttachmentName (const Skin* self, int slotIndex, int attachmentIndex); - -/** Attach each attachment in this skin if the corresponding attachment in oldSkin is currently attached. */ -void Skin_attachAll (const Skin* self, struct Skeleton* skeleton, const Skin* oldSkin); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_SKIN_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/Slot.h b/cappuccino-sdk/incl/extensions/spine/Slot.h deleted file mode 100644 index 47b2a7f..0000000 --- a/cappuccino-sdk/incl/extensions/spine/Slot.h +++ /dev/null @@ -1,58 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_SLOT_H_ -#define SPINE_SLOT_H_ - -#include -#include -#include - -namespace cocos2d { namespace extension { - -struct Skeleton; - -typedef struct Slot { - SlotData* const data; - struct Skeleton* const skeleton; - Bone* const bone; - float r, g, b, a; - Attachment* const attachment; -} Slot; - -Slot* Slot_create (SlotData* data, struct Skeleton* skeleton, Bone* bone); -void Slot_dispose (Slot* self); - -/* @param attachment May be 0 to clear the attachment for the slot. */ -void Slot_setAttachment (Slot* self, Attachment* attachment); - -void Slot_setAttachmentTime (Slot* self, float time); -float Slot_getAttachmentTime (const Slot* self); - -void Slot_setToSetupPose (Slot* self); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_SLOT_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/SlotData.h b/cappuccino-sdk/incl/extensions/spine/SlotData.h deleted file mode 100644 index 660c306..0000000 --- a/cappuccino-sdk/incl/extensions/spine/SlotData.h +++ /dev/null @@ -1,48 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_SLOTDATA_H_ -#define SPINE_SLOTDATA_H_ - -#include - -namespace cocos2d { namespace extension { - -typedef struct { - const char* const name; - const BoneData* const boneData; - const char* const attachmentName; - float r, g, b, a; -} SlotData; - -SlotData* SlotData_create (const char* name, BoneData* boneData); -void SlotData_dispose (SlotData* self); - -/* @param attachmentName May be 0 for no setup pose attachment. */ -void SlotData_setAttachmentName (SlotData* self, const char* attachmentName); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_SLOTDATA_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/extension.h b/cappuccino-sdk/incl/extensions/spine/extension.h deleted file mode 100644 index 37ae496..0000000 --- a/cappuccino-sdk/incl/extensions/spine/extension.h +++ /dev/null @@ -1,145 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -/* - Implementation notes: - - - An OOP style is used where each "class" is made up of a struct and a number of functions prefixed with the struct name. - - - struct fields that are const are readonly. Either they are set in a create function and can never be changed, or they can only - be changed by calling a function. - - - Inheritance is done using a struct field named "super" as the first field, allowing the struct to be cast to its "super class". - This works because a pointer to a struct is guaranteed to be a pointer to the first struct field. - - - Classes intended for inheritance provide init/deinit functions which subclasses must call in their create/dispose functions. - - - Polymorphism is done by a base class providing function pointers in its init function. The public API delegates to this - function. - - - Subclasses do not provide a dispose function, instead the base class' dispose function should be used, which will delegate to - a dispose function. - - - Classes not designed for inheritance cannot be extended. They may use an internal subclass to hide private data and don't - expose function pointers. - - - The public API hides implementation details such init/deinit functions. An internal API is exposed in extension.h to allow - classes to be extended. Internal functions begin with underscore (_). - - - OOP in C tends to lose type safety. Macros are provided in extension.h to give context for why a cast is being done. - */ - -#ifndef SPINE_EXTENSION_H_ -#define SPINE_EXTENSION_H_ - -/* All allocation uses these. */ -#define MALLOC(TYPE,COUNT) ((TYPE*)_malloc(sizeof(TYPE) * COUNT)) -#define CALLOC(TYPE,COUNT) ((TYPE*)_calloc(1, sizeof(TYPE) * COUNT)) -#define NEW(TYPE) CALLOC(TYPE,1) - -/* Gets the direct super class. Type safe. */ -#define SUPER(VALUE) (&VALUE->super) - -/* Cast to a super class. Not type safe, use with care. Prefer SUPER() where possible. */ -#define SUPER_CAST(TYPE,VALUE) ((TYPE*)VALUE) - -/* Cast to a sub class. Not type safe, use with care. */ -#define SUB_CAST(TYPE,VALUE) ((TYPE*)VALUE) - -/* Casts away const. Can be used as an lvalue. Not type safe, use with care. */ -#define CONST_CAST(TYPE,VALUE) (*(TYPE*)&VALUE) - -/* Gets the vtable for the specified type. Not type safe, use with care. */ -#define VTABLE(TYPE,VALUE) ((_##TYPE##Vtable*)((TYPE*)VALUE)->vtable) - -/* Frees memory. Can be used on const types. */ -#define FREE(VALUE) _free((void*)VALUE) - -/* Allocates a new char[], assigns it to TO, and copies FROM to it. Can be used on const types. */ -#define MALLOC_STR(TO,FROM) strcpy(CONST_CAST(char*, TO) = (char*)malloc(strlen(FROM) + 1), FROM) - -#include -#include -#include -#include -#include -#include -#include - -namespace cocos2d { namespace extension { - -/* - * Functions that must be implemented: - */ - -void _AtlasPage_createTexture (AtlasPage* self, const char* path); -void _AtlasPage_disposeTexture (AtlasPage* self); -char* _Util_readFile (const char* path, int* length); - -/* - * Internal API available for extension: - */ - -void* _malloc (size_t size); -void* _calloc (size_t num, size_t size); -void _free (void* ptr); - -void _setMalloc (void* (*_malloc) (size_t size)); -void _setFree (void (*_free) (void* ptr)); - -char* _readFile (const char* path, int* length); - -/**/ - -void _AttachmentLoader_init (AttachmentLoader* self, /**/ - void (*dispose) (AttachmentLoader* self), /**/ - Attachment* (*newAttachment) (AttachmentLoader* self, Skin* skin, AttachmentType type, const char* name)); -void _AttachmentLoader_deinit (AttachmentLoader* self); -void _AttachmentLoader_setError (AttachmentLoader* self, const char* error1, const char* error2); -void _AttachmentLoader_setUnknownTypeError (AttachmentLoader* self, AttachmentType type); - -/**/ - -void _Attachment_init (Attachment* self, const char* name, AttachmentType type, /**/ - void (*dispose) (Attachment* self)); -void _Attachment_deinit (Attachment* self); - -/**/ - -void _Timeline_init (Timeline* self, /**/ - void (*dispose) (Timeline* self), /**/ - void (*apply) (const Timeline* self, Skeleton* skeleton, float time, float alpha)); -void _Timeline_deinit (Timeline* self); - -/**/ - -void _CurveTimeline_init (CurveTimeline* self, int frameCount, /**/ - void (*dispose) (Timeline* self), /**/ - void (*apply) (const Timeline* self, Skeleton* skeleton, float time, float alpha)); -void _CurveTimeline_deinit (CurveTimeline* self); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_EXTENSION_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/spine-cocos2dx.h b/cappuccino-sdk/incl/extensions/spine/spine-cocos2dx.h deleted file mode 100644 index baa42de..0000000 --- a/cappuccino-sdk/incl/extensions/spine/spine-cocos2dx.h +++ /dev/null @@ -1,40 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_COCOS2DX_H_ -#define SPINE_COCOS2DX_H_ - -#include -#include "cocos2d.h" -#include -#include - -namespace cocos2d { namespace extension { - -void RegionAttachment_updateQuad (RegionAttachment* self, Slot* slot, cocos2d::ccV3F_C4B_T2F_Quad* quad, bool premultiplied = false); - -}} // namespace cocos2d { namespace extension { - -#endif /* SPINE_COCOS2DX_H_ */ diff --git a/cappuccino-sdk/incl/extensions/spine/spine.h b/cappuccino-sdk/incl/extensions/spine/spine.h deleted file mode 100644 index d312d91..0000000 --- a/cappuccino-sdk/incl/extensions/spine/spine.h +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2013, Esoteric Software - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, this - * list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED - * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR - * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; - * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS - * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - ******************************************************************************/ - -#ifndef SPINE_SPINE_H_ -#define SPINE_SPINE_H_ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif /* SPINE_SPINE_H_ */ diff --git a/cappuccino-sdk/lib/cappuccino.lib b/cappuccino-sdk/lib/cappuccino.lib deleted file mode 100644 index 6dbe3ee3705447cfa1b0e63e8bd159ecf02ad094..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2029696 zcmY)1e^}k)|G@EEW+s`mR;SYsnIxG>l4O#ZNhULsBuOSoW|B;jBr}uDWF|?HnPet2 zlSwj3GLy;7WS`7TGBZh%`99yT`}NQFb6t@#D}`u|^#(xZSOl+8S~j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>_5sPGv@3&E&f+j3qLj>i(^XY`WV!ks$p36{*x^7 zP^*QXX7PqvE&MEtm%my-BF)bgo~RavoVWi%p^YeS|D}e=k+&BtmT?kT#;;<$+-DpZ z%CCDUUZxE~wlyT5{7r-+Q}ao9-MH(mY#ERF$nguyn17of?d`sV~{BvyE>F*hQXJO3qtXgmm~uMe@1zeZ>( zqbWD?TL@B3{w;&Y)Qvzo1Ao^s;ZB43K#8och-CkvqZ*tYC*D7Gyy?x3uBc=@#2){p zHY~eZ|NpBY-pCqrU^^Or2puKmXnIy z@OYhpF^!?h8$-Nl1`%E$&mH}+PT0+KM8?hx787nB;r6Z&F8RGng}JQ>tJrQ4V{VP} zoN*wY>Xr(tpX5(^0Zb^?mq^tgtiO0G1F9%3s_yCxQl@G z7;Y2cRxe%Dmq(Rs!IH0?48GvD5ehimagNHu5?#eD&D$lA*iKZDmEB(9F=Y0b{hgqY zSnLn0K2KCwT-heFXD8`s9C;>Elifk#v1LHmUC=u!Jf0Yc$ns7Jto3Di=&l7Q; z`jZu&?Deidvr7l0dXgeinVe$4GdA?dtHk`*seM$qg_^%Jg6!XE2_!cEWvOb#*D|Lk z@OXMKm?fN{&?W=Fo4Zqp?b$YkHDu3xrb1%z%vh)QEQK{2^*pR*N45a$wEJv3E>oWw zi$~iP`Uv9DIXc>qPJcT#(cyxXOYZUS50)=Na49<9TX9FHjJi>0dU1&fx zn;~_rSO$8LLOtjPz8>bu{s!~jcj;plh8%J4nm`&w#JyVrk166J^~nx}HsmNcrjS^o zAQlhC71jvi!Gw;+5DzdrD{NI|k3Dx!V2vX7T&(a$5_|4p Mz>^P3W<2x%0SjaOk^lez diff --git a/cappuccino-sdk/lib/libExtensions.lib b/cappuccino-sdk/lib/libExtensions.lib deleted file mode 100644 index 611f2a90513ca2ddb44a7e23a8831c3c0d4a5186..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 357688 zcmeEv4V=d~nv;?pE|(x|{A2!VH>$Z_&sB*$I*wDf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2~S6U3t-mBaDh1x^fswd>cD zrYvy`seK757-XMZ>K64s7R2ZCdifB{ajMcQv-Uib4oJZNRWSDI2M0+H-LETK7mMxZ z_p#o=@zHEmBIf*m1$szZobLcbJir`G$;}TIXvNFmLOfBA!k}+6iZrjx*sX~};DD(I zp_L=_%Ub<9Wbo|t!SgQsVdau7!f%&3V$%m@W7QBj^53u@z)c12&8+kh9gMzX1?PA~l?4lfWnIKF1~->1oHE?gfDKVFGCjN~Pf_64wu>A - -// MinHook Error Codes. -typedef enum MH_STATUS -{ - // Unknown error. Should not be returned. - MH_UNKNOWN = -1, - - // Successful. - MH_OK = 0, - - // MinHook is already initialized. - MH_ERROR_ALREADY_INITIALIZED, - - // MinHook is not initialized yet, or already uninitialized. - MH_ERROR_NOT_INITIALIZED, - - // The hook for the specified target function is already created. - MH_ERROR_ALREADY_CREATED, - - // The hook for the specified target function is not created yet. - MH_ERROR_NOT_CREATED, - - // The hook for the specified target function is already enabled. - MH_ERROR_ENABLED, - - // The hook for the specified target function is not enabled yet, or already - // disabled. - MH_ERROR_DISABLED, - - // The specified pointer is invalid. It points the address of non-allocated - // and/or non-executable region. - MH_ERROR_NOT_EXECUTABLE, - - // The specified target function cannot be hooked. - MH_ERROR_UNSUPPORTED_FUNCTION, - - // Failed to allocate memory. - MH_ERROR_MEMORY_ALLOC, - - // Failed to change the memory protection. - MH_ERROR_MEMORY_PROTECT, - - // The specified module is not loaded. - MH_ERROR_MODULE_NOT_FOUND, - - // The specified function is not found. - MH_ERROR_FUNCTION_NOT_FOUND -} -MH_STATUS; - -// Can be passed as a parameter to MH_EnableHook, MH_DisableHook, -// MH_QueueEnableHook or MH_QueueDisableHook. -#define MH_ALL_HOOKS NULL - -#ifdef __cplusplus -extern "C" { -#endif - - // Initialize the MinHook library. You must call this function EXACTLY ONCE - // at the beginning of your program. - MH_STATUS WINAPI MH_Initialize(VOID); - - // Uninitialize the MinHook library. You must call this function EXACTLY - // ONCE at the end of your program. - MH_STATUS WINAPI MH_Uninitialize(VOID); - - // Creates a Hook for the specified target function, in disabled state. - // Parameters: - // pTarget [in] A pointer to the target function, which will be - // overridden by the detour function. - // pDetour [in] A pointer to the detour function, which will override - // the target function. - // ppOriginal [out] A pointer to the trampoline function, which will be - // used to call the original target function. - // This parameter can be NULL. - MH_STATUS WINAPI MH_CreateHook(LPVOID pTarget, LPVOID pDetour, LPVOID *ppOriginal); - - // Creates a Hook for the specified API function, in disabled state. - // Parameters: - // pszModule [in] A pointer to the loaded module name which contains the - // target function. - // pszTarget [in] A pointer to the target function name, which will be - // overridden by the detour function. - // pDetour [in] A pointer to the detour function, which will override - // the target function. - // ppOriginal [out] A pointer to the trampoline function, which will be - // used to call the original target function. - // This parameter can be NULL. - MH_STATUS WINAPI MH_CreateHookApi( - LPCWSTR pszModule, LPCSTR pszProcName, LPVOID pDetour, LPVOID *ppOriginal); - - // Creates a Hook for the specified API function, in disabled state. - // Parameters: - // pszModule [in] A pointer to the loaded module name which contains the - // target function. - // pszTarget [in] A pointer to the target function name, which will be - // overridden by the detour function. - // pDetour [in] A pointer to the detour function, which will override - // the target function. - // ppOriginal [out] A pointer to the trampoline function, which will be - // used to call the original target function. - // This parameter can be NULL. - // ppTarget [out] A pointer to the target function, which will be used - // with other functions. - // This parameter can be NULL. - MH_STATUS WINAPI MH_CreateHookApiEx( - LPCWSTR pszModule, LPCSTR pszProcName, LPVOID pDetour, LPVOID *ppOriginal, LPVOID *ppTarget); - - // Removes an already created hook. - // Parameters: - // pTarget [in] A pointer to the target function. - MH_STATUS WINAPI MH_RemoveHook(LPVOID pTarget); - - // Enables an already created hook. - // Parameters: - // pTarget [in] A pointer to the target function. - // If this parameter is MH_ALL_HOOKS, all created hooks are - // enabled in one go. - MH_STATUS WINAPI MH_EnableHook(LPVOID pTarget); - - // Disables an already created hook. - // Parameters: - // pTarget [in] A pointer to the target function. - // If this parameter is MH_ALL_HOOKS, all created hooks are - // disabled in one go. - MH_STATUS WINAPI MH_DisableHook(LPVOID pTarget); - - // Queues to enable an already created hook. - // Parameters: - // pTarget [in] A pointer to the target function. - // If this parameter is MH_ALL_HOOKS, all created hooks are - // queued to be enabled. - MH_STATUS WINAPI MH_QueueEnableHook(LPVOID pTarget); - - // Queues to disable an already created hook. - // Parameters: - // pTarget [in] A pointer to the target function. - // If this parameter is MH_ALL_HOOKS, all created hooks are - // queued to be disabled. - MH_STATUS WINAPI MH_QueueDisableHook(LPVOID pTarget); - - // Applies all queued changes in one go. - MH_STATUS WINAPI MH_ApplyQueued(VOID); - - // Translates the MH_STATUS to its name as a string. - const char * WINAPI MH_StatusToString(MH_STATUS status); - -#ifdef __cplusplus -} -#endif - diff --git a/minhook/lib/libMinHook-x86-v141-mtd.lib b/minhook/lib/libMinHook-x86-v141-mtd.lib deleted file mode 100644 index 0069de74ee7e7acb21dcdbd9a058dc66c3408a6f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 26514 zcmd^o4R}=5x$d5sBn;``1ROLft*J&!1^Gz;!T6JeY#^8oA!Lgv8e%e#kdUOA83m7# z#7$}@+nmx~wAj;o#RJEBsJEq7DfD1XFeM1|Dfn|s&*9WSX`47vW94VSk(~EiYwtC) zGZW~~JwDHU?!xSO_q)Ee_FCWi+22}wt>stmC~vH&x+`^RhSg1Kcs{PgFwbhS#jVH3l#|LC|T<8+-+WJRg<6r78_Xm8X^-KMY)pe_L z`9syZYRgkrmsKtBmN!Uc0LYn-K(()^zM{rkDV0@Kdb6|2Dv@;GTJz3Nsg}y}YHRB& zpuYUTs#V@bscc@OSKw$yOy5GEyv|z@U}5trD;vE&JSjFUrr_$b1_c>uT%V8Vk(|G} z7R{KGEoxB`s?lA^lC(KZlFk-LlK(+gt)wK$hCljeAK{$0;}6nGyFtX@%D{qWlAI%*9o{GxA| zQvdK8X#^<}y`(?2qDu)p%-Rr>NS$hShep~)%Ek0)(`L<@m64G(dxp_%u1qbmB}-f1 zsJm~BQXffY8vDy^O;LcYA?X;HuH}E=1OV#Q~cg_ z{>-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/null @@ -1,12 +0,0 @@ -Each file name has these tags: - -"x86", "x64": - CPU archtecture - -"v90", "v100", "v110", "v120", "v140", "v141": - Platform toolset (compiler version) - Choose "v110" for "v110_xp", "v120" for "v120_xp", "v140" for "v140_xp", "v141" for "v141_xp" - -"md", "mt", "mdd", "mtd": - Runtime Link (Dynamic/Static) and Config (Release/Debug) - Corresponding to "/MD", "/MT", "/MDd" and "/MTd" compiler options respectively. From e22255c3324c1ff3e6ca6751cae13685130006bc Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 11 Mar 2021 14:40:13 -0300 Subject: [PATCH 03/95] rename pch.h to includes.h --- src/GameManager.h | 2 +- src/PauseLayer.h | 4 +--- src/PlayLayer.h | 4 +--- src/PlayerObject.h | 2 +- src/ReplaySystem.h | 4 +--- src/dllmain.cpp | 2 +- src/framework.h | 6 ------ src/includes.h | 16 ++++++++++++++++ src/pch.cpp | 5 ----- src/pch.h | 15 --------------- src/utils.hpp | 2 +- 11 files changed, 23 insertions(+), 39 deletions(-) delete mode 100644 src/framework.h create mode 100644 src/includes.h delete mode 100644 src/pch.cpp delete mode 100644 src/pch.h diff --git a/src/GameManager.h b/src/GameManager.h index da38f4c..343fcaa 100644 --- a/src/GameManager.h +++ b/src/GameManager.h @@ -1,5 +1,5 @@ #pragma once -#include "pch.h" +#include "includes.h" namespace GameManager { void setup(uintptr_t); diff --git a/src/PauseLayer.h b/src/PauseLayer.h index 1c8914b..428c6dd 100644 --- a/src/PauseLayer.h +++ b/src/PauseLayer.h @@ -1,7 +1,5 @@ #pragma once -#include "pch.h" - -using namespace cocos2d; +#include "includes.h" namespace PauseLayer { void setup(uintptr_t); diff --git a/src/PlayLayer.h b/src/PlayLayer.h index 708a742..859050d 100644 --- a/src/PlayLayer.h +++ b/src/PlayLayer.h @@ -1,7 +1,5 @@ #pragma once -#include "pch.h" - -using namespace cocos2d; +#include "includes.h" namespace PlayLayer { void setup(uintptr_t base); diff --git a/src/PlayerObject.h b/src/PlayerObject.h index b663ec5..cd85731 100644 --- a/src/PlayerObject.h +++ b/src/PlayerObject.h @@ -1,5 +1,5 @@ #pragma once -#include "pch.h" +#include "includes.h" namespace PlayerObject { void setup(uintptr_t base); diff --git a/src/ReplaySystem.h b/src/ReplaySystem.h index 0a54434..7d143e3 100644 --- a/src/ReplaySystem.h +++ b/src/ReplaySystem.h @@ -1,10 +1,8 @@ #pragma once -#include "pch.h" +#include "includes.h" #include "Replay.h" #include -using namespace cocos2d; - class ReplaySystem { static ReplaySystem* instance; diff --git a/src/dllmain.cpp b/src/dllmain.cpp index e14a107..1ce023f 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -1,4 +1,4 @@ -#include "pch.h" +#include "includes.h" #include "ReplaySystem.h" #include "PauseLayer.h" #include "PlayLayer.h" diff --git a/src/framework.h b/src/framework.h deleted file mode 100644 index 0e225c9..0000000 --- a/src/framework.h +++ /dev/null @@ -1,6 +0,0 @@ -#pragma once - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -// Windows Header Files -#include -#include \ No newline at end of file diff --git a/src/includes.h b/src/includes.h new file mode 100644 index 0000000..c3bbbbb --- /dev/null +++ b/src/includes.h @@ -0,0 +1,16 @@ +#ifndef PCH_H +#define PCH_H + +#define WIN32_LEAN_AND_MEAN +#include +#include + +// shut up cocos +#pragma warning(push, 0) +#include +using namespace cocos2d; +#pragma warning(pop) + +#include + +#endif //PCH_H diff --git a/src/pch.cpp b/src/pch.cpp deleted file mode 100644 index 64b7eef..0000000 --- a/src/pch.cpp +++ /dev/null @@ -1,5 +0,0 @@ -// pch.cpp: source file corresponding to the pre-compiled header - -#include "pch.h" - -// When you are using pre-compiled headers, this source file is necessary for compilation to succeed. diff --git a/src/pch.h b/src/pch.h deleted file mode 100644 index 2390892..0000000 --- a/src/pch.h +++ /dev/null @@ -1,15 +0,0 @@ -// pch.h: This is a precompiled header file. -// Files listed below are compiled only once, improving build performance for future builds. -// This also affects IntelliSense performance, including code completion and many code browsing features. -// However, files listed here are ALL re-compiled if any one of them is updated between builds. -// Do not add files here that you will be updating frequently as this negates the performance advantage. - -#ifndef PCH_H -#define PCH_H - -// add headers that you want to pre-compile here -#include "framework.h" -#include -#include "MinHook.h" - -#endif //PCH_H diff --git a/src/utils.hpp b/src/utils.hpp index dd6b774..224a684 100644 --- a/src/utils.hpp +++ b/src/utils.hpp @@ -1,5 +1,5 @@ #pragma once -#include "pch.h" +#include "includes.h" uintptr_t follow(uintptr_t address) { return *(reinterpret_cast(address)); From 2131ba6ac441469f64decd8111d2f9f56590a179 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 11 Mar 2021 14:47:57 -0300 Subject: [PATCH 04/95] add gd.h --- .gitmodules | 3 +++ libraries/gd.h | 1 + 2 files changed, 4 insertions(+) create mode 160000 libraries/gd.h diff --git a/.gitmodules b/.gitmodules index 8c24773..24792c5 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,3 +4,6 @@ [submodule "libraries/minhook"] path = libraries/minhook url = https://github.com/TsudaKageyu/minhook.git +[submodule "libraries/gd.h"] + path = libraries/gd.h + url = https://github.com/poweredbypie/gd.h.git diff --git a/libraries/gd.h b/libraries/gd.h new file mode 160000 index 0000000..323d075 --- /dev/null +++ b/libraries/gd.h @@ -0,0 +1 @@ +Subproject commit 323d075d1f8dca6173f8662c6881842a5727e35a From 9c157fe5a5e0e2c59cedd30cb245c068d3cf7381 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 11 Mar 2021 16:03:53 -0300 Subject: [PATCH 05/95] switch to hook utils --- src/PauseLayer.cpp | 18 ++------- src/PauseLayer.h | 1 - src/PlayLayer.cpp | 87 +++++++------------------------------------- src/PlayLayer.h | 3 -- src/PlayerObject.cpp | 30 ++++----------- src/PlayerObject.h | 4 -- src/dllmain.cpp | 21 ++++------- src/hook_utils.cpp | 17 +++++++++ src/hook_utils.hpp | 11 ++++++ src/utils.hpp | 18 +++++++-- 10 files changed, 73 insertions(+), 137 deletions(-) create mode 100644 src/hook_utils.cpp create mode 100644 src/hook_utils.hpp diff --git a/src/PauseLayer.cpp b/src/PauseLayer.cpp index 2ff3c03..f762bdc 100644 --- a/src/PauseLayer.cpp +++ b/src/PauseLayer.cpp @@ -2,23 +2,11 @@ #include "ReplaySystem.h" #include "PlayLayer.h" #include "PlayerObject.h" +#include "hook_utils.hpp" void PauseLayer::setup(uintptr_t base) { - MH_CreateHook( - reinterpret_cast(base + 0x1E4620), - initHook, - reinterpret_cast(&init) - ); - MH_CreateHook( - reinterpret_cast(base + 0x20D3C0), - onPauseHook, - reinterpret_cast(&onPause) - ); -} - -void PauseLayer::unload(uintptr_t base) { - MH_RemoveHook(reinterpret_cast(base + 0x1E4620)); - MH_RemoveHook(reinterpret_cast(base + 0x20D3C0)); + Hooks::addHook(base + 0x1E4620, initHook, &init); + Hooks::addHook(base + 0x20D3C0, onPauseHook, &onPause); } // this is probably on PlayLayer but i dontcare diff --git a/src/PauseLayer.h b/src/PauseLayer.h index 428c6dd..9e78cff 100644 --- a/src/PauseLayer.h +++ b/src/PauseLayer.h @@ -3,7 +3,6 @@ namespace PauseLayer { void setup(uintptr_t); - void unload(uintptr_t); inline void(__thiscall* init)(CCLayer* self); void __fastcall initHook(CCLayer* self, void*); diff --git a/src/PlayLayer.cpp b/src/PlayLayer.cpp index bc70bf3..d72b0b2 100644 --- a/src/PlayLayer.cpp +++ b/src/PlayLayer.cpp @@ -3,84 +3,25 @@ #include "utils.hpp" #include "PracticeFixes.h" #include "GameManager.h" +#include "hook_utils.hpp" void PlayLayer::setup(uintptr_t base) { PlayLayer::base = base; - MH_CreateHook( - reinterpret_cast(base + 0x1FB780), - PlayLayer::initHook, - reinterpret_cast(&PlayLayer::init) - ); - MH_CreateHook( - reinterpret_cast(base + 0x2029C0), - PlayLayer::updateHook, - reinterpret_cast(&PlayLayer::update) - ); - MH_CreateHook( - reinterpret_cast(base + 0x1FD3D0), - PlayLayer::levelCompleteHook, - reinterpret_cast(&PlayLayer::levelComplete) - ); - MH_CreateHook( - reinterpret_cast(base + 0x20D810), - PlayLayer::onQuitHook, - reinterpret_cast(&PlayLayer::onQuit) - ); - MH_CreateHook( - reinterpret_cast(base + 0x111500), - pushButtonHook, - reinterpret_cast(&pushButton) - ); - MH_CreateHook( - reinterpret_cast(base + 0x111660), - releaseButtonHook, - reinterpret_cast(&releaseButton) - ); + Hooks::addHook(base + 0x1FB780, initHook, &init); + Hooks::addHook(base + 0x2029C0, updateHook, &update); + Hooks::addHook(base + 0x1FD3D0, levelCompleteHook, &levelComplete); + Hooks::addHook(base + 0x20D810, onQuitHook, &onQuit); + Hooks::addHook(base + 0x111500, pushButtonHook, &pushButton); + Hooks::addHook(base + 0x111660, releaseButtonHook, &releaseButton); auto handle = GetModuleHandleA("libcocos2d.dll"); - auto address = GetProcAddress(handle, "?update@CCScheduler@cocos2d@@UAEXM@Z"); - schUpdateAddress = reinterpret_cast(address); - - MH_CreateHook( - schUpdateAddress, - schUpdateHook, - reinterpret_cast(&schUpdate) - ); - - MH_CreateHook( - reinterpret_cast(base + 0x25FB60), - markCheckpointHook, - reinterpret_cast(&markCheckpoint) - ); - MH_CreateHook( - reinterpret_cast(base + 0x20B830), - removeLastCheckpointHook, - reinterpret_cast(&removeLastCheckpoint) - ); - MH_CreateHook( - reinterpret_cast(base + 0x1E60E0), - onEditorHook, - reinterpret_cast(&onEditor) - ); - MH_CreateHook( - reinterpret_cast(base + 0x20BF00), - resetLevelHook, - reinterpret_cast(&resetLevel) - ); -} - -void PlayLayer::unload(uintptr_t base) { - MH_RemoveHook(reinterpret_cast(base + 0x1FB780)); - MH_RemoveHook(reinterpret_cast(base + 0x2029C0)); - MH_RemoveHook(reinterpret_cast(base + 0x1FD3D0)); - MH_RemoveHook(reinterpret_cast(base + 0x20D810)); - MH_RemoveHook(reinterpret_cast(base + 0x111500)); - MH_RemoveHook(reinterpret_cast(base + 0x111660)); - MH_RemoveHook(schUpdateAddress); - MH_RemoveHook(reinterpret_cast(base + 0x25FB60)); - MH_RemoveHook(reinterpret_cast(base + 0x20B830)); - MH_RemoveHook(reinterpret_cast(base + 0x1E60E0)); - MH_RemoveHook(reinterpret_cast(base + 0x20BF00)); + + Hooks::addHook(GetProcAddress(handle, "?update@CCScheduler@cocos2d@@UAEXM@Z"), schUpdateHook, &schUpdate); + + Hooks::addHook(base + 0x25FB60, markCheckpointHook, &markCheckpoint); + Hooks::addHook(base + 0x20B830, removeLastCheckpointHook, &removeLastCheckpoint); + Hooks::addHook(base + 0x1E60E0, onEditorHook, &onEditor); + Hooks::addHook(base + 0x20BF00, resetLevelHook, &resetLevel); } void __fastcall PlayLayer::initHook(CCLayer* self, void*, void* GJLevel) { diff --git a/src/PlayLayer.h b/src/PlayLayer.h index 859050d..645747b 100644 --- a/src/PlayLayer.h +++ b/src/PlayLayer.h @@ -3,7 +3,6 @@ namespace PlayLayer { void setup(uintptr_t base); - void unload(uintptr_t base); constexpr int StatusLabelTag = 666; inline CCLayer* self; @@ -17,8 +16,6 @@ namespace PlayLayer { inline void(__thiscall* update)(CCLayer* self, float dt); void __fastcall updateHook(CCLayer* self, void*, float dt); - inline void* schUpdateAddress; - inline void(__thiscall* schUpdate)(CCScheduler* self, float dt); void __fastcall schUpdateHook(CCScheduler* self, void*, float dt); diff --git a/src/PlayerObject.cpp b/src/PlayerObject.cpp index c413101..a0d2cb2 100644 --- a/src/PlayerObject.cpp +++ b/src/PlayerObject.cpp @@ -1,27 +1,11 @@ #include "PlayerObject.h" #include "ReplaySystem.h" #include "PlayLayer.h" +#include "hook_utils.hpp" +#include "utils.hpp" void PlayerObject::setup(uintptr_t base) { - MH_CreateHook( - reinterpret_cast(base + 0x1F4E40), - pushButtonHook, - reinterpret_cast(&pushButton) - ); - MH_CreateHook( - reinterpret_cast(base + 0x1F4F70), - releaseButtonHook, - reinterpret_cast(&releaseButton) - ); -} - -void PlayerObject::unload(uintptr_t base) { - MH_RemoveHook(reinterpret_cast(base + 0x1F4E40)); - MH_RemoveHook(reinterpret_cast(base + 0x1F4F70)); -} - -void __fastcall PlayerObject::pushButtonHook(void* self, void*, void* PlayerButton) { - pushButton(self, PlayerButton); + Hooks::addHook(base + 0x1F4F70, releaseButtonHook, &releaseButton); } void __fastcall PlayerObject::releaseButtonHook(void* self, void*, void* PlayerButton) { @@ -31,18 +15,18 @@ void __fastcall PlayerObject::releaseButtonHook(void* self, void*, void* PlayerB namespace PlayerObject { float* getX(uintptr_t player) { - return reinterpret_cast(player + 0x67C); + return readPtr(player + 0x67C); } double* getYAccel(uintptr_t player) { - return reinterpret_cast(player + 0x628); + return readPtr(player + 0x628); } float* getRotation(uintptr_t player) { - return reinterpret_cast(player + 0x20); + return readPtr(player + 0x20); } float* getSpriteRotation(uintptr_t player) { - return reinterpret_cast(player + 0x24); + return readPtr(player + 0x24); } } \ No newline at end of file diff --git a/src/PlayerObject.h b/src/PlayerObject.h index cd85731..acfbb17 100644 --- a/src/PlayerObject.h +++ b/src/PlayerObject.h @@ -3,13 +3,9 @@ namespace PlayerObject { void setup(uintptr_t base); - void unload(uintptr_t base); inline bool preventInput = false; - inline void(__thiscall* pushButton)(void* self, void*); - void __fastcall pushButtonHook(void* self, void*, void*); - inline void(__thiscall* releaseButton)(void* self, void*); void __fastcall releaseButtonHook(void* self, void*, void*); diff --git a/src/dllmain.cpp b/src/dllmain.cpp index 1ce023f..598b0a7 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -5,14 +5,14 @@ #include "PlayerObject.h" #include "GameManager.h" #include +#include "hook_utils.hpp" +#include "utils.hpp" void readInput(HMODULE hModule) { for (std::string line; std::getline(std::cin, line);) { if (line == "exit") { auto base = reinterpret_cast(GetModuleHandle(0)); - PauseLayer::unload(base); - PlayLayer::unload(base); - PlayerObject::unload(base); + Hooks::unload(); fclose(stdout); fclose(stdin); FreeConsole(); @@ -44,15 +44,15 @@ void readInput(HMODULE hModule) { } DWORD WINAPI my_thread(void* hModule) { - MH_Initialize(); - AllocConsole(); SetConsoleTitleA("Console"); - // freopen_s(reinterpret_cast(stdout), "CONOUT$", "w", stdout); + freopen_s(reinterpret_cast(stdout), "CONOUT$", "w", stdout); freopen_s(reinterpret_cast(stdin), "CONIN$", "r", stdin); static std::ofstream conout("CONOUT$", std::ios::out); std::cout.rdbuf(conout.rdbuf()); + Hooks::init(); + auto base = reinterpret_cast(GetModuleHandle(0)); auto rs = ReplaySystem::getInstance(); @@ -64,11 +64,7 @@ DWORD WINAPI my_thread(void* hModule) { MH_EnableHook(MH_ALL_HOOKS); - std::cout << "ReplayBot loaded." << std::endl; - std::cout << "FPS is set to " << rs->getDefaultFPS() << std::endl; - std::cout << "To change it type in `fps (number)`" << std::endl; - - readInput(reinterpret_cast(hModule)); + readInput(cast(hModule)); return 0; } @@ -82,9 +78,6 @@ BOOL APIENTRY DllMain(HMODULE hModule, { case DLL_PROCESS_ATTACH: CreateThread(0, 0x1000, my_thread, hModule, 0, 0); - case DLL_THREAD_ATTACH: - case DLL_THREAD_DETACH: - case DLL_PROCESS_DETACH: break; } return TRUE; diff --git a/src/hook_utils.cpp b/src/hook_utils.cpp new file mode 100644 index 0000000..0057125 --- /dev/null +++ b/src/hook_utils.cpp @@ -0,0 +1,17 @@ +#include "hook_utils.hpp" +#include "utils.hpp" + +namespace Hooks { + void init() { + MH_Initialize(); + } + void unload() { + MH_Uninitialize(); + } + void addHook(uintptr_t address, void* hook, void* original) { + addHook(cast(address), hook, original); + } + void addHook(void* address, void* hook, void* original) { + MH_CreateHook(address, hook, cast(original)); + } +} \ No newline at end of file diff --git a/src/hook_utils.hpp b/src/hook_utils.hpp new file mode 100644 index 0000000..9e81925 --- /dev/null +++ b/src/hook_utils.hpp @@ -0,0 +1,11 @@ +#ifndef __HOOK_UTILS_HPP +#define __HOOK_UTILS_HPP +#include "includes.h" + +namespace Hooks { + void init(); + void unload(); + void addHook(uintptr_t address, void* hook, void* original); + void addHook(void* address, void* hook, void* original); +} +#endif \ No newline at end of file diff --git a/src/utils.hpp b/src/utils.hpp index 224a684..770bec3 100644 --- a/src/utils.hpp +++ b/src/utils.hpp @@ -1,6 +1,16 @@ -#pragma once +#ifndef __UTILS_HPP +#define __UTILS_HPP #include "includes.h" -uintptr_t follow(uintptr_t address) { - return *(reinterpret_cast(address)); -} \ No newline at end of file +template +T cast(R const v) { return reinterpret_cast(v); } + +template +T* readPtr(uintptr_t addr) { return cast(addr); } + +template +T read(uintptr_t addr) { return *readPtr(addr); } + +inline uintptr_t follow(uintptr_t addr) { return read(addr); } + +#endif \ No newline at end of file From 40ea7359adfe7da9957a7adb84f89eeea6027066 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 11 Mar 2021 18:50:27 -0300 Subject: [PATCH 06/95] Replay::load instead of overloaded constructor --- inject.py | 3 --- src/PlayLayer.cpp | 5 ++--- src/Replay.cpp | 9 +++++---- src/Replay.h | 4 ++-- src/ReplaySystem.cpp | 2 +- 5 files changed, 10 insertions(+), 13 deletions(-) delete mode 100644 inject.py diff --git a/inject.py b/inject.py deleted file mode 100644 index 1f74b49..0000000 --- a/inject.py +++ /dev/null @@ -1,3 +0,0 @@ -from gd import memory -from pathlib import Path -memory.get_state().inject_dll(Path(__file__).absolute().parent / 'Debug' / 'ReplayBot.dll') \ No newline at end of file diff --git a/src/PlayLayer.cpp b/src/PlayLayer.cpp index d72b0b2..fe9b490 100644 --- a/src/PlayLayer.cpp +++ b/src/PlayLayer.cpp @@ -139,10 +139,9 @@ uintptr_t PlayLayer::getSelf() { } void* __fastcall PlayLayer::markCheckpointHook(CCLayer* self, void*, void* idk2) { - auto isDead = reinterpret_cast(reinterpret_cast(PlayLayer::self) + 0x39C); - if (!*isDead) { + auto isDead = read(cast(self) + 0x39C); + if (!isDead) PracticeFixes::addCheckpoint(); - } return markCheckpoint(self, idk2); } diff --git a/src/Replay.cpp b/src/Replay.cpp index c84b3bc..93a4cf6 100644 --- a/src/Replay.cpp +++ b/src/Replay.cpp @@ -41,18 +41,19 @@ void Replay::save(const char* path) { outfile.close(); } -Replay::Replay(const char* path) { +std::shared_ptr Replay::load(const char* path) { std::ifstream infile; infile.open(path, std::ios::binary | std::ios::in); infile.seekg(0, std::ios::end); // this apparently can be inaccurate sometimes but i haven't seen it happen auto size = static_cast(infile.tellg()); infile.seekg(0); - this->fps = binRead(&infile); + auto fps = binRead(&infile); + auto replay = std::make_shared(fps); for (long _i = 0; _i < (size - 4) / 6; ++_i) { Action action = { binRead(&infile), binRead(&infile), binRead(&infile) }; - this->actions.push_back(action); + replay->addAction(action); } infile.close(); - std::cout << "Replay loaded with fps=" << this->fps << std::endl; + return replay; } \ No newline at end of file diff --git a/src/Replay.h b/src/Replay.h index b178f14..5aefc03 100644 --- a/src/Replay.h +++ b/src/Replay.h @@ -1,5 +1,6 @@ #pragma once #include +#include struct Action { float x; @@ -12,7 +13,6 @@ class Replay { float fps; public: Replay(float fps); - Replay(const char* path); float getFPS() { return fps; @@ -26,5 +26,5 @@ class Replay { } void save(const char* path); - //static Replay load(const char* path); + static std::shared_ptr load(const char* path); }; diff --git a/src/ReplaySystem.cpp b/src/ReplaySystem.cpp index a22f200..b85c030 100644 --- a/src/ReplaySystem.cpp +++ b/src/ReplaySystem.cpp @@ -83,7 +83,7 @@ void ReplaySystem::handlePlaying() { // TODO: support unicode paths void ReplaySystem::loadReplay(const char* path) { - currentReplay = std::make_shared(path); + currentReplay = Replay::load(path); } void ReplaySystem::saveReplay(const char* path) { From 0ab5b723502abfdda705b871345691bcc3a28792 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Wed, 17 Mar 2021 16:32:39 -0300 Subject: [PATCH 07/95] overlay wip code --- CMakeLists.txt | 2 + src/PlayLayer.cpp | 3 +- src/dllmain.cpp | 17 ++++ src/includes.h | 1 + src/overlay.cpp | 229 ++++++++++++++++++++++++++++++++++++++++++++++ src/overlay.hpp | 51 +++++++++++ 6 files changed, 302 insertions(+), 1 deletion(-) create mode 100644 src/overlay.cpp create mode 100644 src/overlay.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index d535c8b..1612aa4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,8 @@ file( add_library(replay-bot SHARED ${SOURCE_FILES}) target_include_directories(replay-bot PRIVATE + libraries/gd.h/include + libraries/gd.h libraries/minhook/include libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/ libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/include diff --git a/src/PlayLayer.cpp b/src/PlayLayer.cpp index fe9b490..c05cbe3 100644 --- a/src/PlayLayer.cpp +++ b/src/PlayLayer.cpp @@ -37,6 +37,7 @@ void __fastcall PlayLayer::initHook(CCLayer* self, void*, void* GJLevel) { } void PlayLayer::updateStatusLabel(const char* text) { + if (self == nullptr) return; auto director = CCDirector::sharedDirector(); auto winSize = director->getWinSize(); @@ -139,7 +140,7 @@ uintptr_t PlayLayer::getSelf() { } void* __fastcall PlayLayer::markCheckpointHook(CCLayer* self, void*, void* idk2) { - auto isDead = read(cast(self) + 0x39C); + auto isDead = read(getSelf() + 0x39C); if (!isDead) PracticeFixes::addCheckpoint(); return markCheckpoint(self, idk2); diff --git a/src/dllmain.cpp b/src/dllmain.cpp index 598b0a7..7242e6d 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -7,6 +7,7 @@ #include #include "hook_utils.hpp" #include "utils.hpp" +#include "overlay.hpp" void readInput(HMODULE hModule) { for (std::string line; std::getline(std::cin, line);) { @@ -43,6 +44,20 @@ void readInput(HMODULE hModule) { } } +inline bool(__thiscall* MenuLayer_init)(CCLayer* self); +bool __fastcall MenuLayer_initHook(CCLayer* self, void*) { + auto ret = MenuLayer_init(self); + + auto menu = CCMenu::create(); + auto sprite = CCSprite::createWithSpriteFrameName("GJ_trailerBtn_001.png"); + auto btn = CCMenuItemSpriteExtra::create(sprite, sprite, self, menu_selector(OverlayLayer::btnCallback)); + menu->addChild(btn); + menu->setPosition({200, 200}); + self->addChild(menu); + + return ret; +} + DWORD WINAPI my_thread(void* hModule) { AllocConsole(); SetConsoleTitleA("Console"); @@ -62,6 +77,8 @@ DWORD WINAPI my_thread(void* hModule) { PlayerObject::setup(base); GameManager::setup(base); + Hooks::addHook(base + 0x1907b0, MenuLayer_initHook, &MenuLayer_init); + MH_EnableHook(MH_ALL_HOOKS); readInput(cast(hModule)); diff --git a/src/includes.h b/src/includes.h index c3bbbbb..2090654 100644 --- a/src/includes.h +++ b/src/includes.h @@ -12,5 +12,6 @@ using namespace cocos2d; #pragma warning(pop) #include +#include #endif //PCH_H diff --git a/src/overlay.cpp b/src/overlay.cpp new file mode 100644 index 0000000..65dbfde --- /dev/null +++ b/src/overlay.cpp @@ -0,0 +1,229 @@ +#include "overlay.hpp" +#include "ReplaySystem.h" + +OverlayLayer* OverlayLayer::create() { + auto self = cast(CCLayerColor::create()); + + //self->registerWithTouchDispatcher(); + //CCDirector::sharedDirector()->getTouchDispatcher()->incrementForcePrio(2); + //self->setTouchEnabled(true); + self->setKeypadEnabled(true); + + //CCDirector::sharedDirector()->getTouchDispatcher()->addTargetedDelegate(self, -1024, true); + self->initMyStuff(); + + // self->setTouchMode(ccTouchesMode::kCCTouchesOneByOne); + + + // director->getTouchDispatcher()->incrementForcePrio(200); + // self->setTouchEnabled(true); + + return self; +} + +void buttonWithLabel(CCMenu* menu, float x, float y, CCSprite* sprite, const char* text, CCObject* target, SEL_MenuHandler handler, bool right = false) { + auto label = CCLabelBMFont::create(text, "bigFont.fnt"); + label->setScale(0.7f); + auto button = gd::CCMenuItemSpriteExtra::create(sprite, target, handler); + auto btnSize = button->getScaledContentSize(); + auto lblSize = label->getScaledContentSize(); + button->setPosition({x, y}); + float lbX = btnSize.width / 2.f + 5.f + lblSize.width / 2.f + x; + label->setPosition({lbX, y}); + if (right) + label->setPositionX(-lbX); + menu->addChild(button); + menu->addChild(label); +} + +void OverlayLayer::_updateReplayLabel() { + auto label = m_pLblReplay; + auto replay = ReplaySystem::getInstance()->getCurrentReplay(); + auto winSize = CCDirector::sharedDirector()->getWinSize(); + std::stringstream stream; + if (replay) { + stream << "Current FPS: " << replay->getFPS(); + } else { + stream << "No replay loaded"; + } + label->setString(stream.str().c_str()); + auto size = label->getScaledContentSize(); + label->setPosition({15 + size.width / 2, winSize.height - 180 - size.height / 2}); +} + +bool OverlayLayer::initMyStuff() { + auto director = CCDirector::sharedDirector(); + auto winSize = director->getWinSize(); + auto rs = ReplaySystem::getInstance(); + + initWithColor({45, 93, 147, 255}, winSize.width, winSize.height); + + // setZOrder(999); + + { + auto btnBack = gd::CCMenuItemSpriteExtra::create( + CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png"), + this, + menu_selector(OverlayLayer::_btnBackCallback) + ); + auto menu = CCMenu::create(); + menu->addChild(btnBack); + menu->setPosition({25, winSize.height - 25}); + addChild(menu); + } + + auto menu = CCMenu::create(); + auto sprGreen = CCSprite::create("GJ_button_01.png"); + sprGreen->setScale(0.72f); + menu->setPosition({30, winSize.height - 80}); + buttonWithLabel(menu, 0, 0, sprGreen, "Record", this, menu_selector(OverlayLayer::cbRecordBtn)); + buttonWithLabel(menu, 0, -38, sprGreen, "Play", this, menu_selector(OverlayLayer::cbPlayBtn)); + + addChild(menu); + + { + auto menu = CCMenu::create(); + menu->setPosition({winSize.width - 30, winSize.height - 80}); + // auto sprFolder = CCSprite::createWithSpriteFrameName("accountBtn_myLevels_001.png"); + // sprFolder->setScale(0.77f); + auto sprite = CCSprite::create("GJ_button_02.png"); + sprite->setScale(0.72f); + buttonWithLabel(menu, 0, 0, sprite, "Load", this, menu_selector(OverlayLayer::cbLoadBtn), true); + buttonWithLabel(menu, 0, -38, sprite, "Save", this, menu_selector(OverlayLayer::cbSaveBtn), true); + addChild(menu); + } + + { + auto sprite = CCSprite::create("square02b_001.png"); + sprite->setColor({0, 0, 0}); + sprite->setOpacity(69); + sprite->setPosition({102, winSize.height - 159}); + sprite->setScaleX(0.825f); + sprite->setScaleY(0.325f); + addChild(sprite); + } + + auto iptFps = gd::CCTextInputNode::create("the fps uwu", this, "bigFont.fnt", 200.f, 50.f); + iptFps->setPosition({61, winSize.height - 168}); + iptFps->setScale(0.6f); + iptFps->setLabelPlaceholerScale(0.5f); + iptFps->setLabelPlaceholderColor({200, 200, 200}); + iptFps->setAllowedChars("0123456789"); + iptFps->setMaxLabelLength(10); // who needs this much + iptFps->setLabelText(std::to_string((int)rs->getDefaultFPS()).c_str()); + addChild(iptFps); + m_pIptFps = iptFps; + + { + auto label = CCLabelBMFont::create("FPS:", "bigFont.fnt"); + label->setPosition({42, winSize.height - 158}); + label->setScale(0.7f); + addChild(label); + } + + { + auto label = CCLabelBMFont::create("", "bigFont.fnt"); + m_pLblReplay = label; + label->setScale(0.7f); + _updateReplayLabel(); + addChild(label); + } + + return true; +} + +void OverlayLayer::_updateDefaultFPS() { + std::string tmp(this->m_pIptFps->getLabelText()); + ReplaySystem::getInstance()->setDefaultFPS(std::stoi(tmp)); +} + +void _loadReplayDialog() { + OPENFILENAMEA info; + ZeroMemory(&info, sizeof info); + CHAR fileName[MAX_PATH] = ""; + info.lStructSize = sizeof info; + info.hwndOwner = NULL; + info.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_FILEMUSTEXIST; + info.lpstrFile = fileName; + info.nMaxFile = MAX_PATH; + if (GetOpenFileNameA(&info)) { + ReplaySystem::getInstance()->loadReplay(info.lpstrFile); + gd::FLAlertLayer::create(nullptr, "Info", "Ok", nullptr, "Replay loaded.")->show(); + } +} + +void whycantijusthavethisinthelayeridontgetit::FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2) { + auto rs = ReplaySystem::getInstance(); + if (!btn2) { + auto i = alert->getTag(); + auto layer = cast(alert->getUserData()); // god this is dumb + if (i == -1) return; + else if (i == 1) { + rs->toggleRecording(); + layer->_updateReplayLabel(); + } else if (i == 2) { + _loadReplayDialog(); + layer->_updateReplayLabel(); + } + } +} + +void OverlayLayer::cbPlayBtn(CCObject*) { + ReplaySystem::getInstance()->togglePlaying(); +} + +void OverlayLayer::cbRecordBtn(CCObject*) { + _updateDefaultFPS(); + auto rs = ReplaySystem::getInstance(); + if (!rs->isRecording() && rs->getCurrentReplay()) { + auto alert = gd::FLAlertLayer::create( + new whycantijusthavethisinthelayeridontgetit(), + "Warning", + "Ok", + "Cancel", + "This will overwrite your currently loaded replay." + ); + alert->setUserData(this); + alert->setTag(1); + alert->show(); + } else { + rs->toggleRecording(); + _updateReplayLabel(); + } +} + +void OverlayLayer::cbLoadBtn(CCObject*) { + auto rs = ReplaySystem::getInstance(); + if (rs->getCurrentReplay()) { + auto alert = gd::FLAlertLayer::create( + new whycantijusthavethisinthelayeridontgetit(), + "Warning", + "Ok", + "Cancel", + "This will overwrite your currently loaded replay." + ); + alert->setUserData(this); + alert->setTag(2); + alert->show(); + } else { + _loadReplayDialog(); + _updateReplayLabel(); + } +} + +void OverlayLayer::cbSaveBtn(CCObject*) { + auto rs = ReplaySystem::getInstance(); + OPENFILENAMEA info; + ZeroMemory(&info, sizeof info); + CHAR fileName[MAX_PATH] = ""; + info.lStructSize = sizeof info; + info.hwndOwner = NULL; + info.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT; + info.lpstrFile = fileName; + info.nMaxFile = MAX_PATH; + info.lpstrDefExt = "replay"; + if (GetSaveFileNameA(&info)) { + rs->saveReplay(info.lpstrFile); + gd::FLAlertLayer::create(nullptr, "Info", "Ok", nullptr, "Replay saved.")->show(); + } +} diff --git a/src/overlay.hpp b/src/overlay.hpp new file mode 100644 index 0000000..7687a66 --- /dev/null +++ b/src/overlay.hpp @@ -0,0 +1,51 @@ +#pragma once +#include "includes.h" +#include "utils.hpp" + +class OverlayLayer : public CCLayerColor, public gd::FLAlertLayerProtocol { +protected: + gd::CCTextInputNode* m_pIptFps; + CCLabelBMFont* m_pLblReplay; +public: + static OverlayLayer* create(); + bool initMyStuff(); + bool ccTouchBegan(CCTouch* touch, CCEvent* e) override { + std::cout << "touch!" << std::endl; + return false; + } + void keyBackClicked() { + std::cout << "Hello??" << std::endl; + CCDirector::sharedDirector()->popSceneWithTransition(0.5f, PopTransition::FadeTransition); + } + void _btnBackCallback(CCObject*) { + std::cout << "Hello2??" << std::endl; + // ???? why tf does this not work + this->keyBackClicked(); + // i give up + _updateDefaultFPS(); + CCDirector::sharedDirector()->popSceneWithTransition(0.5f, PopTransition::FadeTransition); + } + void btnCallback(CCObject*) { + auto layer = OverlayLayer::create(); + auto scene = CCScene::create(); + scene->addChild(layer); + CCDirector::sharedDirector()->pushScene(CCTransitionFade::create(0.5f, scene)); + // CCDirector::sharedDirector()->getRunningScene()->addChild(OverlayLayer::create()); + } + void cbRecordBtn(CCObject*); + void cbPlayBtn(CCObject*); + void cbLoadBtn(CCObject*); + void cbSaveBtn(CCObject*); + + void _updateReplayLabel(); + void _updateDefaultFPS(); + + void FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2) { + std::cout << "lol!!" << std::endl; + } +}; + +class whycantijusthavethisinthelayeridontgetit : public gd::FLAlertLayerProtocol { +public: + void FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2); +}; \ No newline at end of file From c2c8be27cc189b34f7ee5517cf49215e25441caa Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Fri, 19 Mar 2021 15:48:28 -0300 Subject: [PATCH 08/95] remove old pause layer code, experimental overlay --- src/PauseLayer.cpp | 100 +++++---------------------------------------- src/PauseLayer.h | 12 +----- src/dllmain.cpp | 16 -------- src/overlay.cpp | 19 ++------- src/overlay.hpp | 29 +++++++------ 5 files changed, 33 insertions(+), 143 deletions(-) diff --git a/src/PauseLayer.cpp b/src/PauseLayer.cpp index f762bdc..cd69213 100644 --- a/src/PauseLayer.cpp +++ b/src/PauseLayer.cpp @@ -3,6 +3,7 @@ #include "PlayLayer.h" #include "PlayerObject.h" #include "hook_utils.hpp" +#include "overlay.hpp" void PauseLayer::setup(uintptr_t base) { Hooks::addHook(base + 0x1E4620, initHook, &init); @@ -20,104 +21,25 @@ void __fastcall PauseLayer::onPauseHook(void* self, void*, void* idk) { PlayerObject::preventInput = false; } -void __fastcall PauseLayer::initHook(CCLayer* self, void*) { +bool __fastcall PauseLayer::initHook(CCLayer* self, void*) { auto director = CCDirector::sharedDirector(); auto winSize = director->getWinSize(); - init(self); + bool ret = init(self); auto sprite = CCSprite::create("GJ_button_01.png"); - auto sprite2 = CCSprite::create("GJ_button_02.png"); - auto recordBtn = CCMenuItemSpriteExtra::create(sprite, sprite, self, menu_selector(PauseLayer::Callbacks::recordBtn)); - recordBtn->setScale(0.6f); + auto button = CCMenuItemSpriteExtra::create(sprite, sprite, self, menu_selector(OverlayLayer::btnCallback)); + button->setScale(0.6f); - auto recordLabel = CCLabelBMFont::create("Record", "bigFont.fnt"); - recordLabel->setScale(0.5f); - recordLabel->setPositionX(15.f + recordLabel->getScaledContentSize().width / 2.f); - - auto playBtn = CCMenuItemSpriteExtra::create(sprite, sprite, self, menu_selector(PauseLayer::Callbacks::playBtn)); - playBtn->setScale(0.6f); - - auto playLabel = CCLabelBMFont::create("Play", "bigFont.fnt"); - playLabel->setScale(0.5f); - playLabel->setPositionX(15.f + playLabel->getScaledContentSize().width / 2.f); - - playBtn->setPositionY(-30.f); - playLabel->setPositionY(-30.f); - - auto loadBtn = CCMenuItemSpriteExtra::create(sprite2, sprite2, self, menu_selector(PauseLayer::Callbacks::loadBtn)); - loadBtn->setScale(0.6f); - - auto loadLabel = CCLabelBMFont::create("Load", "bigFont.fnt"); - loadLabel->setScale(0.5f); - loadLabel->setPositionX(15.f + loadLabel->getScaledContentSize().width / 2.f); - - loadBtn->setPositionY(-80.f); - loadLabel->setPositionY(-80.f); - - auto saveBtn = CCMenuItemSpriteExtra::create(sprite2, sprite2, self, menu_selector(PauseLayer::Callbacks::saveBtn)); - saveBtn->setScale(0.6f); - - auto saveLabel = CCLabelBMFont::create("Save", "bigFont.fnt"); - saveLabel->setScale(0.5f); - saveLabel->setPositionX(15.f + saveLabel->getScaledContentSize().width / 2.f); - - saveBtn->setPositionY(-110.f); - saveLabel->setPositionY(-110.f); + auto label = CCLabelBMFont::create("ReplayBot", "bigFont.fnt"); + label->setScale(0.5f); + label->setPositionX(15.f + label->getScaledContentSize().width / 2.f); auto menu = CCMenu::create(); - menu->addChild(recordBtn); - menu->addChild(recordLabel); - - menu->addChild(playBtn); - menu->addChild(playLabel); - - menu->addChild(loadBtn); - menu->addChild(loadLabel); - - menu->addChild(saveBtn); - menu->addChild(saveLabel); - + menu->addChild(button); + menu->addChild(label); menu->setPosition(25, winSize.height - 40.f); self->addChild(menu); + return ret; } - -void PauseLayer::Callbacks::recordBtn(CCObject*) { - ReplaySystem::getInstance()->toggleRecording(); -} - -void PauseLayer::Callbacks::playBtn(CCObject*) { - ReplaySystem::getInstance()->togglePlaying(); -} - -void PauseLayer::Callbacks::loadBtn(CCObject*) { - OPENFILENAMEA info; - ZeroMemory(&info, sizeof info); - CHAR fileName[MAX_PATH] = ""; - info.lStructSize = sizeof info; - info.hwndOwner = NULL; - info.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_FILEMUSTEXIST; - info.lpstrFile = fileName; - info.nMaxFile = MAX_PATH; - if (GetOpenFileNameA(&info)) { - std::cout << "Loading file: " << info.lpstrFile << std::endl; - ReplaySystem::getInstance()->loadReplay(info.lpstrFile); - } -} - -void PauseLayer::Callbacks::saveBtn(CCObject*) { - OPENFILENAMEA info; - ZeroMemory(&info, sizeof info); - CHAR fileName[MAX_PATH] = ""; - info.lStructSize = sizeof info; - info.hwndOwner = NULL; - info.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT; - info.lpstrFile = fileName; - info.nMaxFile = MAX_PATH; - info.lpstrDefExt = "replay"; - if (GetSaveFileNameA(&info)) { - std::cout << "Saving file: " << info.lpstrFile << std::endl; - ReplaySystem::getInstance()->saveReplay(info.lpstrFile); - } -} \ No newline at end of file diff --git a/src/PauseLayer.h b/src/PauseLayer.h index 9e78cff..c43ba2d 100644 --- a/src/PauseLayer.h +++ b/src/PauseLayer.h @@ -4,17 +4,9 @@ namespace PauseLayer { void setup(uintptr_t); - inline void(__thiscall* init)(CCLayer* self); - void __fastcall initHook(CCLayer* self, void*); + inline bool(__thiscall* init)(CCLayer* self); + bool __fastcall initHook(CCLayer* self, void*); inline void(__thiscall* onPause)(void* self, void*); void __fastcall onPauseHook(void* self, void*, void* idk); - - class Callbacks { - public: - void recordBtn(CCObject*); - void playBtn(CCObject*); - void loadBtn(CCObject*); - void saveBtn(CCObject*); - }; } diff --git a/src/dllmain.cpp b/src/dllmain.cpp index 7242e6d..a3f9e49 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -44,20 +44,6 @@ void readInput(HMODULE hModule) { } } -inline bool(__thiscall* MenuLayer_init)(CCLayer* self); -bool __fastcall MenuLayer_initHook(CCLayer* self, void*) { - auto ret = MenuLayer_init(self); - - auto menu = CCMenu::create(); - auto sprite = CCSprite::createWithSpriteFrameName("GJ_trailerBtn_001.png"); - auto btn = CCMenuItemSpriteExtra::create(sprite, sprite, self, menu_selector(OverlayLayer::btnCallback)); - menu->addChild(btn); - menu->setPosition({200, 200}); - self->addChild(menu); - - return ret; -} - DWORD WINAPI my_thread(void* hModule) { AllocConsole(); SetConsoleTitleA("Console"); @@ -77,8 +63,6 @@ DWORD WINAPI my_thread(void* hModule) { PlayerObject::setup(base); GameManager::setup(base); - Hooks::addHook(base + 0x1907b0, MenuLayer_initHook, &MenuLayer_init); - MH_EnableHook(MH_ALL_HOOKS); readInput(cast(hModule)); diff --git a/src/overlay.cpp b/src/overlay.cpp index 65dbfde..75fdad3 100644 --- a/src/overlay.cpp +++ b/src/overlay.cpp @@ -3,21 +3,10 @@ OverlayLayer* OverlayLayer::create() { auto self = cast(CCLayerColor::create()); - - //self->registerWithTouchDispatcher(); - //CCDirector::sharedDirector()->getTouchDispatcher()->incrementForcePrio(2); - //self->setTouchEnabled(true); + // isnt working :sob: self->setKeypadEnabled(true); - - //CCDirector::sharedDirector()->getTouchDispatcher()->addTargetedDelegate(self, -1024, true); self->initMyStuff(); - // self->setTouchMode(ccTouchesMode::kCCTouchesOneByOne); - - - // director->getTouchDispatcher()->incrementForcePrio(200); - // self->setTouchEnabled(true); - return self; } @@ -56,10 +45,8 @@ bool OverlayLayer::initMyStuff() { auto winSize = director->getWinSize(); auto rs = ReplaySystem::getInstance(); - initWithColor({45, 93, 147, 255}, winSize.width, winSize.height); - - // setZOrder(999); - + initWithColor({0, 0, 0, 0}, winSize.width, winSize.height); + setZOrder(999); { auto btnBack = gd::CCMenuItemSpriteExtra::create( CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png"), diff --git a/src/overlay.hpp b/src/overlay.hpp index 7687a66..01d4680 100644 --- a/src/overlay.hpp +++ b/src/overlay.hpp @@ -9,28 +9,33 @@ class OverlayLayer : public CCLayerColor, public gd::FLAlertLayerProtocol { public: static OverlayLayer* create(); bool initMyStuff(); - bool ccTouchBegan(CCTouch* touch, CCEvent* e) override { - std::cout << "touch!" << std::endl; - return false; - } void keyBackClicked() { - std::cout << "Hello??" << std::endl; CCDirector::sharedDirector()->popSceneWithTransition(0.5f, PopTransition::FadeTransition); } void _btnBackCallback(CCObject*) { - std::cout << "Hello2??" << std::endl; // ???? why tf does this not work - this->keyBackClicked(); + // this->keyBackClicked(); // i give up _updateDefaultFPS(); - CCDirector::sharedDirector()->popSceneWithTransition(0.5f, PopTransition::FadeTransition); + // CCDirector::sharedDirector()->popSceneWithTransition(0.5f, PopTransition::FadeTransition); + auto pauseLayer = this->getParent(); + this->removeFromParentAndCleanup(true); + auto children = pauseLayer->getChildren(); + for (unsigned i = 1; i < pauseLayer->getChildrenCount(); ++i) { + cast(children->objectAtIndex(i))->setVisible(true); + } } void btnCallback(CCObject*) { auto layer = OverlayLayer::create(); - auto scene = CCScene::create(); - scene->addChild(layer); - CCDirector::sharedDirector()->pushScene(CCTransitionFade::create(0.5f, scene)); - // CCDirector::sharedDirector()->getRunningScene()->addChild(OverlayLayer::create()); + // auto scene = CCScene::create(); + // scene->addChild(layer); + // CCDirector::sharedDirector()->pushScene(CCTransitionFade::create(0.5f, scene)); + auto pauseLayer = cast(CCDirector::sharedDirector()->getRunningScene()->getChildren()->objectAtIndex(1)); + auto children = pauseLayer->getChildren(); + for (unsigned i = 1; i < pauseLayer->getChildrenCount(); ++i) { + cast(children->objectAtIndex(i))->setVisible(false); + } + pauseLayer->addChild(layer); } void cbRecordBtn(CCObject*); void cbPlayBtn(CCObject*); From 4ea1b0ec7b0844df8bf5b63a10d40ea24fb45073 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sat, 20 Mar 2021 12:52:31 -0300 Subject: [PATCH 09/95] make Replay::getActions return a reference --- src/Replay.h | 2 +- src/ReplaySystem.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Replay.h b/src/Replay.h index 5aefc03..77dda6a 100644 --- a/src/Replay.h +++ b/src/Replay.h @@ -21,7 +21,7 @@ class Replay { void addAction(Action); void removeActionsAfterX(float x); - std::vector getActions() { + std::vector& getActions() { return actions; } diff --git a/src/ReplaySystem.cpp b/src/ReplaySystem.cpp index b85c030..7b689c0 100644 --- a/src/ReplaySystem.cpp +++ b/src/ReplaySystem.cpp @@ -66,7 +66,7 @@ void ReplaySystem::playAction(Action action) { void ReplaySystem::handlePlaying() { auto x = reinterpret_cast(PlayLayer::getPlayer() + 0x67C); - auto actions = currentReplay->getActions(); + auto& actions = currentReplay->getActions(); if (curActionIndex < actions.size()) { Action curAction; // while loop since up to 4 actions can happen in the same frame From c6cd65cb1681430d479aa3920bd8bd6efcbeb815 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sat, 20 Mar 2021 21:25:30 -0300 Subject: [PATCH 10/95] make PlayerObject a class --- src/PauseLayer.cpp | 4 ++-- src/PlayLayer.cpp | 38 ++++++++++++++++++++------------------ src/PlayLayer.h | 17 +++++++++-------- src/PlayerObject.cpp | 22 ++-------------------- src/PlayerObject.h | 24 ++++++++++++++---------- src/PracticeFixes.h | 12 +++++------- src/ReplaySystem.cpp | 11 +++++------ src/dllmain.cpp | 7 ++++--- src/overlay.cpp | 2 +- 9 files changed, 62 insertions(+), 75 deletions(-) diff --git a/src/PauseLayer.cpp b/src/PauseLayer.cpp index cd69213..a81118e 100644 --- a/src/PauseLayer.cpp +++ b/src/PauseLayer.cpp @@ -14,11 +14,11 @@ void PauseLayer::setup(uintptr_t base) { void __fastcall PauseLayer::onPauseHook(void* self, void*, void* idk) { auto rs = ReplaySystem::getInstance(); if (rs->isPlaying()) - PlayerObject::preventInput = true; + PlayerObjectHooks::preventInput = true; if (rs->isRecording()) rs->recordAction(false, true); onPause(self, idk); - PlayerObject::preventInput = false; + PlayerObjectHooks::preventInput = false; } bool __fastcall PauseLayer::initHook(CCLayer* self, void*) { diff --git a/src/PlayLayer.cpp b/src/PlayLayer.cpp index c05cbe3..9ed588e 100644 --- a/src/PlayLayer.cpp +++ b/src/PlayLayer.cpp @@ -24,16 +24,18 @@ void PlayLayer::setup(uintptr_t base) { Hooks::addHook(base + 0x20BF00, resetLevelHook, &resetLevel); } -void __fastcall PlayLayer::initHook(CCLayer* self, void*, void* GJLevel) { +bool __fastcall PlayLayer::initHook(CCLayer* self, void*, void* GJLevel) { PlayLayer::self = self; - init(self, GJLevel); - - // maybe switch to label atlas or whatever - auto label = CCLabelTTF::create("", "Arial", 14); - label->setZOrder(999); - label->setTag(StatusLabelTag); - - self->addChild(label); + auto ret = init(self, GJLevel); + if (ret) { + // maybe switch to label atlas or whatever + auto label = CCLabelTTF::create("", "Arial", 14); + label->setZOrder(999); + label->setTag(StatusLabelTag); + + self->addChild(label); + } + return ret; } void PlayLayer::updateStatusLabel(const char* text) { @@ -96,7 +98,7 @@ void* __fastcall PlayLayer::onEditorHook(CCLayer* self, void*, void* idk) { return onEditor(self, idk); } -uint32_t __fastcall PlayLayer::pushButtonHook(CCLayer* self, void*, int idk, bool button) { +int __fastcall PlayLayer::pushButtonHook(CCLayer* self, void*, int idk, bool button) { // make sure it's in a play layer if (getSelf()) { auto rs = ReplaySystem::getInstance(); @@ -109,7 +111,7 @@ uint32_t __fastcall PlayLayer::pushButtonHook(CCLayer* self, void*, int idk, boo return pushButton(self, idk, button); } -uint32_t __fastcall PlayLayer::releaseButtonHook(CCLayer* self, void*, int idk, bool button) { +int __fastcall PlayLayer::releaseButtonHook(CCLayer* self, void*, int idk, bool button) { if (getSelf()) { auto rs = ReplaySystem::getInstance(); if (rs->isPlaying()) return 0; @@ -123,16 +125,16 @@ uint32_t __fastcall PlayLayer::releaseButtonHook(CCLayer* self, void*, int idk, // technically not in playlayer but who cares bool PlayLayer::is2Player() { - return *reinterpret_cast(follow(follow(follow(base + 0x3222D0) + 0x164) + 0x22c) + 0xfa); + return *cast(follow(follow(follow(base + 0x3222D0) + 0x164) + 0x22c) + 0xfa); } -uintptr_t PlayLayer::getPlayer() { - if (self) return follow(reinterpret_cast(self) + 0x224); - return 0; +PlayerObject* PlayLayer::getPlayer() { + if (self) return cast(follow(cast(self) + 0x224)); + return nullptr; } -uintptr_t PlayLayer::getPlayer2() { - if (self) return follow(reinterpret_cast(self) + 0x228); - return 0; +PlayerObject* PlayLayer::getPlayer2() { + if (self) return cast(follow(cast(self) + 0x228)); + return nullptr; } uintptr_t PlayLayer::getSelf() { diff --git a/src/PlayLayer.h b/src/PlayLayer.h index 645747b..c287402 100644 --- a/src/PlayLayer.h +++ b/src/PlayLayer.h @@ -1,5 +1,6 @@ #pragma once #include "includes.h" +#include "PlayerObject.h" namespace PlayLayer { void setup(uintptr_t base); @@ -8,8 +9,8 @@ namespace PlayLayer { inline CCLayer* self; inline uintptr_t base; - inline void(__thiscall* init)(CCLayer* self, void*); - void __fastcall initHook(CCLayer* self, void*, void*); + inline bool(__thiscall* init)(CCLayer* self, void*); + bool __fastcall initHook(CCLayer* self, void*, void*); void updateStatusLabel(const char* text); @@ -31,11 +32,11 @@ namespace PlayLayer { inline int (__thiscall* resetLevel)(CCLayer* self); int __fastcall resetLevelHook(CCLayer* self, void*); - inline uint32_t(__thiscall* pushButton)(CCLayer* self, int, bool); - uint32_t __fastcall pushButtonHook(CCLayer* self, void*, int, bool); + inline int(__thiscall* pushButton)(CCLayer* self, int, bool); + int __fastcall pushButtonHook(CCLayer* self, void*, int, bool); - inline uint32_t(__thiscall* releaseButton)(CCLayer* self, int, bool); - uint32_t __fastcall releaseButtonHook(CCLayer* self, void*, int, bool); + inline int(__thiscall* releaseButton)(CCLayer* self, int, bool); + int __fastcall releaseButtonHook(CCLayer* self, void*, int, bool); inline void*(__thiscall* markCheckpoint)(CCLayer* self, void*); void* __fastcall markCheckpointHook(CCLayer* self, void*, void*); @@ -45,8 +46,8 @@ namespace PlayLayer { bool is2Player(); - uintptr_t getPlayer(); - uintptr_t getPlayer2(); + PlayerObject* getPlayer(); + PlayerObject* getPlayer2(); uintptr_t getSelf(); }; diff --git a/src/PlayerObject.cpp b/src/PlayerObject.cpp index a0d2cb2..2af7df9 100644 --- a/src/PlayerObject.cpp +++ b/src/PlayerObject.cpp @@ -4,29 +4,11 @@ #include "hook_utils.hpp" #include "utils.hpp" -void PlayerObject::setup(uintptr_t base) { +void PlayerObjectHooks::setup(uintptr_t base) { Hooks::addHook(base + 0x1F4F70, releaseButtonHook, &releaseButton); } -void __fastcall PlayerObject::releaseButtonHook(void* self, void*, void* PlayerButton) { +void __fastcall PlayerObjectHooks::releaseButtonHook(PlayerObject* self, void*, void* PlayerButton) { if (preventInput) return; releaseButton(self, PlayerButton); -} - -namespace PlayerObject { - float* getX(uintptr_t player) { - return readPtr(player + 0x67C); - } - - double* getYAccel(uintptr_t player) { - return readPtr(player + 0x628); - } - - float* getRotation(uintptr_t player) { - return readPtr(player + 0x20); - } - - float* getSpriteRotation(uintptr_t player) { - return readPtr(player + 0x24); - } } \ No newline at end of file diff --git a/src/PlayerObject.h b/src/PlayerObject.h index acfbb17..f6cf409 100644 --- a/src/PlayerObject.h +++ b/src/PlayerObject.h @@ -1,17 +1,21 @@ #pragma once #include "includes.h" -namespace PlayerObject { +class PlayerObject : public CCSprite { +public: + // sizeof(CCSprite) = 484 + char _pad0[0x444]; + double m_yAccel; // + 0x628 + char _pad1[0x4C]; + float m_xPos; // + 0x67C + float m_yPos; +}; + +namespace PlayerObjectHooks { void setup(uintptr_t base); inline bool preventInput = false; - inline void(__thiscall* releaseButton)(void* self, void*); - void __fastcall releaseButtonHook(void* self, void*, void*); - - float* getX(uintptr_t); - double* getYAccel(uintptr_t); - float* getRotation(uintptr_t); - float* getSpriteRotation(uintptr_t); -} - + inline void(__thiscall* releaseButton)(PlayerObject* self, void*); + void __fastcall releaseButtonHook(PlayerObject* self, void*, void*); +}; \ No newline at end of file diff --git a/src/PracticeFixes.h b/src/PracticeFixes.h index fb90a94..adff92b 100644 --- a/src/PracticeFixes.h +++ b/src/PracticeFixes.h @@ -5,14 +5,12 @@ struct CheckpointData { double yAccel; float rotation; - float spriteRotation; - static CheckpointData fromPlayer(uintptr_t player) { - return { *PlayerObject::getYAccel(player), *PlayerObject::getRotation(player), *PlayerObject::getSpriteRotation(player) }; + static CheckpointData fromPlayer(PlayerObject* player) { + return { player->m_yAccel, player->getRotation() }; }; - void apply(uintptr_t player) { - *PlayerObject::getYAccel(player) = yAccel; - *PlayerObject::getRotation(player) = rotation; - *PlayerObject::getSpriteRotation(player) = spriteRotation; + void apply(PlayerObject* player) { + player->m_yAccel = yAccel; + player->setRotation(rotation); } }; diff --git a/src/ReplaySystem.cpp b/src/ReplaySystem.cpp index 7b689c0..d7a9a05 100644 --- a/src/ReplaySystem.cpp +++ b/src/ReplaySystem.cpp @@ -34,15 +34,14 @@ void ReplaySystem::togglePlaying() { void ReplaySystem::recordAction(bool hold, bool player1) { if (recording) { - auto x = reinterpret_cast(PlayLayer::getPlayer() + 0x67c); - currentReplay->addAction({ *x, hold, PlayLayer::is2Player() && !player1 }); + currentReplay->addAction({ PlayLayer::getPlayer()->m_xPos, hold, PlayLayer::is2Player() && !player1 }); } } void ReplaySystem::onReset() { if (recording) { - auto x = PlayerObject::getX(PlayLayer::getPlayer()); - currentReplay->removeActionsAfterX(*x); + auto x = PlayLayer::getPlayer()->m_xPos; + currentReplay->removeActionsAfterX(x); recordAction(PracticeFixes::isHolding, true); // you cant "buffer hold" player 2 if (PlayLayer::is2Player()) @@ -65,12 +64,12 @@ void ReplaySystem::playAction(Action action) { } void ReplaySystem::handlePlaying() { - auto x = reinterpret_cast(PlayLayer::getPlayer() + 0x67C); + auto x = PlayLayer::getPlayer()->m_xPos; auto& actions = currentReplay->getActions(); if (curActionIndex < actions.size()) { Action curAction; // while loop since up to 4 actions can happen in the same frame - while (curActionIndex < actions.size() && *x >= (curAction = actions[curActionIndex]).x) { + while (curActionIndex < actions.size() && x >= (curAction = actions[curActionIndex]).x) { playAction(curAction); ++curActionIndex; } diff --git a/src/dllmain.cpp b/src/dllmain.cpp index a3f9e49..0c500bf 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -21,8 +21,9 @@ void readInput(HMODULE hModule) { break; } else if (line == "x") { - auto x = reinterpret_cast(PlayLayer::getPlayer() + 0x67C); - std::cout << *x << std::endl; + auto player = PlayLayer::getPlayer(); + if (player != nullptr) + std::cout << player->m_xPos << " " << player->m_yPos << std::endl; } else if (line == "showcase") { auto s = ReplaySystem::getInstance()->toggleShowcaseMode(); @@ -60,7 +61,7 @@ DWORD WINAPI my_thread(void* hModule) { rs->init(base); PauseLayer::setup(base); PlayLayer::setup(base); - PlayerObject::setup(base); + PlayerObjectHooks::setup(base); GameManager::setup(base); MH_EnableHook(MH_ALL_HOOKS); diff --git a/src/overlay.cpp b/src/overlay.cpp index 75fdad3..16d8e65 100644 --- a/src/overlay.cpp +++ b/src/overlay.cpp @@ -121,7 +121,7 @@ bool OverlayLayer::initMyStuff() { void OverlayLayer::_updateDefaultFPS() { std::string tmp(this->m_pIptFps->getLabelText()); - ReplaySystem::getInstance()->setDefaultFPS(std::stoi(tmp)); + ReplaySystem::getInstance()->setDefaultFPS((float)std::stoi(tmp)); } void _loadReplayDialog() { From 20b29df56322b1560c4c9b5dc6e0aa33f965730a Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sat, 27 Mar 2021 18:56:32 -0300 Subject: [PATCH 11/95] switch to nfd --- .gitignore | 3 ++- .gitmodules | 3 +++ CMakeLists.txt | 3 +++ libraries/nfd | 1 + src/overlay.cpp | 32 +++++++++++--------------------- 5 files changed, 20 insertions(+), 22 deletions(-) create mode 160000 libraries/nfd diff --git a/.gitignore b/.gitignore index f9098dc..c213ea9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ inject.py Debug/ Release/ .vs/ -.vscode/ \ No newline at end of file +.vscode/ +injector.exe \ No newline at end of file diff --git a/.gitmodules b/.gitmodules index 24792c5..0fcb170 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,3 +7,6 @@ [submodule "libraries/gd.h"] path = libraries/gd.h url = https://github.com/poweredbypie/gd.h.git +[submodule "libraries/nfd"] + path = libraries/nfd + url = https://github.com/mlabbe/nativefiledialog diff --git a/CMakeLists.txt b/CMakeLists.txt index 1612aa4..3e51833 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -15,6 +15,8 @@ file( src/*.cpp # nice libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/custom/Sprites/CCMenuItemSpriteExtra/CCMenuItemSpriteExtra.cpp + libraries/nfd/src/nfd_common.c + libraries/nfd/src/nfd_win.cpp ) add_library(replay-bot SHARED ${SOURCE_FILES}) @@ -22,6 +24,7 @@ target_include_directories(replay-bot PRIVATE libraries/gd.h/include libraries/gd.h libraries/minhook/include + libraries/nfd/src/include libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/ libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/include libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/kazmath/include diff --git a/libraries/nfd b/libraries/nfd new file mode 160000 index 0000000..67345b8 --- /dev/null +++ b/libraries/nfd @@ -0,0 +1 @@ +Subproject commit 67345b80ebb429ecc2aeda94c478b3bcc5f7888e diff --git a/src/overlay.cpp b/src/overlay.cpp index 16d8e65..59738e3 100644 --- a/src/overlay.cpp +++ b/src/overlay.cpp @@ -1,5 +1,6 @@ #include "overlay.hpp" #include "ReplaySystem.h" +#include OverlayLayer* OverlayLayer::create() { auto self = cast(CCLayerColor::create()); @@ -125,17 +126,12 @@ void OverlayLayer::_updateDefaultFPS() { } void _loadReplayDialog() { - OPENFILENAMEA info; - ZeroMemory(&info, sizeof info); - CHAR fileName[MAX_PATH] = ""; - info.lStructSize = sizeof info; - info.hwndOwner = NULL; - info.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_FILEMUSTEXIST; - info.lpstrFile = fileName; - info.nMaxFile = MAX_PATH; - if (GetOpenFileNameA(&info)) { - ReplaySystem::getInstance()->loadReplay(info.lpstrFile); + nfdchar_t* path = nullptr; + auto result = NFD_OpenDialog("replay", nullptr, &path); + if (result == NFD_OKAY) { + ReplaySystem::getInstance()->loadReplay(path); gd::FLAlertLayer::create(nullptr, "Info", "Ok", nullptr, "Replay loaded.")->show(); + free(path); } } @@ -200,17 +196,11 @@ void OverlayLayer::cbLoadBtn(CCObject*) { void OverlayLayer::cbSaveBtn(CCObject*) { auto rs = ReplaySystem::getInstance(); - OPENFILENAMEA info; - ZeroMemory(&info, sizeof info); - CHAR fileName[MAX_PATH] = ""; - info.lStructSize = sizeof info; - info.hwndOwner = NULL; - info.Flags = OFN_EXPLORER | OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT; - info.lpstrFile = fileName; - info.nMaxFile = MAX_PATH; - info.lpstrDefExt = "replay"; - if (GetSaveFileNameA(&info)) { - rs->saveReplay(info.lpstrFile); + nfdchar_t* path = nullptr; + auto result = NFD_SaveDialog("replay", nullptr, &path); + if (result == NFD_OKAY) { + rs->saveReplay(path); gd::FLAlertLayer::create(nullptr, "Info", "Ok", nullptr, "Replay saved.")->show(); + free(path); } } From 2f014f290d416a5442b2e528a7eb894363b3f872 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Tue, 30 Mar 2021 15:05:40 -0300 Subject: [PATCH 12/95] switch to gd.h's GameManager --- libraries/gd.h | 2 +- src/GameManager.cpp | 11 ----------- src/GameManager.h | 11 ----------- src/PauseLayer.cpp | 2 +- src/PlayLayer.cpp | 9 ++------- src/ReplaySystem.cpp | 19 +++++++++++-------- src/ReplaySystem.h | 2 +- src/dllmain.cpp | 2 -- 8 files changed, 16 insertions(+), 42 deletions(-) delete mode 100644 src/GameManager.cpp delete mode 100644 src/GameManager.h diff --git a/libraries/gd.h b/libraries/gd.h index 323d075..fc233d7 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit 323d075d1f8dca6173f8662c6881842a5727e35a +Subproject commit fc233d7199bdd2f6542c56077d5d49f6dd2b4ede diff --git a/src/GameManager.cpp b/src/GameManager.cpp deleted file mode 100644 index f4cc0e2..0000000 --- a/src/GameManager.cpp +++ /dev/null @@ -1,11 +0,0 @@ -#include "GameManager.h" - -void GameManager::setup(uintptr_t base) { - // from https://github.com/AndreNIH/gdduck/blob/master/GameManager.cpp - getSharedState = reinterpret_cast(base + 0xC4A50); - getGameVariable = reinterpret_cast(base + 0xC9D30); -} - -bool GameManager::is2PFlipped() { - return getGameVariable(getSharedState(), "0010"); -} \ No newline at end of file diff --git a/src/GameManager.h b/src/GameManager.h deleted file mode 100644 index 343fcaa..0000000 --- a/src/GameManager.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once -#include "includes.h" - -namespace GameManager { - void setup(uintptr_t); - - inline void* (__cdecl* getSharedState)(); - inline bool(__thiscall* getGameVariable)(void* self, const char* key); - - bool is2PFlipped(); -} diff --git a/src/PauseLayer.cpp b/src/PauseLayer.cpp index a81118e..1749d96 100644 --- a/src/PauseLayer.cpp +++ b/src/PauseLayer.cpp @@ -16,7 +16,7 @@ void __fastcall PauseLayer::onPauseHook(void* self, void*, void* idk) { if (rs->isPlaying()) PlayerObjectHooks::preventInput = true; if (rs->isRecording()) - rs->recordAction(false, true); + rs->recordAction(false, true, false); onPause(self, idk); PlayerObjectHooks::preventInput = false; } diff --git a/src/PlayLayer.cpp b/src/PlayLayer.cpp index 9ed588e..bab3105 100644 --- a/src/PlayLayer.cpp +++ b/src/PlayLayer.cpp @@ -2,7 +2,6 @@ #include "ReplaySystem.h" #include "utils.hpp" #include "PracticeFixes.h" -#include "GameManager.h" #include "hook_utils.hpp" void PlayLayer::setup(uintptr_t base) { @@ -103,9 +102,7 @@ int __fastcall PlayLayer::pushButtonHook(CCLayer* self, void*, int idk, bool but if (getSelf()) { auto rs = ReplaySystem::getInstance(); if (rs->isPlaying()) return 0; - // TODO: somehow put this in recordAction without messing up other stuff - auto flip = is2Player() && GameManager::is2PFlipped(); - rs->recordAction(true, button ^ flip); + rs->recordAction(true, button); PracticeFixes::isHolding = true; } return pushButton(self, idk, button); @@ -115,9 +112,7 @@ int __fastcall PlayLayer::releaseButtonHook(CCLayer* self, void*, int idk, bool if (getSelf()) { auto rs = ReplaySystem::getInstance(); if (rs->isPlaying()) return 0; - // TODO: somehow put this in recordAction without messing up other stuff - auto flip = is2Player() && GameManager::is2PFlipped(); - rs->recordAction(false, button ^ flip); + rs->recordAction(false, button); PracticeFixes::isHolding = false; } return releaseButton(self, idk, button); diff --git a/src/ReplaySystem.cpp b/src/ReplaySystem.cpp index d7a9a05..767b02e 100644 --- a/src/ReplaySystem.cpp +++ b/src/ReplaySystem.cpp @@ -1,7 +1,7 @@ #include "ReplaySystem.h" #include "PlayLayer.h" #include "PracticeFixes.h" -#include "GameManager.h" +#include ReplaySystem* ReplaySystem::instance; @@ -32,8 +32,13 @@ void ReplaySystem::togglePlaying() { } } -void ReplaySystem::recordAction(bool hold, bool player1) { +bool _should_flip_controls() { + return PlayLayer::is2Player() && gd::GameManager::sharedState()->getGameVariable("0010"); +} + +void ReplaySystem::recordAction(bool hold, bool player1, bool flip) { if (recording) { + player1 ^= flip && _should_flip_controls(); currentReplay->addAction({ PlayLayer::getPlayer()->m_xPos, hold, PlayLayer::is2Player() && !player1 }); } } @@ -42,10 +47,10 @@ void ReplaySystem::onReset() { if (recording) { auto x = PlayLayer::getPlayer()->m_xPos; currentReplay->removeActionsAfterX(x); - recordAction(PracticeFixes::isHolding, true); + recordAction(PracticeFixes::isHolding, true, false); // you cant "buffer hold" player 2 if (PlayLayer::is2Player()) - recordAction(false, false); + recordAction(false, false, false); PracticeFixes::applyCheckpoint(); } else if (playing) { @@ -57,10 +62,8 @@ void ReplaySystem::onReset() { void ReplaySystem::playAction(Action action) { auto layer = PlayLayer::self; - // if (!PlayLayer::is2Player() && action.player2) return; - auto flip = PlayLayer::is2Player() && GameManager::is2PFlipped(); - if (action.hold) PlayLayer::pushButton(layer, 0, !action.player2 ^ flip); - else PlayLayer::releaseButton(layer, 0, !action.player2 ^ flip); + auto flip = _should_flip_controls(); + (action.hold ? PlayLayer::pushButton : PlayLayer::releaseButton)(layer, 0, !action.player2 ^ flip); } void ReplaySystem::handlePlaying() { diff --git a/src/ReplaySystem.h b/src/ReplaySystem.h index 7d143e3..6a30e28 100644 --- a/src/ReplaySystem.h +++ b/src/ReplaySystem.h @@ -47,7 +47,7 @@ class ReplaySystem { defaultFPS = fps; } - void recordAction(bool hold, bool player1); + void recordAction(bool hold, bool player1, bool flip = true); void onReset(); void playAction(Action); void handlePlaying(); diff --git a/src/dllmain.cpp b/src/dllmain.cpp index 0c500bf..ff60010 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -3,7 +3,6 @@ #include "PauseLayer.h" #include "PlayLayer.h" #include "PlayerObject.h" -#include "GameManager.h" #include #include "hook_utils.hpp" #include "utils.hpp" @@ -62,7 +61,6 @@ DWORD WINAPI my_thread(void* hModule) { PauseLayer::setup(base); PlayLayer::setup(base); PlayerObjectHooks::setup(base); - GameManager::setup(base); MH_EnableHook(MH_ALL_HOOKS); From cf4086c8d77df437ca7987b0d894e2e040941822 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Tue, 30 Mar 2021 21:24:55 -0300 Subject: [PATCH 13/95] update gd.h --- libraries/gd.h | 2 +- src/overlay.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/gd.h b/libraries/gd.h index fc233d7..688552f 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit fc233d7199bdd2f6542c56077d5d49f6dd2b4ede +Subproject commit 688552f61f558166c4032d88ba374a4e870be651 diff --git a/src/overlay.cpp b/src/overlay.cpp index 59738e3..701baec 100644 --- a/src/overlay.cpp +++ b/src/overlay.cpp @@ -98,7 +98,7 @@ bool OverlayLayer::initMyStuff() { iptFps->setLabelPlaceholderColor({200, 200, 200}); iptFps->setAllowedChars("0123456789"); iptFps->setMaxLabelLength(10); // who needs this much - iptFps->setLabelText(std::to_string((int)rs->getDefaultFPS()).c_str()); + iptFps->setString(std::to_string((int)rs->getDefaultFPS()).c_str()); addChild(iptFps); m_pIptFps = iptFps; @@ -121,7 +121,7 @@ bool OverlayLayer::initMyStuff() { } void OverlayLayer::_updateDefaultFPS() { - std::string tmp(this->m_pIptFps->getLabelText()); + std::string tmp(this->m_pIptFps->getString()); ReplaySystem::getInstance()->setDefaultFPS((float)std::stoi(tmp)); } From 522607ef5f4ce202c5f0f9f35bb560316193ea16 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Tue, 30 Mar 2021 21:25:18 -0300 Subject: [PATCH 14/95] include .replay when saving --- src/overlay.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/overlay.cpp b/src/overlay.cpp index 701baec..a0391e6 100644 --- a/src/overlay.cpp +++ b/src/overlay.cpp @@ -199,7 +199,9 @@ void OverlayLayer::cbSaveBtn(CCObject*) { nfdchar_t* path = nullptr; auto result = NFD_SaveDialog("replay", nullptr, &path); if (result == NFD_OKAY) { - rs->saveReplay(path); + // dear god + auto _path = std::string(path) + ".replay"; + rs->saveReplay(_path.c_str()); gd::FLAlertLayer::create(nullptr, "Info", "Ok", nullptr, "Replay saved.")->show(); free(path); } From 10cb89e419e0c93eeddb118903166d22f500ed7e Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Tue, 30 Mar 2021 21:34:38 -0300 Subject: [PATCH 15/95] better var names --- src/overlay.cpp | 14 ++++++++++---- src/overlay.hpp | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/overlay.cpp b/src/overlay.cpp index a0391e6..b79d7f5 100644 --- a/src/overlay.cpp +++ b/src/overlay.cpp @@ -27,7 +27,7 @@ void buttonWithLabel(CCMenu* menu, float x, float y, CCSprite* sprite, const cha } void OverlayLayer::_updateReplayLabel() { - auto label = m_pLblReplay; + auto label = m_infoLabel; auto replay = ReplaySystem::getInstance()->getCurrentReplay(); auto winSize = CCDirector::sharedDirector()->getWinSize(); std::stringstream stream; @@ -100,7 +100,7 @@ bool OverlayLayer::initMyStuff() { iptFps->setMaxLabelLength(10); // who needs this much iptFps->setString(std::to_string((int)rs->getDefaultFPS()).c_str()); addChild(iptFps); - m_pIptFps = iptFps; + m_fpsInput = iptFps; { auto label = CCLabelBMFont::create("FPS:", "bigFont.fnt"); @@ -111,7 +111,7 @@ bool OverlayLayer::initMyStuff() { { auto label = CCLabelBMFont::create("", "bigFont.fnt"); - m_pLblReplay = label; + m_infoLabel = label; label->setScale(0.7f); _updateReplayLabel(); addChild(label); @@ -121,7 +121,7 @@ bool OverlayLayer::initMyStuff() { } void OverlayLayer::_updateDefaultFPS() { - std::string tmp(this->m_pIptFps->getString()); + std::string tmp(this->m_fpsInput->getString()); ReplaySystem::getInstance()->setDefaultFPS((float)std::stoi(tmp)); } @@ -197,6 +197,12 @@ void OverlayLayer::cbLoadBtn(CCObject*) { void OverlayLayer::cbSaveBtn(CCObject*) { auto rs = ReplaySystem::getInstance(); nfdchar_t* path = nullptr; + // FIXME: this just crashes sometimes?? for no reason + // even when calling winapi directly + // after some debugging it seems to happen on IModalWindow::Show + // this didn't happen on the old ui + // so somehow i fucked up a winapi function in the process + // of making this overlay?? i'm so done auto result = NFD_SaveDialog("replay", nullptr, &path); if (result == NFD_OKAY) { // dear god diff --git a/src/overlay.hpp b/src/overlay.hpp index 01d4680..9b148ef 100644 --- a/src/overlay.hpp +++ b/src/overlay.hpp @@ -4,8 +4,8 @@ class OverlayLayer : public CCLayerColor, public gd::FLAlertLayerProtocol { protected: - gd::CCTextInputNode* m_pIptFps; - CCLabelBMFont* m_pLblReplay; + gd::CCTextInputNode* m_fpsInput; + CCLabelBMFont* m_infoLabel; public: static OverlayLayer* create(); bool initMyStuff(); From a2f6bdc8b4d8acab1f923e75429a7bfd7bec3e9f Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Wed, 31 Mar 2021 15:56:46 -0300 Subject: [PATCH 16/95] update gd.h --- libraries/gd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/gd.h b/libraries/gd.h index 688552f..6e2c456 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit 688552f61f558166c4032d88ba374a4e870be651 +Subproject commit 6e2c4569ee323a255a567e4439c65e8ca1e0ee24 From a38450b6ce2531830db226e4459fc8f80a5b7dc1 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Fri, 2 Apr 2021 18:36:47 -0300 Subject: [PATCH 17/95] hehe rewrite everything --- src/PauseLayer.cpp | 45 --------- src/PauseLayer.h | 12 --- src/PlayLayer.cpp | 155 ----------------------------- src/PlayLayer.h | 53 ---------- src/PlayerObject.cpp | 14 --- src/PlayerObject.h | 21 ---- src/PracticeFixes.cpp | 31 ------ src/PracticeFixes.h | 34 ------- src/Replay.cpp | 59 ++---------- src/Replay.h | 30 ------ src/ReplaySystem.cpp | 99 ------------------- src/ReplaySystem.h | 57 ----------- src/dllmain.cpp | 91 +++++------------- src/hook_utils.cpp | 17 ---- src/hook_utils.hpp | 11 --- src/hooks.cpp | 162 +++++++++++++++++++++++++++++++ src/hooks.hpp | 37 +++++++ src/includes.h | 15 ++- src/overlay.cpp | 214 ----------------------------------------- src/overlay.hpp | 56 ----------- src/practice_fixes.hpp | 57 +++++++++++ src/replay.hpp | 26 +++++ src/replay_system.cpp | 51 ++++++++++ src/replay_system.hpp | 51 ++++++++++ src/types.hpp | 42 ++++++++ src/utils.hpp | 13 ++- 26 files changed, 476 insertions(+), 977 deletions(-) delete mode 100644 src/PauseLayer.cpp delete mode 100644 src/PauseLayer.h delete mode 100644 src/PlayLayer.cpp delete mode 100644 src/PlayLayer.h delete mode 100644 src/PlayerObject.cpp delete mode 100644 src/PlayerObject.h delete mode 100644 src/PracticeFixes.cpp delete mode 100644 src/PracticeFixes.h delete mode 100644 src/Replay.h delete mode 100644 src/ReplaySystem.cpp delete mode 100644 src/ReplaySystem.h delete mode 100644 src/hook_utils.cpp delete mode 100644 src/hook_utils.hpp create mode 100644 src/hooks.cpp create mode 100644 src/hooks.hpp delete mode 100644 src/overlay.cpp delete mode 100644 src/overlay.hpp create mode 100644 src/practice_fixes.hpp create mode 100644 src/replay.hpp create mode 100644 src/replay_system.cpp create mode 100644 src/replay_system.hpp create mode 100644 src/types.hpp diff --git a/src/PauseLayer.cpp b/src/PauseLayer.cpp deleted file mode 100644 index 1749d96..0000000 --- a/src/PauseLayer.cpp +++ /dev/null @@ -1,45 +0,0 @@ -#include "PauseLayer.h" -#include "ReplaySystem.h" -#include "PlayLayer.h" -#include "PlayerObject.h" -#include "hook_utils.hpp" -#include "overlay.hpp" - -void PauseLayer::setup(uintptr_t base) { - Hooks::addHook(base + 0x1E4620, initHook, &init); - Hooks::addHook(base + 0x20D3C0, onPauseHook, &onPause); -} - -// this is probably on PlayLayer but i dontcare -void __fastcall PauseLayer::onPauseHook(void* self, void*, void* idk) { - auto rs = ReplaySystem::getInstance(); - if (rs->isPlaying()) - PlayerObjectHooks::preventInput = true; - if (rs->isRecording()) - rs->recordAction(false, true, false); - onPause(self, idk); - PlayerObjectHooks::preventInput = false; -} - -bool __fastcall PauseLayer::initHook(CCLayer* self, void*) { - auto director = CCDirector::sharedDirector(); - auto winSize = director->getWinSize(); - - bool ret = init(self); - - auto sprite = CCSprite::create("GJ_button_01.png"); - auto button = CCMenuItemSpriteExtra::create(sprite, sprite, self, menu_selector(OverlayLayer::btnCallback)); - button->setScale(0.6f); - - auto label = CCLabelBMFont::create("ReplayBot", "bigFont.fnt"); - label->setScale(0.5f); - label->setPositionX(15.f + label->getScaledContentSize().width / 2.f); - - auto menu = CCMenu::create(); - menu->addChild(button); - menu->addChild(label); - menu->setPosition(25, winSize.height - 40.f); - - self->addChild(menu); - return ret; -} diff --git a/src/PauseLayer.h b/src/PauseLayer.h deleted file mode 100644 index c43ba2d..0000000 --- a/src/PauseLayer.h +++ /dev/null @@ -1,12 +0,0 @@ -#pragma once -#include "includes.h" - -namespace PauseLayer { - void setup(uintptr_t); - - inline bool(__thiscall* init)(CCLayer* self); - bool __fastcall initHook(CCLayer* self, void*); - - inline void(__thiscall* onPause)(void* self, void*); - void __fastcall onPauseHook(void* self, void*, void* idk); -} diff --git a/src/PlayLayer.cpp b/src/PlayLayer.cpp deleted file mode 100644 index bab3105..0000000 --- a/src/PlayLayer.cpp +++ /dev/null @@ -1,155 +0,0 @@ -#include "PlayLayer.h" -#include "ReplaySystem.h" -#include "utils.hpp" -#include "PracticeFixes.h" -#include "hook_utils.hpp" - -void PlayLayer::setup(uintptr_t base) { - PlayLayer::base = base; - Hooks::addHook(base + 0x1FB780, initHook, &init); - Hooks::addHook(base + 0x2029C0, updateHook, &update); - Hooks::addHook(base + 0x1FD3D0, levelCompleteHook, &levelComplete); - Hooks::addHook(base + 0x20D810, onQuitHook, &onQuit); - Hooks::addHook(base + 0x111500, pushButtonHook, &pushButton); - Hooks::addHook(base + 0x111660, releaseButtonHook, &releaseButton); - - auto handle = GetModuleHandleA("libcocos2d.dll"); - - Hooks::addHook(GetProcAddress(handle, "?update@CCScheduler@cocos2d@@UAEXM@Z"), schUpdateHook, &schUpdate); - - Hooks::addHook(base + 0x25FB60, markCheckpointHook, &markCheckpoint); - Hooks::addHook(base + 0x20B830, removeLastCheckpointHook, &removeLastCheckpoint); - Hooks::addHook(base + 0x1E60E0, onEditorHook, &onEditor); - Hooks::addHook(base + 0x20BF00, resetLevelHook, &resetLevel); -} - -bool __fastcall PlayLayer::initHook(CCLayer* self, void*, void* GJLevel) { - PlayLayer::self = self; - auto ret = init(self, GJLevel); - if (ret) { - // maybe switch to label atlas or whatever - auto label = CCLabelTTF::create("", "Arial", 14); - label->setZOrder(999); - label->setTag(StatusLabelTag); - - self->addChild(label); - } - return ret; -} - -void PlayLayer::updateStatusLabel(const char* text) { - if (self == nullptr) return; - auto director = CCDirector::sharedDirector(); - auto winSize = director->getWinSize(); - - auto label = reinterpret_cast(self->getChildByTag(StatusLabelTag)); - label->setString(text); - label->setPosition({ 10.f + label->getContentSize().width / 2.f, 10.f }); -} - -void __fastcall PlayLayer::schUpdateHook(CCScheduler* self, void*, float dt) { - auto rs = ReplaySystem::getInstance(); - if (rs->isPlaying() || rs->isRecording()) { - float fps = rs->getCurrentReplay()->getFPS(); - float speedhack = self->getTimeScale(); - dt = 1.f / fps / speedhack; - } - return schUpdate(self, dt); -} - -void __fastcall PlayLayer::updateHook(CCLayer* self, void*, float dt) { - auto rs = ReplaySystem::getInstance(); - if (rs->isPlaying()) { - rs->handlePlaying(); - } - update(self, dt); -} - -void* __fastcall PlayLayer::levelCompleteHook(CCLayer* self, void*) { - auto rs = ReplaySystem::getInstance(); - if (rs->isRecording()) { - std::cout << "Level completed, stopping recording" << std::endl; - rs->toggleRecording(); - } - return levelComplete(self); -} - -void exitLevel() { - PracticeFixes::clearCheckpoints(); - auto rs = ReplaySystem::getInstance(); - if (rs->isRecording()) { - std::cout << "Exited out of level, stopping recording" << std::endl; - rs->toggleRecording(); - } - if (rs->isPlaying()) { - std::cout << "Exited out of level, stopped playing" << std::endl; - rs->togglePlaying(); - } -} - -void* __fastcall PlayLayer::onQuitHook(CCLayer* self, void*) { - exitLevel(); - return onQuit(self); -} - -void* __fastcall PlayLayer::onEditorHook(CCLayer* self, void*, void* idk) { - exitLevel(); - return onEditor(self, idk); -} - -int __fastcall PlayLayer::pushButtonHook(CCLayer* self, void*, int idk, bool button) { - // make sure it's in a play layer - if (getSelf()) { - auto rs = ReplaySystem::getInstance(); - if (rs->isPlaying()) return 0; - rs->recordAction(true, button); - PracticeFixes::isHolding = true; - } - return pushButton(self, idk, button); -} - -int __fastcall PlayLayer::releaseButtonHook(CCLayer* self, void*, int idk, bool button) { - if (getSelf()) { - auto rs = ReplaySystem::getInstance(); - if (rs->isPlaying()) return 0; - rs->recordAction(false, button); - PracticeFixes::isHolding = false; - } - return releaseButton(self, idk, button); -} - -// technically not in playlayer but who cares -bool PlayLayer::is2Player() { - return *cast(follow(follow(follow(base + 0x3222D0) + 0x164) + 0x22c) + 0xfa); -} - -PlayerObject* PlayLayer::getPlayer() { - if (self) return cast(follow(cast(self) + 0x224)); - return nullptr; -} -PlayerObject* PlayLayer::getPlayer2() { - if (self) return cast(follow(cast(self) + 0x228)); - return nullptr; -} - -uintptr_t PlayLayer::getSelf() { - return follow(follow(base + 0x3222D0) + 0x164); -} - -void* __fastcall PlayLayer::markCheckpointHook(CCLayer* self, void*, void* idk2) { - auto isDead = read(getSelf() + 0x39C); - if (!isDead) - PracticeFixes::addCheckpoint(); - return markCheckpoint(self, idk2); -} - -void* __fastcall PlayLayer::removeLastCheckpointHook(CCLayer* self, void*) { - PracticeFixes::removeCheckpoint(); - return removeLastCheckpoint(self); -} - -int __fastcall PlayLayer::resetLevelHook(CCLayer* self, void*) { - auto ret = resetLevel(self); - ReplaySystem::getInstance()->onReset(); - return ret; -} \ No newline at end of file diff --git a/src/PlayLayer.h b/src/PlayLayer.h deleted file mode 100644 index c287402..0000000 --- a/src/PlayLayer.h +++ /dev/null @@ -1,53 +0,0 @@ -#pragma once -#include "includes.h" -#include "PlayerObject.h" - -namespace PlayLayer { - void setup(uintptr_t base); - - constexpr int StatusLabelTag = 666; - inline CCLayer* self; - inline uintptr_t base; - - inline bool(__thiscall* init)(CCLayer* self, void*); - bool __fastcall initHook(CCLayer* self, void*, void*); - - void updateStatusLabel(const char* text); - - inline void(__thiscall* update)(CCLayer* self, float dt); - void __fastcall updateHook(CCLayer* self, void*, float dt); - - inline void(__thiscall* schUpdate)(CCScheduler* self, float dt); - void __fastcall schUpdateHook(CCScheduler* self, void*, float dt); - - inline void*(__thiscall* levelComplete)(CCLayer* self); - void* __fastcall levelCompleteHook(CCLayer* self, void*); - - inline void* (__thiscall* onQuit)(CCLayer* self); - void* __fastcall onQuitHook(CCLayer* self, void*); - - inline void* (__thiscall* onEditor)(CCLayer* self, void*); - void* __fastcall onEditorHook(CCLayer* self, void*, void*); - - inline int (__thiscall* resetLevel)(CCLayer* self); - int __fastcall resetLevelHook(CCLayer* self, void*); - - inline int(__thiscall* pushButton)(CCLayer* self, int, bool); - int __fastcall pushButtonHook(CCLayer* self, void*, int, bool); - - inline int(__thiscall* releaseButton)(CCLayer* self, int, bool); - int __fastcall releaseButtonHook(CCLayer* self, void*, int, bool); - - inline void*(__thiscall* markCheckpoint)(CCLayer* self, void*); - void* __fastcall markCheckpointHook(CCLayer* self, void*, void*); - - inline void*(__fastcall* removeLastCheckpoint)(CCLayer* self); - void* __fastcall removeLastCheckpointHook(CCLayer* self, void*); - - bool is2Player(); - - PlayerObject* getPlayer(); - PlayerObject* getPlayer2(); - uintptr_t getSelf(); -}; - diff --git a/src/PlayerObject.cpp b/src/PlayerObject.cpp deleted file mode 100644 index 2af7df9..0000000 --- a/src/PlayerObject.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include "PlayerObject.h" -#include "ReplaySystem.h" -#include "PlayLayer.h" -#include "hook_utils.hpp" -#include "utils.hpp" - -void PlayerObjectHooks::setup(uintptr_t base) { - Hooks::addHook(base + 0x1F4F70, releaseButtonHook, &releaseButton); -} - -void __fastcall PlayerObjectHooks::releaseButtonHook(PlayerObject* self, void*, void* PlayerButton) { - if (preventInput) return; - releaseButton(self, PlayerButton); -} \ No newline at end of file diff --git a/src/PlayerObject.h b/src/PlayerObject.h deleted file mode 100644 index f6cf409..0000000 --- a/src/PlayerObject.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once -#include "includes.h" - -class PlayerObject : public CCSprite { -public: - // sizeof(CCSprite) = 484 - char _pad0[0x444]; - double m_yAccel; // + 0x628 - char _pad1[0x4C]; - float m_xPos; // + 0x67C - float m_yPos; -}; - -namespace PlayerObjectHooks { - void setup(uintptr_t base); - - inline bool preventInput = false; - - inline void(__thiscall* releaseButton)(PlayerObject* self, void*); - void __fastcall releaseButtonHook(PlayerObject* self, void*, void*); -}; \ No newline at end of file diff --git a/src/PracticeFixes.cpp b/src/PracticeFixes.cpp deleted file mode 100644 index af496a6..0000000 --- a/src/PracticeFixes.cpp +++ /dev/null @@ -1,31 +0,0 @@ -#include "PracticeFixes.h" -#include "PlayLayer.h" - -namespace PracticeFixes { - void applyCheckpoint() { - if (!checkpoints.empty()) { - auto checkpoint = currentCheckpoint(); - checkpoint.player1.apply(PlayLayer::getPlayer()); - checkpoint.player2.apply(PlayLayer::getPlayer2()); - } - } - - void addCheckpoint() { - checkpoints.push({ CheckpointData::fromPlayer(PlayLayer::getPlayer()), CheckpointData::fromPlayer(PlayLayer::getPlayer2()) }); - } - - void removeCheckpoint() { - if (!checkpoints.empty()) - checkpoints.pop(); - } - - Checkpoint currentCheckpoint() { - return checkpoints.top(); - } - - void clearCheckpoints() { - // maybe switch to a deque? idk - while (!checkpoints.empty()) - checkpoints.pop(); - } -} \ No newline at end of file diff --git a/src/PracticeFixes.h b/src/PracticeFixes.h deleted file mode 100644 index adff92b..0000000 --- a/src/PracticeFixes.h +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once -#include -#include "PlayerObject.h" - -struct CheckpointData { - double yAccel; - float rotation; - static CheckpointData fromPlayer(PlayerObject* player) { - return { player->m_yAccel, player->getRotation() }; - }; - void apply(PlayerObject* player) { - player->m_yAccel = yAccel; - player->setRotation(rotation); - } -}; - -struct Checkpoint { - CheckpointData player1; - CheckpointData player2; -}; - -namespace PracticeFixes { - inline std::stack checkpoints; - // TODONT: 2 player - // nvm lmao gd itself doesnt do it - inline bool isHolding = false; - - void applyCheckpoint(); - - void addCheckpoint(); - void removeCheckpoint(); - Checkpoint currentCheckpoint(); - void clearCheckpoints(); -} \ No newline at end of file diff --git a/src/Replay.cpp b/src/Replay.cpp index 93a4cf6..4d417ad 100644 --- a/src/Replay.cpp +++ b/src/Replay.cpp @@ -1,59 +1,18 @@ -#include "Replay.h" -#include -#include +#include "replay.hpp" -Replay::Replay(float fps) : fps(fps) {} - -void Replay::addAction(Action action) { - // std::cout << "Action: hold=" << action.hold << " player2=" << action.player2 << " x=" << action.x << std::endl; - actions.push_back(action); -} - -void Replay::removeActionsAfterX(float x) { - auto check = [&](Action action) -> bool { +void Replay::remove_actions_after(float x) { + auto check = [&](const Action& action) -> bool { return action.x >= x; }; actions.erase(std::remove_if(actions.begin(), actions.end(), check), actions.end()); } -template -void binWrite(std::ofstream* stream, T val) { - stream->write(reinterpret_cast(&val), sizeof(T)); -} - -template -T binRead(std::ifstream* stream) { - T val; - stream->read(reinterpret_cast(&val), sizeof(T)); - return val; -} - -void Replay::save(const char* path) { - std::ofstream outfile; - outfile.open(path, std::ios::binary | std::ios::out); - binWrite(&outfile, fps); - // std::cout << "n actions " << actions.size() << std::endl; - for (auto& action : actions) { - binWrite(&outfile, action.x); - binWrite(&outfile, action.hold); - binWrite(&outfile, action.player2); - } - outfile.close(); +void Replay::save(const std::string& path) { + // lol } -std::shared_ptr Replay::load(const char* path) { - std::ifstream infile; - infile.open(path, std::ios::binary | std::ios::in); - infile.seekg(0, std::ios::end); - // this apparently can be inaccurate sometimes but i haven't seen it happen - auto size = static_cast(infile.tellg()); - infile.seekg(0); - auto fps = binRead(&infile); - auto replay = std::make_shared(fps); - for (long _i = 0; _i < (size - 4) / 6; ++_i) { - Action action = { binRead(&infile), binRead(&infile), binRead(&infile) }; - replay->addAction(action); - } - infile.close(); - return replay; +Replay Replay::load(const std::string& path) { + Replay replay(60); + // bla bla do some stuff + return std::move(replay); } \ No newline at end of file diff --git a/src/Replay.h b/src/Replay.h deleted file mode 100644 index 77dda6a..0000000 --- a/src/Replay.h +++ /dev/null @@ -1,30 +0,0 @@ -#pragma once -#include -#include - -struct Action { - float x; - bool hold; - bool player2; -}; - -class Replay { - std::vector actions; - float fps; -public: - Replay(float fps); - - float getFPS() { - return fps; - } - - void addAction(Action); - void removeActionsAfterX(float x); - - std::vector& getActions() { - return actions; - } - - void save(const char* path); - static std::shared_ptr load(const char* path); -}; diff --git a/src/ReplaySystem.cpp b/src/ReplaySystem.cpp deleted file mode 100644 index 767b02e..0000000 --- a/src/ReplaySystem.cpp +++ /dev/null @@ -1,99 +0,0 @@ -#include "ReplaySystem.h" -#include "PlayLayer.h" -#include "PracticeFixes.h" -#include - -ReplaySystem* ReplaySystem::instance; - -void ReplaySystem::init(uintptr_t base) { - baseAddress = base; -} - -void ReplaySystem::toggleRecording() { - std::cout << "Toggled Recording" << std::endl; - recording = !recording; - playing = false; - PlayLayer::updateStatusLabel(recording ? "Recording" : ""); - if (recording) { - currentReplay = std::make_shared(defaultFPS); - } -} - -void ReplaySystem::togglePlaying() { - if (currentReplay) { - std::cout << "Toggled Playing" << std::endl; - playing = !playing; - recording = false; - if (!showcaseMode) - PlayLayer::updateStatusLabel(playing ? "Playing" : ""); - if (playing) { - curActionIndex = 0; - } - } -} - -bool _should_flip_controls() { - return PlayLayer::is2Player() && gd::GameManager::sharedState()->getGameVariable("0010"); -} - -void ReplaySystem::recordAction(bool hold, bool player1, bool flip) { - if (recording) { - player1 ^= flip && _should_flip_controls(); - currentReplay->addAction({ PlayLayer::getPlayer()->m_xPos, hold, PlayLayer::is2Player() && !player1 }); - } -} - -void ReplaySystem::onReset() { - if (recording) { - auto x = PlayLayer::getPlayer()->m_xPos; - currentReplay->removeActionsAfterX(x); - recordAction(PracticeFixes::isHolding, true, false); - // you cant "buffer hold" player 2 - if (PlayLayer::is2Player()) - recordAction(false, false, false); - PracticeFixes::applyCheckpoint(); - } - else if (playing) { - PlayLayer::releaseButton(PlayLayer::self, 0, true); - PlayLayer::releaseButton(PlayLayer::self, 0, false); - curActionIndex = 0; - } -} - -void ReplaySystem::playAction(Action action) { - auto layer = PlayLayer::self; - auto flip = _should_flip_controls(); - (action.hold ? PlayLayer::pushButton : PlayLayer::releaseButton)(layer, 0, !action.player2 ^ flip); -} - -void ReplaySystem::handlePlaying() { - auto x = PlayLayer::getPlayer()->m_xPos; - auto& actions = currentReplay->getActions(); - if (curActionIndex < actions.size()) { - Action curAction; - // while loop since up to 4 actions can happen in the same frame - while (curActionIndex < actions.size() && x >= (curAction = actions[curActionIndex]).x) { - playAction(curAction); - ++curActionIndex; - } - } - else { - togglePlaying(); - } -} - -// TODO: support unicode paths - -void ReplaySystem::loadReplay(const char* path) { - currentReplay = Replay::load(path); -} - -void ReplaySystem::saveReplay(const char* path) { - if (currentReplay) { - currentReplay->save(path); - } -} - -bool ReplaySystem::toggleShowcaseMode() { - return (showcaseMode = !showcaseMode); -} diff --git a/src/ReplaySystem.h b/src/ReplaySystem.h deleted file mode 100644 index 6a30e28..0000000 --- a/src/ReplaySystem.h +++ /dev/null @@ -1,57 +0,0 @@ -#pragma once -#include "includes.h" -#include "Replay.h" -#include - -class ReplaySystem { - static ReplaySystem* instance; - - uintptr_t baseAddress; - bool recording = false; - bool playing = false; - std::shared_ptr currentReplay; - float defaultFPS = 120.f; - - bool showcaseMode = false; - - size_t curActionIndex = 0; -public: - static ReplaySystem* getInstance() { - if (!instance) instance = new ReplaySystem(); - return instance; - } - - void init(uintptr_t base); - - std::shared_ptr getCurrentReplay() { - return currentReplay; - } - void loadReplay(const char* path); - void saveReplay(const char* path); - - void toggleRecording(); - void togglePlaying(); - - bool isRecording() { - return recording; - } - bool isPlaying() { - return playing; - } - - float getDefaultFPS() { - return defaultFPS; - } - - void setDefaultFPS(float fps) { - defaultFPS = fps; - } - - void recordAction(bool hold, bool player1, bool flip = true); - void onReset(); - void playAction(Action); - void handlePlaying(); - - bool toggleShowcaseMode(); -}; - diff --git a/src/dllmain.cpp b/src/dllmain.cpp index ff60010..292a912 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -1,85 +1,42 @@ #include "includes.h" -#include "ReplaySystem.h" -#include "PauseLayer.h" -#include "PlayLayer.h" -#include "PlayerObject.h" #include -#include "hook_utils.hpp" -#include "utils.hpp" -#include "overlay.hpp" -void readInput(HMODULE hModule) { - for (std::string line; std::getline(std::cin, line);) { - if (line == "exit") { - auto base = reinterpret_cast(GetModuleHandle(0)); - Hooks::unload(); - fclose(stdout); - fclose(stdin); - FreeConsole(); - FreeLibraryAndExitThread(hModule, 0); - break; - } - else if (line == "x") { - auto player = PlayLayer::getPlayer(); - if (player != nullptr) - std::cout << player->m_xPos << " " << player->m_yPos << std::endl; - } - else if (line == "showcase") { - auto s = ReplaySystem::getInstance()->toggleShowcaseMode(); - std::cout << "Showcase mode is now " << (s ? "ON" : "OFF") << std::endl; - } - else if (line.rfind("fps ", 0) == 0) { - auto fps = std::stoi(line.substr(4)); - std::cout << "Setting fps to " << fps << std::endl; - ReplaySystem::getInstance()->setDefaultFPS(fps); - } - else if (line.rfind("speed ", 0) == 0) { - auto speed = std::stof(line.substr(6)); - auto replay = ReplaySystem::getInstance()->getCurrentReplay(); - if (!replay) continue; - auto fps = replay->getFPS() * speed; - std::cout << "Setting speed to " << speed << " (fps=" << fps << ")" << std::endl; - CCDirector::sharedDirector()->setAnimationInterval(1. / fps); - } - } -} +#include "hooks.hpp" -DWORD WINAPI my_thread(void* hModule) { +#define _SHOW_CONSOLE_UWU 1 + +DWORD WINAPI thread_entry(void* module) { +#if _SHOW_CONSOLE_UWU AllocConsole(); - SetConsoleTitleA("Console"); - freopen_s(reinterpret_cast(stdout), "CONOUT$", "w", stdout); - freopen_s(reinterpret_cast(stdin), "CONIN$", "r", stdin); static std::ofstream conout("CONOUT$", std::ios::out); + static std::ifstream conin("CONIN$", std::ios::in); std::cout.rdbuf(conout.rdbuf()); + std::cin.rdbuf(conin.rdbuf()); +#endif - Hooks::init(); - - auto base = reinterpret_cast(GetModuleHandle(0)); + MH_Initialize(); - auto rs = ReplaySystem::getInstance(); - rs->init(base); - PauseLayer::setup(base); - PlayLayer::setup(base); - PlayerObjectHooks::setup(base); + Hooks::init(); MH_EnableHook(MH_ALL_HOOKS); - readInput(cast(hModule)); +#if _SHOW_CONSOLE_UWU + std::string dababy; + std::getline(std::cin, dababy); + MH_Uninitialize(); + conout.close(); + conin.close(); + FreeConsole(); + FreeLibraryAndExitThread(cast(module), 0); +#endif return 0; } -BOOL APIENTRY DllMain(HMODULE hModule, - DWORD ul_reason_for_call, - LPVOID lpReserved -) -{ - switch (ul_reason_for_call) - { - case DLL_PROCESS_ATTACH: - CreateThread(0, 0x1000, my_thread, hModule, 0, 0); - break; +BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved) { + if (reason == DLL_PROCESS_ATTACH) { + auto handle = CreateThread(0, 0x100, thread_entry, module, 0, 0); + if (handle) CloseHandle(handle); } return TRUE; -} - +} \ No newline at end of file diff --git a/src/hook_utils.cpp b/src/hook_utils.cpp deleted file mode 100644 index 0057125..0000000 --- a/src/hook_utils.cpp +++ /dev/null @@ -1,17 +0,0 @@ -#include "hook_utils.hpp" -#include "utils.hpp" - -namespace Hooks { - void init() { - MH_Initialize(); - } - void unload() { - MH_Uninitialize(); - } - void addHook(uintptr_t address, void* hook, void* original) { - addHook(cast(address), hook, original); - } - void addHook(void* address, void* hook, void* original) { - MH_CreateHook(address, hook, cast(original)); - } -} \ No newline at end of file diff --git a/src/hook_utils.hpp b/src/hook_utils.hpp deleted file mode 100644 index 9e81925..0000000 --- a/src/hook_utils.hpp +++ /dev/null @@ -1,11 +0,0 @@ -#ifndef __HOOK_UTILS_HPP -#define __HOOK_UTILS_HPP -#include "includes.h" - -namespace Hooks { - void init(); - void unload(); - void addHook(uintptr_t address, void* hook, void* original); - void addHook(void* address, void* hook, void* original); -} -#endif \ No newline at end of file diff --git a/src/hooks.cpp b/src/hooks.cpp new file mode 100644 index 0000000..5ef30ba --- /dev/null +++ b/src/hooks.cpp @@ -0,0 +1,162 @@ +#include "hooks.hpp" +#include "replay_system.hpp" + +auto add_gd_hook(uintptr_t offset, void* hook, void* orig) { + return MH_CreateHook(cast(cast(gd::base) + offset), hook, cast(orig)); +} +#define ADD_GD_HOOK(o, f) add_gd_hook(o, f##_H, &f) + +auto add_cocos_hook(const char* symbol, void* hook, void* orig) { + return MH_CreateHook(GetProcAddress(GetModuleHandleA("libcocos2d.dll"), symbol), hook, cast(orig)); +} +#define ADD_COCOS_HOOK(o, f) add_cocos_hook(o, f##_H, &f) + +void Hooks::init() { + ADD_COCOS_HOOK("?update@CCScheduler@cocos2d@@UAEXM@Z", CCScheduler_update); + + ADD_GD_HOOK(0x1FB780, _PlayLayer::init); + ADD_GD_HOOK(0x2029C0, _PlayLayer::update); + + ADD_GD_HOOK(0x111500, _PlayLayer::pushButton); + ADD_GD_HOOK(0x111660, _PlayLayer::releaseButton); + ADD_GD_HOOK(0x20BF00, _PlayLayer::resetLevel); + + ADD_GD_HOOK(0x20D3C0, _PlayLayer::pauseGame); + + ADD_GD_HOOK(0x20B050, _PlayLayer::createCheckpoint); + ADD_GD_HOOK(0x20B830, _PlayLayer::removeLastCheckpoint); + + ADD_GD_HOOK(0x1FD3D0, _PlayLayer::levelComplete); + ADD_GD_HOOK(0x20D810, _PlayLayer::onQuit); + ADD_GD_HOOK(0x1E60E0, _PlayLayer::onEditor); + + ADD_GD_HOOK(0x1E4620, PauseLayer_init); +} + +void __fastcall Hooks::CCScheduler_update_H(CCScheduler* self, int, float dt) { + auto rs = ReplaySystem::get_instance(); + if (rs->is_playing() || rs->is_recording() && gd::GameManager::sharedState()->getPlayLayer()) { + auto fps = rs->get_replay().get_fps(); + auto speedhack = self->getTimeScale(); + dt = 1.f / fps / speedhack; + } + CCScheduler_update(self, dt); +} + + +bool __fastcall Hooks::_PlayLayer::init_H(PlayLayer* self, int, void* level) { + return init(self, level); +} + +void __fastcall Hooks::_PlayLayer::update_H(PlayLayer* self, int, float dt) { + auto rs = ReplaySystem::get_instance(); + if (rs->is_playing()) + rs->handle_playing(); + update(self, dt); +} + + +bool _player_button_handler(bool hold, bool button) { + if (gd::GameManager::sharedState()->getPlayLayer()) { + auto rs = ReplaySystem::get_instance(); + if (rs->is_playing()) return true; + rs->record_action(hold, button); + rs->get_practice_fixes().set_holding(hold); + } + return false; +} + +int __fastcall Hooks::_PlayLayer::pushButton_H(PlayLayer* self, int, int idk, bool button) { + if (_player_button_handler(true, button)) return 0; + return pushButton(self, idk, button); +} + +int __fastcall Hooks::_PlayLayer::releaseButton_H(PlayLayer* self, int, int idk, bool button) { + if (_player_button_handler(false, button)) return 0; + return releaseButton(self, idk, button); +} + +int __fastcall Hooks::_PlayLayer::resetLevel_H(PlayLayer* self, int) { + auto ret = resetLevel(self); + ReplaySystem::get_instance()->on_reset(); + return ret; +} + + +void __fastcall Hooks::_PlayLayer::pauseGame_H(PlayLayer* self, int, bool idk) { + auto addr = cast(gd::base + 0x20D43C); + auto rs = ReplaySystem::get_instance(); + if (rs->is_recording()) + rs->record_action(false, true, false); + + bool should_patch = rs->is_playing(); + if (should_patch) + patch(addr, {0x83, 0xC4, 0x04, 0x90, 0x90}); + + pauseGame(self, idk); + + if (should_patch) + patch(addr, {0xe8, 0x2f, 0x7b, 0xfe, 0xff}); +} + + +int __fastcall Hooks::_PlayLayer::createCheckpoint_H(PlayLayer* self, int) { + auto rs = ReplaySystem::get_instance(); + if (rs->is_recording()) rs->get_practice_fixes().add_checkpoint(); + return createCheckpoint(self); +} + +void* __fastcall Hooks::_PlayLayer::removeLastCheckpoint_H(PlayLayer* self, int) { + ReplaySystem::get_instance()->get_practice_fixes().remove_checkpoint(); + return removeLastCheckpoint(self); +} + + +void* __fastcall Hooks::_PlayLayer::levelComplete_H(PlayLayer* self, int) { + ReplaySystem::get_instance()->reset_state(); + return levelComplete(self); +} + +void _on_exit_level() { + auto rs = ReplaySystem::get_instance(); + rs->get_practice_fixes().clear_checkpoints(); + rs->reset_state(); +} + +void* __fastcall Hooks::_PlayLayer::onQuit_H(PlayLayer* self, int) { + _on_exit_level(); + return onQuit(self); +} + +void* __fastcall Hooks::_PlayLayer::onEditor_H(PlayLayer* self, int, void* idk) { + _on_exit_level(); + return onEditor(self, idk); +} + +class penisdick { + public: + void thecallback(CCObject*) { + auto rs = ReplaySystem::get_instance(); + // amazing + if (cast(this) == 1) { + rs->toggle_recording(); + } else if (cast(this) == 2) { + rs->toggle_playing(); + } + } +}; + +bool __fastcall Hooks::PauseLayer_init_H(gd::PauseLayer* self, int) { + if (PauseLayer_init(self)) { + auto menu = CCMenu::create(); + auto sprite = CCSprite::create("GJ_button_01.png"); + auto btn1 = gd::CCMenuItemSpriteExtra::create(sprite, cast(1), menu_selector(penisdick::thecallback)); + auto btn2 = gd::CCMenuItemSpriteExtra::create(sprite, cast(2), menu_selector(penisdick::thecallback)); + btn2->setPosition({50, 50}); + menu->addChild(btn1); + menu->addChild(btn2); + self->addChild(menu); + return true; + } + return false; +} \ No newline at end of file diff --git a/src/hooks.hpp b/src/hooks.hpp new file mode 100644 index 0000000..f538a34 --- /dev/null +++ b/src/hooks.hpp @@ -0,0 +1,37 @@ +#pragma once +#include "includes.h" +#include "types.hpp" +#include + +#define _THISCALL_HOOK(name, ret_type, self_type, ...) \ +inline ret_type(__thiscall* name)(self_type* self, __VA_ARGS__); \ +ret_type __fastcall name##_H(self_type* self, int, __VA_ARGS__); + +namespace Hooks { + void init(); + + _THISCALL_HOOK(CCScheduler_update, void, CCScheduler, float dt) + + // _ cuz yeah + namespace _PlayLayer { + _THISCALL_HOOK(init, bool, PlayLayer, void* level) + _THISCALL_HOOK(update, void, PlayLayer, float dt) + + _THISCALL_HOOK(pushButton, int, PlayLayer, int, bool) + _THISCALL_HOOK(releaseButton, int, PlayLayer, int, bool) + _THISCALL_HOOK(resetLevel, int, PlayLayer) + + _THISCALL_HOOK(pauseGame, void, PlayLayer, bool) + + _THISCALL_HOOK(createCheckpoint, int, PlayLayer) + _THISCALL_HOOK(removeLastCheckpoint, void*, PlayLayer) + + _THISCALL_HOOK(levelComplete, void*, PlayLayer) + // these are only for stopping recording/playing + // maybe hook the destructor instead ? + _THISCALL_HOOK(onQuit, void*, PlayLayer) + _THISCALL_HOOK(onEditor, void*, PlayLayer, void*) + } + + _THISCALL_HOOK(PauseLayer_init, bool, gd::PauseLayer) +} \ No newline at end of file diff --git a/src/includes.h b/src/includes.h index 2090654..10c583c 100644 --- a/src/includes.h +++ b/src/includes.h @@ -1,17 +1,14 @@ -#ifndef PCH_H -#define PCH_H +#pragma once #define WIN32_LEAN_AND_MEAN -#include -#include +#include + +#include +#include -// shut up cocos #pragma warning(push, 0) #include using namespace cocos2d; #pragma warning(pop) -#include -#include - -#endif //PCH_H +#include "utils.hpp" \ No newline at end of file diff --git a/src/overlay.cpp b/src/overlay.cpp deleted file mode 100644 index b79d7f5..0000000 --- a/src/overlay.cpp +++ /dev/null @@ -1,214 +0,0 @@ -#include "overlay.hpp" -#include "ReplaySystem.h" -#include - -OverlayLayer* OverlayLayer::create() { - auto self = cast(CCLayerColor::create()); - // isnt working :sob: - self->setKeypadEnabled(true); - self->initMyStuff(); - - return self; -} - -void buttonWithLabel(CCMenu* menu, float x, float y, CCSprite* sprite, const char* text, CCObject* target, SEL_MenuHandler handler, bool right = false) { - auto label = CCLabelBMFont::create(text, "bigFont.fnt"); - label->setScale(0.7f); - auto button = gd::CCMenuItemSpriteExtra::create(sprite, target, handler); - auto btnSize = button->getScaledContentSize(); - auto lblSize = label->getScaledContentSize(); - button->setPosition({x, y}); - float lbX = btnSize.width / 2.f + 5.f + lblSize.width / 2.f + x; - label->setPosition({lbX, y}); - if (right) - label->setPositionX(-lbX); - menu->addChild(button); - menu->addChild(label); -} - -void OverlayLayer::_updateReplayLabel() { - auto label = m_infoLabel; - auto replay = ReplaySystem::getInstance()->getCurrentReplay(); - auto winSize = CCDirector::sharedDirector()->getWinSize(); - std::stringstream stream; - if (replay) { - stream << "Current FPS: " << replay->getFPS(); - } else { - stream << "No replay loaded"; - } - label->setString(stream.str().c_str()); - auto size = label->getScaledContentSize(); - label->setPosition({15 + size.width / 2, winSize.height - 180 - size.height / 2}); -} - -bool OverlayLayer::initMyStuff() { - auto director = CCDirector::sharedDirector(); - auto winSize = director->getWinSize(); - auto rs = ReplaySystem::getInstance(); - - initWithColor({0, 0, 0, 0}, winSize.width, winSize.height); - setZOrder(999); - { - auto btnBack = gd::CCMenuItemSpriteExtra::create( - CCSprite::createWithSpriteFrameName("GJ_arrow_03_001.png"), - this, - menu_selector(OverlayLayer::_btnBackCallback) - ); - auto menu = CCMenu::create(); - menu->addChild(btnBack); - menu->setPosition({25, winSize.height - 25}); - addChild(menu); - } - - auto menu = CCMenu::create(); - auto sprGreen = CCSprite::create("GJ_button_01.png"); - sprGreen->setScale(0.72f); - menu->setPosition({30, winSize.height - 80}); - buttonWithLabel(menu, 0, 0, sprGreen, "Record", this, menu_selector(OverlayLayer::cbRecordBtn)); - buttonWithLabel(menu, 0, -38, sprGreen, "Play", this, menu_selector(OverlayLayer::cbPlayBtn)); - - addChild(menu); - - { - auto menu = CCMenu::create(); - menu->setPosition({winSize.width - 30, winSize.height - 80}); - // auto sprFolder = CCSprite::createWithSpriteFrameName("accountBtn_myLevels_001.png"); - // sprFolder->setScale(0.77f); - auto sprite = CCSprite::create("GJ_button_02.png"); - sprite->setScale(0.72f); - buttonWithLabel(menu, 0, 0, sprite, "Load", this, menu_selector(OverlayLayer::cbLoadBtn), true); - buttonWithLabel(menu, 0, -38, sprite, "Save", this, menu_selector(OverlayLayer::cbSaveBtn), true); - addChild(menu); - } - - { - auto sprite = CCSprite::create("square02b_001.png"); - sprite->setColor({0, 0, 0}); - sprite->setOpacity(69); - sprite->setPosition({102, winSize.height - 159}); - sprite->setScaleX(0.825f); - sprite->setScaleY(0.325f); - addChild(sprite); - } - - auto iptFps = gd::CCTextInputNode::create("the fps uwu", this, "bigFont.fnt", 200.f, 50.f); - iptFps->setPosition({61, winSize.height - 168}); - iptFps->setScale(0.6f); - iptFps->setLabelPlaceholerScale(0.5f); - iptFps->setLabelPlaceholderColor({200, 200, 200}); - iptFps->setAllowedChars("0123456789"); - iptFps->setMaxLabelLength(10); // who needs this much - iptFps->setString(std::to_string((int)rs->getDefaultFPS()).c_str()); - addChild(iptFps); - m_fpsInput = iptFps; - - { - auto label = CCLabelBMFont::create("FPS:", "bigFont.fnt"); - label->setPosition({42, winSize.height - 158}); - label->setScale(0.7f); - addChild(label); - } - - { - auto label = CCLabelBMFont::create("", "bigFont.fnt"); - m_infoLabel = label; - label->setScale(0.7f); - _updateReplayLabel(); - addChild(label); - } - - return true; -} - -void OverlayLayer::_updateDefaultFPS() { - std::string tmp(this->m_fpsInput->getString()); - ReplaySystem::getInstance()->setDefaultFPS((float)std::stoi(tmp)); -} - -void _loadReplayDialog() { - nfdchar_t* path = nullptr; - auto result = NFD_OpenDialog("replay", nullptr, &path); - if (result == NFD_OKAY) { - ReplaySystem::getInstance()->loadReplay(path); - gd::FLAlertLayer::create(nullptr, "Info", "Ok", nullptr, "Replay loaded.")->show(); - free(path); - } -} - -void whycantijusthavethisinthelayeridontgetit::FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2) { - auto rs = ReplaySystem::getInstance(); - if (!btn2) { - auto i = alert->getTag(); - auto layer = cast(alert->getUserData()); // god this is dumb - if (i == -1) return; - else if (i == 1) { - rs->toggleRecording(); - layer->_updateReplayLabel(); - } else if (i == 2) { - _loadReplayDialog(); - layer->_updateReplayLabel(); - } - } -} - -void OverlayLayer::cbPlayBtn(CCObject*) { - ReplaySystem::getInstance()->togglePlaying(); -} - -void OverlayLayer::cbRecordBtn(CCObject*) { - _updateDefaultFPS(); - auto rs = ReplaySystem::getInstance(); - if (!rs->isRecording() && rs->getCurrentReplay()) { - auto alert = gd::FLAlertLayer::create( - new whycantijusthavethisinthelayeridontgetit(), - "Warning", - "Ok", - "Cancel", - "This will overwrite your currently loaded replay." - ); - alert->setUserData(this); - alert->setTag(1); - alert->show(); - } else { - rs->toggleRecording(); - _updateReplayLabel(); - } -} - -void OverlayLayer::cbLoadBtn(CCObject*) { - auto rs = ReplaySystem::getInstance(); - if (rs->getCurrentReplay()) { - auto alert = gd::FLAlertLayer::create( - new whycantijusthavethisinthelayeridontgetit(), - "Warning", - "Ok", - "Cancel", - "This will overwrite your currently loaded replay." - ); - alert->setUserData(this); - alert->setTag(2); - alert->show(); - } else { - _loadReplayDialog(); - _updateReplayLabel(); - } -} - -void OverlayLayer::cbSaveBtn(CCObject*) { - auto rs = ReplaySystem::getInstance(); - nfdchar_t* path = nullptr; - // FIXME: this just crashes sometimes?? for no reason - // even when calling winapi directly - // after some debugging it seems to happen on IModalWindow::Show - // this didn't happen on the old ui - // so somehow i fucked up a winapi function in the process - // of making this overlay?? i'm so done - auto result = NFD_SaveDialog("replay", nullptr, &path); - if (result == NFD_OKAY) { - // dear god - auto _path = std::string(path) + ".replay"; - rs->saveReplay(_path.c_str()); - gd::FLAlertLayer::create(nullptr, "Info", "Ok", nullptr, "Replay saved.")->show(); - free(path); - } -} diff --git a/src/overlay.hpp b/src/overlay.hpp deleted file mode 100644 index 9b148ef..0000000 --- a/src/overlay.hpp +++ /dev/null @@ -1,56 +0,0 @@ -#pragma once -#include "includes.h" -#include "utils.hpp" - -class OverlayLayer : public CCLayerColor, public gd::FLAlertLayerProtocol { -protected: - gd::CCTextInputNode* m_fpsInput; - CCLabelBMFont* m_infoLabel; -public: - static OverlayLayer* create(); - bool initMyStuff(); - void keyBackClicked() { - CCDirector::sharedDirector()->popSceneWithTransition(0.5f, PopTransition::FadeTransition); - } - void _btnBackCallback(CCObject*) { - // ???? why tf does this not work - // this->keyBackClicked(); - // i give up - _updateDefaultFPS(); - // CCDirector::sharedDirector()->popSceneWithTransition(0.5f, PopTransition::FadeTransition); - auto pauseLayer = this->getParent(); - this->removeFromParentAndCleanup(true); - auto children = pauseLayer->getChildren(); - for (unsigned i = 1; i < pauseLayer->getChildrenCount(); ++i) { - cast(children->objectAtIndex(i))->setVisible(true); - } - } - void btnCallback(CCObject*) { - auto layer = OverlayLayer::create(); - // auto scene = CCScene::create(); - // scene->addChild(layer); - // CCDirector::sharedDirector()->pushScene(CCTransitionFade::create(0.5f, scene)); - auto pauseLayer = cast(CCDirector::sharedDirector()->getRunningScene()->getChildren()->objectAtIndex(1)); - auto children = pauseLayer->getChildren(); - for (unsigned i = 1; i < pauseLayer->getChildrenCount(); ++i) { - cast(children->objectAtIndex(i))->setVisible(false); - } - pauseLayer->addChild(layer); - } - void cbRecordBtn(CCObject*); - void cbPlayBtn(CCObject*); - void cbLoadBtn(CCObject*); - void cbSaveBtn(CCObject*); - - void _updateReplayLabel(); - void _updateDefaultFPS(); - - void FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2) { - std::cout << "lol!!" << std::endl; - } -}; - -class whycantijusthavethisinthelayeridontgetit : public gd::FLAlertLayerProtocol { -public: - void FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2); -}; \ No newline at end of file diff --git a/src/practice_fixes.hpp b/src/practice_fixes.hpp new file mode 100644 index 0000000..1b09592 --- /dev/null +++ b/src/practice_fixes.hpp @@ -0,0 +1,57 @@ +#pragma once +#include +#include "types.hpp" +#include "includes.h" + +struct CheckpointData { + double y_accel; + float rotation; + static CheckpointData from_player(PlayerObject* player) { + return { player->y_accel, player->getRotation() }; + }; + void apply(PlayerObject* player) { + player->y_accel = y_accel; + player->setRotation(rotation); + } +}; + +struct Checkpoint { + CheckpointData player1; + CheckpointData player2; +}; + +class PracticeFixes { + std::stack checkpoints; + bool holding; +public: + PracticeFixes() {} + bool is_holding() { return holding; } + void set_holding(bool h) { holding = h; } + + void add_checkpoint() { + auto play_layer = cast(gd::GameManager::sharedState()->getPlayLayer()); + checkpoints.push({ + CheckpointData::from_player(play_layer->get_player()), + CheckpointData::from_player(play_layer->get_player2()) + }); + } + + void remove_checkpoint() { + if (!checkpoints.empty()) + checkpoints.pop(); + } + + void apply_checkpoint() { + if (!checkpoints.empty()) { + auto play_layer = cast(gd::GameManager::sharedState()->getPlayLayer()); + auto checkpoint = checkpoints.top(); + checkpoint.player1.apply(play_layer->get_player()); + checkpoint.player2.apply(play_layer->get_player2()); + } + } + + void clear_checkpoints() { + while (!checkpoints.empty()) + checkpoints.pop(); + } +}; \ No newline at end of file diff --git a/src/replay.hpp b/src/replay.hpp new file mode 100644 index 0000000..55fced2 --- /dev/null +++ b/src/replay.hpp @@ -0,0 +1,26 @@ +#pragma once +#include +#include +#include + +struct Action { + float x; + bool hold; + bool player2; +}; + +class Replay { + std::vector actions; + float fps; +public: + Replay(float fps) : fps(fps) {} + + float get_fps() { return fps; } + + void add_action(const Action& action) { actions.push_back(action); } + auto& get_actions() { return actions; } + void remove_actions_after(float x); + + void save(const std::string& path); + static Replay load(const std::string& path); +}; \ No newline at end of file diff --git a/src/replay_system.cpp b/src/replay_system.cpp new file mode 100644 index 0000000..0cd8539 --- /dev/null +++ b/src/replay_system.cpp @@ -0,0 +1,51 @@ +#include "replay_system.hpp" +#include "types.hpp" +#include "hooks.hpp" + +ReplaySystem* ReplaySystem::instance; + +void ReplaySystem::record_action(bool hold, bool player1, bool flip) { + if (is_recording()) { + auto gm = gd::GameManager::sharedState(); + auto play_layer = cast(gm->getPlayLayer()); + auto is_two_player = play_layer->get_level_settings()->is_two_player(); + player1 ^= flip && gm->getGameVariable("0010"); + get_replay().add_action({ play_layer->get_player()->x_pos, hold, is_two_player && !player1 }); + } +} + +void ReplaySystem::play_action(const Action& action) { + auto gm = gd::GameManager::sharedState(); + auto flip = gm->getGameVariable("0010"); + auto func = action.hold ? Hooks::_PlayLayer::pushButton : Hooks::_PlayLayer::releaseButton; + func(cast(gm->getPlayLayer()), 0, !action.player2 ^ flip); +} + +void ReplaySystem::on_reset() { + auto play_layer = cast(gd::GameManager::sharedState()->getPlayLayer()); + if (is_playing()) { + Hooks::_PlayLayer::releaseButton(play_layer, 0, false); + Hooks::_PlayLayer::releaseButton(play_layer, 0, true); + action_index = 0; + } else if (is_recording()) { + get_replay().remove_actions_after(play_layer->get_player()->x_pos); + record_action(practice_fixes.is_holding(), true, false); + if (play_layer->get_level_settings()->is_two_player()) + record_action(false, false, false); + practice_fixes.apply_checkpoint(); + } +} + +void ReplaySystem::handle_playing() { + if (is_playing()) { + auto x = cast(gd::GameManager::sharedState()->getPlayLayer())->get_player()->x_pos; + auto& actions = replay.get_actions(); + Action action; + while (action_index < actions.size() && x >= (action = actions[action_index]).x) { + play_action(action); + ++action_index; + } + if (action_index >= actions.size()) + toggle_playing(); + } +} \ No newline at end of file diff --git a/src/replay_system.hpp b/src/replay_system.hpp new file mode 100644 index 0000000..28ad57c --- /dev/null +++ b/src/replay_system.hpp @@ -0,0 +1,51 @@ +#pragma once +#include "replay.hpp" +#include "practice_fixes.hpp" + +// this is a rly bad name +enum RSState { + NOTHING, + RECORDING, + PLAYING +}; + +class ReplaySystem { + static ReplaySystem* instance; + + float default_fps; + + Replay replay; + RSState state = NOTHING; + + size_t action_index = 0; + + PracticeFixes practice_fixes; + + ReplaySystem() : default_fps(120.f), replay(default_fps) {} +public: + static ReplaySystem* get_instance() { + if (!instance) instance = new ReplaySystem(); + return instance; + } + + inline auto& get_replay() { return replay; } + inline auto get_default_fps() { return default_fps; } + inline void set_default_fps(float fps) { default_fps = fps; } + + inline bool is_playing() { return state == PLAYING; } + inline bool is_recording() { return state == RECORDING; } + + inline void toggle_playing() { state = is_playing() ? NOTHING : PLAYING; } + inline void toggle_recording() { state = is_recording() ? NOTHING : RECORDING; } + + inline void reset_state() { state = NOTHING; } + + void record_action(bool hold, bool player1, bool flip = true); + void play_action(const Action& action); + + void on_reset(); + + void handle_playing(); + + inline auto& get_practice_fixes() { return practice_fixes; } +}; \ No newline at end of file diff --git a/src/types.hpp b/src/types.hpp new file mode 100644 index 0000000..e54030d --- /dev/null +++ b/src/types.hpp @@ -0,0 +1,42 @@ +#pragma once +#include "includes.h" + +class PlayerObject : public gd::GameObject { + // sizeof(GameObject) = 0x468 +protected: + PAD(0x1C0); +public: + double y_accel; // + 0x628 +protected: + PAD(0x4C); +public: + float x_pos; // + 0x67C + float y_pos; +}; + +class LevelSettingsObject : public CCNode { +protected: + PAD(14); + bool two_player_mode; +public: + bool is_two_player() { return two_player_mode; } +}; + +class PlayLayer : public CCLayer { + PAD(0x108); + PlayerObject* player; + PlayerObject* player2; + + LevelSettingsObject* level_settings; + + PAD(0x16c); + + bool player_dead; +public: + auto get_player() { return player; } + auto get_player2() { return player2; } + + auto get_level_settings() { return level_settings; } + + auto is_player_dead() { return player_dead; } +}; \ No newline at end of file diff --git a/src/utils.hpp b/src/utils.hpp index 770bec3..9d6c091 100644 --- a/src/utils.hpp +++ b/src/utils.hpp @@ -1,16 +1,25 @@ #ifndef __UTILS_HPP #define __UTILS_HPP #include "includes.h" +#include template T cast(R const v) { return reinterpret_cast(v); } template -T* readPtr(uintptr_t addr) { return cast(addr); } +T* read_ptr(uintptr_t addr) { return cast(addr); } template -T read(uintptr_t addr) { return *readPtr(addr); } +T read(uintptr_t addr) { return *read_ptr(addr); } inline uintptr_t follow(uintptr_t addr) { return read(addr); } +inline void patch(void* loc, std::vector bytes) { + auto size = bytes.size(); + DWORD old_prot; + VirtualProtect(loc, size, PAGE_EXECUTE_READWRITE, &old_prot); + memcpy(loc, bytes.data(), size); + VirtualProtect(loc, size, old_prot, &old_prot); +} + #endif \ No newline at end of file From 0277b1f7646123870b680171e05962d310a7021d Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Fri, 2 Apr 2021 22:42:02 -0300 Subject: [PATCH 18/95] save and load --- src/Replay.cpp | 68 +++++++++++++++++++++++++++++++++++++++++++++++--- src/hooks.cpp | 10 ++++++++ 2 files changed, 75 insertions(+), 3 deletions(-) diff --git a/src/Replay.cpp b/src/Replay.cpp index 4d417ad..83e4319 100644 --- a/src/Replay.cpp +++ b/src/Replay.cpp @@ -1,4 +1,6 @@ #include "replay.hpp" +#include +#include "utils.hpp" void Replay::remove_actions_after(float x) { auto check = [&](const Action& action) -> bool { @@ -7,12 +9,72 @@ void Replay::remove_actions_after(float x) { actions.erase(std::remove_if(actions.begin(), actions.end(), check), actions.end()); } +// these two functions are so stupid +// why cant c++ do it for me :( + +template +inline void bin_write(std::ofstream& stream, T value) { + stream.write(cast(&value), sizeof(T)); +} + +template +inline T bin_read(std::ifstream& stream) { + T value; + stream.read(cast(&value), sizeof(T)); + return value; +} + +constexpr uint8_t format_ver = 1; +constexpr const char format_magic[5] = "RPLY"; + void Replay::save(const std::string& path) { - // lol + std::ofstream file; + file.open(path, std::ios::binary | std::ios::out); + file << format_magic << format_ver; + bin_write(file, fps); + for (const auto& action : actions) { + uint8_t state = action.hold | action.player2 << 1; + bin_write(file, action.x); + file << state; + } + file.close(); } Replay Replay::load(const std::string& path) { - Replay replay(60); - // bla bla do some stuff + Replay replay(0); + std::ifstream file; + file.open(path, std::ios::binary | std::ios::in); + + file.seekg(0, std::ios::end); + size_t file_size = static_cast(file.tellg()); + file.seekg(0); + + char magic[4]; + file.read(magic, 4); + if (memcmp(magic, format_magic, 4) == 0) { + auto ver = bin_read(file); + if (ver == 1) { + replay.fps = bin_read(file); + size_t left = file_size - static_cast(file.tellg()); + for (size_t _ = 0; _ < left / 5; ++_) { + float x = bin_read(file); + auto state = bin_read(file); + bool hold = state & 1; + bool player2 = state & 2; + replay.add_action({ x, hold, player2 }); + } + } + } else { + replay.fps = *reinterpret_cast(&magic); + size_t left = file_size - static_cast(file.tellg()); + for (size_t _ = 0; _ < left / 6; ++_) { + float x = bin_read(file); + bool hold = bin_read(file); + bool player2 = bin_read(file); + replay.add_action({ x, hold, player2 }); + } + } + file.close(); + return std::move(replay); } \ No newline at end of file diff --git a/src/hooks.cpp b/src/hooks.cpp index 5ef30ba..ffa8aac 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -142,6 +142,10 @@ class penisdick { rs->toggle_recording(); } else if (cast(this) == 2) { rs->toggle_playing(); + } else if (cast(this) == 3) { + rs->get_replay().save("zzzzjiodsjoisajd.replay"); + } else if (cast(this) == 4) { + rs->get_replay() = Replay::load("zzzzjiodsjoisajd.replay"); } } }; @@ -153,8 +157,14 @@ bool __fastcall Hooks::PauseLayer_init_H(gd::PauseLayer* self, int) { auto btn1 = gd::CCMenuItemSpriteExtra::create(sprite, cast(1), menu_selector(penisdick::thecallback)); auto btn2 = gd::CCMenuItemSpriteExtra::create(sprite, cast(2), menu_selector(penisdick::thecallback)); btn2->setPosition({50, 50}); + auto btn3 = gd::CCMenuItemSpriteExtra::create(sprite, cast(3), menu_selector(penisdick::thecallback)); + btn3->setPosition({70, 70}); + auto btn4 = gd::CCMenuItemSpriteExtra::create(sprite, cast(4), menu_selector(penisdick::thecallback)); + btn4->setPosition({90, 90}); menu->addChild(btn1); menu->addChild(btn2); + menu->addChild(btn3); + menu->addChild(btn4); self->addChild(menu); return true; } From 2600d6a2e7366a5df00df246da904aa9d757947b Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sun, 4 Apr 2021 17:33:45 -0300 Subject: [PATCH 19/95] overlay layer --- src/hooks.cpp | 33 ++--------- src/overlay_layer.cpp | 134 ++++++++++++++++++++++++++++++++++++++++++ src/overlay_layer.hpp | 36 ++++++++++++ 3 files changed, 174 insertions(+), 29 deletions(-) create mode 100644 src/overlay_layer.cpp create mode 100644 src/overlay_layer.hpp diff --git a/src/hooks.cpp b/src/hooks.cpp index ffa8aac..c49f163 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -1,5 +1,6 @@ #include "hooks.hpp" #include "replay_system.hpp" +#include "overlay_layer.hpp" auto add_gd_hook(uintptr_t offset, void* hook, void* orig) { return MH_CreateHook(cast(cast(gd::base) + offset), hook, cast(orig)); @@ -133,40 +134,14 @@ void* __fastcall Hooks::_PlayLayer::onEditor_H(PlayLayer* self, int, void* idk) return onEditor(self, idk); } -class penisdick { - public: - void thecallback(CCObject*) { - auto rs = ReplaySystem::get_instance(); - // amazing - if (cast(this) == 1) { - rs->toggle_recording(); - } else if (cast(this) == 2) { - rs->toggle_playing(); - } else if (cast(this) == 3) { - rs->get_replay().save("zzzzjiodsjoisajd.replay"); - } else if (cast(this) == 4) { - rs->get_replay() = Replay::load("zzzzjiodsjoisajd.replay"); - } - } -}; - bool __fastcall Hooks::PauseLayer_init_H(gd::PauseLayer* self, int) { if (PauseLayer_init(self)) { auto menu = CCMenu::create(); auto sprite = CCSprite::create("GJ_button_01.png"); - auto btn1 = gd::CCMenuItemSpriteExtra::create(sprite, cast(1), menu_selector(penisdick::thecallback)); - auto btn2 = gd::CCMenuItemSpriteExtra::create(sprite, cast(2), menu_selector(penisdick::thecallback)); - btn2->setPosition({50, 50}); - auto btn3 = gd::CCMenuItemSpriteExtra::create(sprite, cast(3), menu_selector(penisdick::thecallback)); - btn3->setPosition({70, 70}); - auto btn4 = gd::CCMenuItemSpriteExtra::create(sprite, cast(4), menu_selector(penisdick::thecallback)); - btn4->setPosition({90, 90}); - menu->addChild(btn1); - menu->addChild(btn2); - menu->addChild(btn3); - menu->addChild(btn4); + auto btn = gd::CCMenuItemSpriteExtra::create(sprite, self, menu_selector(OverlayLayer::open_btn_callback)); + menu->addChild(btn); self->addChild(menu); return true; } return false; -} \ No newline at end of file +} diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp new file mode 100644 index 0000000..21f2dc8 --- /dev/null +++ b/src/overlay_layer.cpp @@ -0,0 +1,134 @@ +#include "overlay_layer.hpp" +#include "replay_system.hpp" +#include + +bool OverlayLayer::init() { + if (!initWithColor({ 0, 0, 0, 105 })) return false; + + setZOrder(20); + + auto win_size = CCDirector::sharedDirector()->getWinSize(); + + auto menu = CCMenu::create(); + menu->setPosition({0, win_size.height}); + addChild(menu); + + this->registerWithTouchDispatcher(); + CCDirector::sharedDirector()->getTouchDispatcher()->incrementForcePrio(2); + + auto sprite = CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png"); + sprite->setScale(0.75f); + + auto btn = gd::CCMenuItemSpriteExtra::create(sprite, this, menu_selector(OverlayLayer::close_btn_callback)); + btn->setPosition({18, -18}); + menu->addChild(btn); + + sprite = CCSprite::create("GJ_button_01.png"); + sprite->setScale(0.72f); + + btn = gd::CCMenuItemSpriteExtra::create(sprite, this, menu_selector(OverlayLayer::on_record)); + btn->setPosition({35, -50}); + menu->addChild(btn); + + auto label = CCLabelBMFont::create("Record", "bigFont.fnt"); + label->setAnchorPoint({0, 0.5}); + label->setScale(0.8f); + label->setPosition({55, win_size.height - 50}); + addChild(label); + + btn = gd::CCMenuItemSpriteExtra::create(sprite, this, menu_selector(OverlayLayer::on_play)); + btn->setPosition({35, -85}); + menu->addChild(btn); + + label = CCLabelBMFont::create("Play", "bigFont.fnt"); + label->setAnchorPoint({0, 0.5}); + label->setScale(0.8f); + label->setPosition({55, win_size.height - 85}); + addChild(label); + + sprite = CCSprite::create("GJ_button_02.png"); + sprite->setScale(0.72f); + + btn = gd::CCMenuItemSpriteExtra::create(sprite, this, menu_selector(OverlayLayer::on_save)); + btn->setPosition({win_size.width - 35, -50}); + menu->addChild(btn); + + label = CCLabelBMFont::create("Save", "bigFont.fnt"); + label->setAnchorPoint({1, 0.5}); + label->setScale(0.8f); + label->setPosition({win_size.width - 55, win_size.height - 50}); + addChild(label); + + btn = gd::CCMenuItemSpriteExtra::create(sprite, this, menu_selector(OverlayLayer::on_load)); + btn->setPosition({win_size.width - 35, -85}); + menu->addChild(btn); + + label = CCLabelBMFont::create("Load", "bigFont.fnt"); + label->setAnchorPoint({1, 0.5}); + label->setScale(0.8f); + label->setPosition({win_size.width - 55, win_size.height - 85}); + addChild(label); + + sprite = CCSprite::create("square02b_001.png"); + sprite->setColor({0, 0, 0}); + sprite->setOpacity(69); + sprite->setPosition({110, win_size.height - 115}); + sprite->setScaleX(0.825f); + sprite->setScaleY(0.325f); + sprite->setZOrder(-1); + addChild(sprite); + + m_fps_input = gd::CCTextInputNode::create("fps", nullptr, "bigFont.fnt", 100.f, 100.f); + m_fps_input->setLabelPlaceholderColor({200, 200, 200}); + m_fps_input->setLabelPlaceholerScale(0.5f); + m_fps_input->setMaxLabelScale(0.7f); + m_fps_input->setMaxLabelLength(0); + m_fps_input->setAllowedChars("0123456789"); + m_fps_input->setMaxLabelLength(10); + m_fps_input->setPosition({110, win_size.height - 115}); + addChild(m_fps_input); + + label = CCLabelBMFont::create("FPS:", "bigFont.fnt"); + label->setAnchorPoint({0, 0.5f}); + label->setScale(0.7f); + label->setPosition({20, win_size.height - 115}); + addChild(label); + + m_replay_info = CCLabelBMFont::create("Current Replay:\nFPS: 69\nActions: 563", "chatFont.fnt"); + m_replay_info->setAnchorPoint({0, 1}); + m_replay_info->setPosition({20, win_size.height - 133}); + addChild(m_replay_info); + + setKeypadEnabled(true); + setTouchEnabled(true); + + return true; +} + +void OverlayLayer::on_record(CCObject*) { + ReplaySystem::get_instance()->toggle_recording(); +} + +void OverlayLayer::on_play(CCObject*) { + ReplaySystem::get_instance()->toggle_playing(); +} + +void OverlayLayer::on_save(CCObject*) { + nfdchar_t* path = nullptr; + auto result = NFD_SaveDialog("replay", nullptr, &path); + if (result == NFD_OKAY) { + ReplaySystem::get_instance()->get_replay().save(path); + gd::FLAlertLayer::create(nullptr, "Info", "Ok", nullptr, "Replay saved.")->show(); + free(path); + } +} + +void OverlayLayer::on_load(CCObject*) { + nfdchar_t* path = nullptr; + auto result = NFD_OpenDialog("replay", nullptr, &path); + if (result == NFD_OKAY) { + ReplaySystem::get_instance()->get_replay() = Replay::load(path); + gd::FLAlertLayer::create(nullptr, "Info", "Ok", nullptr, "Replay loaded.")->show(); + free(path); + } +} \ No newline at end of file diff --git a/src/overlay_layer.hpp b/src/overlay_layer.hpp new file mode 100644 index 0000000..5dcda17 --- /dev/null +++ b/src/overlay_layer.hpp @@ -0,0 +1,36 @@ +#pragma once +#include "includes.h" + +class OverlayLayer : public gd::FLAlertLayer { + gd::CCTextInputNode* m_fps_input; + CCLabelBMFont* m_replay_info; + +public: + static auto create() { + auto node = new OverlayLayer; + if (node && node->init()) { + node->autorelease(); + } else { + CC_SAFE_DELETE(node); + } + return node; + } + + virtual bool init(); + + void open_btn_callback(CCObject*) { + auto node = create(); + CCDirector::sharedDirector()->getRunningScene()->addChild(node); + } + + void close_btn_callback(CCObject*) { + this->setKeyboardEnabled(false); + this->removeFromParentAndCleanup(true); + } + + // maybe do like on_btn_record idk + void on_record(CCObject*); + void on_play(CCObject*); + void on_save(CCObject*); + void on_load(CCObject*); +}; \ No newline at end of file From d6860a6200b7f62bed937f3ae0bd889dbb523c0c Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sun, 4 Apr 2021 18:07:29 -0300 Subject: [PATCH 20/95] move button --- src/hooks.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/hooks.cpp b/src/hooks.cpp index c49f163..3788044 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -136,11 +136,22 @@ void* __fastcall Hooks::_PlayLayer::onEditor_H(PlayLayer* self, int, void* idk) bool __fastcall Hooks::PauseLayer_init_H(gd::PauseLayer* self, int) { if (PauseLayer_init(self)) { + auto win_size = CCDirector::sharedDirector()->getWinSize(); + auto menu = CCMenu::create(); + menu->setPosition(35, win_size.height - 40.f); + self->addChild(menu); + auto sprite = CCSprite::create("GJ_button_01.png"); + sprite->setScale(0.72f); auto btn = gd::CCMenuItemSpriteExtra::create(sprite, self, menu_selector(OverlayLayer::open_btn_callback)); menu->addChild(btn); - self->addChild(menu); + + auto label = CCLabelBMFont::create("ReplayBot", "bigFont.fnt"); + label->setAnchorPoint({0, 0.5}); + label->setScale(0.5f); + label->setPositionX(20); + menu->addChild(label); return true; } return false; From b836bbca42a818e5eb67ee0bc08d10551e62e1f6 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sun, 4 Apr 2021 20:05:39 -0300 Subject: [PATCH 21/95] update readme --- README.md | 34 +++++----------------------------- 1 file changed, 5 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index 608d271..a382a0d 100644 --- a/README.md +++ b/README.md @@ -6,34 +6,10 @@ Demo Video: -## Usage - -Replays are always stored in memory, to load one from a file click the load button. - -Once you have a replay in memory go to the level, press the play button and then the restart button. - -To record a replay press the record button and restart the level. Recordings use the default fps, to change it type `fps (number)` into the console (you can't change the fps while recording). -You can record with practice mode but sometimes it can still desync. - -Some sample replays are available on the `replays/` folder. - -## Converter - -The macro converted has been made into its own [website](https://matcool.github.io/gd-macro-converter/) - -```bash -# from replaybot to plain text -python converter.py replaybot myreplay.replay txt myreplay.txt -# txt back to replaybot -python converter.py txt myreplay.txt replaybot myreplay.replay -``` - ## TODO -- wasureta replay in `replays/` can randomly die at 26%, maybe the x pos gets unaligned? (i blame robtop) -- some replays converted from zbot have broken duals (i blame fig) -- support unicode save paths +- pressing space on the overlay crashes +- sometimes creating a file dialog crashes (how) - (?) make it more consistent - -## Credits -@AndreNIH for [CappuccinoSDK](https://github.com/AndreNIH/CappuccinoSDK) -and everyone in the GD Programming Discord for all the help +- rob uses a time function somewhere in the physics (why) +- frame advance (ez) +- wasureta replay in `replays/` can randomly die at 26%, maybe the x pos gets unaligned? (i blame robtop) \ No newline at end of file From 461fffebd3d36d735e345069feb6842a48f98dfb Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sun, 4 Apr 2021 22:34:49 -0300 Subject: [PATCH 22/95] frame advance --- src/hooks.cpp | 21 +++++++++++++++++++++ src/hooks.hpp | 1 + src/replay_system.hpp | 15 +++++++++++++-- 3 files changed, 35 insertions(+), 2 deletions(-) diff --git a/src/hooks.cpp b/src/hooks.cpp index 3788044..fec5136 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -14,6 +14,7 @@ auto add_cocos_hook(const char* symbol, void* hook, void* orig) { void Hooks::init() { ADD_COCOS_HOOK("?update@CCScheduler@cocos2d@@UAEXM@Z", CCScheduler_update); + ADD_COCOS_HOOK("?dispatchKeyboardMSG@CCKeyboardDispatcher@cocos2d@@QAE_NW4enumKeyCodes@2@_N@Z", CCKeyboardDispatcher_dispatchKeyboardMSG); ADD_GD_HOOK(0x1FB780, _PlayLayer::init); ADD_GD_HOOK(0x2029C0, _PlayLayer::update); @@ -44,6 +45,25 @@ void __fastcall Hooks::CCScheduler_update_H(CCScheduler* self, int, float dt) { CCScheduler_update(self, dt); } +void __fastcall Hooks::CCKeyboardDispatcher_dispatchKeyboardMSG_H(CCKeyboardDispatcher* self, int, int key, bool down) { + auto rs = ReplaySystem::get_instance(); + if (down) { + auto play_layer = cast(gd::GameManager::sharedState()->getPlayLayer()); + if (rs->is_recording() && play_layer) { + if (key == 'C') { + rs->set_frame_advance(false); + _PlayLayer::update_H(play_layer, 0, 1.f / rs->get_default_fps()); + rs->set_frame_advance(true); + } else if (key == 'F') { + rs->set_frame_advance(false); + } else if (key == 'R') { + _PlayLayer::resetLevel_H(play_layer, 0); + } + } + } + CCKeyboardDispatcher_dispatchKeyboardMSG(self, key, down); +} + bool __fastcall Hooks::_PlayLayer::init_H(PlayLayer* self, int, void* level) { return init(self, level); @@ -51,6 +71,7 @@ bool __fastcall Hooks::_PlayLayer::init_H(PlayLayer* self, int, void* level) { void __fastcall Hooks::_PlayLayer::update_H(PlayLayer* self, int, float dt) { auto rs = ReplaySystem::get_instance(); + if (rs->get_frame_advance()) return; if (rs->is_playing()) rs->handle_playing(); update(self, dt); diff --git a/src/hooks.hpp b/src/hooks.hpp index f538a34..5503b57 100644 --- a/src/hooks.hpp +++ b/src/hooks.hpp @@ -11,6 +11,7 @@ namespace Hooks { void init(); _THISCALL_HOOK(CCScheduler_update, void, CCScheduler, float dt) + _THISCALL_HOOK(CCKeyboardDispatcher_dispatchKeyboardMSG, void, CCKeyboardDispatcher, int key, bool down) // _ cuz yeah namespace _PlayLayer { diff --git a/src/replay_system.hpp b/src/replay_system.hpp index 28ad57c..ee4b661 100644 --- a/src/replay_system.hpp +++ b/src/replay_system.hpp @@ -21,6 +21,8 @@ class ReplaySystem { PracticeFixes practice_fixes; + bool frame_advance = false; + ReplaySystem() : default_fps(120.f), replay(default_fps) {} public: static ReplaySystem* get_instance() { @@ -36,9 +38,15 @@ class ReplaySystem { inline bool is_recording() { return state == RECORDING; } inline void toggle_playing() { state = is_playing() ? NOTHING : PLAYING; } - inline void toggle_recording() { state = is_recording() ? NOTHING : RECORDING; } + inline void toggle_recording() { + state = is_recording() ? NOTHING : RECORDING; + if (!is_recording()) frame_advance = false; + } - inline void reset_state() { state = NOTHING; } + inline void reset_state() { + state = NOTHING; + frame_advance = false; + } void record_action(bool hold, bool player1, bool flip = true); void play_action(const Action& action); @@ -48,4 +56,7 @@ class ReplaySystem { void handle_playing(); inline auto& get_practice_fixes() { return practice_fixes; } + + inline bool get_frame_advance() { return frame_advance; } + inline void set_frame_advance(bool b) { frame_advance = b; } }; \ No newline at end of file From d148876027f2493ed98d6e72e7064bc006d4e96e Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Mon, 5 Apr 2021 00:15:36 -0300 Subject: [PATCH 23/95] actually update default fps and info --- src/overlay_layer.cpp | 28 +++++++++++++++++++++++++++- src/overlay_layer.hpp | 10 +++++++--- src/replay_system.hpp | 1 + 3 files changed, 35 insertions(+), 4 deletions(-) diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index 21f2dc8..1493c03 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -1,6 +1,7 @@ #include "overlay_layer.hpp" #include "replay_system.hpp" #include +#include bool OverlayLayer::init() { if (!initWithColor({ 0, 0, 0, 105 })) return false; @@ -8,6 +9,7 @@ bool OverlayLayer::init() { setZOrder(20); auto win_size = CCDirector::sharedDirector()->getWinSize(); + auto rs = ReplaySystem::get_instance(); auto menu = CCMenu::create(); menu->setPosition({0, win_size.height}); @@ -79,6 +81,7 @@ bool OverlayLayer::init() { addChild(sprite); m_fps_input = gd::CCTextInputNode::create("fps", nullptr, "bigFont.fnt", 100.f, 100.f); + m_fps_input->setString(std::to_string(static_cast(rs->get_default_fps())).c_str()); m_fps_input->setLabelPlaceholderColor({200, 200, 200}); m_fps_input->setLabelPlaceholerScale(0.5f); m_fps_input->setMaxLabelScale(0.7f); @@ -94,9 +97,10 @@ bool OverlayLayer::init() { label->setPosition({20, win_size.height - 115}); addChild(label); - m_replay_info = CCLabelBMFont::create("Current Replay:\nFPS: 69\nActions: 563", "chatFont.fnt"); + m_replay_info = CCLabelBMFont::create("", "chatFont.fnt"); m_replay_info->setAnchorPoint({0, 1}); m_replay_info->setPosition({20, win_size.height - 133}); + update_info_text(); addChild(m_replay_info); setKeypadEnabled(true); @@ -105,8 +109,24 @@ bool OverlayLayer::init() { return true; } +void OverlayLayer::update_info_text() { + auto rs = ReplaySystem::get_instance(); + auto& replay = rs->get_replay(); + std::stringstream stream; + stream << "Current Replay:\nFPS: " << replay.get_fps() << "\nActions: " << replay.get_actions().size(); + m_replay_info->setString(stream.str().c_str()); +} + +void OverlayLayer::_update_default_fps() { + auto text = m_fps_input->getString(); + if (text[0]) + ReplaySystem::get_instance()->set_default_fps(std::stof(text)); +} + void OverlayLayer::on_record(CCObject*) { + _update_default_fps(); ReplaySystem::get_instance()->toggle_recording(); + update_info_text(); } void OverlayLayer::on_play(CCObject*) { @@ -128,7 +148,13 @@ void OverlayLayer::on_load(CCObject*) { auto result = NFD_OpenDialog("replay", nullptr, &path); if (result == NFD_OKAY) { ReplaySystem::get_instance()->get_replay() = Replay::load(path); + update_info_text(); gd::FLAlertLayer::create(nullptr, "Info", "Ok", nullptr, "Replay loaded.")->show(); free(path); } +} + +void OverlayLayer::keyBackClicked() { + _update_default_fps(); + gd::FLAlertLayer::keyBackClicked(); } \ No newline at end of file diff --git a/src/overlay_layer.hpp b/src/overlay_layer.hpp index 5dcda17..28747d8 100644 --- a/src/overlay_layer.hpp +++ b/src/overlay_layer.hpp @@ -1,10 +1,11 @@ #pragma once #include "includes.h" -class OverlayLayer : public gd::FLAlertLayer { +class OverlayLayer : public gd::FLAlertLayer, public CCTextFieldDelegate { gd::CCTextInputNode* m_fps_input; CCLabelBMFont* m_replay_info; + inline void _update_default_fps(); public: static auto create() { auto node = new OverlayLayer; @@ -18,14 +19,15 @@ class OverlayLayer : public gd::FLAlertLayer { virtual bool init(); + void update_info_text(); + void open_btn_callback(CCObject*) { auto node = create(); CCDirector::sharedDirector()->getRunningScene()->addChild(node); } void close_btn_callback(CCObject*) { - this->setKeyboardEnabled(false); - this->removeFromParentAndCleanup(true); + keyBackClicked(); } // maybe do like on_btn_record idk @@ -33,4 +35,6 @@ class OverlayLayer : public gd::FLAlertLayer { void on_play(CCObject*); void on_save(CCObject*); void on_load(CCObject*); + + virtual void keyBackClicked(); }; \ No newline at end of file diff --git a/src/replay_system.hpp b/src/replay_system.hpp index ee4b661..d3ede0a 100644 --- a/src/replay_system.hpp +++ b/src/replay_system.hpp @@ -41,6 +41,7 @@ class ReplaySystem { inline void toggle_recording() { state = is_recording() ? NOTHING : RECORDING; if (!is_recording()) frame_advance = false; + else replay = Replay(default_fps); } inline void reset_state() { From 8780ab0ce39e1494d8ca911634c2d98eea53320e Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Mon, 5 Apr 2021 10:27:24 -0300 Subject: [PATCH 24/95] fix spacebar crash --- README.md | 1 - src/overlay_layer.hpp | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index a382a0d..0c1a134 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,6 @@ Demo Video: ## TODO -- pressing space on the overlay crashes - sometimes creating a file dialog crashes (how) - (?) make it more consistent - rob uses a time function somewhere in the physics (why) diff --git a/src/overlay_layer.hpp b/src/overlay_layer.hpp index 28747d8..f7a2d22 100644 --- a/src/overlay_layer.hpp +++ b/src/overlay_layer.hpp @@ -37,4 +37,5 @@ class OverlayLayer : public gd::FLAlertLayer, public CCTextFieldDelegate { void on_load(CCObject*); virtual void keyBackClicked(); + virtual void keyDown(enumKeyCodes key) {} }; \ No newline at end of file From ca3b5966ac6644b166ff9f2d5a11dbb7f449d8b7 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Mon, 5 Apr 2021 10:33:28 -0300 Subject: [PATCH 25/95] update readme --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0c1a134..d5a3321 100644 --- a/README.md +++ b/README.md @@ -10,5 +10,9 @@ Demo Video: - sometimes creating a file dialog crashes (how) - (?) make it more consistent - rob uses a time function somewhere in the physics (why) -- frame advance (ez) -- wasureta replay in `replays/` can randomly die at 26%, maybe the x pos gets unaligned? (i blame robtop) \ No newline at end of file +- wasureta replay in `replays/` can randomly die at 26%, maybe the x pos gets unaligned? (i blame robtop) + +## Credits +- [Andre](https://github.com/AndreNIH) for [CappuccinoSDK](https://github.com/AndreNIH/CappuccinoSDK) +- [pie](https://github.com/PoweredByPie) for [gd.h](https://github.com/PoweredByPie/gd.h) +- [Camden314](https://github.com/camden314) and Andre for a lot of the addresses and offsets \ No newline at end of file From 339b02f7f8d29dee3f3cc8c8ada94fcb1625a193 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Mon, 5 Apr 2021 11:36:32 -0300 Subject: [PATCH 26/95] add .replay extension --- src/overlay_layer.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index 1493c03..81f105f 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -137,7 +137,9 @@ void OverlayLayer::on_save(CCObject*) { nfdchar_t* path = nullptr; auto result = NFD_SaveDialog("replay", nullptr, &path); if (result == NFD_OKAY) { - ReplaySystem::get_instance()->get_replay().save(path); + std::string s_path(path); + // why doesnt it just add the extension for me + ReplaySystem::get_instance()->get_replay().save(s_path + ".replay"); gd::FLAlertLayer::create(nullptr, "Info", "Ok", nullptr, "Replay saved.")->show(); free(path); } From 37a9c6368d15cae4fd896752afb7c51d857de349 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Mon, 5 Apr 2021 11:37:03 -0300 Subject: [PATCH 27/95] fix keyBackClicked --- src/overlay_layer.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/overlay_layer.hpp b/src/overlay_layer.hpp index f7a2d22..b59292f 100644 --- a/src/overlay_layer.hpp +++ b/src/overlay_layer.hpp @@ -37,5 +37,8 @@ class OverlayLayer : public gd::FLAlertLayer, public CCTextFieldDelegate { void on_load(CCObject*); virtual void keyBackClicked(); - virtual void keyDown(enumKeyCodes key) {} + virtual void keyDown(enumKeyCodes key) { + // keyDown overwrites keyBackClicked, how fun + if (key == 27) keyBackClicked(); + } }; \ No newline at end of file From 511acb301cd45e2ee130773c4a4b827a30e5583c Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Mon, 5 Apr 2021 17:15:37 -0300 Subject: [PATCH 28/95] show warnings on replay overwrite --- src/overlay_layer.cpp | 50 ++++++++++++++++++++++++++++++++++++++++--- src/overlay_layer.hpp | 4 +++- 2 files changed, 50 insertions(+), 4 deletions(-) diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index 81f105f..5d96efd 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -123,10 +123,39 @@ void OverlayLayer::_update_default_fps() { ReplaySystem::get_instance()->set_default_fps(std::stof(text)); } +void OverlayLayer::FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2) { + if (!btn2) { + auto rs = ReplaySystem::get_instance(); + int tag = alert->getTag(); + if (tag == 1) { + rs->toggle_recording(); + update_info_text(); + } else if (tag == 2) { + _handle_load_replay(); + } + update_info_text(); + } +} + void OverlayLayer::on_record(CCObject*) { _update_default_fps(); - ReplaySystem::get_instance()->toggle_recording(); - update_info_text(); + auto rs = ReplaySystem::get_instance(); + if (!rs->is_recording()) { + if (rs->get_replay().get_actions().empty()) { + rs->toggle_recording(); + update_info_text(); + } else { + auto alert = gd::FLAlertLayer::create(this, + "Warning", + "Ok", + "Cancel", + "This will overwrite your currently loaded replay."); + alert->setTag(1); + alert->show(); + } + } else { + rs->toggle_recording(); + } } void OverlayLayer::on_play(CCObject*) { @@ -145,7 +174,7 @@ void OverlayLayer::on_save(CCObject*) { } } -void OverlayLayer::on_load(CCObject*) { +void OverlayLayer::_handle_load_replay() { nfdchar_t* path = nullptr; auto result = NFD_OpenDialog("replay", nullptr, &path); if (result == NFD_OKAY) { @@ -156,6 +185,21 @@ void OverlayLayer::on_load(CCObject*) { } } +void OverlayLayer::on_load(CCObject*) { + auto rs = ReplaySystem::get_instance(); + if (rs->get_replay().get_actions().empty()) { + _handle_load_replay(); + } else { + auto alert = gd::FLAlertLayer::create(this, + "Warning", + "Ok", + "Cancel", + "This will overwrite your currently loaded replay."); + alert->setTag(2); + alert->show(); + } +} + void OverlayLayer::keyBackClicked() { _update_default_fps(); gd::FLAlertLayer::keyBackClicked(); diff --git a/src/overlay_layer.hpp b/src/overlay_layer.hpp index b59292f..6fd6605 100644 --- a/src/overlay_layer.hpp +++ b/src/overlay_layer.hpp @@ -1,11 +1,12 @@ #pragma once #include "includes.h" -class OverlayLayer : public gd::FLAlertLayer, public CCTextFieldDelegate { +class OverlayLayer : public gd::FLAlertLayer, public CCTextFieldDelegate, public gd::FLAlertLayerProtocol { gd::CCTextInputNode* m_fps_input; CCLabelBMFont* m_replay_info; inline void _update_default_fps(); + void _handle_load_replay(); public: static auto create() { auto node = new OverlayLayer; @@ -41,4 +42,5 @@ class OverlayLayer : public gd::FLAlertLayer, public CCTextFieldDelegate { // keyDown overwrites keyBackClicked, how fun if (key == 27) keyBackClicked(); } + virtual void FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2); }; \ No newline at end of file From d1649171b82c3ee8cdeb0dc3e0ea26f88a70c563 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Mon, 5 Apr 2021 19:24:52 -0300 Subject: [PATCH 29/95] status label --- src/replay_system.cpp | 34 ++++++++++++++++++++++++++++++++++ src/replay_system.hpp | 6 +++++- 2 files changed, 39 insertions(+), 1 deletion(-) diff --git a/src/replay_system.cpp b/src/replay_system.cpp index 0cd8539..ec9bdfa 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -48,4 +48,38 @@ void ReplaySystem::handle_playing() { if (action_index >= actions.size()) toggle_playing(); } +} + +// why here out of all places? idk + +constexpr int STATUS_LABEL_TAG = 10032; + +auto _create_status_label(PlayLayer* play_layer) { + auto label = CCLabelBMFont::create("", "chatFont.fnt"); + label->setTag(STATUS_LABEL_TAG); + label->setAnchorPoint({0, 0}); + label->setPosition({5, 5}); + label->setZOrder(999); + play_layer->addChild(label); + return label; +} + +void ReplaySystem::_update_status_label() { + auto play_layer = cast(gd::GameManager::sharedState()->getPlayLayer()); + if (play_layer) { + auto label = cast(play_layer->getChildByTag(10032)); + if (!label) + label = _create_status_label(play_layer); + switch (state) { + case NOTHING: + label->setString(""); + break; + case RECORDING: + label->setString("Recording"); + break; + case PLAYING: + label->setString("Playing"); + break; + } + } } \ No newline at end of file diff --git a/src/replay_system.hpp b/src/replay_system.hpp index d3ede0a..47afea9 100644 --- a/src/replay_system.hpp +++ b/src/replay_system.hpp @@ -24,6 +24,8 @@ class ReplaySystem { bool frame_advance = false; ReplaySystem() : default_fps(120.f), replay(default_fps) {} + + void _update_status_label(); public: static ReplaySystem* get_instance() { if (!instance) instance = new ReplaySystem(); @@ -37,16 +39,18 @@ class ReplaySystem { inline bool is_playing() { return state == PLAYING; } inline bool is_recording() { return state == RECORDING; } - inline void toggle_playing() { state = is_playing() ? NOTHING : PLAYING; } + inline void toggle_playing() { state = is_playing() ? NOTHING : PLAYING; _update_status_label(); } inline void toggle_recording() { state = is_recording() ? NOTHING : RECORDING; if (!is_recording()) frame_advance = false; else replay = Replay(default_fps); + _update_status_label(); } inline void reset_state() { state = NOTHING; frame_advance = false; + _update_status_label(); } void record_action(bool hold, bool player1, bool flip = true); From 7a0baed2899aab35bd9c37cfdaf2c76899796910 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Fri, 30 Apr 2021 21:32:01 -0300 Subject: [PATCH 30/95] cleanup --- CMakeLists.txt | 24 ++++++++++-------------- src/replay_system.hpp | 9 ++++++--- 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3e51833..dc4654f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) -project(replay-bot VERSION 1.0.0) +project(replay-bot) find_file(WINDOWS_HEADER windows.h) if(NOT WINDOWS_HEADER) @@ -13,32 +13,28 @@ endif() file( GLOB_RECURSE SOURCE_FILES src/*.cpp - # nice - libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/custom/Sprites/CCMenuItemSpriteExtra/CCMenuItemSpriteExtra.cpp libraries/nfd/src/nfd_common.c libraries/nfd/src/nfd_win.cpp ) add_library(replay-bot SHARED ${SOURCE_FILES}) +set(CAPPUCCINO_DIR ${CMAKE_SOURCE_DIR}/libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk) + target_include_directories(replay-bot PRIVATE libraries/gd.h/include libraries/gd.h libraries/minhook/include libraries/nfd/src/include - libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/ - libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/include - libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/kazmath/include - libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/platform/win32 - libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/platform/third_party/win32 - libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/incl/cocos2dx/platform/third_party/win32/OGLES + ${CAPPUCCINO_DIR}/incl/cocos2dx/ + ${CAPPUCCINO_DIR}/incl/cocos2dx/include + ${CAPPUCCINO_DIR}/incl/cocos2dx/kazmath/include + ${CAPPUCCINO_DIR}/incl/cocos2dx/platform/win32 + ${CAPPUCCINO_DIR}/incl/cocos2dx/platform/third_party/win32 + ${CAPPUCCINO_DIR}/incl/cocos2dx/platform/third_party/win32/OGLES ) add_subdirectory(libraries/minhook) # TODO: make it not build minhook every time target_link_libraries(replay-bot minhook) -target_link_libraries(replay-bot ${CMAKE_SOURCE_DIR}/libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk/lib/cappuccino.lib) - -set_target_properties(replay-bot PROPERTIES PREFIX "") -set(CPACK_PROJECT_NAME ${PROJECT_NAME}) -set(CPACK_PROJECT_VERSION ${PROJECT_VERSION}) \ No newline at end of file +target_link_libraries(replay-bot ${CAPPUCCINO_DIR}/lib/cappuccino.lib) \ No newline at end of file diff --git a/src/replay_system.hpp b/src/replay_system.hpp index 47afea9..beff911 100644 --- a/src/replay_system.hpp +++ b/src/replay_system.hpp @@ -39,15 +39,18 @@ class ReplaySystem { inline bool is_playing() { return state == PLAYING; } inline bool is_recording() { return state == RECORDING; } - inline void toggle_playing() { state = is_playing() ? NOTHING : PLAYING; _update_status_label(); } - inline void toggle_recording() { + void toggle_playing() { + state = is_playing() ? NOTHING : PLAYING; + _update_status_label(); + } + void toggle_recording() { state = is_recording() ? NOTHING : RECORDING; if (!is_recording()) frame_advance = false; else replay = Replay(default_fps); _update_status_label(); } - inline void reset_state() { + void reset_state() { state = NOTHING; frame_advance = false; _update_status_label(); From f453fe571fa3ce92fd4b681d87ee1b4957706bda Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sat, 1 May 2021 13:21:46 -0300 Subject: [PATCH 31/95] better holding --- src/hooks.cpp | 1 - src/practice_fixes.hpp | 3 --- src/replay_system.cpp | 7 +++++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/hooks.cpp b/src/hooks.cpp index fec5136..441d7e0 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -83,7 +83,6 @@ bool _player_button_handler(bool hold, bool button) { auto rs = ReplaySystem::get_instance(); if (rs->is_playing()) return true; rs->record_action(hold, button); - rs->get_practice_fixes().set_holding(hold); } return false; } diff --git a/src/practice_fixes.hpp b/src/practice_fixes.hpp index 1b09592..c0e4a30 100644 --- a/src/practice_fixes.hpp +++ b/src/practice_fixes.hpp @@ -22,11 +22,8 @@ struct Checkpoint { class PracticeFixes { std::stack checkpoints; - bool holding; public: PracticeFixes() {} - bool is_holding() { return holding; } - void set_holding(bool h) { holding = h; } void add_checkpoint() { auto play_layer = cast(gd::GameManager::sharedState()->getPlayLayer()); diff --git a/src/replay_system.cpp b/src/replay_system.cpp index ec9bdfa..b280f42 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -28,8 +28,11 @@ void ReplaySystem::on_reset() { Hooks::_PlayLayer::releaseButton(play_layer, 0, true); action_index = 0; } else if (is_recording()) { - get_replay().remove_actions_after(play_layer->get_player()->x_pos); - record_action(practice_fixes.is_holding(), true, false); + replay.remove_actions_after(play_layer->get_player()->x_pos); + const auto& actions = replay.get_actions(); + bool holding = *cast(cast(play_layer->get_player()) + 0x611); + if ((holding && actions.empty()) || (!actions.empty() && actions.back().hold != holding)) + record_action(holding, true, false); if (play_layer->get_level_settings()->is_two_player()) record_action(false, false, false); practice_fixes.apply_checkpoint(); From 95b6039c6273a6197891f63f1c259fbe4d8ef216 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sat, 1 May 2021 22:27:46 -0300 Subject: [PATCH 32/95] better holding from reset --- src/practice_fixes.hpp | 4 +++- src/replay_system.cpp | 12 +++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/practice_fixes.hpp b/src/practice_fixes.hpp index c0e4a30..63770df 100644 --- a/src/practice_fixes.hpp +++ b/src/practice_fixes.hpp @@ -6,8 +6,9 @@ struct CheckpointData { double y_accel; float rotation; + bool buffer_orb; static CheckpointData from_player(PlayerObject* player) { - return { player->y_accel, player->getRotation() }; + return { player->y_accel, player->getRotation(), *cast(cast(player) + 0x612) }; }; void apply(PlayerObject* player) { player->y_accel = y_accel; @@ -22,6 +23,7 @@ struct Checkpoint { class PracticeFixes { std::stack checkpoints; + friend class ReplaySystem; public: PracticeFixes() {} diff --git a/src/replay_system.cpp b/src/replay_system.cpp index b280f42..9dcc92c 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -31,8 +31,18 @@ void ReplaySystem::on_reset() { replay.remove_actions_after(play_layer->get_player()->x_pos); const auto& actions = replay.get_actions(); bool holding = *cast(cast(play_layer->get_player()) + 0x611); - if ((holding && actions.empty()) || (!actions.empty() && actions.back().hold != holding)) + if ((holding && actions.empty()) || (!actions.empty() && actions.back().hold != holding)) { record_action(holding, true, false); + if (holding) { + auto buffer_thing = cast(cast(play_layer->get_player()) + 0x612); + Hooks::_PlayLayer::releaseButton(play_layer, 0, true); + Hooks::_PlayLayer::pushButton(play_layer, 0, true); + *buffer_thing = true; + } + } else if (!actions.empty() && actions.back().hold && holding && !practice_fixes.checkpoints.empty() && practice_fixes.checkpoints.top().player1.buffer_orb) { + Hooks::_PlayLayer::releaseButton(play_layer, 0, true); + Hooks::_PlayLayer::pushButton(play_layer, 0, true); + } if (play_layer->get_level_settings()->is_two_player()) record_action(false, false, false); practice_fixes.apply_checkpoint(); From 345bb88944dc5b8b5fb0b551a7aa1a610026c987 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sat, 8 May 2021 21:09:23 -0300 Subject: [PATCH 33/95] save activated objects --- src/hooks.cpp | 20 ++++++++++++++++++++ src/hooks.hpp | 3 +++ src/practice_fixes.hpp | 17 +++++++++++++++-- src/replay_system.cpp | 12 ++++++++++++ 4 files changed, 50 insertions(+), 2 deletions(-) diff --git a/src/hooks.cpp b/src/hooks.cpp index 441d7e0..948e2d6 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -33,6 +33,9 @@ void Hooks::init() { ADD_GD_HOOK(0x1E60E0, _PlayLayer::onEditor); ADD_GD_HOOK(0x1E4620, PauseLayer_init); + + ADD_GD_HOOK(0x1f4ff0, PlayerObject_ringJump); + ADD_GD_HOOK(0xef0e0, GameObject_activateObject); } void __fastcall Hooks::CCScheduler_update_H(CCScheduler* self, int, float dt) { @@ -176,3 +179,20 @@ bool __fastcall Hooks::PauseLayer_init_H(gd::PauseLayer* self, int) { } return false; } + +void __fastcall Hooks::PlayerObject_ringJump_H(gd::PlayerObject* self, int, gd::GameObject* ring) { + PlayerObject_ringJump(self, ring); + auto rs = ReplaySystem::get_instance(); + if (rs->is_recording() && *cast(cast(ring) + 0x2ca)) { + rs->get_practice_fixes().add_activated_object(ring); + } +} + +void __fastcall Hooks::GameObject_activateObject_H(gd::GameObject* self, int, gd::PlayerObject* player) { + GameObject_activateObject(self, player); + auto rs = ReplaySystem::get_instance(); + // need to check if its on practice mode duh + if (rs->is_recording() && *cast(cast(self) + 0x2ca)) { + rs->get_practice_fixes().add_activated_object(self); + } +} \ No newline at end of file diff --git a/src/hooks.hpp b/src/hooks.hpp index 5503b57..5fa6765 100644 --- a/src/hooks.hpp +++ b/src/hooks.hpp @@ -35,4 +35,7 @@ namespace Hooks { } _THISCALL_HOOK(PauseLayer_init, bool, gd::PauseLayer) + + _THISCALL_HOOK(PlayerObject_ringJump, void, gd::PlayerObject, gd::GameObject* ring) + _THISCALL_HOOK(GameObject_activateObject, void, gd::GameObject, gd::PlayerObject* player) } \ No newline at end of file diff --git a/src/practice_fixes.hpp b/src/practice_fixes.hpp index 63770df..65f3e3f 100644 --- a/src/practice_fixes.hpp +++ b/src/practice_fixes.hpp @@ -19,10 +19,12 @@ struct CheckpointData { struct Checkpoint { CheckpointData player1; CheckpointData player2; + size_t activated_objects_size; }; class PracticeFixes { std::stack checkpoints; + std::vector activated_objects; friend class ReplaySystem; public: PracticeFixes() {} @@ -31,13 +33,20 @@ class PracticeFixes { auto play_layer = cast(gd::GameManager::sharedState()->getPlayLayer()); checkpoints.push({ CheckpointData::from_player(play_layer->get_player()), - CheckpointData::from_player(play_layer->get_player2()) + CheckpointData::from_player(play_layer->get_player2()), + activated_objects.size() }); } void remove_checkpoint() { - if (!checkpoints.empty()) + if (!checkpoints.empty()) { checkpoints.pop(); + if (checkpoints.empty()) { + activated_objects.clear(); + } else { + activated_objects.erase(activated_objects.begin() + checkpoints.top().activated_objects_size, activated_objects.end()); + } + } } void apply_checkpoint() { @@ -53,4 +62,8 @@ class PracticeFixes { while (!checkpoints.empty()) checkpoints.pop(); } + + void add_activated_object(gd::GameObject* object) { + activated_objects.push_back(object); + } }; \ No newline at end of file diff --git a/src/replay_system.cpp b/src/replay_system.cpp index 9dcc92c..6aa458b 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -29,6 +29,18 @@ void ReplaySystem::on_reset() { action_index = 0; } else if (is_recording()) { replay.remove_actions_after(play_layer->get_player()->x_pos); + auto& activated_objects = practice_fixes.activated_objects; + if (practice_fixes.checkpoints.empty()) { + activated_objects.clear(); + } else { + activated_objects.erase( + activated_objects.begin() + practice_fixes.checkpoints.top().activated_objects_size, + activated_objects.end() + ); + for (const auto object : activated_objects) { + *cast(cast(object) + 0x2ca) = true; + } + } const auto& actions = replay.get_actions(); bool holding = *cast(cast(play_layer->get_player()) + 0x611); if ((holding && actions.empty()) || (!actions.empty() && actions.back().hold != holding)) { From 8ebb5c52866d11aa951307dbb1a6b8976f65e707 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sat, 8 May 2021 21:12:34 -0300 Subject: [PATCH 34/95] switch to my own gd.h fork --- .gitmodules | 2 +- libraries/gd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitmodules b/.gitmodules index 0fcb170..dee3473 100644 --- a/.gitmodules +++ b/.gitmodules @@ -6,7 +6,7 @@ url = https://github.com/TsudaKageyu/minhook.git [submodule "libraries/gd.h"] path = libraries/gd.h - url = https://github.com/poweredbypie/gd.h.git + url = git@github.com:matcool/gd.h.git [submodule "libraries/nfd"] path = libraries/nfd url = https://github.com/mlabbe/nativefiledialog diff --git a/libraries/gd.h b/libraries/gd.h index 6e2c456..76f7f08 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit 6e2c4569ee323a255a567e4439c65e8ca1e0ee24 +Subproject commit 76f7f080246890445e9ecce768846fe292ed9ae2 From f8a8b67c1d6f9acf16584fa9440a6981e8f9e0c6 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sat, 8 May 2021 22:50:00 -0300 Subject: [PATCH 35/95] update gd.h --- libraries/gd.h | 2 +- src/hooks.cpp | 59 +++++++++++++++++++++--------------------- src/hooks.hpp | 26 +++++++++---------- src/practice_fixes.hpp | 25 +++++++++--------- src/replay_system.cpp | 44 +++++++++++++++---------------- src/types.hpp | 42 ------------------------------ 6 files changed, 76 insertions(+), 122 deletions(-) delete mode 100644 src/types.hpp diff --git a/libraries/gd.h b/libraries/gd.h index 76f7f08..6e57c6b 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit 76f7f080246890445e9ecce768846fe292ed9ae2 +Subproject commit 6e57c6b50f4de392dd1b42730da15304a9324f7b diff --git a/src/hooks.cpp b/src/hooks.cpp index 948e2d6..c55237e 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -3,7 +3,7 @@ #include "overlay_layer.hpp" auto add_gd_hook(uintptr_t offset, void* hook, void* orig) { - return MH_CreateHook(cast(cast(gd::base) + offset), hook, cast(orig)); + return MH_CreateHook(cast(gd::base + offset), hook, cast(orig)); } #define ADD_GD_HOOK(o, f) add_gd_hook(o, f##_H, &f) @@ -16,21 +16,21 @@ void Hooks::init() { ADD_COCOS_HOOK("?update@CCScheduler@cocos2d@@UAEXM@Z", CCScheduler_update); ADD_COCOS_HOOK("?dispatchKeyboardMSG@CCKeyboardDispatcher@cocos2d@@QAE_NW4enumKeyCodes@2@_N@Z", CCKeyboardDispatcher_dispatchKeyboardMSG); - ADD_GD_HOOK(0x1FB780, _PlayLayer::init); - ADD_GD_HOOK(0x2029C0, _PlayLayer::update); + ADD_GD_HOOK(0x1FB780, PlayLayer::init); + ADD_GD_HOOK(0x2029C0, PlayLayer::update); - ADD_GD_HOOK(0x111500, _PlayLayer::pushButton); - ADD_GD_HOOK(0x111660, _PlayLayer::releaseButton); - ADD_GD_HOOK(0x20BF00, _PlayLayer::resetLevel); + ADD_GD_HOOK(0x111500, PlayLayer::pushButton); + ADD_GD_HOOK(0x111660, PlayLayer::releaseButton); + ADD_GD_HOOK(0x20BF00, PlayLayer::resetLevel); - ADD_GD_HOOK(0x20D3C0, _PlayLayer::pauseGame); + ADD_GD_HOOK(0x20D3C0, PlayLayer::pauseGame); - ADD_GD_HOOK(0x20B050, _PlayLayer::createCheckpoint); - ADD_GD_HOOK(0x20B830, _PlayLayer::removeLastCheckpoint); + ADD_GD_HOOK(0x20B050, PlayLayer::createCheckpoint); + ADD_GD_HOOK(0x20B830, PlayLayer::removeLastCheckpoint); - ADD_GD_HOOK(0x1FD3D0, _PlayLayer::levelComplete); - ADD_GD_HOOK(0x20D810, _PlayLayer::onQuit); - ADD_GD_HOOK(0x1E60E0, _PlayLayer::onEditor); + ADD_GD_HOOK(0x1FD3D0, PlayLayer::levelComplete); + ADD_GD_HOOK(0x20D810, PlayLayer::onQuit); + ADD_GD_HOOK(0x1E60E0, PlayLayer::onEditor); ADD_GD_HOOK(0x1E4620, PauseLayer_init); @@ -51,16 +51,16 @@ void __fastcall Hooks::CCScheduler_update_H(CCScheduler* self, int, float dt) { void __fastcall Hooks::CCKeyboardDispatcher_dispatchKeyboardMSG_H(CCKeyboardDispatcher* self, int, int key, bool down) { auto rs = ReplaySystem::get_instance(); if (down) { - auto play_layer = cast(gd::GameManager::sharedState()->getPlayLayer()); + auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); if (rs->is_recording() && play_layer) { if (key == 'C') { rs->set_frame_advance(false); - _PlayLayer::update_H(play_layer, 0, 1.f / rs->get_default_fps()); + PlayLayer::update_H(play_layer, 0, 1.f / rs->get_default_fps()); rs->set_frame_advance(true); } else if (key == 'F') { rs->set_frame_advance(false); } else if (key == 'R') { - _PlayLayer::resetLevel_H(play_layer, 0); + PlayLayer::resetLevel_H(play_layer, 0); } } } @@ -68,11 +68,11 @@ void __fastcall Hooks::CCKeyboardDispatcher_dispatchKeyboardMSG_H(CCKeyboardDisp } -bool __fastcall Hooks::_PlayLayer::init_H(PlayLayer* self, int, void* level) { +bool __fastcall Hooks::PlayLayer::init_H(gd::PlayLayer* self, int, void* level) { return init(self, level); } -void __fastcall Hooks::_PlayLayer::update_H(PlayLayer* self, int, float dt) { +void __fastcall Hooks::PlayLayer::update_H(gd::PlayLayer* self, int, float dt) { auto rs = ReplaySystem::get_instance(); if (rs->get_frame_advance()) return; if (rs->is_playing()) @@ -90,24 +90,24 @@ bool _player_button_handler(bool hold, bool button) { return false; } -int __fastcall Hooks::_PlayLayer::pushButton_H(PlayLayer* self, int, int idk, bool button) { +int __fastcall Hooks::PlayLayer::pushButton_H(gd::PlayLayer* self, int, int idk, bool button) { if (_player_button_handler(true, button)) return 0; return pushButton(self, idk, button); } -int __fastcall Hooks::_PlayLayer::releaseButton_H(PlayLayer* self, int, int idk, bool button) { +int __fastcall Hooks::PlayLayer::releaseButton_H(gd::PlayLayer* self, int, int idk, bool button) { if (_player_button_handler(false, button)) return 0; return releaseButton(self, idk, button); } -int __fastcall Hooks::_PlayLayer::resetLevel_H(PlayLayer* self, int) { +int __fastcall Hooks::PlayLayer::resetLevel_H(gd::PlayLayer* self, int) { auto ret = resetLevel(self); ReplaySystem::get_instance()->on_reset(); return ret; } -void __fastcall Hooks::_PlayLayer::pauseGame_H(PlayLayer* self, int, bool idk) { +void __fastcall Hooks::PlayLayer::pauseGame_H(gd::PlayLayer* self, int, bool idk) { auto addr = cast(gd::base + 0x20D43C); auto rs = ReplaySystem::get_instance(); if (rs->is_recording()) @@ -124,19 +124,19 @@ void __fastcall Hooks::_PlayLayer::pauseGame_H(PlayLayer* self, int, bool idk) { } -int __fastcall Hooks::_PlayLayer::createCheckpoint_H(PlayLayer* self, int) { +int __fastcall Hooks::PlayLayer::createCheckpoint_H(gd::PlayLayer* self, int) { auto rs = ReplaySystem::get_instance(); if (rs->is_recording()) rs->get_practice_fixes().add_checkpoint(); return createCheckpoint(self); } -void* __fastcall Hooks::_PlayLayer::removeLastCheckpoint_H(PlayLayer* self, int) { +void* __fastcall Hooks::PlayLayer::removeLastCheckpoint_H(gd::PlayLayer* self, int) { ReplaySystem::get_instance()->get_practice_fixes().remove_checkpoint(); return removeLastCheckpoint(self); } -void* __fastcall Hooks::_PlayLayer::levelComplete_H(PlayLayer* self, int) { +void* __fastcall Hooks::PlayLayer::levelComplete_H(gd::PlayLayer* self, int) { ReplaySystem::get_instance()->reset_state(); return levelComplete(self); } @@ -147,12 +147,12 @@ void _on_exit_level() { rs->reset_state(); } -void* __fastcall Hooks::_PlayLayer::onQuit_H(PlayLayer* self, int) { +void* __fastcall Hooks::PlayLayer::onQuit_H(gd::PlayLayer* self, int) { _on_exit_level(); return onQuit(self); } -void* __fastcall Hooks::_PlayLayer::onEditor_H(PlayLayer* self, int, void* idk) { +void* __fastcall Hooks::PlayLayer::onEditor_H(gd::PlayLayer* self, int, void* idk) { _on_exit_level(); return onEditor(self, idk); } @@ -183,7 +183,8 @@ bool __fastcall Hooks::PauseLayer_init_H(gd::PauseLayer* self, int) { void __fastcall Hooks::PlayerObject_ringJump_H(gd::PlayerObject* self, int, gd::GameObject* ring) { PlayerObject_ringJump(self, ring); auto rs = ReplaySystem::get_instance(); - if (rs->is_recording() && *cast(cast(ring) + 0x2ca)) { + auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); + if (play_layer && play_layer->is_practice_mode && rs->is_recording() && ring->hasBeenActivated) { rs->get_practice_fixes().add_activated_object(ring); } } @@ -191,8 +192,8 @@ void __fastcall Hooks::PlayerObject_ringJump_H(gd::PlayerObject* self, int, gd:: void __fastcall Hooks::GameObject_activateObject_H(gd::GameObject* self, int, gd::PlayerObject* player) { GameObject_activateObject(self, player); auto rs = ReplaySystem::get_instance(); - // need to check if its on practice mode duh - if (rs->is_recording() && *cast(cast(self) + 0x2ca)) { + auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); + if (play_layer && play_layer->is_practice_mode && rs->is_recording() && self->hasBeenActivated) { rs->get_practice_fixes().add_activated_object(self); } } \ No newline at end of file diff --git a/src/hooks.hpp b/src/hooks.hpp index 5fa6765..68c8c72 100644 --- a/src/hooks.hpp +++ b/src/hooks.hpp @@ -1,6 +1,5 @@ #pragma once #include "includes.h" -#include "types.hpp" #include #define _THISCALL_HOOK(name, ret_type, self_type, ...) \ @@ -13,25 +12,24 @@ namespace Hooks { _THISCALL_HOOK(CCScheduler_update, void, CCScheduler, float dt) _THISCALL_HOOK(CCKeyboardDispatcher_dispatchKeyboardMSG, void, CCKeyboardDispatcher, int key, bool down) - // _ cuz yeah - namespace _PlayLayer { - _THISCALL_HOOK(init, bool, PlayLayer, void* level) - _THISCALL_HOOK(update, void, PlayLayer, float dt) + namespace PlayLayer { + _THISCALL_HOOK(init, bool, gd::PlayLayer, void* level) + _THISCALL_HOOK(update, void, gd::PlayLayer, float dt) - _THISCALL_HOOK(pushButton, int, PlayLayer, int, bool) - _THISCALL_HOOK(releaseButton, int, PlayLayer, int, bool) - _THISCALL_HOOK(resetLevel, int, PlayLayer) + _THISCALL_HOOK(pushButton, int, gd::PlayLayer, int, bool) + _THISCALL_HOOK(releaseButton, int, gd::PlayLayer, int, bool) + _THISCALL_HOOK(resetLevel, int, gd::PlayLayer) - _THISCALL_HOOK(pauseGame, void, PlayLayer, bool) + _THISCALL_HOOK(pauseGame, void, gd::PlayLayer, bool) - _THISCALL_HOOK(createCheckpoint, int, PlayLayer) - _THISCALL_HOOK(removeLastCheckpoint, void*, PlayLayer) + _THISCALL_HOOK(createCheckpoint, int, gd::PlayLayer) + _THISCALL_HOOK(removeLastCheckpoint, void*, gd::PlayLayer) - _THISCALL_HOOK(levelComplete, void*, PlayLayer) + _THISCALL_HOOK(levelComplete, void*, gd::PlayLayer) // these are only for stopping recording/playing // maybe hook the destructor instead ? - _THISCALL_HOOK(onQuit, void*, PlayLayer) - _THISCALL_HOOK(onEditor, void*, PlayLayer, void*) + _THISCALL_HOOK(onQuit, void*, gd::PlayLayer) + _THISCALL_HOOK(onEditor, void*, gd::PlayLayer, void*) } _THISCALL_HOOK(PauseLayer_init, bool, gd::PauseLayer) diff --git a/src/practice_fixes.hpp b/src/practice_fixes.hpp index 65f3e3f..b8ee8a3 100644 --- a/src/practice_fixes.hpp +++ b/src/practice_fixes.hpp @@ -1,17 +1,16 @@ #pragma once #include -#include "types.hpp" #include "includes.h" struct CheckpointData { - double y_accel; - float rotation; + double y_accel; + float rotation; bool buffer_orb; - static CheckpointData from_player(PlayerObject* player) { - return { player->y_accel, player->getRotation(), *cast(cast(player) + 0x612) }; + static CheckpointData from_player(gd::PlayerObject* player) { + return { player->yAccel, player->getRotation(), player->canBufferOrb }; }; - void apply(PlayerObject* player) { - player->y_accel = y_accel; + void apply(gd::PlayerObject* player) { + player->yAccel = y_accel; player->setRotation(rotation); } }; @@ -30,10 +29,10 @@ class PracticeFixes { PracticeFixes() {} void add_checkpoint() { - auto play_layer = cast(gd::GameManager::sharedState()->getPlayLayer()); + auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); checkpoints.push({ - CheckpointData::from_player(play_layer->get_player()), - CheckpointData::from_player(play_layer->get_player2()), + CheckpointData::from_player(play_layer->player1), + CheckpointData::from_player(play_layer->player2), activated_objects.size() }); } @@ -51,10 +50,10 @@ class PracticeFixes { void apply_checkpoint() { if (!checkpoints.empty()) { - auto play_layer = cast(gd::GameManager::sharedState()->getPlayLayer()); + auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); auto checkpoint = checkpoints.top(); - checkpoint.player1.apply(play_layer->get_player()); - checkpoint.player2.apply(play_layer->get_player2()); + checkpoint.player1.apply(play_layer->player1); + checkpoint.player2.apply(play_layer->player2); } } diff --git a/src/replay_system.cpp b/src/replay_system.cpp index 6aa458b..69041d0 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -1,5 +1,4 @@ #include "replay_system.hpp" -#include "types.hpp" #include "hooks.hpp" ReplaySystem* ReplaySystem::instance; @@ -7,28 +6,28 @@ ReplaySystem* ReplaySystem::instance; void ReplaySystem::record_action(bool hold, bool player1, bool flip) { if (is_recording()) { auto gm = gd::GameManager::sharedState(); - auto play_layer = cast(gm->getPlayLayer()); - auto is_two_player = play_layer->get_level_settings()->is_two_player(); + auto play_layer = gm->getPlayLayer(); + auto is_two_player = play_layer->levelSettings->twoPlayerMode; player1 ^= flip && gm->getGameVariable("0010"); - get_replay().add_action({ play_layer->get_player()->x_pos, hold, is_two_player && !player1 }); + get_replay().add_action({ play_layer->player1->position.x, hold, is_two_player && !player1 }); } } void ReplaySystem::play_action(const Action& action) { auto gm = gd::GameManager::sharedState(); auto flip = gm->getGameVariable("0010"); - auto func = action.hold ? Hooks::_PlayLayer::pushButton : Hooks::_PlayLayer::releaseButton; - func(cast(gm->getPlayLayer()), 0, !action.player2 ^ flip); + auto func = action.hold ? Hooks::PlayLayer::pushButton : Hooks::PlayLayer::releaseButton; + func(gm->getPlayLayer(), 0, !action.player2 ^ flip); } void ReplaySystem::on_reset() { - auto play_layer = cast(gd::GameManager::sharedState()->getPlayLayer()); + auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); if (is_playing()) { - Hooks::_PlayLayer::releaseButton(play_layer, 0, false); - Hooks::_PlayLayer::releaseButton(play_layer, 0, true); + Hooks::PlayLayer::releaseButton(play_layer, 0, false); + Hooks::PlayLayer::releaseButton(play_layer, 0, true); action_index = 0; } else if (is_recording()) { - replay.remove_actions_after(play_layer->get_player()->x_pos); + replay.remove_actions_after(play_layer->player1->position.x); auto& activated_objects = practice_fixes.activated_objects; if (practice_fixes.checkpoints.empty()) { activated_objects.clear(); @@ -38,24 +37,23 @@ void ReplaySystem::on_reset() { activated_objects.end() ); for (const auto object : activated_objects) { - *cast(cast(object) + 0x2ca) = true; + object->hasBeenActivated = true; } } const auto& actions = replay.get_actions(); - bool holding = *cast(cast(play_layer->get_player()) + 0x611); + bool holding = play_layer->player1->isActuallyHolding; if ((holding && actions.empty()) || (!actions.empty() && actions.back().hold != holding)) { record_action(holding, true, false); if (holding) { - auto buffer_thing = cast(cast(play_layer->get_player()) + 0x612); - Hooks::_PlayLayer::releaseButton(play_layer, 0, true); - Hooks::_PlayLayer::pushButton(play_layer, 0, true); - *buffer_thing = true; + Hooks::PlayLayer::releaseButton(play_layer, 0, true); + Hooks::PlayLayer::pushButton(play_layer, 0, true); + play_layer->player1->canBufferOrb = true; } } else if (!actions.empty() && actions.back().hold && holding && !practice_fixes.checkpoints.empty() && practice_fixes.checkpoints.top().player1.buffer_orb) { - Hooks::_PlayLayer::releaseButton(play_layer, 0, true); - Hooks::_PlayLayer::pushButton(play_layer, 0, true); + Hooks::PlayLayer::releaseButton(play_layer, 0, true); + Hooks::PlayLayer::pushButton(play_layer, 0, true); } - if (play_layer->get_level_settings()->is_two_player()) + if (play_layer->levelSettings->twoPlayerMode) record_action(false, false, false); practice_fixes.apply_checkpoint(); } @@ -63,7 +61,7 @@ void ReplaySystem::on_reset() { void ReplaySystem::handle_playing() { if (is_playing()) { - auto x = cast(gd::GameManager::sharedState()->getPlayLayer())->get_player()->x_pos; + auto x = gd::GameManager::sharedState()->getPlayLayer()->player1->position.x; auto& actions = replay.get_actions(); Action action; while (action_index < actions.size() && x >= (action = actions[action_index]).x) { @@ -79,18 +77,18 @@ void ReplaySystem::handle_playing() { constexpr int STATUS_LABEL_TAG = 10032; -auto _create_status_label(PlayLayer* play_layer) { +auto _create_status_label(CCLayer* layer) { auto label = CCLabelBMFont::create("", "chatFont.fnt"); label->setTag(STATUS_LABEL_TAG); label->setAnchorPoint({0, 0}); label->setPosition({5, 5}); label->setZOrder(999); - play_layer->addChild(label); + layer->addChild(label); return label; } void ReplaySystem::_update_status_label() { - auto play_layer = cast(gd::GameManager::sharedState()->getPlayLayer()); + auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); if (play_layer) { auto label = cast(play_layer->getChildByTag(10032)); if (!label) diff --git a/src/types.hpp b/src/types.hpp deleted file mode 100644 index e54030d..0000000 --- a/src/types.hpp +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once -#include "includes.h" - -class PlayerObject : public gd::GameObject { - // sizeof(GameObject) = 0x468 -protected: - PAD(0x1C0); -public: - double y_accel; // + 0x628 -protected: - PAD(0x4C); -public: - float x_pos; // + 0x67C - float y_pos; -}; - -class LevelSettingsObject : public CCNode { -protected: - PAD(14); - bool two_player_mode; -public: - bool is_two_player() { return two_player_mode; } -}; - -class PlayLayer : public CCLayer { - PAD(0x108); - PlayerObject* player; - PlayerObject* player2; - - LevelSettingsObject* level_settings; - - PAD(0x16c); - - bool player_dead; -public: - auto get_player() { return player; } - auto get_player2() { return player2; } - - auto get_level_settings() { return level_settings; } - - auto is_player_dead() { return player_dead; } -}; \ No newline at end of file From 6ef1eadaebc50df79aee62c8771bab146f790837 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Fri, 21 May 2021 22:09:10 -0300 Subject: [PATCH 36/95] update gd.h --- libraries/gd.h | 2 +- src/replay_system.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/gd.h b/libraries/gd.h index 6e57c6b..10b2339 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit 6e57c6b50f4de392dd1b42730da15304a9324f7b +Subproject commit 10b23397a7ccf431a6a7ead5d19155e95619fc70 diff --git a/src/replay_system.cpp b/src/replay_system.cpp index 69041d0..099b391 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -7,7 +7,7 @@ void ReplaySystem::record_action(bool hold, bool player1, bool flip) { if (is_recording()) { auto gm = gd::GameManager::sharedState(); auto play_layer = gm->getPlayLayer(); - auto is_two_player = play_layer->levelSettings->twoPlayerMode; + auto is_two_player = play_layer->levelSettings->m_twoPlayerMode; player1 ^= flip && gm->getGameVariable("0010"); get_replay().add_action({ play_layer->player1->position.x, hold, is_two_player && !player1 }); } @@ -53,7 +53,7 @@ void ReplaySystem::on_reset() { Hooks::PlayLayer::releaseButton(play_layer, 0, true); Hooks::PlayLayer::pushButton(play_layer, 0, true); } - if (play_layer->levelSettings->twoPlayerMode) + if (play_layer->levelSettings->m_twoPlayerMode) record_action(false, false, false); practice_fixes.apply_checkpoint(); } From 1f20f76ffdf0585d5191430e2e58b0060003dfdb Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Tue, 1 Jun 2021 09:42:30 -0300 Subject: [PATCH 37/95] update gd.h --- libraries/gd.h | 2 +- src/hooks.cpp | 4 ++-- src/practice_fixes.hpp | 8 ++++---- src/replay_system.cpp | 17 ++++++++--------- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/libraries/gd.h b/libraries/gd.h index 10b2339..a5af121 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit 10b23397a7ccf431a6a7ead5d19155e95619fc70 +Subproject commit a5af1215fd28c119e046dc677c7faec6a7183699 diff --git a/src/hooks.cpp b/src/hooks.cpp index c55237e..95e00be 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -184,7 +184,7 @@ void __fastcall Hooks::PlayerObject_ringJump_H(gd::PlayerObject* self, int, gd:: PlayerObject_ringJump(self, ring); auto rs = ReplaySystem::get_instance(); auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); - if (play_layer && play_layer->is_practice_mode && rs->is_recording() && ring->hasBeenActivated) { + if (play_layer && play_layer->is_practice_mode && rs->is_recording() && ring->m_hasBeenActivated) { rs->get_practice_fixes().add_activated_object(ring); } } @@ -193,7 +193,7 @@ void __fastcall Hooks::GameObject_activateObject_H(gd::GameObject* self, int, gd GameObject_activateObject(self, player); auto rs = ReplaySystem::get_instance(); auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); - if (play_layer && play_layer->is_practice_mode && rs->is_recording() && self->hasBeenActivated) { + if (play_layer && play_layer->is_practice_mode && rs->is_recording() && self->m_hasBeenActivated) { rs->get_practice_fixes().add_activated_object(self); } } \ No newline at end of file diff --git a/src/practice_fixes.hpp b/src/practice_fixes.hpp index b8ee8a3..2e26587 100644 --- a/src/practice_fixes.hpp +++ b/src/practice_fixes.hpp @@ -31,8 +31,8 @@ class PracticeFixes { void add_checkpoint() { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); checkpoints.push({ - CheckpointData::from_player(play_layer->player1), - CheckpointData::from_player(play_layer->player2), + CheckpointData::from_player(play_layer->m_player1), + CheckpointData::from_player(play_layer->m_player2), activated_objects.size() }); } @@ -52,8 +52,8 @@ class PracticeFixes { if (!checkpoints.empty()) { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); auto checkpoint = checkpoints.top(); - checkpoint.player1.apply(play_layer->player1); - checkpoint.player2.apply(play_layer->player2); + checkpoint.player1.apply(play_layer->m_player1); + checkpoint.player2.apply(play_layer->m_player2); } } diff --git a/src/replay_system.cpp b/src/replay_system.cpp index 099b391..4fb2a99 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -1,15 +1,14 @@ #include "replay_system.hpp" #include "hooks.hpp" - ReplaySystem* ReplaySystem::instance; void ReplaySystem::record_action(bool hold, bool player1, bool flip) { if (is_recording()) { auto gm = gd::GameManager::sharedState(); auto play_layer = gm->getPlayLayer(); - auto is_two_player = play_layer->levelSettings->m_twoPlayerMode; + auto is_two_player = play_layer->m_levelSettings->m_twoPlayerMode; player1 ^= flip && gm->getGameVariable("0010"); - get_replay().add_action({ play_layer->player1->position.x, hold, is_two_player && !player1 }); + get_replay().add_action({ play_layer->m_player1->position.x, hold, is_two_player && !player1 }); } } @@ -27,7 +26,7 @@ void ReplaySystem::on_reset() { Hooks::PlayLayer::releaseButton(play_layer, 0, true); action_index = 0; } else if (is_recording()) { - replay.remove_actions_after(play_layer->player1->position.x); + replay.remove_actions_after(play_layer->m_player1->position.x); auto& activated_objects = practice_fixes.activated_objects; if (practice_fixes.checkpoints.empty()) { activated_objects.clear(); @@ -37,23 +36,23 @@ void ReplaySystem::on_reset() { activated_objects.end() ); for (const auto object : activated_objects) { - object->hasBeenActivated = true; + object->m_hasBeenActivated = true; } } const auto& actions = replay.get_actions(); - bool holding = play_layer->player1->isActuallyHolding; + bool holding = play_layer->m_player1->isActuallyHolding; if ((holding && actions.empty()) || (!actions.empty() && actions.back().hold != holding)) { record_action(holding, true, false); if (holding) { Hooks::PlayLayer::releaseButton(play_layer, 0, true); Hooks::PlayLayer::pushButton(play_layer, 0, true); - play_layer->player1->canBufferOrb = true; + play_layer->m_player1->canBufferOrb = true; } } else if (!actions.empty() && actions.back().hold && holding && !practice_fixes.checkpoints.empty() && practice_fixes.checkpoints.top().player1.buffer_orb) { Hooks::PlayLayer::releaseButton(play_layer, 0, true); Hooks::PlayLayer::pushButton(play_layer, 0, true); } - if (play_layer->levelSettings->m_twoPlayerMode) + if (play_layer->m_levelSettings->m_twoPlayerMode) record_action(false, false, false); practice_fixes.apply_checkpoint(); } @@ -61,7 +60,7 @@ void ReplaySystem::on_reset() { void ReplaySystem::handle_playing() { if (is_playing()) { - auto x = gd::GameManager::sharedState()->getPlayLayer()->player1->position.x; + auto x = gd::GameManager::sharedState()->getPlayLayer()->m_player1->position.x; auto& actions = replay.get_actions(); Action action; while (action_index < actions.size() && x >= (action = actions[action_index]).x) { From 86d739fa7e545ab9b7831ada6e473dd411fb417d Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Mon, 7 Jun 2021 18:04:12 -0300 Subject: [PATCH 38/95] update gd.h --- libraries/gd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/gd.h b/libraries/gd.h index a5af121..fc50a65 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit a5af1215fd28c119e046dc677c7faec6a7183699 +Subproject commit fc50a65260e96364f230f677c4430b0a76d31551 From 4fe1b8110198db18028a909be8d429693ef10a37 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Tue, 8 Jun 2021 13:47:28 -0300 Subject: [PATCH 39/95] update gd.h --- libraries/gd.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/gd.h b/libraries/gd.h index fc50a65..4661609 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit fc50a65260e96364f230f677c4430b0a76d31551 +Subproject commit 466160936eb892fe02a684a8698c07c8d98e19eb From 774c6b48a0a6dcb8d0edde56dba23b450f1de0e0 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Tue, 8 Jun 2021 13:53:53 -0300 Subject: [PATCH 40/95] use a reference in ReplaySystem::get_instance thx zmx --- src/hooks.cpp | 68 +++++++++++++++++++++---------------------- src/overlay_layer.cpp | 34 +++++++++++----------- src/replay_system.cpp | 1 - src/replay_system.hpp | 8 ++--- 4 files changed, 54 insertions(+), 57 deletions(-) diff --git a/src/hooks.cpp b/src/hooks.cpp index 95e00be..da52bca 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -39,9 +39,9 @@ void Hooks::init() { } void __fastcall Hooks::CCScheduler_update_H(CCScheduler* self, int, float dt) { - auto rs = ReplaySystem::get_instance(); - if (rs->is_playing() || rs->is_recording() && gd::GameManager::sharedState()->getPlayLayer()) { - auto fps = rs->get_replay().get_fps(); + auto& rs = ReplaySystem::get_instance(); + if (rs.is_playing() || rs.is_recording() && gd::GameManager::sharedState()->getPlayLayer()) { + auto fps = rs.get_replay().get_fps(); auto speedhack = self->getTimeScale(); dt = 1.f / fps / speedhack; } @@ -49,16 +49,16 @@ void __fastcall Hooks::CCScheduler_update_H(CCScheduler* self, int, float dt) { } void __fastcall Hooks::CCKeyboardDispatcher_dispatchKeyboardMSG_H(CCKeyboardDispatcher* self, int, int key, bool down) { - auto rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get_instance(); if (down) { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); - if (rs->is_recording() && play_layer) { + if (rs.is_recording() && play_layer) { if (key == 'C') { - rs->set_frame_advance(false); - PlayLayer::update_H(play_layer, 0, 1.f / rs->get_default_fps()); - rs->set_frame_advance(true); + rs.set_frame_advance(false); + PlayLayer::update_H(play_layer, 0, 1.f / rs.get_default_fps()); + rs.set_frame_advance(true); } else if (key == 'F') { - rs->set_frame_advance(false); + rs.set_frame_advance(false); } else if (key == 'R') { PlayLayer::resetLevel_H(play_layer, 0); } @@ -73,19 +73,19 @@ bool __fastcall Hooks::PlayLayer::init_H(gd::PlayLayer* self, int, void* level) } void __fastcall Hooks::PlayLayer::update_H(gd::PlayLayer* self, int, float dt) { - auto rs = ReplaySystem::get_instance(); - if (rs->get_frame_advance()) return; - if (rs->is_playing()) - rs->handle_playing(); + auto& rs = ReplaySystem::get_instance(); + if (rs.get_frame_advance()) return; + if (rs.is_playing()) + rs.handle_playing(); update(self, dt); } bool _player_button_handler(bool hold, bool button) { if (gd::GameManager::sharedState()->getPlayLayer()) { - auto rs = ReplaySystem::get_instance(); - if (rs->is_playing()) return true; - rs->record_action(hold, button); + auto& rs = ReplaySystem::get_instance(); + if (rs.is_playing()) return true; + rs.record_action(hold, button); } return false; } @@ -102,18 +102,18 @@ int __fastcall Hooks::PlayLayer::releaseButton_H(gd::PlayLayer* self, int, int i int __fastcall Hooks::PlayLayer::resetLevel_H(gd::PlayLayer* self, int) { auto ret = resetLevel(self); - ReplaySystem::get_instance()->on_reset(); + ReplaySystem::get_instance().on_reset(); return ret; } void __fastcall Hooks::PlayLayer::pauseGame_H(gd::PlayLayer* self, int, bool idk) { auto addr = cast(gd::base + 0x20D43C); - auto rs = ReplaySystem::get_instance(); - if (rs->is_recording()) - rs->record_action(false, true, false); + auto& rs = ReplaySystem::get_instance(); + if (rs.is_recording()) + rs.record_action(false, true, false); - bool should_patch = rs->is_playing(); + bool should_patch = rs.is_playing(); if (should_patch) patch(addr, {0x83, 0xC4, 0x04, 0x90, 0x90}); @@ -125,26 +125,26 @@ void __fastcall Hooks::PlayLayer::pauseGame_H(gd::PlayLayer* self, int, bool idk int __fastcall Hooks::PlayLayer::createCheckpoint_H(gd::PlayLayer* self, int) { - auto rs = ReplaySystem::get_instance(); - if (rs->is_recording()) rs->get_practice_fixes().add_checkpoint(); + auto& rs = ReplaySystem::get_instance(); + if (rs.is_recording()) rs.get_practice_fixes().add_checkpoint(); return createCheckpoint(self); } void* __fastcall Hooks::PlayLayer::removeLastCheckpoint_H(gd::PlayLayer* self, int) { - ReplaySystem::get_instance()->get_practice_fixes().remove_checkpoint(); + ReplaySystem::get_instance().get_practice_fixes().remove_checkpoint(); return removeLastCheckpoint(self); } void* __fastcall Hooks::PlayLayer::levelComplete_H(gd::PlayLayer* self, int) { - ReplaySystem::get_instance()->reset_state(); + ReplaySystem::get_instance().reset_state(); return levelComplete(self); } void _on_exit_level() { - auto rs = ReplaySystem::get_instance(); - rs->get_practice_fixes().clear_checkpoints(); - rs->reset_state(); + auto& rs = ReplaySystem::get_instance(); + rs.get_practice_fixes().clear_checkpoints(); + rs.reset_state(); } void* __fastcall Hooks::PlayLayer::onQuit_H(gd::PlayLayer* self, int) { @@ -182,18 +182,18 @@ bool __fastcall Hooks::PauseLayer_init_H(gd::PauseLayer* self, int) { void __fastcall Hooks::PlayerObject_ringJump_H(gd::PlayerObject* self, int, gd::GameObject* ring) { PlayerObject_ringJump(self, ring); - auto rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get_instance(); auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); - if (play_layer && play_layer->is_practice_mode && rs->is_recording() && ring->m_hasBeenActivated) { - rs->get_practice_fixes().add_activated_object(ring); + if (play_layer && play_layer->is_practice_mode && rs.is_recording() && ring->m_hasBeenActivated) { + rs.get_practice_fixes().add_activated_object(ring); } } void __fastcall Hooks::GameObject_activateObject_H(gd::GameObject* self, int, gd::PlayerObject* player) { GameObject_activateObject(self, player); - auto rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get_instance(); auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); - if (play_layer && play_layer->is_practice_mode && rs->is_recording() && self->m_hasBeenActivated) { - rs->get_practice_fixes().add_activated_object(self); + if (play_layer && play_layer->is_practice_mode && rs.is_recording() && self->m_hasBeenActivated) { + rs.get_practice_fixes().add_activated_object(self); } } \ No newline at end of file diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index 5d96efd..f70fa9b 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -9,7 +9,7 @@ bool OverlayLayer::init() { setZOrder(20); auto win_size = CCDirector::sharedDirector()->getWinSize(); - auto rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get_instance(); auto menu = CCMenu::create(); menu->setPosition({0, win_size.height}); @@ -81,7 +81,7 @@ bool OverlayLayer::init() { addChild(sprite); m_fps_input = gd::CCTextInputNode::create("fps", nullptr, "bigFont.fnt", 100.f, 100.f); - m_fps_input->setString(std::to_string(static_cast(rs->get_default_fps())).c_str()); + m_fps_input->setString(std::to_string(static_cast(rs.get_default_fps())).c_str()); m_fps_input->setLabelPlaceholderColor({200, 200, 200}); m_fps_input->setLabelPlaceholerScale(0.5f); m_fps_input->setMaxLabelScale(0.7f); @@ -110,8 +110,8 @@ bool OverlayLayer::init() { } void OverlayLayer::update_info_text() { - auto rs = ReplaySystem::get_instance(); - auto& replay = rs->get_replay(); + auto& rs = ReplaySystem::get_instance(); + auto& replay = rs.get_replay(); std::stringstream stream; stream << "Current Replay:\nFPS: " << replay.get_fps() << "\nActions: " << replay.get_actions().size(); m_replay_info->setString(stream.str().c_str()); @@ -120,15 +120,15 @@ void OverlayLayer::update_info_text() { void OverlayLayer::_update_default_fps() { auto text = m_fps_input->getString(); if (text[0]) - ReplaySystem::get_instance()->set_default_fps(std::stof(text)); + ReplaySystem::get_instance().set_default_fps(std::stof(text)); } void OverlayLayer::FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2) { if (!btn2) { - auto rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get_instance(); int tag = alert->getTag(); if (tag == 1) { - rs->toggle_recording(); + rs.toggle_recording(); update_info_text(); } else if (tag == 2) { _handle_load_replay(); @@ -139,10 +139,10 @@ void OverlayLayer::FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2) { void OverlayLayer::on_record(CCObject*) { _update_default_fps(); - auto rs = ReplaySystem::get_instance(); - if (!rs->is_recording()) { - if (rs->get_replay().get_actions().empty()) { - rs->toggle_recording(); + auto& rs = ReplaySystem::get_instance(); + if (!rs.is_recording()) { + if (rs.get_replay().get_actions().empty()) { + rs.toggle_recording(); update_info_text(); } else { auto alert = gd::FLAlertLayer::create(this, @@ -154,12 +154,12 @@ void OverlayLayer::on_record(CCObject*) { alert->show(); } } else { - rs->toggle_recording(); + rs.toggle_recording(); } } void OverlayLayer::on_play(CCObject*) { - ReplaySystem::get_instance()->toggle_playing(); + ReplaySystem::get_instance().toggle_playing(); } void OverlayLayer::on_save(CCObject*) { @@ -168,7 +168,7 @@ void OverlayLayer::on_save(CCObject*) { if (result == NFD_OKAY) { std::string s_path(path); // why doesnt it just add the extension for me - ReplaySystem::get_instance()->get_replay().save(s_path + ".replay"); + ReplaySystem::get_instance().get_replay().save(s_path + ".replay"); gd::FLAlertLayer::create(nullptr, "Info", "Ok", nullptr, "Replay saved.")->show(); free(path); } @@ -178,7 +178,7 @@ void OverlayLayer::_handle_load_replay() { nfdchar_t* path = nullptr; auto result = NFD_OpenDialog("replay", nullptr, &path); if (result == NFD_OKAY) { - ReplaySystem::get_instance()->get_replay() = Replay::load(path); + ReplaySystem::get_instance().get_replay() = Replay::load(path); update_info_text(); gd::FLAlertLayer::create(nullptr, "Info", "Ok", nullptr, "Replay loaded.")->show(); free(path); @@ -186,8 +186,8 @@ void OverlayLayer::_handle_load_replay() { } void OverlayLayer::on_load(CCObject*) { - auto rs = ReplaySystem::get_instance(); - if (rs->get_replay().get_actions().empty()) { + auto& rs = ReplaySystem::get_instance(); + if (rs.get_replay().get_actions().empty()) { _handle_load_replay(); } else { auto alert = gd::FLAlertLayer::create(this, diff --git a/src/replay_system.cpp b/src/replay_system.cpp index 4fb2a99..688df4c 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -1,6 +1,5 @@ #include "replay_system.hpp" #include "hooks.hpp" -ReplaySystem* ReplaySystem::instance; void ReplaySystem::record_action(bool hold, bool player1, bool flip) { if (is_recording()) { diff --git a/src/replay_system.hpp b/src/replay_system.hpp index beff911..9581dea 100644 --- a/src/replay_system.hpp +++ b/src/replay_system.hpp @@ -10,8 +10,6 @@ enum RSState { }; class ReplaySystem { - static ReplaySystem* instance; - float default_fps; Replay replay; @@ -27,9 +25,9 @@ class ReplaySystem { void _update_status_label(); public: - static ReplaySystem* get_instance() { - if (!instance) instance = new ReplaySystem(); - return instance; + static auto& get_instance() { + static ReplaySystem instance; + return instance; } inline auto& get_replay() { return replay; } From 6e8f2dd4361091270b8a07d98cccc8885faa3050 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 10 Jun 2021 23:21:36 -0300 Subject: [PATCH 41/95] begin adding frame --- src/Replay.cpp | 47 ++++++++++++++++++++++++++++++++++-------- src/dllmain.cpp | 11 +++++----- src/hooks.cpp | 2 +- src/practice_fixes.hpp | 6 ++++-- src/replay.hpp | 17 +++++++++++++-- src/replay_system.cpp | 37 ++++++++++++++++++++++++++++----- src/replay_system.hpp | 10 ++++++++- 7 files changed, 104 insertions(+), 26 deletions(-) diff --git a/src/Replay.cpp b/src/Replay.cpp index 83e4319..2de0330 100644 --- a/src/Replay.cpp +++ b/src/Replay.cpp @@ -3,12 +3,19 @@ #include "utils.hpp" void Replay::remove_actions_after(float x) { - auto check = [&](const Action& action) -> bool { + const auto check = [&](const Action& action) -> bool { return action.x >= x; }; actions.erase(std::remove_if(actions.begin(), actions.end(), check), actions.end()); } +void Replay::remove_actions_after(unsigned frame) { + const auto check = [&](const Action& action) -> bool { + return action.frame >= frame; + }; + actions.erase(std::remove_if(actions.begin(), actions.end(), check), actions.end()); +} + // these two functions are so stupid // why cant c++ do it for me :( @@ -24,17 +31,33 @@ inline T bin_read(std::ifstream& stream) { return value; } -constexpr uint8_t format_ver = 1; -constexpr const char format_magic[5] = "RPLY"; +/* + * Format changelog + * + * - version 1 + * header | action[] + * header: "RPLY" | version as u8 | fps as f32 + * action: x as f32 | state as u8 + * + * - version 2 + * add `type as u8` between version and fps + * change action x to be either float or an unsigned int + */ + +constexpr uint8_t format_ver = 2; +constexpr const char format_magic[4] = {'R', 'P', 'L', 'Y'}; void Replay::save(const std::string& path) { std::ofstream file; file.open(path, std::ios::binary | std::ios::out); - file << format_magic << format_ver; + file << format_magic << format_ver << type; bin_write(file, fps); for (const auto& action : actions) { uint8_t state = action.hold | action.player2 << 1; - bin_write(file, action.x); + if (type == ReplayType::XPOS) + bin_write(file, action.x); + else if (type == ReplayType::FRAME) + bin_write(file, action.frame); file << state; } file.close(); @@ -53,19 +76,25 @@ Replay Replay::load(const std::string& path) { file.read(magic, 4); if (memcmp(magic, format_magic, 4) == 0) { auto ver = bin_read(file); - if (ver == 1) { + if (ver == 1 || ver == 2) { + if (ver == 2) replay.type = ReplayType(bin_read(file)); replay.fps = bin_read(file); size_t left = file_size - static_cast(file.tellg()); + float x; + unsigned frame; for (size_t _ = 0; _ < left / 5; ++_) { - float x = bin_read(file); + if (replay.type == ReplayType::XPOS) + x = bin_read(file); + else if (replay.type == ReplayType::FRAME) + frame = bin_read(file); auto state = bin_read(file); bool hold = state & 1; bool player2 = state & 2; - replay.add_action({ x, hold, player2 }); + replay.add_action({ replay.type == ReplayType::XPOS ? x : frame, hold, player2 }); } } } else { - replay.fps = *reinterpret_cast(&magic); + replay.fps = *cast(&magic); size_t left = file_size - static_cast(file.tellg()); for (size_t _ = 0; _ < left / 6; ++_) { float x = bin_read(file); diff --git a/src/dllmain.cpp b/src/dllmain.cpp index 292a912..dd56f74 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -3,10 +3,10 @@ #include "hooks.hpp" -#define _SHOW_CONSOLE_UWU 1 +#define _DEBUG DWORD WINAPI thread_entry(void* module) { -#if _SHOW_CONSOLE_UWU +#ifdef _DEBUG AllocConsole(); static std::ofstream conout("CONOUT$", std::ios::out); static std::ifstream conin("CONIN$", std::ios::in); @@ -20,9 +20,8 @@ DWORD WINAPI thread_entry(void* module) { MH_EnableHook(MH_ALL_HOOKS); -#if _SHOW_CONSOLE_UWU - std::string dababy; - std::getline(std::cin, dababy); +#ifdef _DEBUG + std::getline(std::cin, std::string()); MH_Uninitialize(); conout.close(); conin.close(); @@ -35,7 +34,7 @@ DWORD WINAPI thread_entry(void* module) { BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved) { if (reason == DLL_PROCESS_ATTACH) { - auto handle = CreateThread(0, 0x100, thread_entry, module, 0, 0); + auto handle = CreateThread(0, 0, thread_entry, module, 0, 0); if (handle) CloseHandle(handle); } return TRUE; diff --git a/src/hooks.cpp b/src/hooks.cpp index da52bca..1e0c727 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -126,7 +126,7 @@ void __fastcall Hooks::PlayLayer::pauseGame_H(gd::PlayLayer* self, int, bool idk int __fastcall Hooks::PlayLayer::createCheckpoint_H(gd::PlayLayer* self, int) { auto& rs = ReplaySystem::get_instance(); - if (rs.is_recording()) rs.get_practice_fixes().add_checkpoint(); + if (rs.is_recording()) rs.get_practice_fixes().add_checkpoint(rs.get_frame()); return createCheckpoint(self); } diff --git a/src/practice_fixes.hpp b/src/practice_fixes.hpp index 2e26587..d2d486e 100644 --- a/src/practice_fixes.hpp +++ b/src/practice_fixes.hpp @@ -19,6 +19,7 @@ struct Checkpoint { CheckpointData player1; CheckpointData player2; size_t activated_objects_size; + unsigned frame; }; class PracticeFixes { @@ -28,12 +29,13 @@ class PracticeFixes { public: PracticeFixes() {} - void add_checkpoint() { + void add_checkpoint(unsigned frame = 0) { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); checkpoints.push({ CheckpointData::from_player(play_layer->m_player1), CheckpointData::from_player(play_layer->m_player2), - activated_objects.size() + activated_objects.size(), + frame }); } diff --git a/src/replay.hpp b/src/replay.hpp index 55fced2..14e6947 100644 --- a/src/replay.hpp +++ b/src/replay.hpp @@ -3,23 +3,36 @@ #include #include +enum ReplayType : std::uint8_t { + XPOS, + FRAME +}; + struct Action { - float x; + union { + float x; + unsigned frame; + }; bool hold; bool player2; }; class Replay { +protected: std::vector actions; float fps; + ReplayType type; public: - Replay(float fps) : fps(fps) {} + Replay(float fps, ReplayType type = ReplayType::FRAME) : fps(fps), type(type) {} float get_fps() { return fps; } void add_action(const Action& action) { actions.push_back(action); } auto& get_actions() { return actions; } void remove_actions_after(float x); + void remove_actions_after(unsigned frame); + + auto get_type() { return type; } void save(const std::string& path); static Replay load(const std::string& path); diff --git a/src/replay_system.cpp b/src/replay_system.cpp index 688df4c..702b64d 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -7,7 +7,14 @@ void ReplaySystem::record_action(bool hold, bool player1, bool flip) { auto play_layer = gm->getPlayLayer(); auto is_two_player = play_layer->m_levelSettings->m_twoPlayerMode; player1 ^= flip && gm->getGameVariable("0010"); - get_replay().add_action({ play_layer->m_player1->position.x, hold, is_two_player && !player1 }); + Action action; + action.hold = hold; + action.player2 = is_two_player && !player1; + if (replay.get_type() == ReplayType::XPOS) + action.x = play_layer->m_player1->position.x; + else if (replay.get_type() == ReplayType::FRAME) + action.frame = get_frame(); + replay.add_action(action); } } @@ -18,6 +25,14 @@ void ReplaySystem::play_action(const Action& action) { func(gm->getPlayLayer(), 0, !action.player2 ^ flip); } +unsigned ReplaySystem::get_frame() { + auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); + if (play_layer != nullptr) { + return static_cast(play_layer->time * replay.get_fps()) + frame_offset; + } + return 0; +} + void ReplaySystem::on_reset() { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); if (is_playing()) { @@ -25,11 +40,12 @@ void ReplaySystem::on_reset() { Hooks::PlayLayer::releaseButton(play_layer, 0, true); action_index = 0; } else if (is_recording()) { - replay.remove_actions_after(play_layer->m_player1->position.x); auto& activated_objects = practice_fixes.activated_objects; if (practice_fixes.checkpoints.empty()) { activated_objects.clear(); + frame_offset = 0; } else { + frame_offset = practice_fixes.checkpoints.top().frame; activated_objects.erase( activated_objects.begin() + practice_fixes.checkpoints.top().activated_objects_size, activated_objects.end() @@ -38,6 +54,10 @@ void ReplaySystem::on_reset() { object->m_hasBeenActivated = true; } } + if (replay.get_type() == ReplayType::XPOS) + replay.remove_actions_after(play_layer->m_player1->position.x); + else + replay.remove_actions_after(get_frame()); const auto& actions = replay.get_actions(); bool holding = play_layer->m_player1->isActuallyHolding; if ((holding && actions.empty()) || (!actions.empty() && actions.back().hold != holding)) { @@ -62,9 +82,16 @@ void ReplaySystem::handle_playing() { auto x = gd::GameManager::sharedState()->getPlayLayer()->m_player1->position.x; auto& actions = replay.get_actions(); Action action; - while (action_index < actions.size() && x >= (action = actions[action_index]).x) { - play_action(action); - ++action_index; + if (replay.get_type() == ReplayType::XPOS) { + while (action_index < actions.size() && x >= (action = actions[action_index]).x) { + play_action(action); + ++action_index; + } + } else { + while (action_index < actions.size() && get_frame() >= (action = actions[action_index]).frame) { + play_action(action); + ++action_index; + } } if (action_index >= actions.size()) toggle_playing(); diff --git a/src/replay_system.hpp b/src/replay_system.hpp index 9581dea..482d90c 100644 --- a/src/replay_system.hpp +++ b/src/replay_system.hpp @@ -14,6 +14,7 @@ class ReplaySystem { Replay replay; RSState state = NOTHING; + ReplayType replay_type; size_t action_index = 0; @@ -21,9 +22,11 @@ class ReplaySystem { bool frame_advance = false; - ReplaySystem() : default_fps(120.f), replay(default_fps) {} + ReplaySystem() : default_fps(120.f), replay(default_fps), replay_type(replay.get_type()) {} void _update_status_label(); + + unsigned frame_offset = 0; public: static auto& get_instance() { static ReplaySystem instance; @@ -39,18 +42,21 @@ class ReplaySystem { void toggle_playing() { state = is_playing() ? NOTHING : PLAYING; + frame_offset = 0; _update_status_label(); } void toggle_recording() { state = is_recording() ? NOTHING : RECORDING; if (!is_recording()) frame_advance = false; else replay = Replay(default_fps); + frame_offset = 0; _update_status_label(); } void reset_state() { state = NOTHING; frame_advance = false; + frame_offset = 0; _update_status_label(); } @@ -65,4 +71,6 @@ class ReplaySystem { inline bool get_frame_advance() { return frame_advance; } inline void set_frame_advance(bool b) { frame_advance = b; } + + unsigned get_frame(); }; \ No newline at end of file From ea76de7ad4fffdbd46d3fc0e408b014de679b9a2 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Fri, 11 Jun 2021 20:46:57 -0300 Subject: [PATCH 42/95] fix player 2 orbs --- src/Replay.cpp | 9 +++++++-- src/hooks.cpp | 35 +++++++++++++++++++++++++---------- src/hooks.hpp | 1 + src/practice_fixes.hpp | 8 ++++++-- src/replay_system.cpp | 19 ++++++++++++------- 5 files changed, 51 insertions(+), 21 deletions(-) diff --git a/src/Replay.cpp b/src/Replay.cpp index 2de0330..d8de52a 100644 --- a/src/Replay.cpp +++ b/src/Replay.cpp @@ -53,7 +53,7 @@ void Replay::save(const std::string& path) { file << format_magic << format_ver << type; bin_write(file, fps); for (const auto& action : actions) { - uint8_t state = action.hold | action.player2 << 1; + uint8_t state = static_cast(action.hold) | static_cast(action.player2) << 1; if (type == ReplayType::XPOS) bin_write(file, action.x); else if (type == ReplayType::FRAME) @@ -90,7 +90,12 @@ Replay Replay::load(const std::string& path) { auto state = bin_read(file); bool hold = state & 1; bool player2 = state & 2; - replay.add_action({ replay.type == ReplayType::XPOS ? x : frame, hold, player2 }); + Action action = { 0, hold, player2 }; + if (replay.type == ReplayType::XPOS) + action.x = x; + else if (replay.type == ReplayType::FRAME) + action.frame = frame; + replay.add_action(action); } } } else { diff --git a/src/hooks.cpp b/src/hooks.cpp index 1e0c727..f8f48d6 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -36,6 +36,7 @@ void Hooks::init() { ADD_GD_HOOK(0x1f4ff0, PlayerObject_ringJump); ADD_GD_HOOK(0xef0e0, GameObject_activateObject); + ADD_GD_HOOK(0x10ed50, GJBaseGameLayer_bumpPlayer); } void __fastcall Hooks::CCScheduler_update_H(CCScheduler* self, int, float dt) { @@ -180,20 +181,34 @@ bool __fastcall Hooks::PauseLayer_init_H(gd::PauseLayer* self, int) { return false; } -void __fastcall Hooks::PlayerObject_ringJump_H(gd::PlayerObject* self, int, gd::GameObject* ring) { - PlayerObject_ringJump(self, ring); - auto& rs = ReplaySystem::get_instance(); +void _handle_activated_object(bool a, bool b, gd::GameObject* object) { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); - if (play_layer && play_layer->is_practice_mode && rs.is_recording() && ring->m_hasBeenActivated) { - rs.get_practice_fixes().add_activated_object(ring); + auto& rs = ReplaySystem::get_instance(); + if (play_layer && play_layer->is_practice_mode && rs.is_recording()) { + if (object->m_hasBeenActivated && !a) + rs.get_practice_fixes().add_activated_object(object); + if (object->m_hasBeenActivatedP2 && !b) + rs.get_practice_fixes().add_activated_object_p2(object); } } +void __fastcall Hooks::PlayerObject_ringJump_H(gd::PlayerObject* self, int, gd::GameObject* ring) { + bool a = ring->m_hasBeenActivated; + bool b = ring->m_hasBeenActivatedP2; + PlayerObject_ringJump(self, ring); + _handle_activated_object(a, b, ring); +} + void __fastcall Hooks::GameObject_activateObject_H(gd::GameObject* self, int, gd::PlayerObject* player) { + bool a = self->m_hasBeenActivated; + bool b = self->m_hasBeenActivatedP2; GameObject_activateObject(self, player); - auto& rs = ReplaySystem::get_instance(); - auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); - if (play_layer && play_layer->is_practice_mode && rs.is_recording() && self->m_hasBeenActivated) { - rs.get_practice_fixes().add_activated_object(self); - } + _handle_activated_object(a, b, self); +} + +void __fastcall Hooks::GJBaseGameLayer_bumpPlayer_H(gd::GJBaseGameLayer* self, int, gd::PlayerObject* player, gd::GameObject* object) { + bool a = object->m_hasBeenActivated; + bool b = object->m_hasBeenActivatedP2; + GJBaseGameLayer_bumpPlayer(self, player, object); + _handle_activated_object(a, b, object); } \ No newline at end of file diff --git a/src/hooks.hpp b/src/hooks.hpp index 68c8c72..870cd4d 100644 --- a/src/hooks.hpp +++ b/src/hooks.hpp @@ -36,4 +36,5 @@ namespace Hooks { _THISCALL_HOOK(PlayerObject_ringJump, void, gd::PlayerObject, gd::GameObject* ring) _THISCALL_HOOK(GameObject_activateObject, void, gd::GameObject, gd::PlayerObject* player) + _THISCALL_HOOK(GJBaseGameLayer_bumpPlayer, void, gd::GJBaseGameLayer, gd::PlayerObject* player, gd::GameObject* object) } \ No newline at end of file diff --git a/src/practice_fixes.hpp b/src/practice_fixes.hpp index d2d486e..9afb7c2 100644 --- a/src/practice_fixes.hpp +++ b/src/practice_fixes.hpp @@ -19,22 +19,23 @@ struct Checkpoint { CheckpointData player1; CheckpointData player2; size_t activated_objects_size; + size_t activated_objects_p2_size; unsigned frame; }; class PracticeFixes { std::stack checkpoints; std::vector activated_objects; + std::vector activated_objects_p2; friend class ReplaySystem; public: - PracticeFixes() {} - void add_checkpoint(unsigned frame = 0) { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); checkpoints.push({ CheckpointData::from_player(play_layer->m_player1), CheckpointData::from_player(play_layer->m_player2), activated_objects.size(), + activated_objects_p2.size(), frame }); } @@ -67,4 +68,7 @@ class PracticeFixes { void add_activated_object(gd::GameObject* object) { activated_objects.push_back(object); } + void add_activated_object_p2(gd::GameObject* object) { + activated_objects_p2.push_back(object); + } }; \ No newline at end of file diff --git a/src/replay_system.cpp b/src/replay_system.cpp index 702b64d..7decb77 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -40,19 +40,24 @@ void ReplaySystem::on_reset() { Hooks::PlayLayer::releaseButton(play_layer, 0, true); action_index = 0; } else if (is_recording()) { - auto& activated_objects = practice_fixes.activated_objects; if (practice_fixes.checkpoints.empty()) { - activated_objects.clear(); + practice_fixes.activated_objects.clear(); + practice_fixes.activated_objects_p2.clear(); frame_offset = 0; } else { frame_offset = practice_fixes.checkpoints.top().frame; - activated_objects.erase( - activated_objects.begin() + practice_fixes.checkpoints.top().activated_objects_size, - activated_objects.end() - ); - for (const auto object : activated_objects) { + constexpr auto delete_from = [&](auto& vec, size_t index) { + vec.erase(vec.begin() + index, vec.end()); + }; + const auto& checkpoint = practice_fixes.checkpoints.top(); + delete_from(practice_fixes.activated_objects, checkpoint.activated_objects_size); + delete_from(practice_fixes.activated_objects_p2, checkpoint.activated_objects_p2_size); + for (const auto& object : practice_fixes.activated_objects) { object->m_hasBeenActivated = true; } + for (const auto& object : practice_fixes.activated_objects_p2) { + object->m_hasBeenActivatedP2 = true; + } } if (replay.get_type() == ReplayType::XPOS) replay.remove_actions_after(play_layer->m_player1->position.x); From c0c8f07e315bb68bd8a862a58d7da298c0cf413b Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sat, 12 Jun 2021 20:16:00 -0300 Subject: [PATCH 43/95] add buttons for switching the mode --- src/Replay.cpp | 2 +- src/dllmain.cpp | 6 ++++-- src/overlay_layer.cpp | 44 ++++++++++++++++++++++++++++++++++++++++++- src/overlay_layer.hpp | 5 +++++ src/replay_system.hpp | 9 ++++++--- 5 files changed, 59 insertions(+), 7 deletions(-) diff --git a/src/Replay.cpp b/src/Replay.cpp index d8de52a..6815274 100644 --- a/src/Replay.cpp +++ b/src/Replay.cpp @@ -45,7 +45,7 @@ inline T bin_read(std::ifstream& stream) { */ constexpr uint8_t format_ver = 2; -constexpr const char format_magic[4] = {'R', 'P', 'L', 'Y'}; +constexpr const char* format_magic = "RPLY"; void Replay::save(const std::string& path) { std::ofstream file; diff --git a/src/dllmain.cpp b/src/dllmain.cpp index dd56f74..91327d6 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -8,12 +8,14 @@ DWORD WINAPI thread_entry(void* module) { #ifdef _DEBUG AllocConsole(); - static std::ofstream conout("CONOUT$", std::ios::out); - static std::ifstream conin("CONIN$", std::ios::in); + std::ofstream conout("CONOUT$", std::ios::out); + std::ifstream conin("CONIN$", std::ios::in); std::cout.rdbuf(conout.rdbuf()); std::cin.rdbuf(conin.rdbuf()); #endif + DisableThreadLibraryCalls(cast(module)); + MH_Initialize(); Hooks::init(); diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index f70fa9b..e9fb745 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -71,6 +71,34 @@ bool OverlayLayer::init() { label->setPosition({win_size.width - 55, win_size.height - 85}); addChild(label); + auto check_off_sprite = CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); + auto check_on_sprite = CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); + + m_x_pos_toggle = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(OverlayLayer::on_x_pos)); + m_x_pos_toggle->setPosition({win_size.width - 35, -120}); + menu->addChild(m_x_pos_toggle); + + m_frame_toggle = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(OverlayLayer::on_frame)); + m_frame_toggle->setPosition({win_size.width - 35, -155}); + menu->addChild(m_frame_toggle); + + if (rs.get_default_type() == ReplayType::XPOS) + m_x_pos_toggle->toggle(true); + else + m_frame_toggle->toggle(true); + + label = CCLabelBMFont::create("X Pos", "bigFont.fnt"); + label->setAnchorPoint({1, 0.5}); + label->setScale(0.8f); + label->setPosition({win_size.width - 55, win_size.height - 120}); + addChild(label); + + label = CCLabelBMFont::create("Frame", "bigFont.fnt"); + label->setAnchorPoint({1, 0.5}); + label->setScale(0.8f); + label->setPosition({win_size.width - 55, win_size.height - 155}); + addChild(label); + sprite = CCSprite::create("square02b_001.png"); sprite->setColor({0, 0, 0}); sprite->setOpacity(69); @@ -113,7 +141,9 @@ void OverlayLayer::update_info_text() { auto& rs = ReplaySystem::get_instance(); auto& replay = rs.get_replay(); std::stringstream stream; - stream << "Current Replay:\nFPS: " << replay.get_fps() << "\nActions: " << replay.get_actions().size(); + stream << "Current Replay:\nFPS: " << replay.get_fps(); + stream << "\nActions: " << replay.get_actions().size(); + stream << "\nMode: " << (replay.get_type() == ReplayType::XPOS ? "X Pos" : "Frame"); m_replay_info->setString(stream.str().c_str()); } @@ -203,4 +233,16 @@ void OverlayLayer::on_load(CCObject*) { void OverlayLayer::keyBackClicked() { _update_default_fps(); gd::FLAlertLayer::keyBackClicked(); +} + +void OverlayLayer::on_x_pos(CCObject*) { + m_x_pos_toggle->toggle(false); + m_frame_toggle->toggle(false); + ReplaySystem::get_instance().set_default_type(ReplayType::XPOS); +} + +void OverlayLayer::on_frame(CCObject*) { + m_x_pos_toggle->toggle(false); + m_frame_toggle->toggle(false); + ReplaySystem::get_instance().set_default_type(ReplayType::FRAME); } \ No newline at end of file diff --git a/src/overlay_layer.hpp b/src/overlay_layer.hpp index 6fd6605..40383b1 100644 --- a/src/overlay_layer.hpp +++ b/src/overlay_layer.hpp @@ -4,6 +4,8 @@ class OverlayLayer : public gd::FLAlertLayer, public CCTextFieldDelegate, public gd::FLAlertLayerProtocol { gd::CCTextInputNode* m_fps_input; CCLabelBMFont* m_replay_info; + gd::CCMenuItemToggler* m_x_pos_toggle; + gd::CCMenuItemToggler* m_frame_toggle; inline void _update_default_fps(); void _handle_load_replay(); @@ -37,6 +39,9 @@ class OverlayLayer : public gd::FLAlertLayer, public CCTextFieldDelegate, public void on_save(CCObject*); void on_load(CCObject*); + void on_x_pos(CCObject*); + void on_frame(CCObject*); + virtual void keyBackClicked(); virtual void keyDown(enumKeyCodes key) { // keyDown overwrites keyBackClicked, how fun diff --git a/src/replay_system.hpp b/src/replay_system.hpp index 482d90c..52b960b 100644 --- a/src/replay_system.hpp +++ b/src/replay_system.hpp @@ -14,7 +14,7 @@ class ReplaySystem { Replay replay; RSState state = NOTHING; - ReplayType replay_type; + ReplayType default_type; size_t action_index = 0; @@ -22,7 +22,7 @@ class ReplaySystem { bool frame_advance = false; - ReplaySystem() : default_fps(120.f), replay(default_fps), replay_type(replay.get_type()) {} + ReplaySystem() : default_fps(120.f), replay(default_fps), default_type(replay.get_type()) {} void _update_status_label(); @@ -37,6 +37,9 @@ class ReplaySystem { inline auto get_default_fps() { return default_fps; } inline void set_default_fps(float fps) { default_fps = fps; } + inline auto get_default_type() { return default_type; } + inline void set_default_type(ReplayType type) { default_type = type; } + inline bool is_playing() { return state == PLAYING; } inline bool is_recording() { return state == RECORDING; } @@ -48,7 +51,7 @@ class ReplaySystem { void toggle_recording() { state = is_recording() ? NOTHING : RECORDING; if (!is_recording()) frame_advance = false; - else replay = Replay(default_fps); + else replay = Replay(default_fps, default_type); frame_offset = 0; _update_status_label(); } From cfb2c77320ef924c0636265f4d9a65940dd67602 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sat, 12 Jun 2021 20:20:40 -0300 Subject: [PATCH 44/95] oops --- src/dllmain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dllmain.cpp b/src/dllmain.cpp index 91327d6..eab36ee 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -3,7 +3,7 @@ #include "hooks.hpp" -#define _DEBUG +// #define _DEBUG DWORD WINAPI thread_entry(void* module) { #ifdef _DEBUG From 273b1e0cacbcb3c26cc1fbb71e891af3bffa5ebc Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sun, 13 Jun 2021 09:08:26 -0300 Subject: [PATCH 45/95] make loaded replays default to x pos --- src/Replay.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Replay.cpp b/src/Replay.cpp index 6815274..eb42961 100644 --- a/src/Replay.cpp +++ b/src/Replay.cpp @@ -64,7 +64,7 @@ void Replay::save(const std::string& path) { } Replay Replay::load(const std::string& path) { - Replay replay(0); + Replay replay(0, ReplayType::XPOS); std::ifstream file; file.open(path, std::ios::binary | std::ios::in); From cd7524be0747a6fba1d2e7d08aca14f65f60bfd3 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sun, 13 Jun 2021 09:18:42 -0300 Subject: [PATCH 46/95] rename to replay.cpp --- src/{Replay.cpp => replay.cpp} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/{Replay.cpp => replay.cpp} (100%) diff --git a/src/Replay.cpp b/src/replay.cpp similarity index 100% rename from src/Replay.cpp rename to src/replay.cpp From ca4428283e79ad7fb29695989cb254924408e332 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Tue, 22 Jun 2021 13:28:06 -0300 Subject: [PATCH 47/95] real time mode and update gd.h --- libraries/gd.h | 2 +- src/hooks.cpp | 42 ++++++++++++++++++++++++++++++++++++++---- src/hooks.hpp | 2 ++ src/overlay_layer.cpp | 18 ++++++++++++++++++ src/overlay_layer.hpp | 2 ++ src/practice_fixes.hpp | 4 ++-- src/replay_system.cpp | 4 ++-- src/replay_system.hpp | 2 ++ 8 files changed, 67 insertions(+), 9 deletions(-) diff --git a/libraries/gd.h b/libraries/gd.h index 4661609..8008dee 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit 466160936eb892fe02a684a8698c07c8d98e19eb +Subproject commit 8008deeeba5a62da9e307c4ced3819849035104f diff --git a/src/hooks.cpp b/src/hooks.cpp index f8f48d6..5915611 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -32,6 +32,8 @@ void Hooks::init() { ADD_GD_HOOK(0x20D810, PlayLayer::onQuit); ADD_GD_HOOK(0x1E60E0, PlayLayer::onEditor); + ADD_GD_HOOK(0x205460, PlayLayer::updateVisiblity); + ADD_GD_HOOK(0x1E4620, PauseLayer_init); ADD_GD_HOOK(0x1f4ff0, PlayerObject_ringJump); @@ -39,14 +41,41 @@ void Hooks::init() { ADD_GD_HOOK(0x10ed50, GJBaseGameLayer_bumpPlayer); } +// yes these are global, too lazy to store them in replaysystem or smth +// not like theyre used anywhere else atm +bool g_disable_render = false; +float g_left_over = 0.f; + void __fastcall Hooks::CCScheduler_update_H(CCScheduler* self, int, float dt) { auto& rs = ReplaySystem::get_instance(); if (rs.is_playing() || rs.is_recording() && gd::GameManager::sharedState()->getPlayLayer()) { - auto fps = rs.get_replay().get_fps(); + const auto fps = rs.get_replay().get_fps(); auto speedhack = self->getTimeScale(); - dt = 1.f / fps / speedhack; + + const float target_dt = 1.f / fps / speedhack; + + if (!rs.real_time_mode) + return CCScheduler_update(self, target_dt); + + // todo: find ways to disable more render stuff + g_disable_render = true; + + // TODO: not have this min() + // doing the commented out if below causes really weird stutters for some reason + const int times = min(static_cast((dt + g_left_over) / target_dt), 150); + // if the fps is really low then dont run it a lot of times + // if (dt > 1.f / 10.f) { + // times = min(times, 100); + // } + for (int i = 0; i < times; ++i) { + if (i == times - 1) + g_disable_render = false; + CCScheduler_update(self, target_dt); + } + g_left_over += dt - target_dt * times; + } else { + CCScheduler_update(self, dt); } - CCScheduler_update(self, dt); } void __fastcall Hooks::CCKeyboardDispatcher_dispatchKeyboardMSG_H(CCKeyboardDispatcher* self, int, int key, bool down) { @@ -211,4 +240,9 @@ void __fastcall Hooks::GJBaseGameLayer_bumpPlayer_H(gd::GJBaseGameLayer* self, i bool b = object->m_hasBeenActivatedP2; GJBaseGameLayer_bumpPlayer(self, player, object); _handle_activated_object(a, b, object); -} \ No newline at end of file +} + +void __fastcall Hooks::PlayLayer::updateVisiblity_H(gd::PlayLayer* self, int) { + if (!g_disable_render) + updateVisiblity(self); +} diff --git a/src/hooks.hpp b/src/hooks.hpp index 870cd4d..7b930f4 100644 --- a/src/hooks.hpp +++ b/src/hooks.hpp @@ -30,6 +30,8 @@ namespace Hooks { // maybe hook the destructor instead ? _THISCALL_HOOK(onQuit, void*, gd::PlayLayer) _THISCALL_HOOK(onEditor, void*, gd::PlayLayer, void*) + + _THISCALL_HOOK(updateVisiblity, void, gd::PlayLayer) } _THISCALL_HOOK(PauseLayer_init, bool, gd::PauseLayer) diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index e9fb745..25e5bef 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -99,6 +99,17 @@ bool OverlayLayer::init() { label->setPosition({win_size.width - 55, win_size.height - 155}); addChild(label); + auto toggle = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(OverlayLayer::on_toggle_real_time)); + toggle->setPosition({win_size.width - 35, -190}); + toggle->toggle(rs.real_time_mode); + menu->addChild(toggle); + + label = CCLabelBMFont::create("Real Time", "bigFont.fnt"); + label->setAnchorPoint({1, 0.5}); + label->setScale(0.8f); + label->setPosition({win_size.width - 55, win_size.height - 190}); + addChild(label); + sprite = CCSprite::create("square02b_001.png"); sprite->setColor({0, 0, 0}); sprite->setOpacity(69); @@ -245,4 +256,11 @@ void OverlayLayer::on_frame(CCObject*) { m_x_pos_toggle->toggle(false); m_frame_toggle->toggle(false); ReplaySystem::get_instance().set_default_type(ReplayType::FRAME); +} + +void OverlayLayer::on_toggle_real_time(CCObject* toggle_) { + auto toggle = cast(toggle_); + if (toggle != nullptr) { + ReplaySystem::get_instance().real_time_mode = !toggle->isOn(); // why is it flipped + } } \ No newline at end of file diff --git a/src/overlay_layer.hpp b/src/overlay_layer.hpp index 40383b1..68eb065 100644 --- a/src/overlay_layer.hpp +++ b/src/overlay_layer.hpp @@ -42,6 +42,8 @@ class OverlayLayer : public gd::FLAlertLayer, public CCTextFieldDelegate, public void on_x_pos(CCObject*); void on_frame(CCObject*); + void on_toggle_real_time(CCObject*); + virtual void keyBackClicked(); virtual void keyDown(enumKeyCodes key) { // keyDown overwrites keyBackClicked, how fun diff --git a/src/practice_fixes.hpp b/src/practice_fixes.hpp index 9afb7c2..5e5b27f 100644 --- a/src/practice_fixes.hpp +++ b/src/practice_fixes.hpp @@ -7,10 +7,10 @@ struct CheckpointData { float rotation; bool buffer_orb; static CheckpointData from_player(gd::PlayerObject* player) { - return { player->yAccel, player->getRotation(), player->canBufferOrb }; + return { player->m_yAccel, player->getRotation(), player->m_hasJustHeld }; }; void apply(gd::PlayerObject* player) { - player->yAccel = y_accel; + player->m_yAccel = y_accel; player->setRotation(rotation); } }; diff --git a/src/replay_system.cpp b/src/replay_system.cpp index 7decb77..baa1a6b 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -64,13 +64,13 @@ void ReplaySystem::on_reset() { else replay.remove_actions_after(get_frame()); const auto& actions = replay.get_actions(); - bool holding = play_layer->m_player1->isActuallyHolding; + bool holding = play_layer->m_player1->m_isHolding; if ((holding && actions.empty()) || (!actions.empty() && actions.back().hold != holding)) { record_action(holding, true, false); if (holding) { Hooks::PlayLayer::releaseButton(play_layer, 0, true); Hooks::PlayLayer::pushButton(play_layer, 0, true); - play_layer->m_player1->canBufferOrb = true; + play_layer->m_player1->m_hasJustHeld = true; } } else if (!actions.empty() && actions.back().hold && holding && !practice_fixes.checkpoints.empty() && practice_fixes.checkpoints.top().player1.buffer_orb) { Hooks::PlayLayer::releaseButton(play_layer, 0, true); diff --git a/src/replay_system.hpp b/src/replay_system.hpp index 52b960b..461fe19 100644 --- a/src/replay_system.hpp +++ b/src/replay_system.hpp @@ -76,4 +76,6 @@ class ReplaySystem { inline void set_frame_advance(bool b) { frame_advance = b; } unsigned get_frame(); + + bool real_time_mode = true; // fuck it we going public }; \ No newline at end of file From 748a6e7663349534485586413c6bbe05de19c95b Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 29 Jul 2021 20:35:00 -0300 Subject: [PATCH 48/95] extend CheckpointObject and update gd.h --- .gitmodules | 6 ++--- CMakeLists.txt | 23 +++++++++--------- libraries/cocos-headers | 1 + libraries/gd.h | 2 +- src/dllmain.cpp | 6 ++--- src/hooks.cpp | 20 ++++----------- src/hooks.hpp | 8 +++--- src/practice_fixes.cpp | 23 ++++++++++++++++++ src/practice_fixes.hpp | 54 +++++++++++++++++++++-------------------- src/replay_system.cpp | 17 +++++++------ src/utils.hpp | 8 +++--- 11 files changed, 95 insertions(+), 73 deletions(-) create mode 160000 libraries/cocos-headers create mode 100644 src/practice_fixes.cpp diff --git a/.gitmodules b/.gitmodules index dee3473..e4269eb 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,3 @@ -[submodule "libraries/cappuccino-sdk"] - path = libraries/cappuccino-sdk - url = https://github.com/AndreNIH/CappuccinoSDK.git [submodule "libraries/minhook"] path = libraries/minhook url = https://github.com/TsudaKageyu/minhook.git @@ -10,3 +7,6 @@ [submodule "libraries/nfd"] path = libraries/nfd url = https://github.com/mlabbe/nativefiledialog +[submodule "libraries/cocos-headers"] + path = libraries/cocos-headers + url = https://github.com/HJfod/cocos-headers.git diff --git a/CMakeLists.txt b/CMakeLists.txt index dc4654f..e9d2f56 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,23 +18,24 @@ file( ) add_library(replay-bot SHARED ${SOURCE_FILES}) -set(CAPPUCCINO_DIR ${CMAKE_SOURCE_DIR}/libraries/cappuccino-sdk/template/default-cpp/cappuccino-sdk) - target_include_directories(replay-bot PRIVATE libraries/gd.h/include libraries/gd.h libraries/minhook/include libraries/nfd/src/include - ${CAPPUCCINO_DIR}/incl/cocos2dx/ - ${CAPPUCCINO_DIR}/incl/cocos2dx/include - ${CAPPUCCINO_DIR}/incl/cocos2dx/kazmath/include - ${CAPPUCCINO_DIR}/incl/cocos2dx/platform/win32 - ${CAPPUCCINO_DIR}/incl/cocos2dx/platform/third_party/win32 - ${CAPPUCCINO_DIR}/incl/cocos2dx/platform/third_party/win32/OGLES + libraries/cocos-headers/cocos2dx/ + libraries/cocos-headers/cocos2dx/include + libraries/cocos-headers/cocos2dx/kazmath/include + libraries/cocos-headers/cocos2dx/platform/win32 + libraries/cocos-headers/cocos2dx/platform/third_party/win32 + libraries/cocos-headers/cocos2dx/platform/third_party/win32/OGLES + libraries/cocos-headers/extensions/ ) add_subdirectory(libraries/minhook) -# TODO: make it not build minhook every time -target_link_libraries(replay-bot minhook) -target_link_libraries(replay-bot ${CAPPUCCINO_DIR}/lib/cappuccino.lib) \ No newline at end of file +target_link_libraries(replay-bot + minhook + ${CMAKE_SOURCE_DIR}/libraries/cocos-headers/cocos2dx/libcocos2d.lib + ${CMAKE_SOURCE_DIR}/libraries/cocos-headers/extensions/libExtensions.lib +) diff --git a/libraries/cocos-headers b/libraries/cocos-headers new file mode 160000 index 0000000..b4b368c --- /dev/null +++ b/libraries/cocos-headers @@ -0,0 +1 @@ +Subproject commit b4b368cafd1f4caf6765c2a3f508fc1b53cf4d35 diff --git a/libraries/gd.h b/libraries/gd.h index 8008dee..c85747d 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit 8008deeeba5a62da9e307c4ced3819849035104f +Subproject commit c85747d78f9c7fbba61f04ec58aabadc9c0510c4 diff --git a/src/dllmain.cpp b/src/dllmain.cpp index eab36ee..5ecffe2 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -3,10 +3,10 @@ #include "hooks.hpp" -// #define _DEBUG +// #define SHOW_CONSOLE DWORD WINAPI thread_entry(void* module) { -#ifdef _DEBUG +#ifdef SHOW_CONSOLE AllocConsole(); std::ofstream conout("CONOUT$", std::ios::out); std::ifstream conin("CONIN$", std::ios::in); @@ -22,7 +22,7 @@ DWORD WINAPI thread_entry(void* module) { MH_EnableHook(MH_ALL_HOOKS); -#ifdef _DEBUG +#ifdef SHOW_CONSOLE std::getline(std::cin, std::string()); MH_Uninitialize(); conout.close(); diff --git a/src/hooks.cpp b/src/hooks.cpp index 5915611..52849dd 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -15,6 +15,7 @@ auto add_cocos_hook(const char* symbol, void* hook, void* orig) { void Hooks::init() { ADD_COCOS_HOOK("?update@CCScheduler@cocos2d@@UAEXM@Z", CCScheduler_update); ADD_COCOS_HOOK("?dispatchKeyboardMSG@CCKeyboardDispatcher@cocos2d@@QAE_NW4enumKeyCodes@2@_N@Z", CCKeyboardDispatcher_dispatchKeyboardMSG); + ADD_GD_HOOK(0x20ddd0, CheckpointObject_create); ADD_GD_HOOK(0x1FB780, PlayLayer::init); ADD_GD_HOOK(0x2029C0, PlayLayer::update); @@ -25,9 +26,6 @@ void Hooks::init() { ADD_GD_HOOK(0x20D3C0, PlayLayer::pauseGame); - ADD_GD_HOOK(0x20B050, PlayLayer::createCheckpoint); - ADD_GD_HOOK(0x20B830, PlayLayer::removeLastCheckpoint); - ADD_GD_HOOK(0x1FD3D0, PlayLayer::levelComplete); ADD_GD_HOOK(0x20D810, PlayLayer::onQuit); ADD_GD_HOOK(0x1E60E0, PlayLayer::onEditor); @@ -154,18 +152,11 @@ void __fastcall Hooks::PlayLayer::pauseGame_H(gd::PlayLayer* self, int, bool idk } -int __fastcall Hooks::PlayLayer::createCheckpoint_H(gd::PlayLayer* self, int) { - auto& rs = ReplaySystem::get_instance(); - if (rs.is_recording()) rs.get_practice_fixes().add_checkpoint(rs.get_frame()); - return createCheckpoint(self); +CCObject* __fastcall Hooks::CheckpointObject_create_H() { + std::cout << sizeof(CheckpointObjectMod) << std::endl; + return CheckpointObjectMod::create(); } -void* __fastcall Hooks::PlayLayer::removeLastCheckpoint_H(gd::PlayLayer* self, int) { - ReplaySystem::get_instance().get_practice_fixes().remove_checkpoint(); - return removeLastCheckpoint(self); -} - - void* __fastcall Hooks::PlayLayer::levelComplete_H(gd::PlayLayer* self, int) { ReplaySystem::get_instance().reset_state(); return levelComplete(self); @@ -173,7 +164,6 @@ void* __fastcall Hooks::PlayLayer::levelComplete_H(gd::PlayLayer* self, int) { void _on_exit_level() { auto& rs = ReplaySystem::get_instance(); - rs.get_practice_fixes().clear_checkpoints(); rs.reset_state(); } @@ -213,7 +203,7 @@ bool __fastcall Hooks::PauseLayer_init_H(gd::PauseLayer* self, int) { void _handle_activated_object(bool a, bool b, gd::GameObject* object) { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); auto& rs = ReplaySystem::get_instance(); - if (play_layer && play_layer->is_practice_mode && rs.is_recording()) { + if (play_layer && play_layer->m_isPracticeMode && rs.is_recording()) { if (object->m_hasBeenActivated && !a) rs.get_practice_fixes().add_activated_object(object); if (object->m_hasBeenActivatedP2 && !b) diff --git a/src/hooks.hpp b/src/hooks.hpp index 7b930f4..5e23f7f 100644 --- a/src/hooks.hpp +++ b/src/hooks.hpp @@ -6,11 +6,16 @@ inline ret_type(__thiscall* name)(self_type* self, __VA_ARGS__); \ ret_type __fastcall name##_H(self_type* self, int, __VA_ARGS__); +#define _FASTCALL_HOOK(name, ret_type, ...) \ +inline ret_type(__fastcall* name)(__VA_ARGS__); \ +ret_type __fastcall name##_H(__VA_ARGS__); + namespace Hooks { void init(); _THISCALL_HOOK(CCScheduler_update, void, CCScheduler, float dt) _THISCALL_HOOK(CCKeyboardDispatcher_dispatchKeyboardMSG, void, CCKeyboardDispatcher, int key, bool down) + _FASTCALL_HOOK(CheckpointObject_create, CCObject*) namespace PlayLayer { _THISCALL_HOOK(init, bool, gd::PlayLayer, void* level) @@ -22,9 +27,6 @@ namespace Hooks { _THISCALL_HOOK(pauseGame, void, gd::PlayLayer, bool) - _THISCALL_HOOK(createCheckpoint, int, gd::PlayLayer) - _THISCALL_HOOK(removeLastCheckpoint, void*, gd::PlayLayer) - _THISCALL_HOOK(levelComplete, void*, gd::PlayLayer) // these are only for stopping recording/playing // maybe hook the destructor instead ? diff --git a/src/practice_fixes.cpp b/src/practice_fixes.cpp new file mode 100644 index 0000000..067417a --- /dev/null +++ b/src/practice_fixes.cpp @@ -0,0 +1,23 @@ +#include "practice_fixes.hpp" +#include "replay_system.hpp" + +void CheckpointObjectMod::saveInfo() { + auto& rs = ReplaySystem::get_instance(); + m_checkpoint = rs.get_practice_fixes().create_checkpoint(); +} + +Checkpoint PracticeFixes::create_checkpoint() { + auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); + if (play_layer) { + auto& rs = ReplaySystem::get_instance(); + return { + CheckpointData::from_player(play_layer->m_player1), + CheckpointData::from_player(play_layer->m_player2), + activated_objects.size(), + activated_objects_p2.size(), + rs.get_frame() + }; + } else { + return {}; + } +} \ No newline at end of file diff --git a/src/practice_fixes.hpp b/src/practice_fixes.hpp index 5e5b27f..b324942 100644 --- a/src/practice_fixes.hpp +++ b/src/practice_fixes.hpp @@ -9,7 +9,7 @@ struct CheckpointData { static CheckpointData from_player(gd::PlayerObject* player) { return { player->m_yAccel, player->getRotation(), player->m_hasJustHeld }; }; - void apply(gd::PlayerObject* player) { + void apply(gd::PlayerObject* player) const { player->m_yAccel = y_accel; player->setRotation(rotation); } @@ -23,48 +23,50 @@ struct Checkpoint { unsigned frame; }; +class CheckpointObjectMod : public gd::CheckpointObject { +public: + Checkpoint m_checkpoint; // great name i know + void saveInfo(); + static auto create() { + auto ret = new CheckpointObjectMod; + if (ret && ret->init()) { + ret->autorelease(); + ret->saveInfo(); + } else { + CC_SAFE_DELETE(ret); + } + return ret; + } +}; + class PracticeFixes { std::stack checkpoints; std::vector activated_objects; std::vector activated_objects_p2; friend class ReplaySystem; public: - void add_checkpoint(unsigned frame = 0) { + Checkpoint create_checkpoint(); + + Checkpoint get_last_checkpoint() { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); - checkpoints.push({ - CheckpointData::from_player(play_layer->m_player1), - CheckpointData::from_player(play_layer->m_player2), - activated_objects.size(), - activated_objects_p2.size(), - frame - }); - } - - void remove_checkpoint() { - if (!checkpoints.empty()) { - checkpoints.pop(); - if (checkpoints.empty()) { - activated_objects.clear(); - } else { - activated_objects.erase(activated_objects.begin() + checkpoints.top().activated_objects_size, activated_objects.end()); + if (play_layer && play_layer->m_checkpoints->count()) { + auto checkpoint_obj = dynamic_cast(play_layer->m_checkpoints->lastObject()); + if (checkpoint_obj) { + return checkpoint_obj->m_checkpoint; } } + return {}; } void apply_checkpoint() { - if (!checkpoints.empty()) { - auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); - auto checkpoint = checkpoints.top(); + auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); + if (play_layer) { + const auto checkpoint = get_last_checkpoint(); checkpoint.player1.apply(play_layer->m_player1); checkpoint.player2.apply(play_layer->m_player2); } } - void clear_checkpoints() { - while (!checkpoints.empty()) - checkpoints.pop(); - } - void add_activated_object(gd::GameObject* object) { activated_objects.push_back(object); } diff --git a/src/replay_system.cpp b/src/replay_system.cpp index baa1a6b..9cdeb44 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -11,7 +11,7 @@ void ReplaySystem::record_action(bool hold, bool player1, bool flip) { action.hold = hold; action.player2 = is_two_player && !player1; if (replay.get_type() == ReplayType::XPOS) - action.x = play_layer->m_player1->position.x; + action.x = play_layer->m_player1->m_position.x; else if (replay.get_type() == ReplayType::FRAME) action.frame = get_frame(); replay.add_action(action); @@ -28,7 +28,7 @@ void ReplaySystem::play_action(const Action& action) { unsigned ReplaySystem::get_frame() { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); if (play_layer != nullptr) { - return static_cast(play_layer->time * replay.get_fps()) + frame_offset; + return static_cast(play_layer->m_time * replay.get_fps()) + frame_offset; } return 0; } @@ -40,16 +40,17 @@ void ReplaySystem::on_reset() { Hooks::PlayLayer::releaseButton(play_layer, 0, true); action_index = 0; } else if (is_recording()) { - if (practice_fixes.checkpoints.empty()) { + bool has_checkpoints = play_layer->m_checkpoints->count(); + const auto checkpoint = practice_fixes.get_last_checkpoint(); + if (!has_checkpoints) { practice_fixes.activated_objects.clear(); practice_fixes.activated_objects_p2.clear(); frame_offset = 0; } else { - frame_offset = practice_fixes.checkpoints.top().frame; + frame_offset = checkpoint.frame; constexpr auto delete_from = [&](auto& vec, size_t index) { vec.erase(vec.begin() + index, vec.end()); }; - const auto& checkpoint = practice_fixes.checkpoints.top(); delete_from(practice_fixes.activated_objects, checkpoint.activated_objects_size); delete_from(practice_fixes.activated_objects_p2, checkpoint.activated_objects_p2_size); for (const auto& object : practice_fixes.activated_objects) { @@ -60,7 +61,7 @@ void ReplaySystem::on_reset() { } } if (replay.get_type() == ReplayType::XPOS) - replay.remove_actions_after(play_layer->m_player1->position.x); + replay.remove_actions_after(play_layer->m_player1->m_position.x); else replay.remove_actions_after(get_frame()); const auto& actions = replay.get_actions(); @@ -72,7 +73,7 @@ void ReplaySystem::on_reset() { Hooks::PlayLayer::pushButton(play_layer, 0, true); play_layer->m_player1->m_hasJustHeld = true; } - } else if (!actions.empty() && actions.back().hold && holding && !practice_fixes.checkpoints.empty() && practice_fixes.checkpoints.top().player1.buffer_orb) { + } else if (!actions.empty() && actions.back().hold && holding && has_checkpoints && checkpoint.player1.buffer_orb) { Hooks::PlayLayer::releaseButton(play_layer, 0, true); Hooks::PlayLayer::pushButton(play_layer, 0, true); } @@ -84,7 +85,7 @@ void ReplaySystem::on_reset() { void ReplaySystem::handle_playing() { if (is_playing()) { - auto x = gd::GameManager::sharedState()->getPlayLayer()->m_player1->position.x; + auto x = gd::GameManager::sharedState()->getPlayLayer()->m_player1->m_position.x; auto& actions = replay.get_actions(); Action action; if (replay.get_type() == ReplayType::XPOS) { diff --git a/src/utils.hpp b/src/utils.hpp index 9d6c091..042b9b4 100644 --- a/src/utils.hpp +++ b/src/utils.hpp @@ -1,5 +1,4 @@ -#ifndef __UTILS_HPP -#define __UTILS_HPP +#pragma once #include "includes.h" #include @@ -22,4 +21,7 @@ inline void patch(void* loc, std::vector bytes) { VirtualProtect(loc, size, old_prot, &old_prot); } -#endif \ No newline at end of file +template +R& from_offset(U base, int offset) { + return *cast(cast(base) + offset); +} From d754f67c65c27ca86ec24bc363f98ae39782b255 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 29 Jul 2021 20:38:44 -0300 Subject: [PATCH 49/95] woo 100 commits --- libraries/cappuccino-sdk | 1 - 1 file changed, 1 deletion(-) delete mode 160000 libraries/cappuccino-sdk diff --git a/libraries/cappuccino-sdk b/libraries/cappuccino-sdk deleted file mode 160000 index 04a793d..0000000 --- a/libraries/cappuccino-sdk +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 04a793d9756816b6cd1c69cc59653ad0b4cd0020 From f2c13dba8bd328a714511522772c3907ebda877e Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Fri, 30 Jul 2021 11:57:19 -0300 Subject: [PATCH 50/95] properly restore frame offset and other things from last checkpoint --- src/hooks.cpp | 1 - src/replay_system.cpp | 58 ++++++++++++++++++++++++++----------------- src/replay_system.hpp | 8 +++--- 3 files changed, 40 insertions(+), 27 deletions(-) diff --git a/src/hooks.cpp b/src/hooks.cpp index 52849dd..69006b4 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -153,7 +153,6 @@ void __fastcall Hooks::PlayLayer::pauseGame_H(gd::PlayLayer* self, int, bool idk CCObject* __fastcall Hooks::CheckpointObject_create_H() { - std::cout << sizeof(CheckpointObjectMod) << std::endl; return CheckpointObjectMod::create(); } diff --git a/src/replay_system.cpp b/src/replay_system.cpp index 9cdeb44..4c489c3 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -33,13 +33,21 @@ unsigned ReplaySystem::get_frame() { return 0; } +void ReplaySystem::update_frame_offset() { + // if there is no last checkpoint then it should default to 0 + frame_offset = practice_fixes.get_last_checkpoint().frame; +} + void ReplaySystem::on_reset() { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); if (is_playing()) { + update_frame_offset(); Hooks::PlayLayer::releaseButton(play_layer, 0, false); Hooks::PlayLayer::releaseButton(play_layer, 0, true); action_index = 0; - } else if (is_recording()) { + practice_fixes.activated_objects.clear(); + practice_fixes.activated_objects_p2.clear(); + } else { bool has_checkpoints = play_layer->m_checkpoints->count(); const auto checkpoint = practice_fixes.get_last_checkpoint(); if (!has_checkpoints) { @@ -53,33 +61,37 @@ void ReplaySystem::on_reset() { }; delete_from(practice_fixes.activated_objects, checkpoint.activated_objects_size); delete_from(practice_fixes.activated_objects_p2, checkpoint.activated_objects_p2_size); - for (const auto& object : practice_fixes.activated_objects) { - object->m_hasBeenActivated = true; - } - for (const auto& object : practice_fixes.activated_objects_p2) { - object->m_hasBeenActivatedP2 = true; + if (is_recording()) { + for (const auto& object : practice_fixes.activated_objects) { + object->m_hasBeenActivated = true; + } + for (const auto& object : practice_fixes.activated_objects_p2) { + object->m_hasBeenActivatedP2 = true; + } } } - if (replay.get_type() == ReplayType::XPOS) - replay.remove_actions_after(play_layer->m_player1->m_position.x); - else - replay.remove_actions_after(get_frame()); - const auto& actions = replay.get_actions(); - bool holding = play_layer->m_player1->m_isHolding; - if ((holding && actions.empty()) || (!actions.empty() && actions.back().hold != holding)) { - record_action(holding, true, false); - if (holding) { + if (is_recording()) { + if (replay.get_type() == ReplayType::XPOS) + replay.remove_actions_after(play_layer->m_player1->m_position.x); + else + replay.remove_actions_after(get_frame()); + const auto& actions = replay.get_actions(); + bool holding = play_layer->m_player1->m_isHolding; + if ((holding && actions.empty()) || (!actions.empty() && actions.back().hold != holding)) { + record_action(holding, true, false); + if (holding) { + Hooks::PlayLayer::releaseButton(play_layer, 0, true); + Hooks::PlayLayer::pushButton(play_layer, 0, true); + play_layer->m_player1->m_hasJustHeld = true; + } + } else if (!actions.empty() && actions.back().hold && holding && has_checkpoints && checkpoint.player1.buffer_orb) { Hooks::PlayLayer::releaseButton(play_layer, 0, true); Hooks::PlayLayer::pushButton(play_layer, 0, true); - play_layer->m_player1->m_hasJustHeld = true; } - } else if (!actions.empty() && actions.back().hold && holding && has_checkpoints && checkpoint.player1.buffer_orb) { - Hooks::PlayLayer::releaseButton(play_layer, 0, true); - Hooks::PlayLayer::pushButton(play_layer, 0, true); + if (play_layer->m_levelSettings->m_twoPlayerMode) + record_action(false, false, false); + practice_fixes.apply_checkpoint(); } - if (play_layer->m_levelSettings->m_twoPlayerMode) - record_action(false, false, false); - practice_fixes.apply_checkpoint(); } } @@ -121,7 +133,7 @@ auto _create_status_label(CCLayer* layer) { void ReplaySystem::_update_status_label() { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); if (play_layer) { - auto label = cast(play_layer->getChildByTag(10032)); + auto label = cast(play_layer->getChildByTag(STATUS_LABEL_TAG)); if (!label) label = _create_status_label(play_layer); switch (state) { diff --git a/src/replay_system.hpp b/src/replay_system.hpp index 461fe19..843a2d5 100644 --- a/src/replay_system.hpp +++ b/src/replay_system.hpp @@ -43,23 +43,25 @@ class ReplaySystem { inline bool is_playing() { return state == PLAYING; } inline bool is_recording() { return state == RECORDING; } + void update_frame_offset(); + void toggle_playing() { state = is_playing() ? NOTHING : PLAYING; - frame_offset = 0; + update_frame_offset(); _update_status_label(); } void toggle_recording() { state = is_recording() ? NOTHING : RECORDING; if (!is_recording()) frame_advance = false; else replay = Replay(default_fps, default_type); - frame_offset = 0; + update_frame_offset(); _update_status_label(); } void reset_state() { state = NOTHING; frame_advance = false; - frame_offset = 0; + update_frame_offset(); _update_status_label(); } From 8a556e51e4ddf078621c98c4a20281cfc5d0af8e Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Tue, 3 Aug 2021 22:39:50 -0300 Subject: [PATCH 51/95] showcase mode --- src/overlay_layer.cpp | 20 +++++++++++++++++++- src/overlay_layer.hpp | 1 + src/replay_system.cpp | 2 +- src/replay_system.hpp | 1 + 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index 25e5bef..bae7362 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -110,6 +110,17 @@ bool OverlayLayer::init() { label->setPosition({win_size.width - 55, win_size.height - 190}); addChild(label); + toggle = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(OverlayLayer::on_toggle_showcase)); + toggle->setPosition({win_size.width - 35, -225}); + toggle->toggle(rs.showcase_mode); + menu->addChild(toggle); + + label = CCLabelBMFont::create("Showcase Mode", "bigFont.fnt"); + label->setAnchorPoint({1, 0.5}); + label->setScale(0.6f); + label->setPosition({win_size.width - 55, win_size.height - 225}); + addChild(label); + sprite = CCSprite::create("square02b_001.png"); sprite->setColor({0, 0, 0}); sprite->setOpacity(69); @@ -263,4 +274,11 @@ void OverlayLayer::on_toggle_real_time(CCObject* toggle_) { if (toggle != nullptr) { ReplaySystem::get_instance().real_time_mode = !toggle->isOn(); // why is it flipped } -} \ No newline at end of file +} + +void OverlayLayer::on_toggle_showcase(CCObject* toggle_) { + auto toggle = cast(toggle_); + if (toggle != nullptr) { + ReplaySystem::get_instance().showcase_mode = !toggle->isOn(); + } +} diff --git a/src/overlay_layer.hpp b/src/overlay_layer.hpp index 68eb065..a2928b6 100644 --- a/src/overlay_layer.hpp +++ b/src/overlay_layer.hpp @@ -43,6 +43,7 @@ class OverlayLayer : public gd::FLAlertLayer, public CCTextFieldDelegate, public void on_frame(CCObject*); void on_toggle_real_time(CCObject*); + void on_toggle_showcase(CCObject*); virtual void keyBackClicked(); virtual void keyDown(enumKeyCodes key) { diff --git a/src/replay_system.cpp b/src/replay_system.cpp index 4c489c3..bc76db0 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -144,7 +144,7 @@ void ReplaySystem::_update_status_label() { label->setString("Recording"); break; case PLAYING: - label->setString("Playing"); + label->setString(showcase_mode ? "" : "Playing"); break; } } diff --git a/src/replay_system.hpp b/src/replay_system.hpp index 843a2d5..4e0ae4a 100644 --- a/src/replay_system.hpp +++ b/src/replay_system.hpp @@ -80,4 +80,5 @@ class ReplaySystem { unsigned get_frame(); bool real_time_mode = true; // fuck it we going public + bool showcase_mode = false; }; \ No newline at end of file From 29c113c320540cad2389a4e3081c894d9b0bf9f5 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sat, 4 Sep 2021 10:26:34 -0300 Subject: [PATCH 52/95] wip recorder --- CMakeLists.txt | 2 + libraries/glew32.lib | Bin 0 -> 669944 bytes libraries/subprocess.hpp | 89 +++++++++++++++++++++++++++++ src/hooks.cpp | 39 ++++++++++--- src/recorder.cpp | 117 +++++++++++++++++++++++++++++++++++++++ src/recorder.hpp | 64 +++++++++++++++++++++ src/replay_system.cpp | 3 + src/replay_system.hpp | 2 + 8 files changed, 307 insertions(+), 9 deletions(-) create mode 100644 libraries/glew32.lib create mode 100644 libraries/subprocess.hpp create mode 100644 src/recorder.cpp create mode 100644 src/recorder.hpp diff --git a/CMakeLists.txt b/CMakeLists.txt index e9d2f56..29235ce 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,4 +38,6 @@ target_link_libraries(replay-bot minhook ${CMAKE_SOURCE_DIR}/libraries/cocos-headers/cocos2dx/libcocos2d.lib ${CMAKE_SOURCE_DIR}/libraries/cocos-headers/extensions/libExtensions.lib + opengl32 + ${CMAKE_SOURCE_DIR}/libraries/glew32.lib ) diff --git a/libraries/glew32.lib b/libraries/glew32.lib new file mode 100644 index 0000000000000000000000000000000000000000..1e71c9142785d9786e4a807121902c88a5eda1cc GIT binary patch literal 669944 zcmbTf3%FgyS-8JN$W5daks?J(Q;HOkh9pgqA0mV#Bs7GWq-l!C;av7fHk_OLoD&j6 zL`0;KQbbCTBBe+vA|g^skzz!oh!GJH5s@NAiik)lB2uLIe`n^KwdV58+UNQ6@IGJ8 z{x0*)%(~2)HEXT+AKTv@+;ZH!4<8)=chr)FM=x2paPdbM#=kF+Kacw8PcJ%ZiTUHq zd9BvIgRMQbcUyb>($%d!&U>V_$N2{dS0Le6b`vf_!UZkiT%_R@$FH8%+QafZ5-vPb zcoGS}wn2Cp2^XyuDDxut^%cTnNVph#%cDs6jg`WENVsHya1#c z8ws~87Rd1y_yhj7n192q^qb{sB>ds-!Uagf+m74V2Q2R(;g9&+@)iTgs*H8sKZy_&Se61xD&p5yl@{9?m9*w=eyu*hYHst;qLu~%aQOWy9*Z} z4b;PM5C68jiG;6j6<$Tcz4V8LobQD{rTr~WB4OtmfgE?jpV9u7dy#P8k;08g_;cFV zaxD_>KSa1134gJda1qk*w&MZvval^a0N*%Gcnk>-t`;6b!e6cw9zeoFw3p>BB>dGv zfwucA*mbx-PP^c*$-_cF{7pR`Sdw+!YxR6@(|%# zB>WS3S*}3BQ?rC^NCSBp{&`p+r+3;NTO!60SzVf9)w;f`r%S2|4iqj&!ra}3^Nbnx z772SFAdth}@a{c@9Z1+`oE!jG>Nb|K*)^0GXNg!iow zb|T?m+RJhW65fB9Ku+(6`TGd8&3yR4UIICN!0?vi5ZcG`G!j0zMz{|Nhf>Tux(BpkW7 za0$}zw&TOwTC*%KB4NR>KwTEVQR@Wy_9$3*jIa|4ixvo!u?QB^pBC!27(OyfxDaWe z-3&`;Hw$Gffsbww9zep;)W!XJe+Wta1|1kQa{U9q=A@*6E_JDAz>N$TW&_e z^8JNNkOp!ytk@zviG-6@3U?!6+}Hn}ny3 za0=~jc?1b-DA#f?5>7orppQ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ZIoqe2+pjJfRS;N%R-c z;oZ=Fzch7IUC;CF-Qkc}7Mf|9;2L`vQpv0VcO%b5+LqZqMy&E?o@(FA2o+`v;afT1 z6RW(9a0}X(*-=I9$`yqhdOw}ZR(55idfEWr+EJ;IA0*En3L87Q{zXM`RU$j?7lmcd zGqoS?%3SylnR2g&wh|aHBubBdC39U*$jkM-}-1V_K^sQyzAx($n)t zT>H}G7ruuf6$0_9=1Ao_aJcpS_MjKR4<~}+X7fQQZnC2a$=ag7=2&Kn7d7$AhY+f& zS{a6IF?H5E(WpqdiOr<+wNs7x^gMC#wSGDx-wXXed60?7hn{u0>Rz)wN)ywbo2S QH=$8}ag)(H#io_M0cm2iWB>pF literal 0 HcmV?d00001 diff --git a/libraries/subprocess.hpp b/libraries/subprocess.hpp new file mode 100644 index 0000000..7e5958e --- /dev/null +++ b/libraries/subprocess.hpp @@ -0,0 +1,89 @@ +#pragma once +#include +#include + +namespace subprocess { + + struct PipeHandle { + HANDLE handle; + + void set_inherit(bool value) { + SetHandleInformation(handle, HANDLE_FLAG_INHERIT, value * HANDLE_FLAG_INHERIT); + } + + void close() { + CloseHandle(handle); + } + }; + + struct PipePair { + PipeHandle m_read; + PipeHandle m_write; + + static PipePair create(bool inheritable) { + SECURITY_ATTRIBUTES security = {0}; + security.nLength = sizeof(security); + security.bInheritHandle = inheritable; + HANDLE read, write; + CreatePipe(&read, &write, &security, 0); + return {read, write}; + } + + void write(const void* const data, size_t size) { + WriteFile(m_write.handle, data, size, nullptr, nullptr); + } + + void close() { + m_read.close(); + m_write.close(); + } + }; + + class Popen { + public: + PipePair m_stdin; + PipePair m_stdout; + PROCESS_INFORMATION m_proc_info; + public: + Popen() {} + Popen(const std::string& command) { + SECURITY_ATTRIBUTES sec_attrs = {0}; + + sec_attrs.nLength = sizeof(sec_attrs); + sec_attrs.bInheritHandle = true; + sec_attrs.lpSecurityDescriptor = nullptr; + + m_proc_info = {0}; + STARTUPINFOA start_info = {0}; + + start_info.cb = sizeof(start_info); + start_info.hStdInput = GetStdHandle(STD_INPUT_HANDLE); + start_info.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); + start_info.hStdError = GetStdHandle(STD_ERROR_HANDLE); + start_info.dwFlags |= STARTF_USESTDHANDLES; + + m_stdin = PipePair::create(true); + start_info.hStdInput = m_stdin.m_read.handle; + m_stdin.m_write.set_inherit(false); + + CreateProcessA(nullptr, const_cast(command.c_str()), nullptr, nullptr, true, 0, nullptr, nullptr, &start_info, &m_proc_info); + + m_stdin.m_read.close(); + } + + int wait() { + DWORD result = WaitForSingleObject(m_proc_info.hProcess, INFINITE); + DWORD exit_code; + GetExitCodeProcess(m_proc_info.hProcess, &exit_code); + return exit_code; + } + + void close(bool should_wait = true) { + m_stdin.close(); + m_stdout.close(); + if (should_wait) wait(); + CloseHandle(m_proc_info.hProcess); + CloseHandle(m_proc_info.hThread); + } + }; +} \ No newline at end of file diff --git a/src/hooks.cpp b/src/hooks.cpp index 69006b4..6703b18 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -1,6 +1,8 @@ #include "hooks.hpp" #include "replay_system.hpp" #include "overlay_layer.hpp" +#include "recorder.hpp" +#include auto add_gd_hook(uintptr_t offset, void* hook, void* orig) { return MH_CreateHook(cast(gd::base + offset), hook, cast(orig)); @@ -46,7 +48,7 @@ float g_left_over = 0.f; void __fastcall Hooks::CCScheduler_update_H(CCScheduler* self, int, float dt) { auto& rs = ReplaySystem::get_instance(); - if (rs.is_playing() || rs.is_recording() && gd::GameManager::sharedState()->getPlayLayer()) { + if (rs.recorder.m_recording || rs.is_playing() || rs.is_recording() && gd::GameManager::sharedState()->getPlayLayer()) { const auto fps = rs.get_replay().get_fps(); auto speedhack = self->getTimeScale(); @@ -56,19 +58,26 @@ void __fastcall Hooks::CCScheduler_update_H(CCScheduler* self, int, float dt) { return CCScheduler_update(self, target_dt); // todo: find ways to disable more render stuff - g_disable_render = true; + g_disable_render = false; // TODO: not have this min() // doing the commented out if below causes really weird stutters for some reason - const int times = min(static_cast((dt + g_left_over) / target_dt), 150); + // const int times = min(static_cast((dt + g_left_over) / target_dt), 150); + unsigned times = static_cast((dt + g_left_over) / target_dt); // if the fps is really low then dont run it a lot of times // if (dt > 1.f / 10.f) { // times = min(times, 100); // } - for (int i = 0; i < times; ++i) { - if (i == times - 1) - g_disable_render = false; + auto start = std::chrono::high_resolution_clock::now(); + for (unsigned i = 0; i < times; ++i) { + // if (i == times - 1) + // g_disable_render = false; CCScheduler_update(self, target_dt); + using namespace std::literals; + if (std::chrono::high_resolution_clock::now() - start > 16.666ms) { + times = i + 1; + break; + } } g_left_over += dt - target_dt * times; } else { @@ -95,7 +104,6 @@ void __fastcall Hooks::CCKeyboardDispatcher_dispatchKeyboardMSG_H(CCKeyboardDisp CCKeyboardDispatcher_dispatchKeyboardMSG(self, key, down); } - bool __fastcall Hooks::PlayLayer::init_H(gd::PlayLayer* self, int, void* level) { return init(self, level); } @@ -103,8 +111,21 @@ bool __fastcall Hooks::PlayLayer::init_H(gd::PlayLayer* self, int, void* level) void __fastcall Hooks::PlayLayer::update_H(gd::PlayLayer* self, int, float dt) { auto& rs = ReplaySystem::get_instance(); if (rs.get_frame_advance()) return; - if (rs.is_playing()) - rs.handle_playing(); + if (rs.is_playing()) rs.handle_playing(); + if (rs.recorder.m_recording) { + // is menu thing open + if (!from_offset(self, 0x4BD)) { + auto frame_dt = 1.f / static_cast(rs.recorder.m_fps); + auto time = self->m_time + rs.recorder.m_extra_t - rs.recorder.m_last_frame_t; + if (time >= frame_dt) { + rs.recorder.m_extra_t = time - frame_dt; + rs.recorder.m_last_frame_t = self->m_time; + rs.recorder.capture_frame(); + } + } else { + rs.recorder.stop(); + } + } update(self, dt); } diff --git a/src/recorder.cpp b/src/recorder.cpp new file mode 100644 index 0000000..b2a6b73 --- /dev/null +++ b/src/recorder.cpp @@ -0,0 +1,117 @@ +#include "recorder.hpp" +#include +#include + +Recorder::Recorder() : m_width(1280), m_height(720), m_fps(60) {} +// Recorder::Recorder() : m_width(400), m_height(300), m_fps(30) {} + + +void Recorder::start() { + m_recording = true; + m_last_frame_t = m_extra_t = 0; + m_renderer.m_width = m_width; + m_renderer.m_height = m_height; + m_renderer.begin(); + std::cout << "i will now create da thread" << std::endl; + std::thread([&]() { + std::cout << "in da thread" << std::endl; + std::stringstream stream; + stream << "ffmpeg -y -f rawvideo -pix_fmt rgb24 -s " << m_width << "x" << m_height << " -r " << m_fps << " -i - -c:v h264_amf -b:v 50M -vf \"vflip\" -an fuckfuckfuck.mp4"; + // m_process = subprocess::Popen(stream.str()); + std::cout << "i will now create process" << std::endl; + auto process = subprocess::Popen(stream.str()); + while (m_recording) { + m_lock.lock(); + if (!m_frames.empty()) { + const auto& frame = m_frames.back(); + // std::cout << "the size is: " << frame.size() << std::endl; + process.m_stdin.write(frame.data(), frame.size()); + m_frames.pop(); + } + m_lock.unlock(); + } + process.close(); + std::cout << "should be done now!" << std::endl; + }).detach(); +} + +void Recorder::stop() { + m_renderer.end(); + m_recording = false; + // m_process.close(false); +} + +// void Recorder::add_frame(const std::vector& frame) { +// m_process.m_stdin.write(frame.data(), frame.size()); +// } + +void MyRenderTexture::begin() { + glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &m_old_fbo); + + m_texture = new CCTexture2D; + { + std::vector data; + data.resize(m_width * m_height * 3, 0); + // auto data = malloc(m_width * m_height * 3); + // memset(data, 0, m_width * m_height * 3); + // dynamic_array data(m_width * m_height * 3); + m_texture->initWithData(data.data(), kCCTexture2DPixelFormat_RGB888, m_width, m_height, CCSize(m_width, m_height)); + // free(data); + } + + glGetIntegerv(GL_RENDERBUFFER_BINDING_EXT, &m_old_rbo); + + glGenFramebuffersEXT(1, &m_fbo); + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); + + glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, m_texture->getName(), 0); + + m_texture->setAliasTexParameters(); + + m_texture->autorelease(); + + glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, m_old_rbo); + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_old_fbo); + + // begin() + // glViewport(0, 0, m_width, m_height); + + // glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &m_old_fbo); + // glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); +} + +std::vector MyRenderTexture::capture() { + glViewport(0, 0, m_width, m_height); + + glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &m_old_fbo); + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); + + auto director = CCDirector::sharedDirector(); + auto scene = director->getRunningScene(); + scene->visit(); + + // dynamic_array data(m_width * m_height * 3); + std::vector data; + data.resize(m_width * m_height * 3, 0); + glPixelStorei(GL_PACK_ALIGNMENT, 1); + glReadPixels(0, 0, m_width, m_height, GL_RGB, GL_UNSIGNED_BYTE, data.data()); + + glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_old_fbo); + director->setViewport(); + return data; +} + +void MyRenderTexture::end() { + // auto director = CCDirector::sharedDirector(); + // glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_old_fbo); + // director->setViewport(); + m_texture->release(); +} + +void Recorder::capture_frame() { + const auto frame = m_renderer.capture(); + m_lock.lock(); + m_frames.push(frame); + m_lock.unlock(); + // m_process.m_stdin.write(frame.data(), m_width * m_height * 3); +} \ No newline at end of file diff --git a/src/recorder.hpp b/src/recorder.hpp new file mode 100644 index 0000000..40e2f86 --- /dev/null +++ b/src/recorder.hpp @@ -0,0 +1,64 @@ +#pragma once + +#include "includes.h" +#include +#include +#include +#include +#include "../libraries/subprocess.hpp" + +using u8 = uint8_t; + +template +class dynamic_array { + size_t m_size; + T* m_data; +public: + dynamic_array(const size_t size) : m_size(size) { + m_data = new T[m_size](); + } + // dynamic_array(const dynamic_array& other) { + // std::cout << "copying other " << other.size() << std::endl; + // m_size = other.size(); + // m_data = new T[m_size](); + // for (size_t i = 0; i < size(); ++i) + // this[i] = other[i]; + // } + ~dynamic_array() { + delete[] m_data; + } + T& operator[](const size_t index) { return m_data[index]; } + const T& operator[](const size_t index) const { return m_data[index]; } + const auto size() const { return m_size; } + auto data() { return m_data; } + const auto data() const { return m_data; } +}; + +class MyRenderTexture { +public: + unsigned m_width, m_height; + int m_old_fbo, m_old_rbo; + unsigned m_fbo; + CCTexture2D* m_texture; + void begin(); + void end(); + std::vector capture(); +}; + +class Recorder { +public: + Recorder(); + // subprocess::Popen m_process; + std::queue> m_frames; + std::mutex m_lock; + MyRenderTexture m_renderer; + unsigned m_width, m_height; + unsigned m_fps; + bool m_recording = false; + float m_last_frame_t, m_extra_t; + + void start(); + void stop(); + void add_frame(const std::vector& data); + void capture_frame(); +}; \ No newline at end of file diff --git a/src/replay_system.cpp b/src/replay_system.cpp index bc76db0..fc23abf 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -147,5 +147,8 @@ void ReplaySystem::_update_status_label() { label->setString(showcase_mode ? "" : "Playing"); break; } + if (state == PLAYING) { + recorder.start(); + } } } \ No newline at end of file diff --git a/src/replay_system.hpp b/src/replay_system.hpp index 4e0ae4a..25a1ca0 100644 --- a/src/replay_system.hpp +++ b/src/replay_system.hpp @@ -1,6 +1,7 @@ #pragma once #include "replay.hpp" #include "practice_fixes.hpp" +#include "recorder.hpp" // this is a rly bad name enum RSState { @@ -81,4 +82,5 @@ class ReplaySystem { bool real_time_mode = true; // fuck it we going public bool showcase_mode = false; + Recorder recorder; }; \ No newline at end of file From c2c98a2df3080287bec9d9130d7be3bcdbd36d87 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sat, 4 Sep 2021 19:32:19 -0300 Subject: [PATCH 53/95] add a gui for the recorder + sync pulses --- src/hooks.cpp | 7 ++- src/nodes.hpp | 56 +++++++++++++++++ src/overlay_layer.cpp | 9 +++ src/overlay_layer.hpp | 2 + src/recorder.cpp | 34 +++-------- src/recorder.hpp | 4 +- src/recorder_layer.cpp | 135 +++++++++++++++++++++++++++++++++++++++++ src/recorder_layer.hpp | 22 +++++++ src/replay_system.cpp | 7 ++- 9 files changed, 242 insertions(+), 34 deletions(-) create mode 100644 src/nodes.hpp create mode 100644 src/recorder_layer.cpp create mode 100644 src/recorder_layer.hpp diff --git a/src/hooks.cpp b/src/hooks.cpp index 6703b18..b59f375 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -74,7 +74,7 @@ void __fastcall Hooks::CCScheduler_update_H(CCScheduler* self, int, float dt) { // g_disable_render = false; CCScheduler_update(self, target_dt); using namespace std::literals; - if (std::chrono::high_resolution_clock::now() - start > 16.666ms) { + if (std::chrono::high_resolution_clock::now() - start > 33.333ms) { times = i + 1; break; } @@ -116,10 +116,11 @@ void __fastcall Hooks::PlayLayer::update_H(gd::PlayLayer* self, int, float dt) { // is menu thing open if (!from_offset(self, 0x4BD)) { auto frame_dt = 1.f / static_cast(rs.recorder.m_fps); - auto time = self->m_time + rs.recorder.m_extra_t - rs.recorder.m_last_frame_t; + auto time = static_cast(self->m_time + rs.recorder.m_extra_t - rs.recorder.m_last_frame_t); if (time >= frame_dt) { + gd::FMODAudioEngine::sharedEngine()->setBackgroundMusicTime(self->m_time + from_offset(self->m_levelSettings, 0xfc)); rs.recorder.m_extra_t = time - frame_dt; - rs.recorder.m_last_frame_t = self->m_time; + rs.recorder.m_last_frame_t = static_cast(self->m_time); rs.recorder.capture_frame(); } } else { diff --git a/src/nodes.hpp b/src/nodes.hpp new file mode 100644 index 0000000..e5d19d5 --- /dev/null +++ b/src/nodes.hpp @@ -0,0 +1,56 @@ +#pragma once +#include "includes.h" +#include +#include +#include + +class NumberInputNode : public CCNode, public gd::TextInputDelegate { +public: + gd::CCTextInputNode* input_node; + cocos2d::extension::CCScale9Sprite* background; + std::function callback = [](auto){}; + + static auto create(CCSize size, float bg_scale = 1.f) { + auto node = new NumberInputNode; + if (node && node->init(size, bg_scale)) { + node->autorelease(); + } else { + CC_SAFE_DELETE(node); + } + return node; + } + + bool init(CCSize size, float scale) { + if (!CCNode::init()) return false; + + input_node = gd::CCTextInputNode::create("", this, "bigFont.fnt", size.width, size.height); + input_node->setAllowedChars("0123456789"); + input_node->setDelegate(this); + addChild(input_node); + + background = extension::CCScale9Sprite::create("square02_small.png"); + background->setContentSize(size * scale); + background->setScale(1.f / scale); + background->setOpacity(100); + background->setZOrder(-1); + addChild(background); + + return true; + } + + virtual void textChanged(gd::CCTextInputNode*) { + callback(this); + } + + void set_value(int value) { + input_node->setString(std::to_string(value).c_str()); + } + + int get_value() { + try { + return std::stoi(input_node->getString()); + } catch (const std::invalid_argument&) { + return -1; + } + } +}; \ No newline at end of file diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index bae7362..9e4a391 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -2,6 +2,7 @@ #include "replay_system.hpp" #include #include +#include "recorder_layer.hpp" bool OverlayLayer::init() { if (!initWithColor({ 0, 0, 0, 105 })) return false; @@ -121,6 +122,10 @@ bool OverlayLayer::init() { label->setPosition({win_size.width - 55, win_size.height - 225}); addChild(label); + btn = gd::CCMenuItemSpriteExtra::create(CCSprite::create("GJ_button_01.png"), this, menu_selector(OverlayLayer::on_recorder)); + btn->setPosition({win_size.width - 35, -275}); + menu->addChild(btn); + sprite = CCSprite::create("square02b_001.png"); sprite->setColor({0, 0, 0}); sprite->setOpacity(69); @@ -282,3 +287,7 @@ void OverlayLayer::on_toggle_showcase(CCObject* toggle_) { ReplaySystem::get_instance().showcase_mode = !toggle->isOn(); } } + +void OverlayLayer::on_recorder(CCObject*) { + RecorderLayer::create()->show(); +} \ No newline at end of file diff --git a/src/overlay_layer.hpp b/src/overlay_layer.hpp index a2928b6..30053a4 100644 --- a/src/overlay_layer.hpp +++ b/src/overlay_layer.hpp @@ -45,6 +45,8 @@ class OverlayLayer : public gd::FLAlertLayer, public CCTextFieldDelegate, public void on_toggle_real_time(CCObject*); void on_toggle_showcase(CCObject*); + void on_recorder(CCObject*); + virtual void keyBackClicked(); virtual void keyDown(enumKeyCodes key) { // keyDown overwrites keyBackClicked, how fun diff --git a/src/recorder.cpp b/src/recorder.cpp index b2a6b73..f8d83d7 100644 --- a/src/recorder.cpp +++ b/src/recorder.cpp @@ -3,8 +3,6 @@ #include Recorder::Recorder() : m_width(1280), m_height(720), m_fps(60) {} -// Recorder::Recorder() : m_width(400), m_height(300), m_fps(30) {} - void Recorder::start() { m_recording = true; @@ -16,15 +14,14 @@ void Recorder::start() { std::thread([&]() { std::cout << "in da thread" << std::endl; std::stringstream stream; - stream << "ffmpeg -y -f rawvideo -pix_fmt rgb24 -s " << m_width << "x" << m_height << " -r " << m_fps << " -i - -c:v h264_amf -b:v 50M -vf \"vflip\" -an fuckfuckfuck.mp4"; - // m_process = subprocess::Popen(stream.str()); + stream << "ffmpeg -y -f rawvideo -pix_fmt rgb24 -s " << m_width << "x" << m_height << " -r " << m_fps + << " -i - -c:v h264_amf -b:v 50M -vf \"vflip\" -an \"" << m_output_path << "\" "; // i hope just putting it in "" escapes it std::cout << "i will now create process" << std::endl; auto process = subprocess::Popen(stream.str()); while (m_recording) { m_lock.lock(); if (!m_frames.empty()) { const auto& frame = m_frames.back(); - // std::cout << "the size is: " << frame.size() << std::endl; process.m_stdin.write(frame.data(), frame.size()); m_frames.pop(); } @@ -36,27 +33,20 @@ void Recorder::start() { } void Recorder::stop() { + std::cout << "stopping renderer" << std::endl; m_renderer.end(); m_recording = false; - // m_process.close(false); } -// void Recorder::add_frame(const std::vector& frame) { -// m_process.m_stdin.write(frame.data(), frame.size()); -// } - void MyRenderTexture::begin() { glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &m_old_fbo); m_texture = new CCTexture2D; { - std::vector data; - data.resize(m_width * m_height * 3, 0); - // auto data = malloc(m_width * m_height * 3); - // memset(data, 0, m_width * m_height * 3); - // dynamic_array data(m_width * m_height * 3); - m_texture->initWithData(data.data(), kCCTexture2DPixelFormat_RGB888, m_width, m_height, CCSize(m_width, m_height)); - // free(data); + auto data = malloc(m_width * m_height * 3); + memset(data, 0, m_width * m_height * 3); + m_texture->initWithData(data, kCCTexture2DPixelFormat_RGB888, m_width, m_height, CCSize(m_width, m_height)); + free(data); } glGetIntegerv(GL_RENDERBUFFER_BINDING_EXT, &m_old_rbo); @@ -72,12 +62,6 @@ void MyRenderTexture::begin() { glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, m_old_rbo); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_old_fbo); - - // begin() - // glViewport(0, 0, m_width, m_height); - - // glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &m_old_fbo); - // glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo); } std::vector MyRenderTexture::capture() { @@ -102,9 +86,6 @@ std::vector MyRenderTexture::capture() { } void MyRenderTexture::end() { - // auto director = CCDirector::sharedDirector(); - // glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_old_fbo); - // director->setViewport(); m_texture->release(); } @@ -113,5 +94,4 @@ void Recorder::capture_frame() { m_lock.lock(); m_frames.push(frame); m_lock.unlock(); - // m_process.m_stdin.write(frame.data(), m_width * m_height * 3); } \ No newline at end of file diff --git a/src/recorder.hpp b/src/recorder.hpp index 40e2f86..f10ad9a 100644 --- a/src/recorder.hpp +++ b/src/recorder.hpp @@ -6,6 +6,7 @@ #include #include #include "../libraries/subprocess.hpp" +#include using u8 = uint8_t; @@ -56,9 +57,10 @@ class Recorder { unsigned m_fps; bool m_recording = false; float m_last_frame_t, m_extra_t; + bool m_until_end = true; + std::string m_output_path = "recording.mp4"; void start(); void stop(); - void add_frame(const std::vector& data); void capture_frame(); }; \ No newline at end of file diff --git a/src/recorder_layer.cpp b/src/recorder_layer.cpp new file mode 100644 index 0000000..99b12c8 --- /dev/null +++ b/src/recorder_layer.cpp @@ -0,0 +1,135 @@ +#include "recorder_layer.hpp" +#include "nodes.hpp" +#include "replay_system.hpp" +#include + +bool RecorderLayer::init() { + auto win_size = cocos2d::CCDirector::sharedDirector()->getWinSize(); + + if (!initWithColor({0, 0, 0, 105})) return false; + m_pLayer = CCLayer::create(); + addChild(m_pLayer); + + auto bg = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", { 0.0f, 0.0f, 80.0f, 80.0f }); + bg->setContentSize({250, 200}); + bg->setPosition(win_size / 2); + m_pLayer->addChild(bg); + + m_pButtonMenu = CCMenu::create(); + m_pButtonMenu->setPosition({0, 0}); + auto menu = m_pButtonMenu; // sorry m_pButtonMenu is too much to type + m_pLayer->addChild(m_pButtonMenu); + auto layer = m_pLayer; + + auto check_off_sprite = CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); + auto check_on_sprite = CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); + + const auto center = win_size / 2.f; + + auto& rs = ReplaySystem::get_instance(); + + auto toggler = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(RecorderLayer::on_toggle_recorder)); + toggler->setPosition(center - ccp(98.0f, -70.0f)); + toggler->toggle(rs.recorder.m_recording); + auto label = CCLabelBMFont::create("Record", "bigFont.fnt"); + label->setPosition(center - ccp(73.f, -70.f)); + label->setAnchorPoint({0, 0.5f}); + menu->addChild(toggler); + layer->addChild(label); + + toggler = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(RecorderLayer::on_toggle_until_end)); + toggler->setPosition(center - ccp(98.0f, -35.0f)); + toggler->toggle(rs.recorder.m_until_end); + label = CCLabelBMFont::create("Record until the end", "bigFont.fnt"); + label->limitLabelWidth(180.f, 1.f, 0.1f); + label->setPosition(center - ccp(73.f, -35.f)); + label->setAnchorPoint({0, 0.5f}); + menu->addChild(toggler); + layer->addChild(label); + + auto input = NumberInputNode::create({70.f, 30.f}); + input->set_value(rs.recorder.m_width); + input->setPosition(center - ccp(79, 0)); + input->input_node->setMaxLabelScale(0.73f); + input->callback = [](auto input) { + ReplaySystem::get_instance().recorder.m_width = input->get_value(); + }; + layer->addChild(input); + + input = NumberInputNode::create({70.f, 30.f}); + input->set_value(rs.recorder.m_height); + input->setPosition(center - ccp(4, 0)); + input->input_node->setMaxLabelScale(0.73f); + input->callback = [&rs](auto input) { + rs.recorder.m_height = input->get_value(); + }; + layer->addChild(input); + + input = NumberInputNode::create({50.f, 30.f}); + input->set_value(rs.recorder.m_fps); + input->setPosition(center + ccp(76, 0)); + input->input_node->setMaxLabelScale(0.73f); + input->callback = [&rs](auto input) { + rs.recorder.m_fps = input->get_value(); + }; + layer->addChild(input); + + auto btn = gd::CCMenuItemSpriteExtra::create( + CCSprite::createWithSpriteFrameName("gj_folderBtn_001.png"), + this, + menu_selector(RecorderLayer::on_pick_path) + ); + btn->setPosition(center - ccp(98.f, 63.f)); + menu->addChild(btn); + + registerWithTouchDispatcher(); + CCDirector::sharedDirector()->getTouchDispatcher()->incrementForcePrio(2); + + auto close_btn = gd::CCMenuItemSpriteExtra::create( + CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png"), + this, + menu_selector(RecorderLayer::on_close) + ); + + m_pButtonMenu->addChild(close_btn); + close_btn->setPosition(50.f, win_size.height - 50.f); + + setKeypadEnabled(true); + setTouchEnabled(true); + + return true; +} + +void RecorderLayer::keyBackClicked() { + setKeyboardEnabled(false); + removeFromParentAndCleanup(true); +} + +void RecorderLayer::on_close(CCObject*) { + keyBackClicked(); +} + +void RecorderLayer::on_toggle_recorder(CCObject* obj) { + auto& rs = ReplaySystem::get_instance(); + if (static_cast(obj)->isOn()) { + rs.recorder.stop(); + } else { + // TODO: warn the user? idk theyre kinda dumb + if (!rs.is_playing()) + rs.toggle_playing(); + rs.recorder.start(); + } +} + +void RecorderLayer::on_toggle_until_end(CCObject* obj) { + ReplaySystem::get_instance().recorder.m_until_end = !static_cast(obj)->isOn(); +} + +void RecorderLayer::on_pick_path(CCObject*) { + nfdchar_t* path = nullptr; + if (NFD_SaveDialog("mp4", nullptr, &path) == NFD_OKAY) { + ReplaySystem::get_instance().recorder.m_output_path = std::string(path) + ".mp4"; + std::cout << "set path to " << ReplaySystem::get_instance().recorder.m_output_path << std::endl; + free(path); + } +} \ No newline at end of file diff --git a/src/recorder_layer.hpp b/src/recorder_layer.hpp new file mode 100644 index 0000000..60228ff --- /dev/null +++ b/src/recorder_layer.hpp @@ -0,0 +1,22 @@ +#pragma once +#include "includes.h" +#include + +class RecorderLayer : public gd::FLAlertLayer { +public: + static auto create() { + auto node = new RecorderLayer; + if (node && node->init()) { + node->autorelease(); + } else { + CC_SAFE_DELETE(node); + } + return node; + } + bool init(); + void keyBackClicked(); + void on_close(CCObject*); + void on_toggle_recorder(CCObject*); + void on_toggle_until_end(CCObject*); + void on_pick_path(CCObject*); +}; \ No newline at end of file diff --git a/src/replay_system.cpp b/src/replay_system.cpp index fc23abf..da62ec0 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -139,6 +139,8 @@ void ReplaySystem::_update_status_label() { switch (state) { case NOTHING: label->setString(""); + if (recorder.m_recording && (!recorder.m_until_end || from_offset(play_layer, 0x4BD))) + recorder.stop(); break; case RECORDING: label->setString("Recording"); @@ -147,8 +149,7 @@ void ReplaySystem::_update_status_label() { label->setString(showcase_mode ? "" : "Playing"); break; } - if (state == PLAYING) { - recorder.start(); - } + } else if (recorder.m_recording) { + recorder.stop(); } } \ No newline at end of file From f065319d1cbd26fd4baffd172c4db4b72537f8d5 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sun, 5 Sep 2021 23:15:38 -0300 Subject: [PATCH 54/95] rework the recorder layer --- libraries/gd.h | 2 +- libraries/subprocess.hpp | 7 +-- src/nodes.hpp | 76 +++++++++++++++++++------- src/overlay_layer.cpp | 11 ++++ src/recorder.cpp | 17 +++--- src/recorder.hpp | 5 +- src/recorder_layer.cpp | 114 ++++++++++++++++++++++++++------------- src/recorder_layer.hpp | 3 +- src/replay_system.hpp | 2 +- 9 files changed, 166 insertions(+), 71 deletions(-) diff --git a/libraries/gd.h b/libraries/gd.h index c85747d..af2be3d 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit c85747d78f9c7fbba61f04ec58aabadc9c0510c4 +Subproject commit af2be3da3c0898ec76581495c189e4801b78a145 diff --git a/libraries/subprocess.hpp b/libraries/subprocess.hpp index 7e5958e..e6b518d 100644 --- a/libraries/subprocess.hpp +++ b/libraries/subprocess.hpp @@ -57,7 +57,6 @@ namespace subprocess { STARTUPINFOA start_info = {0}; start_info.cb = sizeof(start_info); - start_info.hStdInput = GetStdHandle(STD_INPUT_HANDLE); start_info.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); start_info.hStdError = GetStdHandle(STD_ERROR_HANDLE); start_info.dwFlags |= STARTF_USESTDHANDLES; @@ -78,12 +77,14 @@ namespace subprocess { return exit_code; } - void close(bool should_wait = true) { + int close(bool should_wait = true) { + int exit_code = 0; m_stdin.close(); m_stdout.close(); - if (should_wait) wait(); + if (should_wait) exit_code = wait(); CloseHandle(m_proc_info.hProcess); CloseHandle(m_proc_info.hThread); + return exit_code; } }; } \ No newline at end of file diff --git a/src/nodes.hpp b/src/nodes.hpp index e5d19d5..b970393 100644 --- a/src/nodes.hpp +++ b/src/nodes.hpp @@ -4,27 +4,28 @@ #include #include -class NumberInputNode : public CCNode, public gd::TextInputDelegate { +#define GEN_CREATE(class_name) template \ +static auto create(Args... args) { \ + auto node = new class_name; \ + if (node && node->init(args...)) \ + node->autorelease(); \ + else \ + CC_SAFE_DELETE(node); \ + return node; \ +} + +class TextInputNode : public CCNode, public gd::TextInputDelegate { public: gd::CCTextInputNode* input_node; cocos2d::extension::CCScale9Sprite* background; - std::function callback = [](auto){}; + std::function callback = [](auto){}; - static auto create(CCSize size, float bg_scale = 1.f) { - auto node = new NumberInputNode; - if (node && node->init(size, bg_scale)) { - node->autorelease(); - } else { - CC_SAFE_DELETE(node); - } - return node; - } + GEN_CREATE(TextInputNode) - bool init(CCSize size, float scale) { + bool init(CCSize size, float scale = 1.f, const std::string& font = "bigFont.fnt") { if (!CCNode::init()) return false; - input_node = gd::CCTextInputNode::create("", this, "bigFont.fnt", size.width, size.height); - input_node->setAllowedChars("0123456789"); + input_node = gd::CCTextInputNode::create("", this, font.c_str(), size.width, size.height); input_node->setDelegate(this); addChild(input_node); @@ -38,14 +39,26 @@ class NumberInputNode : public CCNode, public gd::TextInputDelegate { return true; } - virtual void textChanged(gd::CCTextInputNode*) { - callback(this); - } + virtual void textChanged(gd::CCTextInputNode*) { callback(this); } + + void set_value(const std::string& value) { input_node->setString(value.c_str()); } + std::string get_value() { return input_node->getString(); } +}; + +class NumberInputNode : public TextInputNode { +public: + std::function callback = [](auto){}; + + GEN_CREATE(NumberInputNode) - void set_value(int value) { - input_node->setString(std::to_string(value).c_str()); + bool init(CCSize size, float scale = 1.f, const std::string& font = "bigFont.fnt") { + if (!TextInputNode::init(size, scale, font)) return false; + input_node->setAllowedChars("0123456789"); + return true; } + virtual void textChanged(gd::CCTextInputNode*) { callback(this); } + void set_value(int value) { input_node->setString(std::to_string(value).c_str()); } int get_value() { try { return std::stoi(input_node->getString()); @@ -53,4 +66,29 @@ class NumberInputNode : public CCNode, public gd::TextInputDelegate { return -1; } } +}; + +template +class NodeFactory { +public: + static auto& start(T* node) { return *reinterpret_cast(node); } + + template + static auto& start(Args... args) { return *reinterpret_cast(T::create(args...)); } + + operator T*() { return reinterpret_cast(this); } + + #define _gen_func(name) template \ + inline auto& name(Args... args) { \ + reinterpret_cast(this)->name(args...); \ + return *this; \ + } + + _gen_func(setPosition) + _gen_func(setScale) + _gen_func(setContentSize) + _gen_func(setOpacity) + _gen_func(setZOrder) + + #undef _gen_func }; \ No newline at end of file diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index 9e4a391..82aaef7 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -289,5 +289,16 @@ void OverlayLayer::on_toggle_showcase(CCObject* toggle_) { } void OverlayLayer::on_recorder(CCObject*) { + static bool has_ffmpeg = false; + if (!has_ffmpeg) { + // theres prob a way to do it by not spawning a process but im lazy and hate dealing with winapi + auto process = subprocess::Popen("where ffmpeg"); + if (process.close()) + gd::FLAlertLayer::create(nullptr, "Error", "Ok", nullptr, "ffmpeg was not found in your path, recorder will not work without it")->show(); + else + has_ffmpeg = true; + if (!has_ffmpeg) + return; + } RecorderLayer::create()->show(); } \ No newline at end of file diff --git a/src/recorder.cpp b/src/recorder.cpp index f8d83d7..d90415c 100644 --- a/src/recorder.cpp +++ b/src/recorder.cpp @@ -4,19 +4,23 @@ Recorder::Recorder() : m_width(1280), m_height(720), m_fps(60) {} -void Recorder::start() { +void Recorder::start(const std::string& path) { m_recording = true; m_last_frame_t = m_extra_t = 0; m_renderer.m_width = m_width; m_renderer.m_height = m_height; m_renderer.begin(); - std::cout << "i will now create da thread" << std::endl; - std::thread([&]() { - std::cout << "in da thread" << std::endl; + std::thread([&, path]() { std::stringstream stream; stream << "ffmpeg -y -f rawvideo -pix_fmt rgb24 -s " << m_width << "x" << m_height << " -r " << m_fps - << " -i - -c:v h264_amf -b:v 50M -vf \"vflip\" -an \"" << m_output_path << "\" "; // i hope just putting it in "" escapes it - std::cout << "i will now create process" << std::endl; + << " -i - "; + if (!m_codec.empty()) + stream << "-c:v " << m_codec << " "; + if (!m_bitrate.empty()) + stream << "-b:v " << m_bitrate << " "; + if (!m_extra_args.empty()) + stream << m_extra_args << " "; + stream << "-vf \"vflip\" -an \"" << path << "\" "; // i hope just putting it in "" escapes it auto process = subprocess::Popen(stream.str()); while (m_recording) { m_lock.lock(); @@ -33,7 +37,6 @@ void Recorder::start() { } void Recorder::stop() { - std::cout << "stopping renderer" << std::endl; m_renderer.end(); m_recording = false; } diff --git a/src/recorder.hpp b/src/recorder.hpp index f10ad9a..37aaf1d 100644 --- a/src/recorder.hpp +++ b/src/recorder.hpp @@ -49,7 +49,6 @@ class MyRenderTexture { class Recorder { public: Recorder(); - // subprocess::Popen m_process; std::queue> m_frames; std::mutex m_lock; MyRenderTexture m_renderer; @@ -58,9 +57,9 @@ class Recorder { bool m_recording = false; float m_last_frame_t, m_extra_t; bool m_until_end = true; - std::string m_output_path = "recording.mp4"; + std::string m_codec = "", m_bitrate = "30M", m_extra_args = ""; - void start(); + void start(const std::string& path); void stop(); void capture_frame(); }; \ No newline at end of file diff --git a/src/recorder_layer.cpp b/src/recorder_layer.cpp index 99b12c8..3331128 100644 --- a/src/recorder_layer.cpp +++ b/src/recorder_layer.cpp @@ -11,10 +11,13 @@ bool RecorderLayer::init() { addChild(m_pLayer); auto bg = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", { 0.0f, 0.0f, 80.0f, 80.0f }); - bg->setContentSize({250, 200}); + const CCSize window_size(400, 250); + bg->setContentSize(window_size); bg->setPosition(win_size / 2); m_pLayer->addChild(bg); + const CCPoint top_left = win_size / 2.f - ccp(window_size.width / 2.f, -window_size.height / 2.f); + m_pButtonMenu = CCMenu::create(); m_pButtonMenu->setPosition({0, 0}); auto menu = m_pButtonMenu; // sorry m_pButtonMenu is too much to type @@ -29,58 +32,95 @@ bool RecorderLayer::init() { auto& rs = ReplaySystem::get_instance(); auto toggler = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(RecorderLayer::on_toggle_recorder)); - toggler->setPosition(center - ccp(98.0f, -70.0f)); + toggler->setPosition(top_left + ccp(30.f, -30.f)); toggler->toggle(rs.recorder.m_recording); auto label = CCLabelBMFont::create("Record", "bigFont.fnt"); - label->setPosition(center - ccp(73.f, -70.f)); + label->setPosition(top_left + ccp(55.f, -30.f)); + label->setScale(0.7f); label->setAnchorPoint({0, 0.5f}); menu->addChild(toggler); layer->addChild(label); toggler = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(RecorderLayer::on_toggle_until_end)); - toggler->setPosition(center - ccp(98.0f, -35.0f)); + toggler->setPosition(top_left + ccp(30.f, -65.f)); toggler->toggle(rs.recorder.m_until_end); label = CCLabelBMFont::create("Record until the end", "bigFont.fnt"); - label->limitLabelWidth(180.f, 1.f, 0.1f); - label->setPosition(center - ccp(73.f, -35.f)); + label->setScale(0.7f); + label->setPosition(top_left + ccp(55.f, -65.f)); label->setAnchorPoint({0, 0.5f}); menu->addChild(toggler); layer->addChild(label); - auto input = NumberInputNode::create({70.f, 30.f}); + auto input = NumberInputNode::create(CCSize(70.f, 30.f)); input->set_value(rs.recorder.m_width); - input->setPosition(center - ccp(79, 0)); + input->setPosition(top_left + ccp(49.f, -104.f)); input->input_node->setMaxLabelScale(0.73f); - input->callback = [](auto input) { - ReplaySystem::get_instance().recorder.m_width = input->get_value(); + input->callback = [&rs](auto input) { + rs.recorder.m_width = input->get_value(); }; layer->addChild(input); - input = NumberInputNode::create({70.f, 30.f}); + layer->addChild(NodeFactory::start("x", "bigFont.fnt") + .setPosition(top_left + ccp(93.5f, -104.f)) + .setScale(0.5f)); + + input = NumberInputNode::create(CCSize(70.f, 30.f)); input->set_value(rs.recorder.m_height); - input->setPosition(center - ccp(4, 0)); + input->setPosition(top_left + ccp(137.f, -104.f)); input->input_node->setMaxLabelScale(0.73f); input->callback = [&rs](auto input) { rs.recorder.m_height = input->get_value(); }; layer->addChild(input); - input = NumberInputNode::create({50.f, 30.f}); + layer->addChild(NodeFactory::start("@", "bigFont.fnt") + .setPosition(top_left + ccp(185.5f, -104.f)) + .setScale(0.5f)); + + input = NumberInputNode::create(CCSize(50.f, 30.f)); input->set_value(rs.recorder.m_fps); - input->setPosition(center + ccp(76, 0)); + input->setPosition(top_left + ccp(225.f, -104.f)); input->input_node->setMaxLabelScale(0.73f); input->callback = [&rs](auto input) { rs.recorder.m_fps = input->get_value(); }; layer->addChild(input); - auto btn = gd::CCMenuItemSpriteExtra::create( - CCSprite::createWithSpriteFrameName("gj_folderBtn_001.png"), - this, - menu_selector(RecorderLayer::on_pick_path) - ); - btn->setPosition(center - ccp(98.f, 63.f)); - menu->addChild(btn); + const std::string broad_filter = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.,;-_=+@!\":0123456789$[](){}"; + + auto text_input = TextInputNode::create(CCSize(60.f, 30.f), 1.f, "chatFont.fnt"); + text_input->setPosition(top_left + ccp(291.5f, -177.f)); + text_input->input_node->setAllowedChars(broad_filter); + text_input->set_value(rs.recorder.m_bitrate); + text_input->callback = [&rs](auto input) { + rs.recorder.m_bitrate = input->get_value(); + }; + layer->addChild(text_input); + + text_input = TextInputNode::create(CCSize(60.f, 30.f), 1.f, "chatFont.fnt"); + text_input->setPosition(top_left + ccp(359.5f, -177.f)); + text_input->input_node->m_sCaption = "Default"; + text_input->input_node->setAllowedChars(broad_filter); + text_input->input_node->setLabelPlaceholderColor({200, 200, 200}); + text_input->set_value(rs.recorder.m_codec); + text_input->callback = [&rs](auto input) { + rs.recorder.m_codec = input->get_value(); + }; + layer->addChild(text_input); + + text_input = TextInputNode::create(CCSize(128.f, 30.f), 1.f, "chatFont.fnt"); + text_input->setPosition(top_left + ccp(324.5f, -217.f)); + text_input->input_node->m_sCaption = "Extra options"; + text_input->input_node->setAllowedChars(broad_filter); + text_input->set_value(rs.recorder.m_extra_args); + text_input->callback = [&rs](auto input) { + rs.recorder.m_extra_args = input->get_value(); + }; + text_input->input_node->setLabelPlaceholderColor({200, 200, 200}); + layer->addChild(text_input); + + layer->addChild(NodeFactory::start("Bitrate", "bigFont.fnt").setPosition(top_left + ccp(291.5f, -152.f)).setScale(0.4f)); + layer->addChild(NodeFactory::start("Codec", "bigFont.fnt").setPosition(top_left + ccp(359.5f, -152.f)).setScale(0.4f)); registerWithTouchDispatcher(); CCDirector::sharedDirector()->getTouchDispatcher()->incrementForcePrio(2); @@ -92,7 +132,8 @@ bool RecorderLayer::init() { ); m_pButtonMenu->addChild(close_btn); - close_btn->setPosition(50.f, win_size.height - 50.f); + close_btn->setPosition(18.f, win_size.height - 18.f); + close_btn->getNormalImage()->setScale(.75f); setKeypadEnabled(true); setTouchEnabled(true); @@ -111,25 +152,26 @@ void RecorderLayer::on_close(CCObject*) { void RecorderLayer::on_toggle_recorder(CCObject* obj) { auto& rs = ReplaySystem::get_instance(); - if (static_cast(obj)->isOn()) { + auto toggler = static_cast(obj); + if (toggler->isOn()) { rs.recorder.stop(); } else { - // TODO: warn the user? idk theyre kinda dumb - if (!rs.is_playing()) - rs.toggle_playing(); - rs.recorder.start(); + nfdchar_t* path = nullptr; + if (NFD_SaveDialog("mp4", nullptr, &path) == NFD_OKAY) { + // TODO: warn the user? idk theyre kinda dumb + if (!rs.is_playing()) + rs.toggle_playing(); + std::string p = std::string(path) + ".mp4"; + std::cout << "saving it to " << p << std::endl; + rs.recorder.start(p); + free(path); + } else { + // toggle it on so then gd does !on and then turns it off then boom success + toggler->toggle(true); + } } } void RecorderLayer::on_toggle_until_end(CCObject* obj) { ReplaySystem::get_instance().recorder.m_until_end = !static_cast(obj)->isOn(); -} - -void RecorderLayer::on_pick_path(CCObject*) { - nfdchar_t* path = nullptr; - if (NFD_SaveDialog("mp4", nullptr, &path) == NFD_OKAY) { - ReplaySystem::get_instance().recorder.m_output_path = std::string(path) + ".mp4"; - std::cout << "set path to " << ReplaySystem::get_instance().recorder.m_output_path << std::endl; - free(path); - } } \ No newline at end of file diff --git a/src/recorder_layer.hpp b/src/recorder_layer.hpp index 60228ff..0fa1458 100644 --- a/src/recorder_layer.hpp +++ b/src/recorder_layer.hpp @@ -4,6 +4,8 @@ class RecorderLayer : public gd::FLAlertLayer { public: + CCLabelBMFont* m_path_label; + static auto create() { auto node = new RecorderLayer; if (node && node->init()) { @@ -18,5 +20,4 @@ class RecorderLayer : public gd::FLAlertLayer { void on_close(CCObject*); void on_toggle_recorder(CCObject*); void on_toggle_until_end(CCObject*); - void on_pick_path(CCObject*); }; \ No newline at end of file diff --git a/src/replay_system.hpp b/src/replay_system.hpp index 25a1ca0..c3e9d82 100644 --- a/src/replay_system.hpp +++ b/src/replay_system.hpp @@ -23,7 +23,7 @@ class ReplaySystem { bool frame_advance = false; - ReplaySystem() : default_fps(120.f), replay(default_fps), default_type(replay.get_type()) {} + ReplaySystem() : default_fps(240.f), replay(default_fps), default_type(replay.get_type()) {} void _update_status_label(); From 53d5801ff15a1a13ab4c28a19c7d5f3666ebd806 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sun, 5 Sep 2021 23:55:18 -0300 Subject: [PATCH 55/95] make the button nicer --- src/nodes.hpp | 1 + src/overlay_layer.cpp | 22 +++++++++++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/src/nodes.hpp b/src/nodes.hpp index b970393..91ffa36 100644 --- a/src/nodes.hpp +++ b/src/nodes.hpp @@ -89,6 +89,7 @@ class NodeFactory { _gen_func(setContentSize) _gen_func(setOpacity) _gen_func(setZOrder) + _gen_func(setAnchorPoint) #undef _gen_func }; \ No newline at end of file diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index 82aaef7..39fd0b0 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -3,6 +3,7 @@ #include #include #include "recorder_layer.hpp" +#include "nodes.hpp" bool OverlayLayer::init() { if (!initWithColor({ 0, 0, 0, 105 })) return false; @@ -123,9 +124,28 @@ bool OverlayLayer::init() { addChild(label); btn = gd::CCMenuItemSpriteExtra::create(CCSprite::create("GJ_button_01.png"), this, menu_selector(OverlayLayer::on_recorder)); - btn->setPosition({win_size.width - 35, -275}); + { + auto draw_node = CCDrawNode::create(); + constexpr size_t n_verts = 16; + constexpr float radius = 13.f; + CCPoint verts[n_verts]; + for (size_t i = 0; i < n_verts; ++i) { + verts[i] = CCPoint::forAngle(static_cast(i) / n_verts * 6.2831f) * radius; + } + draw_node->drawPolygon(verts, n_verts, {1.f, 0.f, 0.f, 1.f}, 1.f, {0.f, 0.f, 0.f, 1.f}); + btn->getNormalImage()->addChild(draw_node); + draw_node->setPosition(btn->getNormalImage()->getContentSize() / 2.f); + } + btn->getNormalImage()->setScale(0.775f); + btn->setPosition({win_size.width - 35, -260}); menu->addChild(btn); + addChild(NodeFactory::start("Internal Recorder", "bigFont.fnt") + .setAnchorPoint(ccp(1, 0.5)) + .setScale(0.6f) + .setPosition(win_size - ccp(55, 260)) + ); + sprite = CCSprite::create("square02b_001.png"); sprite->setColor({0, 0, 0}); sprite->setOpacity(69); From abe7aeaff65ad97fec10ad68c014f1cd1a63108e Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Tue, 7 Sep 2021 11:28:50 -0300 Subject: [PATCH 56/95] rename recorder to renderer in the guis this is to hopefully avoid confusion between the internal recorder and just recording a replay --- src/overlay_layer.cpp | 2 +- src/recorder_layer.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index 39fd0b0..592642f 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -140,7 +140,7 @@ bool OverlayLayer::init() { btn->setPosition({win_size.width - 35, -260}); menu->addChild(btn); - addChild(NodeFactory::start("Internal Recorder", "bigFont.fnt") + addChild(NodeFactory::start("Internal Renderer", "bigFont.fnt") .setAnchorPoint(ccp(1, 0.5)) .setScale(0.6f) .setPosition(win_size - ccp(55, 260)) diff --git a/src/recorder_layer.cpp b/src/recorder_layer.cpp index 3331128..5e9d5d0 100644 --- a/src/recorder_layer.cpp +++ b/src/recorder_layer.cpp @@ -34,7 +34,7 @@ bool RecorderLayer::init() { auto toggler = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(RecorderLayer::on_toggle_recorder)); toggler->setPosition(top_left + ccp(30.f, -30.f)); toggler->toggle(rs.recorder.m_recording); - auto label = CCLabelBMFont::create("Record", "bigFont.fnt"); + auto label = CCLabelBMFont::create("Render", "bigFont.fnt"); label->setPosition(top_left + ccp(55.f, -30.f)); label->setScale(0.7f); label->setAnchorPoint({0, 0.5f}); @@ -44,7 +44,7 @@ bool RecorderLayer::init() { toggler = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(RecorderLayer::on_toggle_until_end)); toggler->setPosition(top_left + ccp(30.f, -65.f)); toggler->toggle(rs.recorder.m_until_end); - label = CCLabelBMFont::create("Record until the end", "bigFont.fnt"); + label = CCLabelBMFont::create("Render until the end", "bigFont.fnt"); label->setScale(0.7f); label->setPosition(top_left + ccp(55.f, -65.f)); label->setAnchorPoint({0, 0.5f}); From c8ca219ed4d0fe25c71a29421967ba7e4e1da8c6 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Tue, 7 Sep 2021 20:14:26 -0300 Subject: [PATCH 57/95] oops forgot space --- src/recorder_layer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/recorder_layer.cpp b/src/recorder_layer.cpp index 5e9d5d0..ca48324 100644 --- a/src/recorder_layer.cpp +++ b/src/recorder_layer.cpp @@ -86,7 +86,7 @@ bool RecorderLayer::init() { }; layer->addChild(input); - const std::string broad_filter = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.,;-_=+@!\":0123456789$[](){}"; + const std::string broad_filter = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.,;-_=+@!\":0123456789$[](){} "; auto text_input = TextInputNode::create(CCSize(60.f, 30.f), 1.f, "chatFont.fnt"); text_input->setPosition(top_left + ccp(291.5f, -177.f)); From a78b3417535318c2325e6bb79e828d40fd0ff1f7 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Wed, 8 Sep 2021 20:27:54 -0300 Subject: [PATCH 58/95] change default pix fmt --- src/recorder.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/recorder.cpp b/src/recorder.cpp index d90415c..0ee2a6a 100644 --- a/src/recorder.cpp +++ b/src/recorder.cpp @@ -20,6 +20,8 @@ void Recorder::start(const std::string& path) { stream << "-b:v " << m_bitrate << " "; if (!m_extra_args.empty()) stream << m_extra_args << " "; + else + stream << "-pix_fmt yuv420p "; stream << "-vf \"vflip\" -an \"" << path << "\" "; // i hope just putting it in "" escapes it auto process = subprocess::Popen(stream.str()); while (m_recording) { From bb3ccf8d9978d4308dd071590120cee8d00a5f3f Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 9 Sep 2021 16:07:58 -0300 Subject: [PATCH 59/95] update nfd to fix including the file extension also changed the default pix fmt to 420p on the recorder --- .gitmodules | 1 + CMakeLists.txt | 7 +++++++ libraries/nfd | 2 +- src/dllmain.cpp | 2 -- src/overlay_layer.cpp | 4 +--- src/recorder_layer.cpp | 7 +++---- 6 files changed, 13 insertions(+), 10 deletions(-) diff --git a/.gitmodules b/.gitmodules index e4269eb..e54fda4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,6 +7,7 @@ [submodule "libraries/nfd"] path = libraries/nfd url = https://github.com/mlabbe/nativefiledialog + branch = devel [submodule "libraries/cocos-headers"] path = libraries/cocos-headers url = https://github.com/HJfod/cocos-headers.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 29235ce..004a379 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,6 +10,13 @@ if(NOT WINDOWS_HEADER) message(FATAL_ERROR "Can't find windows.h!") endif() +# TODO: not +add_compile_definitions(FTG_IGNORE_UNICODE) + +if (${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo") + add_compile_definitions(SHOW_CONSOLE) +endif() + file( GLOB_RECURSE SOURCE_FILES src/*.cpp diff --git a/libraries/nfd b/libraries/nfd index 67345b8..2850c97 160000 --- a/libraries/nfd +++ b/libraries/nfd @@ -1 +1 @@ -Subproject commit 67345b80ebb429ecc2aeda94c478b3bcc5f7888e +Subproject commit 2850c97af02e6b4cce6ffb91a0445acb5eb9b241 diff --git a/src/dllmain.cpp b/src/dllmain.cpp index 5ecffe2..46c6279 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -3,8 +3,6 @@ #include "hooks.hpp" -// #define SHOW_CONSOLE - DWORD WINAPI thread_entry(void* module) { #ifdef SHOW_CONSOLE AllocConsole(); diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index 592642f..cf179bb 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -243,9 +243,7 @@ void OverlayLayer::on_save(CCObject*) { nfdchar_t* path = nullptr; auto result = NFD_SaveDialog("replay", nullptr, &path); if (result == NFD_OKAY) { - std::string s_path(path); - // why doesnt it just add the extension for me - ReplaySystem::get_instance().get_replay().save(s_path + ".replay"); + ReplaySystem::get_instance().get_replay().save(path); gd::FLAlertLayer::create(nullptr, "Info", "Ok", nullptr, "Replay saved.")->show(); free(path); } diff --git a/src/recorder_layer.cpp b/src/recorder_layer.cpp index ca48324..8ba414d 100644 --- a/src/recorder_layer.cpp +++ b/src/recorder_layer.cpp @@ -157,13 +157,12 @@ void RecorderLayer::on_toggle_recorder(CCObject* obj) { rs.recorder.stop(); } else { nfdchar_t* path = nullptr; - if (NFD_SaveDialog("mp4", nullptr, &path) == NFD_OKAY) { + if (NFD_SaveDialog("mp4;mkv;webm", nullptr, &path) == NFD_OKAY) { // TODO: warn the user? idk theyre kinda dumb if (!rs.is_playing()) rs.toggle_playing(); - std::string p = std::string(path) + ".mp4"; - std::cout << "saving it to " << p << std::endl; - rs.recorder.start(p); + std::cout << "saving it to " << path << std::endl; + rs.recorder.start(path); free(path); } else { // toggle it on so then gd does !on and then turns it off then boom success From 37cccc36fcb12e229bd610bac576805b0fa257c4 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 9 Sep 2021 16:41:46 -0300 Subject: [PATCH 60/95] switch to double to maybe make it desync less --- src/hooks.cpp | 13 ++++--------- src/hooks.hpp | 1 - src/recorder.cpp | 2 +- src/recorder.hpp | 2 +- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/hooks.cpp b/src/hooks.cpp index b59f375..4582cf9 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -19,7 +19,6 @@ void Hooks::init() { ADD_COCOS_HOOK("?dispatchKeyboardMSG@CCKeyboardDispatcher@cocos2d@@QAE_NW4enumKeyCodes@2@_N@Z", CCKeyboardDispatcher_dispatchKeyboardMSG); ADD_GD_HOOK(0x20ddd0, CheckpointObject_create); - ADD_GD_HOOK(0x1FB780, PlayLayer::init); ADD_GD_HOOK(0x2029C0, PlayLayer::update); ADD_GD_HOOK(0x111500, PlayLayer::pushButton); @@ -104,23 +103,19 @@ void __fastcall Hooks::CCKeyboardDispatcher_dispatchKeyboardMSG_H(CCKeyboardDisp CCKeyboardDispatcher_dispatchKeyboardMSG(self, key, down); } -bool __fastcall Hooks::PlayLayer::init_H(gd::PlayLayer* self, int, void* level) { - return init(self, level); -} - void __fastcall Hooks::PlayLayer::update_H(gd::PlayLayer* self, int, float dt) { auto& rs = ReplaySystem::get_instance(); if (rs.get_frame_advance()) return; if (rs.is_playing()) rs.handle_playing(); if (rs.recorder.m_recording) { // is menu thing open - if (!from_offset(self, 0x4BD)) { - auto frame_dt = 1.f / static_cast(rs.recorder.m_fps); - auto time = static_cast(self->m_time + rs.recorder.m_extra_t - rs.recorder.m_last_frame_t); + if (self->m_hasLevelCompleteMenu) { + auto frame_dt = 1. / static_cast(rs.recorder.m_fps); + auto time = self->m_time + rs.recorder.m_extra_t - rs.recorder.m_last_frame_t; if (time >= frame_dt) { gd::FMODAudioEngine::sharedEngine()->setBackgroundMusicTime(self->m_time + from_offset(self->m_levelSettings, 0xfc)); rs.recorder.m_extra_t = time - frame_dt; - rs.recorder.m_last_frame_t = static_cast(self->m_time); + rs.recorder.m_last_frame_t = self->m_time; rs.recorder.capture_frame(); } } else { diff --git a/src/hooks.hpp b/src/hooks.hpp index 5e23f7f..18e2b34 100644 --- a/src/hooks.hpp +++ b/src/hooks.hpp @@ -18,7 +18,6 @@ namespace Hooks { _FASTCALL_HOOK(CheckpointObject_create, CCObject*) namespace PlayLayer { - _THISCALL_HOOK(init, bool, gd::PlayLayer, void* level) _THISCALL_HOOK(update, void, gd::PlayLayer, float dt) _THISCALL_HOOK(pushButton, int, gd::PlayLayer, int, bool) diff --git a/src/recorder.cpp b/src/recorder.cpp index 0ee2a6a..8c0bb70 100644 --- a/src/recorder.cpp +++ b/src/recorder.cpp @@ -50,7 +50,7 @@ void MyRenderTexture::begin() { { auto data = malloc(m_width * m_height * 3); memset(data, 0, m_width * m_height * 3); - m_texture->initWithData(data, kCCTexture2DPixelFormat_RGB888, m_width, m_height, CCSize(m_width, m_height)); + m_texture->initWithData(data, kCCTexture2DPixelFormat_RGB888, m_width, m_height, CCSize(static_cast(m_width), static_cast(m_height))); free(data); } diff --git a/src/recorder.hpp b/src/recorder.hpp index 37aaf1d..a892a8a 100644 --- a/src/recorder.hpp +++ b/src/recorder.hpp @@ -55,7 +55,7 @@ class Recorder { unsigned m_width, m_height; unsigned m_fps; bool m_recording = false; - float m_last_frame_t, m_extra_t; + double m_last_frame_t, m_extra_t; bool m_until_end = true; std::string m_codec = "", m_bitrate = "30M", m_extra_args = ""; From 54cf14dcc2d457f7a28f18d6dd02932329287473 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 9 Sep 2021 17:43:32 -0300 Subject: [PATCH 61/95] fix offset from startpos --- libraries/gd.h | 2 +- src/hooks.cpp | 13 +++++++++---- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/libraries/gd.h b/libraries/gd.h index af2be3d..ae0c9e5 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit af2be3da3c0898ec76581495c189e4801b78a145 +Subproject commit ae0c9e5787813107c84cfc0b26d1ea1e993cc2eb diff --git a/src/hooks.cpp b/src/hooks.cpp index 4582cf9..497d83d 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -103,17 +103,18 @@ void __fastcall Hooks::CCKeyboardDispatcher_dispatchKeyboardMSG_H(CCKeyboardDisp CCKeyboardDispatcher_dispatchKeyboardMSG(self, key, down); } +float g_xpos_time = 0.f; + void __fastcall Hooks::PlayLayer::update_H(gd::PlayLayer* self, int, float dt) { auto& rs = ReplaySystem::get_instance(); if (rs.get_frame_advance()) return; if (rs.is_playing()) rs.handle_playing(); if (rs.recorder.m_recording) { - // is menu thing open - if (self->m_hasLevelCompleteMenu) { + if (!self->m_hasLevelCompleteMenu) { auto frame_dt = 1. / static_cast(rs.recorder.m_fps); auto time = self->m_time + rs.recorder.m_extra_t - rs.recorder.m_last_frame_t; if (time >= frame_dt) { - gd::FMODAudioEngine::sharedEngine()->setBackgroundMusicTime(self->m_time + from_offset(self->m_levelSettings, 0xfc)); + gd::FMODAudioEngine::sharedEngine()->setBackgroundMusicTime(self->m_time + from_offset(self->m_levelSettings, 0xfc) + g_xpos_time); rs.recorder.m_extra_t = time - frame_dt; rs.recorder.m_last_frame_t = self->m_time; rs.recorder.capture_frame(); @@ -147,7 +148,11 @@ int __fastcall Hooks::PlayLayer::releaseButton_H(gd::PlayLayer* self, int, int i int __fastcall Hooks::PlayLayer::resetLevel_H(gd::PlayLayer* self, int) { auto ret = resetLevel(self); - ReplaySystem::get_instance().on_reset(); + auto& rs = ReplaySystem::get_instance(); + rs.on_reset(); + // from what i've checked rob doesnt store this anywhere, so i have to calculate it again + if (rs.recorder.m_recording) + g_xpos_time = self->timeForXPos2(self->m_player1->m_position.x, self->m_isTestMode); return ret; } From d481f5f7303baff11f110261e4f9ff87baadff05 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Fri, 10 Sep 2021 23:11:34 -0300 Subject: [PATCH 62/95] post add song + move code around --- libraries/gd.h | 2 +- src/hooks.cpp | 16 +++------------- src/recorder.cpp | 44 +++++++++++++++++++++++++++++++++++++++++++- src/recorder.hpp | 4 ++++ 4 files changed, 51 insertions(+), 15 deletions(-) diff --git a/libraries/gd.h b/libraries/gd.h index ae0c9e5..54513de 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit ae0c9e5787813107c84cfc0b26d1ea1e993cc2eb +Subproject commit 54513de492fc369735a1cd62ecdb4527b382dc34 diff --git a/src/hooks.cpp b/src/hooks.cpp index 497d83d..b3dc350 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -110,18 +110,7 @@ void __fastcall Hooks::PlayLayer::update_H(gd::PlayLayer* self, int, float dt) { if (rs.get_frame_advance()) return; if (rs.is_playing()) rs.handle_playing(); if (rs.recorder.m_recording) { - if (!self->m_hasLevelCompleteMenu) { - auto frame_dt = 1. / static_cast(rs.recorder.m_fps); - auto time = self->m_time + rs.recorder.m_extra_t - rs.recorder.m_last_frame_t; - if (time >= frame_dt) { - gd::FMODAudioEngine::sharedEngine()->setBackgroundMusicTime(self->m_time + from_offset(self->m_levelSettings, 0xfc) + g_xpos_time); - rs.recorder.m_extra_t = time - frame_dt; - rs.recorder.m_last_frame_t = self->m_time; - rs.recorder.capture_frame(); - } - } else { - rs.recorder.stop(); - } + rs.recorder.handle_recording(self, dt); } update(self, dt); } @@ -152,7 +141,8 @@ int __fastcall Hooks::PlayLayer::resetLevel_H(gd::PlayLayer* self, int) { rs.on_reset(); // from what i've checked rob doesnt store this anywhere, so i have to calculate it again if (rs.recorder.m_recording) - g_xpos_time = self->timeForXPos2(self->m_player1->m_position.x, self->m_isTestMode); + rs.recorder.m_song_start_offset = self->timeForXPos2( + self->m_player1->m_position.x, self->m_isTestMode) + self->m_levelSettings->m_songStartOffset; return ret; } diff --git a/src/recorder.cpp b/src/recorder.cpp index 8c0bb70..2deae00 100644 --- a/src/recorder.cpp +++ b/src/recorder.cpp @@ -6,11 +6,18 @@ Recorder::Recorder() : m_width(1280), m_height(720), m_fps(60) {} void Recorder::start(const std::string& path) { m_recording = true; + m_finished_level = false; m_last_frame_t = m_extra_t = 0; + m_after_end_extra_time = 0.f; m_renderer.m_width = m_width; m_renderer.m_height = m_height; m_renderer.begin(); - std::thread([&, path]() { + auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); + auto song_file = play_layer->m_level->getAudioFileName(); + // these are always false??? + auto fade_in = play_layer->m_levelSettings->m_fadeIn; + auto fade_out = play_layer->m_levelSettings->m_fadeOut; + std::thread([&, path, song_file]() { std::stringstream stream; stream << "ffmpeg -y -f rawvideo -pix_fmt rgb24 -s " << m_width << "x" << m_height << " -r " << m_fps << " -i - "; @@ -23,6 +30,7 @@ void Recorder::start(const std::string& path) { else stream << "-pix_fmt yuv420p "; stream << "-vf \"vflip\" -an \"" << path << "\" "; // i hope just putting it in "" escapes it + std::cout << "executing: " << stream.str() << std::endl; auto process = subprocess::Popen(stream.str()); while (m_recording) { m_lock.lock(); @@ -35,6 +43,20 @@ void Recorder::start(const std::string& path) { } process.close(); std::cout << "should be done now!" << std::endl; + std::cout << "sike" << std::endl; + auto total_time = m_last_frame_t; // 1 frame too short? + { + std::stringstream stream; + stream << "ffmpeg -y -ss " << m_song_start_offset << " -i \"" << song_file + << "\" -i \"" << path << "\" -t " << total_time << " -c:v copy " + << "-filter:a \""; + std::cout << "in " << fade_in << " out " << fade_out << std::endl; + stream << "afade=t=in:d=0.5[out];[out]afade=t=out:d=0.5:st=" << (total_time - 0.5f - 3.f - 1.f); + stream << "\" " << path << ".sound.mp4"; + std::cout << "executing: " << stream.str() << std::endl; + auto process = subprocess::Popen(stream.str()); + process.close(); + } }).detach(); } @@ -99,4 +121,24 @@ void Recorder::capture_frame() { m_lock.lock(); m_frames.push(frame); m_lock.unlock(); +} + +void Recorder::handle_recording(gd::PlayLayer* play_layer, float dt) { + if (!play_layer->m_hasLevelCompleteMenu || m_after_end_extra_time < 3.f) { + if (play_layer->m_hasLevelCompleteMenu) { + m_after_end_extra_time += dt; + m_finished_level = true; + } + auto frame_dt = 1. / static_cast(m_fps); + auto time = play_layer->m_time + m_extra_t - m_last_frame_t; + if (time >= frame_dt) { + gd::FMODAudioEngine::sharedEngine()->setBackgroundMusicTime( + play_layer->m_time + m_song_start_offset); + m_extra_t = time - frame_dt; + m_last_frame_t = play_layer->m_time; + capture_frame(); + } + } else { + stop(); + } } \ No newline at end of file diff --git a/src/recorder.hpp b/src/recorder.hpp index a892a8a..e5b70ae 100644 --- a/src/recorder.hpp +++ b/src/recorder.hpp @@ -58,8 +58,12 @@ class Recorder { double m_last_frame_t, m_extra_t; bool m_until_end = true; std::string m_codec = "", m_bitrate = "30M", m_extra_args = ""; + float m_after_end_extra_time; + float m_song_start_offset; + bool m_finished_level; void start(const std::string& path); void stop(); void capture_frame(); + void handle_recording(gd::PlayLayer*, float dt); }; \ No newline at end of file From 2e19faa51bf08cb1e762898a33dfe1486c03b2eb Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sat, 11 Sep 2021 18:25:43 -0300 Subject: [PATCH 63/95] slightly better audio implementation --- src/recorder.cpp | 44 +++++++++++++++++++++++++++++++++++--------- 1 file changed, 35 insertions(+), 9 deletions(-) diff --git a/src/recorder.cpp b/src/recorder.cpp index 2deae00..3a7d831 100644 --- a/src/recorder.cpp +++ b/src/recorder.cpp @@ -1,9 +1,12 @@ #include "recorder.hpp" #include #include +#include Recorder::Recorder() : m_width(1280), m_height(720), m_fps(60) {} +const float extra_length_at_the_end = 3.f; + void Recorder::start(const std::string& path) { m_recording = true; m_finished_level = false; @@ -12,12 +15,16 @@ void Recorder::start(const std::string& path) { m_renderer.m_width = m_width; m_renderer.m_height = m_height; m_renderer.begin(); - auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); + auto gm = gd::GameManager::sharedState(); + auto play_layer = gm->getPlayLayer(); auto song_file = play_layer->m_level->getAudioFileName(); - // these are always false??? auto fade_in = play_layer->m_levelSettings->m_fadeIn; auto fade_out = play_layer->m_levelSettings->m_fadeOut; - std::thread([&, path, song_file]() { + auto bg_volume = gm->m_fBackgroundMusicVolume; + auto sfx_volume = gm->m_fEffectsVolume; + if (play_layer->m_level->songID == 0) + song_file = CCFileUtils::sharedFileUtils()->fullPathForFilename(song_file.c_str(), false); + std::thread([&, path, song_file, fade_in, fade_out, bg_volume, sfx_volume]() { std::stringstream stream; stream << "ffmpeg -y -f rawvideo -pix_fmt rgb24 -s " << m_width << "x" << m_height << " -r " << m_fps << " -i - "; @@ -41,22 +48,41 @@ void Recorder::start(const std::string& path) { } m_lock.unlock(); } - process.close(); + if (process.close()) { + std::cout << "ffmpeg errored :(" << std::endl; + return; + } std::cout << "should be done now!" << std::endl; + if (!std::filesystem::exists(song_file)) return; std::cout << "sike" << std::endl; + char buffer[MAX_PATH]; + if (!GetTempFileNameA(std::filesystem::temp_directory_path().string().c_str(), "rec", 0, buffer)) { + std::cout << "error getting temp file" << std::endl; + return; + } + auto temp_path = std::string(buffer) + "." + std::filesystem::path(path).filename().string(); + std::filesystem::rename(buffer, temp_path); auto total_time = m_last_frame_t; // 1 frame too short? { std::stringstream stream; stream << "ffmpeg -y -ss " << m_song_start_offset << " -i \"" << song_file << "\" -i \"" << path << "\" -t " << total_time << " -c:v copy " - << "-filter:a \""; + << "-filter:a \"volume=" << bg_volume << "[0:a]"; + if (fade_in) + stream << ";[0:a]afade=t=in:d=2[0:a]"; + if (fade_out) + stream << ";[0:a]afade=t=out:d=2:st=" << (total_time - extra_length_at_the_end - 3.5f) << "[0:a]"; std::cout << "in " << fade_in << " out " << fade_out << std::endl; - stream << "afade=t=in:d=0.5[out];[out]afade=t=out:d=0.5:st=" << (total_time - 0.5f - 3.f - 1.f); - stream << "\" " << path << ".sound.mp4"; + stream << "\" \"" << temp_path << "\""; std::cout << "executing: " << stream.str() << std::endl; auto process = subprocess::Popen(stream.str()); - process.close(); + if (process.close()) { + std::cout << "oh god adding the song went wrong cmon" << std::endl; + return; + } } + std::filesystem::remove(path); + std::filesystem::rename(temp_path, path); }).detach(); } @@ -124,7 +150,7 @@ void Recorder::capture_frame() { } void Recorder::handle_recording(gd::PlayLayer* play_layer, float dt) { - if (!play_layer->m_hasLevelCompleteMenu || m_after_end_extra_time < 3.f) { + if (!play_layer->m_hasLevelCompleteMenu || m_after_end_extra_time < extra_length_at_the_end) { if (play_layer->m_hasLevelCompleteMenu) { m_after_end_extra_time += dt; m_finished_level = true; From 251adc4eac7001ecd505b8d84a9135157466da24 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Mon, 13 Sep 2021 23:04:16 -0300 Subject: [PATCH 64/95] add gui for the new stuff --- src/recorder.cpp | 15 +++++++------- src/recorder.hpp | 2 ++ src/recorder_layer.cpp | 45 +++++++++++++++++++++++++++++++++--------- src/recorder_layer.hpp | 1 + 4 files changed, 46 insertions(+), 17 deletions(-) diff --git a/src/recorder.cpp b/src/recorder.cpp index 3a7d831..f72c369 100644 --- a/src/recorder.cpp +++ b/src/recorder.cpp @@ -5,8 +5,6 @@ Recorder::Recorder() : m_width(1280), m_height(720), m_fps(60) {} -const float extra_length_at_the_end = 3.f; - void Recorder::start(const std::string& path) { m_recording = true; m_finished_level = false; @@ -24,7 +22,8 @@ void Recorder::start(const std::string& path) { auto sfx_volume = gm->m_fEffectsVolume; if (play_layer->m_level->songID == 0) song_file = CCFileUtils::sharedFileUtils()->fullPathForFilename(song_file.c_str(), false); - std::thread([&, path, song_file, fade_in, fade_out, bg_volume, sfx_volume]() { + auto is_testmode = play_layer->m_isTestMode; + std::thread([&, path, song_file, fade_in, fade_out, bg_volume, sfx_volume, is_testmode]() { std::stringstream stream; stream << "ffmpeg -y -f rawvideo -pix_fmt rgb24 -s " << m_width << "x" << m_height << " -r " << m_fps << " -i - "; @@ -53,7 +52,7 @@ void Recorder::start(const std::string& path) { return; } std::cout << "should be done now!" << std::endl; - if (!std::filesystem::exists(song_file)) return; + if (!m_include_audio || !std::filesystem::exists(song_file)) return; std::cout << "sike" << std::endl; char buffer[MAX_PATH]; if (!GetTempFileNameA(std::filesystem::temp_directory_path().string().c_str(), "rec", 0, buffer)) { @@ -68,10 +67,10 @@ void Recorder::start(const std::string& path) { stream << "ffmpeg -y -ss " << m_song_start_offset << " -i \"" << song_file << "\" -i \"" << path << "\" -t " << total_time << " -c:v copy " << "-filter:a \"volume=" << bg_volume << "[0:a]"; - if (fade_in) + if (fade_in && !is_testmode) stream << ";[0:a]afade=t=in:d=2[0:a]"; - if (fade_out) - stream << ";[0:a]afade=t=out:d=2:st=" << (total_time - extra_length_at_the_end - 3.5f) << "[0:a]"; + if (fade_out && m_finished_level) + stream << ";[0:a]afade=t=out:d=2:st=" << (total_time - m_after_end_duration - 3.5f) << "[0:a]"; std::cout << "in " << fade_in << " out " << fade_out << std::endl; stream << "\" \"" << temp_path << "\""; std::cout << "executing: " << stream.str() << std::endl; @@ -150,7 +149,7 @@ void Recorder::capture_frame() { } void Recorder::handle_recording(gd::PlayLayer* play_layer, float dt) { - if (!play_layer->m_hasLevelCompleteMenu || m_after_end_extra_time < extra_length_at_the_end) { + if (!play_layer->m_hasLevelCompleteMenu || m_after_end_extra_time < m_after_end_duration) { if (play_layer->m_hasLevelCompleteMenu) { m_after_end_extra_time += dt; m_finished_level = true; diff --git a/src/recorder.hpp b/src/recorder.hpp index e5b70ae..c89174b 100644 --- a/src/recorder.hpp +++ b/src/recorder.hpp @@ -58,9 +58,11 @@ class Recorder { double m_last_frame_t, m_extra_t; bool m_until_end = true; std::string m_codec = "", m_bitrate = "30M", m_extra_args = ""; + float m_after_end_duration = 3.f; float m_after_end_extra_time; float m_song_start_offset; bool m_finished_level; + bool m_include_audio = true; void start(const std::string& path); void stop(); diff --git a/src/recorder_layer.cpp b/src/recorder_layer.cpp index 8ba414d..a7c766f 100644 --- a/src/recorder_layer.cpp +++ b/src/recorder_layer.cpp @@ -18,6 +18,9 @@ bool RecorderLayer::init() { const CCPoint top_left = win_size / 2.f - ccp(window_size.width / 2.f, -window_size.height / 2.f); + registerWithTouchDispatcher(); + CCDirector::sharedDirector()->getTouchDispatcher()->incrementForcePrio(2); + m_pButtonMenu = CCMenu::create(); m_pButtonMenu->setPosition({0, 0}); auto menu = m_pButtonMenu; // sorry m_pButtonMenu is too much to type @@ -51,9 +54,18 @@ bool RecorderLayer::init() { menu->addChild(toggler); layer->addChild(label); + toggler = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(RecorderLayer::on_toggle_include_audio)); + toggler->setPosition(top_left + ccp(30.f, -100.f)); + toggler->toggle(rs.recorder.m_include_audio); + menu->addChild(toggler); + layer->addChild(NodeFactory::start("Include audio", "bigFont.fnt") + .setScale(0.7f) + .setPosition(top_left + ccp(55.f, -100.f)) + .setAnchorPoint(ccp(0, 0.5f))); + auto input = NumberInputNode::create(CCSize(70.f, 30.f)); input->set_value(rs.recorder.m_width); - input->setPosition(top_left + ccp(49.f, -104.f)); + input->setPosition(top_left + ccp(49.f, -138.f)); input->input_node->setMaxLabelScale(0.73f); input->callback = [&rs](auto input) { rs.recorder.m_width = input->get_value(); @@ -61,12 +73,12 @@ bool RecorderLayer::init() { layer->addChild(input); layer->addChild(NodeFactory::start("x", "bigFont.fnt") - .setPosition(top_left + ccp(93.5f, -104.f)) + .setPosition(top_left + ccp(93.5f, -138.f)) .setScale(0.5f)); input = NumberInputNode::create(CCSize(70.f, 30.f)); input->set_value(rs.recorder.m_height); - input->setPosition(top_left + ccp(137.f, -104.f)); + input->setPosition(top_left + ccp(137.f, -138.f)); input->input_node->setMaxLabelScale(0.73f); input->callback = [&rs](auto input) { rs.recorder.m_height = input->get_value(); @@ -74,18 +86,32 @@ bool RecorderLayer::init() { layer->addChild(input); layer->addChild(NodeFactory::start("@", "bigFont.fnt") - .setPosition(top_left + ccp(185.5f, -104.f)) + .setPosition(top_left + ccp(185.5f, -138.f)) .setScale(0.5f)); input = NumberInputNode::create(CCSize(50.f, 30.f)); input->set_value(rs.recorder.m_fps); - input->setPosition(top_left + ccp(225.f, -104.f)); + input->setPosition(top_left + ccp(225.f, -138.f)); input->input_node->setMaxLabelScale(0.73f); input->callback = [&rs](auto input) { rs.recorder.m_fps = input->get_value(); }; layer->addChild(input); + input = NumberInputNode::create(CCSize(50.f, 30.f)); + input->set_value(rs.recorder.m_after_end_duration); + input->setPosition(top_left + ccp(346.f, -65.f)); + input->input_node->setMaxLabelScale(0.73f); + input->callback = [&rs](auto input) { + rs.recorder.m_after_end_duration = static_cast(input->get_value()); + }; + layer->addChild(input); + layer->addChild(NodeFactory::start("seconds to render after", "bigFont.fnt") + .setPosition(top_left + ccp(346.f, -45.f)) + .setScale(0.224f)); + + layer->addChild(NodeFactory::start().setPosition(top_left)); + const std::string broad_filter = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.,;-_=+@!\":0123456789$[](){} "; auto text_input = TextInputNode::create(CCSize(60.f, 30.f), 1.f, "chatFont.fnt"); @@ -122,9 +148,6 @@ bool RecorderLayer::init() { layer->addChild(NodeFactory::start("Bitrate", "bigFont.fnt").setPosition(top_left + ccp(291.5f, -152.f)).setScale(0.4f)); layer->addChild(NodeFactory::start("Codec", "bigFont.fnt").setPosition(top_left + ccp(359.5f, -152.f)).setScale(0.4f)); - registerWithTouchDispatcher(); - CCDirector::sharedDirector()->getTouchDispatcher()->incrementForcePrio(2); - auto close_btn = gd::CCMenuItemSpriteExtra::create( CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png"), this, @@ -173,4 +196,8 @@ void RecorderLayer::on_toggle_recorder(CCObject* obj) { void RecorderLayer::on_toggle_until_end(CCObject* obj) { ReplaySystem::get_instance().recorder.m_until_end = !static_cast(obj)->isOn(); -} \ No newline at end of file +} + +void RecorderLayer::on_toggle_include_audio(CCObject* obj) { + ReplaySystem::get_instance().recorder.m_include_audio = !static_cast(obj)->isOn(); +} diff --git a/src/recorder_layer.hpp b/src/recorder_layer.hpp index 0fa1458..5afac03 100644 --- a/src/recorder_layer.hpp +++ b/src/recorder_layer.hpp @@ -20,4 +20,5 @@ class RecorderLayer : public gd::FLAlertLayer { void on_close(CCObject*); void on_toggle_recorder(CCObject*); void on_toggle_until_end(CCObject*); + void on_toggle_include_audio(CCObject*); }; \ No newline at end of file From b7fb4ba653089ce07de8939fc3b0bb995f25e0fa Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Tue, 14 Sep 2021 17:16:33 -0300 Subject: [PATCH 65/95] keep console open on the recorder --- src/recorder.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/recorder.cpp b/src/recorder.cpp index f72c369..a80806a 100644 --- a/src/recorder.cpp +++ b/src/recorder.cpp @@ -2,10 +2,20 @@ #include #include #include +#include Recorder::Recorder() : m_width(1280), m_height(720), m_fps(60) {} void Recorder::start(const std::string& path) { +#ifndef SHOW_CONSOLE + static bool has_console = false; + if (!has_console) { + has_console = true; + AllocConsole(); + static std::ofstream conout("CONOUT$", std::ios::out); + std::cout.rdbuf(conout.rdbuf()); + } +#endif m_recording = true; m_finished_level = false; m_last_frame_t = m_extra_t = 0; @@ -51,9 +61,8 @@ void Recorder::start(const std::string& path) { std::cout << "ffmpeg errored :(" << std::endl; return; } - std::cout << "should be done now!" << std::endl; + std::cout << "video should be done now" << std::endl; if (!m_include_audio || !std::filesystem::exists(song_file)) return; - std::cout << "sike" << std::endl; char buffer[MAX_PATH]; if (!GetTempFileNameA(std::filesystem::temp_directory_path().string().c_str(), "rec", 0, buffer)) { std::cout << "error getting temp file" << std::endl; @@ -82,6 +91,7 @@ void Recorder::start(const std::string& path) { } std::filesystem::remove(path); std::filesystem::rename(temp_path, path); + std::cout << "video + audio should be done now!" << std::endl; }).detach(); } From 11939e9f2fb0563ef4d9f4c036ff877707042e63 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sat, 25 Sep 2021 20:40:50 -0300 Subject: [PATCH 66/95] store a single frame instead of queue, always set volume to 1 turns out using a queue didnt provide any benefit to just storing a single frame, and it also created potential memory issues as the frames built up on the queue --- src/recorder.cpp | 32 ++++++++++++++++---------------- src/recorder.hpp | 30 +++--------------------------- 2 files changed, 19 insertions(+), 43 deletions(-) diff --git a/src/recorder.cpp b/src/recorder.cpp index a80806a..93755fa 100644 --- a/src/recorder.cpp +++ b/src/recorder.cpp @@ -17,6 +17,8 @@ void Recorder::start(const std::string& path) { } #endif m_recording = true; + m_frame_has_data = false; + m_current_frame.resize(m_width * m_height * 3, 0); m_finished_level = false; m_last_frame_t = m_extra_t = 0; m_after_end_extra_time = 0.f; @@ -48,14 +50,15 @@ void Recorder::start(const std::string& path) { stream << "-vf \"vflip\" -an \"" << path << "\" "; // i hope just putting it in "" escapes it std::cout << "executing: " << stream.str() << std::endl; auto process = subprocess::Popen(stream.str()); - while (m_recording) { + while (m_recording || m_frame_has_data) { m_lock.lock(); - if (!m_frames.empty()) { - const auto& frame = m_frames.back(); + if (m_frame_has_data) { + const auto frame = m_current_frame; // copy it + m_frame_has_data = false; + m_lock.unlock(); process.m_stdin.write(frame.data(), frame.size()); - m_frames.pop(); } - m_lock.unlock(); + else m_lock.unlock(); } if (process.close()) { std::cout << "ffmpeg errored :(" << std::endl; @@ -75,7 +78,7 @@ void Recorder::start(const std::string& path) { std::stringstream stream; stream << "ffmpeg -y -ss " << m_song_start_offset << " -i \"" << song_file << "\" -i \"" << path << "\" -t " << total_time << " -c:v copy " - << "-filter:a \"volume=" << bg_volume << "[0:a]"; + << "-filter:a \"volume=1[0:a]"; if (fade_in && !is_testmode) stream << ";[0:a]afade=t=in:d=2[0:a]"; if (fade_out && m_finished_level) @@ -126,7 +129,7 @@ void MyRenderTexture::begin() { glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_old_fbo); } -std::vector MyRenderTexture::capture() { +void MyRenderTexture::capture(std::mutex& lock, std::vector& data, volatile bool& lul) { glViewport(0, 0, m_width, m_height); glGetIntegerv(GL_FRAMEBUFFER_BINDING_EXT, &m_old_fbo); @@ -135,16 +138,15 @@ std::vector MyRenderTexture::capture() { auto director = CCDirector::sharedDirector(); auto scene = director->getRunningScene(); scene->visit(); - - // dynamic_array data(m_width * m_height * 3); - std::vector data; - data.resize(m_width * m_height * 3, 0); + glPixelStorei(GL_PACK_ALIGNMENT, 1); + lock.lock(); + lul = true; glReadPixels(0, 0, m_width, m_height, GL_RGB, GL_UNSIGNED_BYTE, data.data()); + lock.unlock(); glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_old_fbo); director->setViewport(); - return data; } void MyRenderTexture::end() { @@ -152,10 +154,8 @@ void MyRenderTexture::end() { } void Recorder::capture_frame() { - const auto frame = m_renderer.capture(); - m_lock.lock(); - m_frames.push(frame); - m_lock.unlock(); + while (m_frame_has_data) {} + m_renderer.capture(m_lock, m_current_frame, m_frame_has_data); } void Recorder::handle_recording(gd::PlayLayer* play_layer, float dt) { diff --git a/src/recorder.hpp b/src/recorder.hpp index c89174b..d3e8b12 100644 --- a/src/recorder.hpp +++ b/src/recorder.hpp @@ -10,31 +10,6 @@ using u8 = uint8_t; -template -class dynamic_array { - size_t m_size; - T* m_data; -public: - dynamic_array(const size_t size) : m_size(size) { - m_data = new T[m_size](); - } - // dynamic_array(const dynamic_array& other) { - // std::cout << "copying other " << other.size() << std::endl; - // m_size = other.size(); - // m_data = new T[m_size](); - // for (size_t i = 0; i < size(); ++i) - // this[i] = other[i]; - // } - ~dynamic_array() { - delete[] m_data; - } - T& operator[](const size_t index) { return m_data[index]; } - const T& operator[](const size_t index) const { return m_data[index]; } - const auto size() const { return m_size; } - auto data() { return m_data; } - const auto data() const { return m_data; } -}; - class MyRenderTexture { public: unsigned m_width, m_height; @@ -43,13 +18,14 @@ class MyRenderTexture { CCTexture2D* m_texture; void begin(); void end(); - std::vector capture(); + void capture(std::mutex& lock, std::vector& data, volatile bool& lul); }; class Recorder { public: Recorder(); - std::queue> m_frames; + std::vector m_current_frame; + volatile bool m_frame_has_data; std::mutex m_lock; MyRenderTexture m_renderer; unsigned m_width, m_height; From 7a4e93566bcdf368eee4fdbc73359b36f57bc4c2 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sun, 3 Oct 2021 12:03:35 -0300 Subject: [PATCH 67/95] does this even help --- src/hooks.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/hooks.cpp b/src/hooks.cpp index b3dc350..1bc0b49 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -59,14 +59,9 @@ void __fastcall Hooks::CCScheduler_update_H(CCScheduler* self, int, float dt) { // todo: find ways to disable more render stuff g_disable_render = false; - // TODO: not have this min() - // doing the commented out if below causes really weird stutters for some reason - // const int times = min(static_cast((dt + g_left_over) / target_dt), 150); unsigned times = static_cast((dt + g_left_over) / target_dt); - // if the fps is really low then dont run it a lot of times - // if (dt > 1.f / 10.f) { - // times = min(times, 100); - // } + if (dt == 0.f) + return CCScheduler_update(self, target_dt); auto start = std::chrono::high_resolution_clock::now(); for (unsigned i = 0; i < times; ++i) { // if (i == times - 1) From 8fd8b82d59a0e05fff230fc904b119d63ed71914 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sun, 3 Oct 2021 16:10:30 -0300 Subject: [PATCH 68/95] switch to mat-dash --- .gitmodules | 3 ++ CMakeLists.txt | 2 + libraries/mat-dash | 1 + src/dllmain.cpp | 19 ++----- src/hooks.cpp | 121 ++++++++++++++++++++---------------------- src/hooks.hpp | 41 ++++++-------- src/replay_system.cpp | 16 +++--- 7 files changed, 93 insertions(+), 110 deletions(-) create mode 160000 libraries/mat-dash diff --git a/.gitmodules b/.gitmodules index e54fda4..9ff91c0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -11,3 +11,6 @@ [submodule "libraries/cocos-headers"] path = libraries/cocos-headers url = https://github.com/HJfod/cocos-headers.git +[submodule "libraries/mat-dash"] + path = libraries/mat-dash + url = git@github.com:matcool/mat-dash.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 004a379..3f662a4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,8 @@ set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) +include(libraries/mat-dash/include.cmake) + project(replay-bot) find_file(WINDOWS_HEADER windows.h) diff --git a/libraries/mat-dash b/libraries/mat-dash new file mode 160000 index 0000000..3fe4116 --- /dev/null +++ b/libraries/mat-dash @@ -0,0 +1 @@ +Subproject commit 3fe4116b1d517125d42bf38774aa1e4cbe82bdf1 diff --git a/src/dllmain.cpp b/src/dllmain.cpp index 46c6279..c7a626a 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -1,9 +1,10 @@ #include "includes.h" #include +#include #include "hooks.hpp" -DWORD WINAPI thread_entry(void* module) { +void mod_main(HMODULE module) { #ifdef SHOW_CONSOLE AllocConsole(); std::ofstream conout("CONOUT$", std::ios::out); @@ -12,14 +13,10 @@ DWORD WINAPI thread_entry(void* module) { std::cin.rdbuf(conin.rdbuf()); #endif - DisableThreadLibraryCalls(cast(module)); - - MH_Initialize(); + DisableThreadLibraryCalls(module); Hooks::init(); - MH_EnableHook(MH_ALL_HOOKS); - #ifdef SHOW_CONSOLE std::getline(std::cin, std::string()); MH_Uninitialize(); @@ -28,14 +25,6 @@ DWORD WINAPI thread_entry(void* module) { FreeConsole(); FreeLibraryAndExitThread(cast(module), 0); #endif - - return 0; } -BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved) { - if (reason == DLL_PROCESS_ATTACH) { - auto handle = CreateThread(0, 0, thread_entry, module, 0, 0); - if (handle) CloseHandle(handle); - } - return TRUE; -} \ No newline at end of file +#include diff --git a/src/hooks.cpp b/src/hooks.cpp index 1bc0b49..74f7a5f 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -3,41 +3,37 @@ #include "overlay_layer.hpp" #include "recorder.hpp" #include +#include -auto add_gd_hook(uintptr_t offset, void* hook, void* orig) { - return MH_CreateHook(cast(gd::base + offset), hook, cast(orig)); +auto cocos(const char* symbol) { + static auto mod = GetModuleHandleA("libcocos2d.dll"); + return GetProcAddress(mod, symbol); } -#define ADD_GD_HOOK(o, f) add_gd_hook(o, f##_H, &f) - -auto add_cocos_hook(const char* symbol, void* hook, void* orig) { - return MH_CreateHook(GetProcAddress(GetModuleHandleA("libcocos2d.dll"), symbol), hook, cast(orig)); -} -#define ADD_COCOS_HOOK(o, f) add_cocos_hook(o, f##_H, &f) void Hooks::init() { - ADD_COCOS_HOOK("?update@CCScheduler@cocos2d@@UAEXM@Z", CCScheduler_update); - ADD_COCOS_HOOK("?dispatchKeyboardMSG@CCKeyboardDispatcher@cocos2d@@QAE_NW4enumKeyCodes@2@_N@Z", CCKeyboardDispatcher_dispatchKeyboardMSG); - ADD_GD_HOOK(0x20ddd0, CheckpointObject_create); + add_hook<&CCScheduler_update, Thiscall>(cocos("?update@CCScheduler@cocos2d@@UAEXM@Z")); + add_hook<&CCKeyboardDispatcher_dispatchKeyboardMSG>(cocos("?dispatchKeyboardMSG@CCKeyboardDispatcher@cocos2d@@QAE_NW4enumKeyCodes@2@_N@Z")); + add_hook<&CheckpointObject_create, Optfastcall>(gd::base + 0x20ddd0); - ADD_GD_HOOK(0x2029C0, PlayLayer::update); + add_hook<&PlayLayer::update, Thiscall>(gd::base + 0x2029C0); - ADD_GD_HOOK(0x111500, PlayLayer::pushButton); - ADD_GD_HOOK(0x111660, PlayLayer::releaseButton); - ADD_GD_HOOK(0x20BF00, PlayLayer::resetLevel); + add_hook<&PlayLayer::pushButton>(gd::base + 0x111500); + add_hook<&PlayLayer::releaseButton>(gd::base + 0x111660); + add_hook<&PlayLayer::resetLevel>(gd::base + 0x20BF00); - ADD_GD_HOOK(0x20D3C0, PlayLayer::pauseGame); + add_hook<&PlayLayer::pauseGame>(gd::base + 0x20D3C0); - ADD_GD_HOOK(0x1FD3D0, PlayLayer::levelComplete); - ADD_GD_HOOK(0x20D810, PlayLayer::onQuit); - ADD_GD_HOOK(0x1E60E0, PlayLayer::onEditor); + add_hook<&PlayLayer::levelComplete>(gd::base + 0x1FD3D0); + add_hook<&PlayLayer::onQuit>(gd::base + 0x20D810); + add_hook<&PauseLayer_onEditor>(gd::base + 0x1E60E0); - ADD_GD_HOOK(0x205460, PlayLayer::updateVisiblity); + add_hook<&PlayLayer::updateVisiblity>(gd::base + 0x205460); - ADD_GD_HOOK(0x1E4620, PauseLayer_init); + add_hook<&PauseLayer_init>(gd::base + 0x1E4620); - ADD_GD_HOOK(0x1f4ff0, PlayerObject_ringJump); - ADD_GD_HOOK(0xef0e0, GameObject_activateObject); - ADD_GD_HOOK(0x10ed50, GJBaseGameLayer_bumpPlayer); + add_hook<&PlayerObject_ringJump>(gd::base + 0x1f4ff0); + add_hook<&GameObject_activateObject>(gd::base + 0xef0e0); + add_hook<&GJBaseGameLayer_bumpPlayer>(gd::base + 0x10ed50); } // yes these are global, too lazy to store them in replaysystem or smth @@ -45,7 +41,7 @@ void Hooks::init() { bool g_disable_render = false; float g_left_over = 0.f; -void __fastcall Hooks::CCScheduler_update_H(CCScheduler* self, int, float dt) { +void Hooks::CCScheduler_update(CCScheduler* self, float dt) { auto& rs = ReplaySystem::get_instance(); if (rs.recorder.m_recording || rs.is_playing() || rs.is_recording() && gd::GameManager::sharedState()->getPlayLayer()) { const auto fps = rs.get_replay().get_fps(); @@ -54,19 +50,19 @@ void __fastcall Hooks::CCScheduler_update_H(CCScheduler* self, int, float dt) { const float target_dt = 1.f / fps / speedhack; if (!rs.real_time_mode) - return CCScheduler_update(self, target_dt); + return orig<&CCScheduler_update, Thiscall>(self, target_dt); // todo: find ways to disable more render stuff g_disable_render = false; unsigned times = static_cast((dt + g_left_over) / target_dt); if (dt == 0.f) - return CCScheduler_update(self, target_dt); + return orig<&CCScheduler_update, Thiscall>(self, target_dt); auto start = std::chrono::high_resolution_clock::now(); for (unsigned i = 0; i < times; ++i) { // if (i == times - 1) // g_disable_render = false; - CCScheduler_update(self, target_dt); + orig<&CCScheduler_update, Thiscall>(self, target_dt); using namespace std::literals; if (std::chrono::high_resolution_clock::now() - start > 33.333ms) { times = i + 1; @@ -75,39 +71,39 @@ void __fastcall Hooks::CCScheduler_update_H(CCScheduler* self, int, float dt) { } g_left_over += dt - target_dt * times; } else { - CCScheduler_update(self, dt); + orig<&CCScheduler_update, Thiscall>(self, dt); } } -void __fastcall Hooks::CCKeyboardDispatcher_dispatchKeyboardMSG_H(CCKeyboardDispatcher* self, int, int key, bool down) { +void Hooks::CCKeyboardDispatcher_dispatchKeyboardMSG(CCKeyboardDispatcher* self, int key, bool down) { auto& rs = ReplaySystem::get_instance(); if (down) { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); if (rs.is_recording() && play_layer) { if (key == 'C') { rs.set_frame_advance(false); - PlayLayer::update_H(play_layer, 0, 1.f / rs.get_default_fps()); + PlayLayer::update(play_layer, 1.f / rs.get_default_fps()); rs.set_frame_advance(true); } else if (key == 'F') { rs.set_frame_advance(false); } else if (key == 'R') { - PlayLayer::resetLevel_H(play_layer, 0); + PlayLayer::resetLevel(play_layer); } } } - CCKeyboardDispatcher_dispatchKeyboardMSG(self, key, down); + orig<&CCKeyboardDispatcher_dispatchKeyboardMSG>(self, key, down); } float g_xpos_time = 0.f; -void __fastcall Hooks::PlayLayer::update_H(gd::PlayLayer* self, int, float dt) { +void Hooks::PlayLayer::update(gd::PlayLayer* self, float dt) { auto& rs = ReplaySystem::get_instance(); if (rs.get_frame_advance()) return; if (rs.is_playing()) rs.handle_playing(); if (rs.recorder.m_recording) { rs.recorder.handle_recording(self, dt); } - update(self, dt); + orig<&update, Thiscall>(self, dt); } @@ -120,29 +116,28 @@ bool _player_button_handler(bool hold, bool button) { return false; } -int __fastcall Hooks::PlayLayer::pushButton_H(gd::PlayLayer* self, int, int idk, bool button) { - if (_player_button_handler(true, button)) return 0; - return pushButton(self, idk, button); +void Hooks::PlayLayer::pushButton(gd::PlayLayer* self, int idk, bool button) { + if (_player_button_handler(true, button)) return; + orig<&pushButton>(self, idk, button); } -int __fastcall Hooks::PlayLayer::releaseButton_H(gd::PlayLayer* self, int, int idk, bool button) { - if (_player_button_handler(false, button)) return 0; - return releaseButton(self, idk, button); +void Hooks::PlayLayer::releaseButton(gd::PlayLayer* self, int idk, bool button) { + if (_player_button_handler(false, button)) return; + orig<&releaseButton>(self, idk, button); } -int __fastcall Hooks::PlayLayer::resetLevel_H(gd::PlayLayer* self, int) { - auto ret = resetLevel(self); +void Hooks::PlayLayer::resetLevel(gd::PlayLayer* self) { + orig<&resetLevel>(self); auto& rs = ReplaySystem::get_instance(); rs.on_reset(); // from what i've checked rob doesnt store this anywhere, so i have to calculate it again if (rs.recorder.m_recording) rs.recorder.m_song_start_offset = self->timeForXPos2( self->m_player1->m_position.x, self->m_isTestMode) + self->m_levelSettings->m_songStartOffset; - return ret; } -void __fastcall Hooks::PlayLayer::pauseGame_H(gd::PlayLayer* self, int, bool idk) { +void Hooks::PlayLayer::pauseGame(gd::PlayLayer* self, bool idk) { auto addr = cast(gd::base + 0x20D43C); auto& rs = ReplaySystem::get_instance(); if (rs.is_recording()) @@ -152,20 +147,20 @@ void __fastcall Hooks::PlayLayer::pauseGame_H(gd::PlayLayer* self, int, bool idk if (should_patch) patch(addr, {0x83, 0xC4, 0x04, 0x90, 0x90}); - pauseGame(self, idk); + orig<&pauseGame>(self, idk); if (should_patch) patch(addr, {0xe8, 0x2f, 0x7b, 0xfe, 0xff}); } -CCObject* __fastcall Hooks::CheckpointObject_create_H() { +CCObject* Hooks::CheckpointObject_create() { return CheckpointObjectMod::create(); } -void* __fastcall Hooks::PlayLayer::levelComplete_H(gd::PlayLayer* self, int) { +void Hooks::PlayLayer::levelComplete(gd::PlayLayer* self) { ReplaySystem::get_instance().reset_state(); - return levelComplete(self); + return orig<&levelComplete>(self); } void _on_exit_level() { @@ -173,18 +168,18 @@ void _on_exit_level() { rs.reset_state(); } -void* __fastcall Hooks::PlayLayer::onQuit_H(gd::PlayLayer* self, int) { +void Hooks::PlayLayer::onQuit(gd::PlayLayer* self) { _on_exit_level(); - return onQuit(self); + orig<&onQuit>(self); } -void* __fastcall Hooks::PlayLayer::onEditor_H(gd::PlayLayer* self, int, void* idk) { +void Hooks::PauseLayer_onEditor(gd::PauseLayer* self, CCObject* idk) { _on_exit_level(); - return onEditor(self, idk); + orig<&PauseLayer_onEditor>(self, idk); } -bool __fastcall Hooks::PauseLayer_init_H(gd::PauseLayer* self, int) { - if (PauseLayer_init(self)) { +bool Hooks::PauseLayer_init(gd::PauseLayer* self) { + if (orig<&PauseLayer_init>(self)) { auto win_size = CCDirector::sharedDirector()->getWinSize(); auto menu = CCMenu::create(); @@ -217,28 +212,28 @@ void _handle_activated_object(bool a, bool b, gd::GameObject* object) { } } -void __fastcall Hooks::PlayerObject_ringJump_H(gd::PlayerObject* self, int, gd::GameObject* ring) { +void Hooks::PlayerObject_ringJump(gd::PlayerObject* self, gd::GameObject* ring) { bool a = ring->m_hasBeenActivated; bool b = ring->m_hasBeenActivatedP2; - PlayerObject_ringJump(self, ring); + orig<&PlayerObject_ringJump>(self, ring); _handle_activated_object(a, b, ring); } -void __fastcall Hooks::GameObject_activateObject_H(gd::GameObject* self, int, gd::PlayerObject* player) { +void Hooks::GameObject_activateObject(gd::GameObject* self, gd::PlayerObject* player) { bool a = self->m_hasBeenActivated; bool b = self->m_hasBeenActivatedP2; - GameObject_activateObject(self, player); + orig<&GameObject_activateObject>(self, player); _handle_activated_object(a, b, self); } -void __fastcall Hooks::GJBaseGameLayer_bumpPlayer_H(gd::GJBaseGameLayer* self, int, gd::PlayerObject* player, gd::GameObject* object) { +void Hooks::GJBaseGameLayer_bumpPlayer(gd::GJBaseGameLayer* self, gd::PlayerObject* player, gd::GameObject* object) { bool a = object->m_hasBeenActivated; bool b = object->m_hasBeenActivatedP2; - GJBaseGameLayer_bumpPlayer(self, player, object); + orig<&GJBaseGameLayer_bumpPlayer>(self, player, object); _handle_activated_object(a, b, object); } -void __fastcall Hooks::PlayLayer::updateVisiblity_H(gd::PlayLayer* self, int) { +void Hooks::PlayLayer::updateVisiblity(gd::PlayLayer* self) { if (!g_disable_render) - updateVisiblity(self); + orig<&updateVisiblity>(self); } diff --git a/src/hooks.hpp b/src/hooks.hpp index 18e2b34..babdbee 100644 --- a/src/hooks.hpp +++ b/src/hooks.hpp @@ -1,43 +1,36 @@ #pragma once #include "includes.h" #include - -#define _THISCALL_HOOK(name, ret_type, self_type, ...) \ -inline ret_type(__thiscall* name)(self_type* self, __VA_ARGS__); \ -ret_type __fastcall name##_H(self_type* self, int, __VA_ARGS__); - -#define _FASTCALL_HOOK(name, ret_type, ...) \ -inline ret_type(__fastcall* name)(__VA_ARGS__); \ -ret_type __fastcall name##_H(__VA_ARGS__); +#include namespace Hooks { void init(); - _THISCALL_HOOK(CCScheduler_update, void, CCScheduler, float dt) - _THISCALL_HOOK(CCKeyboardDispatcher_dispatchKeyboardMSG, void, CCKeyboardDispatcher, int key, bool down) - _FASTCALL_HOOK(CheckpointObject_create, CCObject*) + void CCScheduler_update(CCScheduler*, float dt); + void CCKeyboardDispatcher_dispatchKeyboardMSG(CCKeyboardDispatcher*, int key, bool down); + CCObject* CheckpointObject_create(); namespace PlayLayer { - _THISCALL_HOOK(update, void, gd::PlayLayer, float dt) + void update(gd::PlayLayer*, float dt); - _THISCALL_HOOK(pushButton, int, gd::PlayLayer, int, bool) - _THISCALL_HOOK(releaseButton, int, gd::PlayLayer, int, bool) - _THISCALL_HOOK(resetLevel, int, gd::PlayLayer) + void pushButton(gd::PlayLayer*, int, bool); + void releaseButton(gd::PlayLayer*, int, bool); + void resetLevel(gd::PlayLayer*); - _THISCALL_HOOK(pauseGame, void, gd::PlayLayer, bool) + void pauseGame(gd::PlayLayer*, bool); - _THISCALL_HOOK(levelComplete, void*, gd::PlayLayer) + void levelComplete(gd::PlayLayer*); // these are only for stopping recording/playing // maybe hook the destructor instead ? - _THISCALL_HOOK(onQuit, void*, gd::PlayLayer) - _THISCALL_HOOK(onEditor, void*, gd::PlayLayer, void*) + void onQuit(gd::PlayLayer*); - _THISCALL_HOOK(updateVisiblity, void, gd::PlayLayer) + void updateVisiblity(gd::PlayLayer*); } - _THISCALL_HOOK(PauseLayer_init, bool, gd::PauseLayer) + void PauseLayer_onEditor(gd::PauseLayer*, CCObject*); + bool PauseLayer_init(gd::PauseLayer*); - _THISCALL_HOOK(PlayerObject_ringJump, void, gd::PlayerObject, gd::GameObject* ring) - _THISCALL_HOOK(GameObject_activateObject, void, gd::GameObject, gd::PlayerObject* player) - _THISCALL_HOOK(GJBaseGameLayer_bumpPlayer, void, gd::GJBaseGameLayer, gd::PlayerObject* player, gd::GameObject* object) + void PlayerObject_ringJump(gd::PlayerObject*, gd::GameObject* ring); + void GameObject_activateObject(gd::GameObject*, gd::PlayerObject* player); + void GJBaseGameLayer_bumpPlayer(gd::GJBaseGameLayer*, gd::PlayerObject* player, gd::GameObject* object); } \ No newline at end of file diff --git a/src/replay_system.cpp b/src/replay_system.cpp index da62ec0..ff5671c 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -21,8 +21,8 @@ void ReplaySystem::record_action(bool hold, bool player1, bool flip) { void ReplaySystem::play_action(const Action& action) { auto gm = gd::GameManager::sharedState(); auto flip = gm->getGameVariable("0010"); - auto func = action.hold ? Hooks::PlayLayer::pushButton : Hooks::PlayLayer::releaseButton; - func(gm->getPlayLayer(), 0, !action.player2 ^ flip); + if (action.hold) orig<&Hooks::PlayLayer::pushButton>(gm->getPlayLayer(), 0, !action.player2 ^ flip); + else orig<&Hooks::PlayLayer::releaseButton>(gm->getPlayLayer(), 0, !action.player2 ^ flip); } unsigned ReplaySystem::get_frame() { @@ -42,8 +42,8 @@ void ReplaySystem::on_reset() { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); if (is_playing()) { update_frame_offset(); - Hooks::PlayLayer::releaseButton(play_layer, 0, false); - Hooks::PlayLayer::releaseButton(play_layer, 0, true); + orig<&Hooks::PlayLayer::releaseButton>(play_layer, 0, false); + orig<&Hooks::PlayLayer::releaseButton>(play_layer, 0, true); action_index = 0; practice_fixes.activated_objects.clear(); practice_fixes.activated_objects_p2.clear(); @@ -80,13 +80,13 @@ void ReplaySystem::on_reset() { if ((holding && actions.empty()) || (!actions.empty() && actions.back().hold != holding)) { record_action(holding, true, false); if (holding) { - Hooks::PlayLayer::releaseButton(play_layer, 0, true); - Hooks::PlayLayer::pushButton(play_layer, 0, true); + orig<&Hooks::PlayLayer::releaseButton>(play_layer, 0, true); + orig<&Hooks::PlayLayer::pushButton>(play_layer, 0, true); play_layer->m_player1->m_hasJustHeld = true; } } else if (!actions.empty() && actions.back().hold && holding && has_checkpoints && checkpoint.player1.buffer_orb) { - Hooks::PlayLayer::releaseButton(play_layer, 0, true); - Hooks::PlayLayer::pushButton(play_layer, 0, true); + orig<&Hooks::PlayLayer::releaseButton>(play_layer, 0, true); + orig<&Hooks::PlayLayer::pushButton>(play_layer, 0, true); } if (play_layer->m_levelSettings->m_twoPlayerMode) record_action(false, false, false); From 2eb26ab911c4e751108470925be9c74977d5991f Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Mon, 11 Oct 2021 10:32:28 -0300 Subject: [PATCH 69/95] possibly make the bot break less --- src/hooks.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/hooks.cpp b/src/hooks.cpp index 74f7a5f..2218854 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -17,8 +17,6 @@ void Hooks::init() { add_hook<&PlayLayer::update, Thiscall>(gd::base + 0x2029C0); - add_hook<&PlayLayer::pushButton>(gd::base + 0x111500); - add_hook<&PlayLayer::releaseButton>(gd::base + 0x111660); add_hook<&PlayLayer::resetLevel>(gd::base + 0x20BF00); add_hook<&PlayLayer::pauseGame>(gd::base + 0x20D3C0); @@ -179,6 +177,14 @@ void Hooks::PauseLayer_onEditor(gd::PauseLayer* self, CCObject* idk) { } bool Hooks::PauseLayer_init(gd::PauseLayer* self) { + static bool placed_hooks = false; + if (!placed_hooks) { + placed_hooks = true; + // this is stupid lol, but should hopefully + // stop it breaking when loading from extensions + add_hook<&PlayLayer::pushButton>(gd::base + 0x111500); + add_hook<&PlayLayer::releaseButton>(gd::base + 0x111660); + } if (orig<&PauseLayer_init>(self)) { auto win_size = CCDirector::sharedDirector()->getWinSize(); From 8a5c224543272b5e40967eb43a0c3b36a88036b6 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Mon, 11 Oct 2021 13:00:25 -0300 Subject: [PATCH 70/95] utf-8 support --- CMakeLists.txt | 10 ++-------- libraries/gd.h | 2 +- libraries/subprocess.hpp | 11 +++++++++-- src/recorder.cpp | 10 +++++----- src/replay.cpp | 4 ++-- src/utils.cpp | 21 +++++++++++++++++++++ src/utils.hpp | 5 +++++ 7 files changed, 45 insertions(+), 18 deletions(-) create mode 100644 src/utils.cpp diff --git a/CMakeLists.txt b/CMakeLists.txt index 3f662a4..a839c31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,18 +7,12 @@ include(libraries/mat-dash/include.cmake) project(replay-bot) -find_file(WINDOWS_HEADER windows.h) -if(NOT WINDOWS_HEADER) - message(FATAL_ERROR "Can't find windows.h!") -endif() - -# TODO: not -add_compile_definitions(FTG_IGNORE_UNICODE) - if (${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo") add_compile_definitions(SHOW_CONSOLE) endif() +add_compile_definitions(UNICODE _UNICODE) + file( GLOB_RECURSE SOURCE_FILES src/*.cpp diff --git a/libraries/gd.h b/libraries/gd.h index 54513de..3f9eecc 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit 54513de492fc369735a1cd62ecdb4527b382dc34 +Subproject commit 3f9eecc8023c908be942da77706f15572cfbc999 diff --git a/libraries/subprocess.hpp b/libraries/subprocess.hpp index e6b518d..63c26dd 100644 --- a/libraries/subprocess.hpp +++ b/libraries/subprocess.hpp @@ -54,7 +54,7 @@ namespace subprocess { sec_attrs.lpSecurityDescriptor = nullptr; m_proc_info = {0}; - STARTUPINFOA start_info = {0}; + STARTUPINFOW start_info = {0}; start_info.cb = sizeof(start_info); start_info.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); @@ -65,7 +65,14 @@ namespace subprocess { start_info.hStdInput = m_stdin.m_read.handle; m_stdin.m_write.set_inherit(false); - CreateProcessA(nullptr, const_cast(command.c_str()), nullptr, nullptr, true, 0, nullptr, nullptr, &start_info, &m_proc_info); + // cant include "utils.hpp" here, so just copy paste code from myself :D + auto size = MultiByteToWideChar(CP_UTF8, 0, command.c_str(), -1, nullptr, 0); + auto buffer = new wchar_t[size]; + MultiByteToWideChar(CP_UTF8, 0, command.c_str(), -1, buffer, size); + + CreateProcessW(nullptr, buffer, nullptr, nullptr, true, 0, nullptr, nullptr, &start_info, &m_proc_info); + + delete[] buffer; m_stdin.m_read.close(); } diff --git a/src/recorder.cpp b/src/recorder.cpp index 93755fa..9170472 100644 --- a/src/recorder.cpp +++ b/src/recorder.cpp @@ -66,12 +66,12 @@ void Recorder::start(const std::string& path) { } std::cout << "video should be done now" << std::endl; if (!m_include_audio || !std::filesystem::exists(song_file)) return; - char buffer[MAX_PATH]; - if (!GetTempFileNameA(std::filesystem::temp_directory_path().string().c_str(), "rec", 0, buffer)) { + wchar_t buffer[MAX_PATH]; + if (!GetTempFileNameW(widen(std::filesystem::temp_directory_path().string()).c_str(), L"rec", 0, buffer)) { std::cout << "error getting temp file" << std::endl; return; } - auto temp_path = std::string(buffer) + "." + std::filesystem::path(path).filename().string(); + auto temp_path = narrow(buffer) + "." + std::filesystem::path(path).filename().string(); std::filesystem::rename(buffer, temp_path); auto total_time = m_last_frame_t; // 1 frame too short? { @@ -92,8 +92,8 @@ void Recorder::start(const std::string& path) { return; } } - std::filesystem::remove(path); - std::filesystem::rename(temp_path, path); + std::filesystem::remove(widen(path)); + std::filesystem::rename(temp_path, widen(path)); std::cout << "video + audio should be done now!" << std::endl; }).detach(); } diff --git a/src/replay.cpp b/src/replay.cpp index eb42961..ff1e5a3 100644 --- a/src/replay.cpp +++ b/src/replay.cpp @@ -49,7 +49,7 @@ constexpr const char* format_magic = "RPLY"; void Replay::save(const std::string& path) { std::ofstream file; - file.open(path, std::ios::binary | std::ios::out); + file.open(widen(path), std::ios::binary | std::ios::out); file << format_magic << format_ver << type; bin_write(file, fps); for (const auto& action : actions) { @@ -66,7 +66,7 @@ void Replay::save(const std::string& path) { Replay Replay::load(const std::string& path) { Replay replay(0, ReplayType::XPOS); std::ifstream file; - file.open(path, std::ios::binary | std::ios::in); + file.open(widen(path), std::ios::binary | std::ios::in); file.seekg(0, std::ios::end); size_t file_size = static_cast(file.tellg()); diff --git a/src/utils.cpp b/src/utils.cpp new file mode 100644 index 0000000..7ba2fd8 --- /dev/null +++ b/src/utils.cpp @@ -0,0 +1,21 @@ +#include "utils.hpp" + +std::string narrow(const wchar_t* str) { + auto size = WideCharToMultiByte(CP_UTF8, 0, str, -1, nullptr, 0, nullptr, nullptr); + if (size <= 0) { /* fuck */ } + auto buffer = new char[size]; + WideCharToMultiByte(CP_UTF8, 0, str, -1, buffer, size, nullptr, nullptr); + std::string result(buffer, size_t(size) - 1); + delete[] buffer; + return result; +} + +std::wstring widen(const char* str) { + auto size = MultiByteToWideChar(CP_UTF8, 0, str, -1, nullptr, 0); + if (size <= 0) { /* fuck */ } + auto buffer = new wchar_t[size]; + MultiByteToWideChar(CP_UTF8, 0, str, -1, buffer, size); + std::wstring result(buffer, size_t(size) - 1); + delete[] buffer; + return result; +} \ No newline at end of file diff --git a/src/utils.hpp b/src/utils.hpp index 042b9b4..066c90e 100644 --- a/src/utils.hpp +++ b/src/utils.hpp @@ -25,3 +25,8 @@ template R& from_offset(U base, int offset) { return *cast(cast(base) + offset); } + +std::string narrow(const wchar_t* str); +inline auto narrow(const std::wstring& str) { return narrow(str.c_str()); } +std::wstring widen(const char* str); +inline auto widen(const std::string& str) { return widen(str.c_str()); } From 6c2cda5bcf51a67d0cde2ec508bc7bf09782403f Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Mon, 11 Oct 2021 13:09:14 -0300 Subject: [PATCH 71/95] switch to shared minhook --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a839c31..270b228 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,10 @@ target_include_directories(replay-bot PRIVATE libraries/cocos-headers/extensions/ ) +# lmao +option(BUILD_SHARED_LIBS "" ON) add_subdirectory(libraries/minhook) +option(BUILD_SHARED_LIBS "" OFF) target_link_libraries(replay-bot minhook From 829b1f726c652e1538c631898465bca202243c4a Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Mon, 11 Oct 2021 14:02:08 -0300 Subject: [PATCH 72/95] ok nvm that broke it even more --- CMakeLists.txt | 3 --- libraries/gd.h | 2 +- src/hooks.cpp | 7 +++---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 270b228..a839c31 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,10 +35,7 @@ target_include_directories(replay-bot PRIVATE libraries/cocos-headers/extensions/ ) -# lmao -option(BUILD_SHARED_LIBS "" ON) add_subdirectory(libraries/minhook) -option(BUILD_SHARED_LIBS "" OFF) target_link_libraries(replay-bot minhook diff --git a/libraries/gd.h b/libraries/gd.h index 3f9eecc..54df71d 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit 3f9eecc8023c908be942da77706f15572cfbc999 +Subproject commit 54df71dab06abc7455e0aa2524746de67b1de3dc diff --git a/src/hooks.cpp b/src/hooks.cpp index 2218854..126188a 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -13,12 +13,9 @@ auto cocos(const char* symbol) { void Hooks::init() { add_hook<&CCScheduler_update, Thiscall>(cocos("?update@CCScheduler@cocos2d@@UAEXM@Z")); add_hook<&CCKeyboardDispatcher_dispatchKeyboardMSG>(cocos("?dispatchKeyboardMSG@CCKeyboardDispatcher@cocos2d@@QAE_NW4enumKeyCodes@2@_N@Z")); - add_hook<&CheckpointObject_create, Optfastcall>(gd::base + 0x20ddd0); add_hook<&PlayLayer::update, Thiscall>(gd::base + 0x2029C0); - add_hook<&PlayLayer::resetLevel>(gd::base + 0x20BF00); - add_hook<&PlayLayer::pauseGame>(gd::base + 0x20D3C0); add_hook<&PlayLayer::levelComplete>(gd::base + 0x1FD3D0); @@ -85,7 +82,7 @@ void Hooks::CCKeyboardDispatcher_dispatchKeyboardMSG(CCKeyboardDispatcher* self, } else if (key == 'F') { rs.set_frame_advance(false); } else if (key == 'R') { - PlayLayer::resetLevel(play_layer); + play_layer->resetLevel(); } } } @@ -184,6 +181,8 @@ bool Hooks::PauseLayer_init(gd::PauseLayer* self) { // stop it breaking when loading from extensions add_hook<&PlayLayer::pushButton>(gd::base + 0x111500); add_hook<&PlayLayer::releaseButton>(gd::base + 0x111660); + add_hook<&PlayLayer::resetLevel>(gd::base + 0x20BF00); + add_hook<&CheckpointObject_create, Optfastcall>(gd::base + 0x20ddd0); } if (orig<&PauseLayer_init>(self)) { auto win_size = CCDirector::sharedDirector()->getWinSize(); From 7383ceb2ecd0573342001fb0e82bbb8fcd30ba23 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Mon, 11 Oct 2021 14:38:07 -0300 Subject: [PATCH 73/95] remove credits (they were kinda dumb and outdated) --- README.md | 6 ------ 1 file changed, 6 deletions(-) diff --git a/README.md b/README.md index d5a3321..2b9bc42 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,6 @@ Demo Video: ## TODO -- sometimes creating a file dialog crashes (how) - (?) make it more consistent - rob uses a time function somewhere in the physics (why) - wasureta replay in `replays/` can randomly die at 26%, maybe the x pos gets unaligned? (i blame robtop) - -## Credits -- [Andre](https://github.com/AndreNIH) for [CappuccinoSDK](https://github.com/AndreNIH/CappuccinoSDK) -- [pie](https://github.com/PoweredByPie) for [gd.h](https://github.com/PoweredByPie/gd.h) -- [Camden314](https://github.com/camden314) and Andre for a lot of the addresses and offsets \ No newline at end of file From 8e9f232ab3a9abe4c6685d92da19cfa0496660e6 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 4 Nov 2021 16:57:34 -0300 Subject: [PATCH 74/95] restart level on playing --- CMakeLists.txt | 11 ++----- libraries/cocos-headers | 2 +- libraries/gd.h | 2 +- src/hooks.cpp | 65 +++++++++++++++++++++++------------------ src/recorder_layer.cpp | 9 +++++- src/replay_system.cpp | 27 +++++++++++++++++ src/replay_system.hpp | 16 +++------- src/utils.hpp | 17 +++++++++++ 8 files changed, 97 insertions(+), 52 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a839c31..97ef44c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,21 +26,14 @@ target_include_directories(replay-bot PRIVATE libraries/gd.h libraries/minhook/include libraries/nfd/src/include - libraries/cocos-headers/cocos2dx/ - libraries/cocos-headers/cocos2dx/include - libraries/cocos-headers/cocos2dx/kazmath/include - libraries/cocos-headers/cocos2dx/platform/win32 - libraries/cocos-headers/cocos2dx/platform/third_party/win32 - libraries/cocos-headers/cocos2dx/platform/third_party/win32/OGLES - libraries/cocos-headers/extensions/ ) add_subdirectory(libraries/minhook) +add_subdirectory(libraries/cocos-headers) target_link_libraries(replay-bot minhook - ${CMAKE_SOURCE_DIR}/libraries/cocos-headers/cocos2dx/libcocos2d.lib - ${CMAKE_SOURCE_DIR}/libraries/cocos-headers/extensions/libExtensions.lib + cocos2d opengl32 ${CMAKE_SOURCE_DIR}/libraries/glew32.lib ) diff --git a/libraries/cocos-headers b/libraries/cocos-headers index b4b368c..bd2f1c0 160000 --- a/libraries/cocos-headers +++ b/libraries/cocos-headers @@ -1 +1 @@ -Subproject commit b4b368cafd1f4caf6765c2a3f508fc1b53cf4d35 +Subproject commit bd2f1c0696255ed3455171f6042e04d99ad919e2 diff --git a/libraries/gd.h b/libraries/gd.h index 54df71d..7d62f5e 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit 54df71dab06abc7455e0aa2524746de67b1de3dc +Subproject commit 7d62f5e9a419f653e6748d3571e2cf47df0ba762 diff --git a/src/hooks.cpp b/src/hooks.cpp index 126188a..df54a53 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -5,32 +5,6 @@ #include #include -auto cocos(const char* symbol) { - static auto mod = GetModuleHandleA("libcocos2d.dll"); - return GetProcAddress(mod, symbol); -} - -void Hooks::init() { - add_hook<&CCScheduler_update, Thiscall>(cocos("?update@CCScheduler@cocos2d@@UAEXM@Z")); - add_hook<&CCKeyboardDispatcher_dispatchKeyboardMSG>(cocos("?dispatchKeyboardMSG@CCKeyboardDispatcher@cocos2d@@QAE_NW4enumKeyCodes@2@_N@Z")); - - add_hook<&PlayLayer::update, Thiscall>(gd::base + 0x2029C0); - - add_hook<&PlayLayer::pauseGame>(gd::base + 0x20D3C0); - - add_hook<&PlayLayer::levelComplete>(gd::base + 0x1FD3D0); - add_hook<&PlayLayer::onQuit>(gd::base + 0x20D810); - add_hook<&PauseLayer_onEditor>(gd::base + 0x1E60E0); - - add_hook<&PlayLayer::updateVisiblity>(gd::base + 0x205460); - - add_hook<&PauseLayer_init>(gd::base + 0x1E4620); - - add_hook<&PlayerObject_ringJump>(gd::base + 0x1f4ff0); - add_hook<&GameObject_activateObject>(gd::base + 0xef0e0); - add_hook<&GJBaseGameLayer_bumpPlayer>(gd::base + 0x10ed50); -} - // yes these are global, too lazy to store them in replaysystem or smth // not like theyre used anywhere else atm bool g_disable_render = false; @@ -95,9 +69,8 @@ void Hooks::PlayLayer::update(gd::PlayLayer* self, float dt) { auto& rs = ReplaySystem::get_instance(); if (rs.get_frame_advance()) return; if (rs.is_playing()) rs.handle_playing(); - if (rs.recorder.m_recording) { + if (rs.recorder.m_recording) rs.recorder.handle_recording(self, dt); - } orig<&update, Thiscall>(self, dt); } @@ -242,3 +215,39 @@ void Hooks::PlayLayer::updateVisiblity(gd::PlayLayer* self) { if (!g_disable_render) orig<&updateVisiblity>(self); } + +void PauseLayer_onResume(gd::PauseLayer* self, CCObject* sender) { + auto& rs = ReplaySystem::get_instance(); + if (rs.should_restart_next_time) { + self->onRestart(nullptr); + rs.should_restart_next_time = false; + } else + orig<&PauseLayer_onResume>(self, sender); +} + +auto cocos(const char* symbol) { + static auto mod = GetModuleHandleA("libcocos2d.dll"); + return GetProcAddress(mod, symbol); +} + +void Hooks::init() { + add_hook<&CCScheduler_update, Thiscall>(cocos("?update@CCScheduler@cocos2d@@UAEXM@Z")); + add_hook<&CCKeyboardDispatcher_dispatchKeyboardMSG>(cocos("?dispatchKeyboardMSG@CCKeyboardDispatcher@cocos2d@@QAE_NW4enumKeyCodes@2@_N@Z")); + + add_hook<&PlayLayer::update, Thiscall>(gd::base + 0x2029C0); + + add_hook<&PlayLayer::pauseGame>(gd::base + 0x20D3C0); + + add_hook<&PlayLayer::levelComplete>(gd::base + 0x1FD3D0); + add_hook<&PlayLayer::onQuit>(gd::base + 0x20D810); + add_hook<&PauseLayer_onEditor>(gd::base + 0x1E60E0); + + add_hook<&PlayLayer::updateVisiblity>(gd::base + 0x205460); + + add_hook<&PauseLayer_init>(gd::base + 0x1E4620); + add_hook<&PauseLayer_onResume>(gd::base + 0x1e5fa0); + + add_hook<&PlayerObject_ringJump>(gd::base + 0x1f4ff0); + add_hook<&GameObject_activateObject>(gd::base + 0xef0e0); + add_hook<&GJBaseGameLayer_bumpPlayer>(gd::base + 0x10ed50); +} \ No newline at end of file diff --git a/src/recorder_layer.cpp b/src/recorder_layer.cpp index a7c766f..25412bf 100644 --- a/src/recorder_layer.cpp +++ b/src/recorder_layer.cpp @@ -112,7 +112,7 @@ bool RecorderLayer::init() { layer->addChild(NodeFactory::start().setPosition(top_left)); - const std::string broad_filter = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.,;-_=+@!\":0123456789$[](){} "; + const std::string broad_filter = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.,;-_=+@!'\":0123456789$[](){} "; auto text_input = TextInputNode::create(CCSize(60.f, 30.f), 1.f, "chatFont.fnt"); text_input->setPosition(top_left + ccp(291.5f, -177.f)); @@ -148,6 +148,13 @@ bool RecorderLayer::init() { layer->addChild(NodeFactory::start("Bitrate", "bigFont.fnt").setPosition(top_left + ccp(291.5f, -152.f)).setScale(0.4f)); layer->addChild(NodeFactory::start("Codec", "bigFont.fnt").setPosition(top_left + ccp(359.5f, -152.f)).setScale(0.4f)); + text_input = TextInputNode::create(CCSize(128.f, 30.f), 1.f, "chatFont.fnt"); + text_input->setPosition(top_left + ccp(124.5f, -217.f)); + text_input->input_node->m_sCaption = "Audio extra options"; + text_input->input_node->setAllowedChars(broad_filter); + text_input->input_node->setLabelPlaceholderColor({200, 200, 200}); + layer->addChild(text_input); + auto close_btn = gd::CCMenuItemSpriteExtra::create( CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png"), this, diff --git a/src/replay_system.cpp b/src/replay_system.cpp index ff5671c..e7665c9 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -38,6 +38,33 @@ void ReplaySystem::update_frame_offset() { frame_offset = practice_fixes.get_last_checkpoint().frame; } +void ReplaySystem::toggle_playing() { + state = is_playing() ? NOTHING : PLAYING; + auto pl = gd::GameManager::sharedState()->getPlayLayer(); + if (is_playing()) { + if (pl && get_frame() > 0) + should_restart_next_time = true; + action_index = 0; + } else + should_restart_next_time = false; + update_frame_offset(); + _update_status_label(); +} + +void ReplaySystem::toggle_recording() { + state = is_recording() ? NOTHING : RECORDING; + if (!is_recording()) { + frame_advance = false; + should_restart_next_time = false; + } else { + replay = Replay(default_fps, default_type); + if (gd::GameManager::sharedState()->getPlayLayer() && get_frame() > 0) + should_restart_next_time = true; + } + update_frame_offset(); + _update_status_label(); +} + void ReplaySystem::on_reset() { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); if (is_playing()) { diff --git a/src/replay_system.hpp b/src/replay_system.hpp index c3e9d82..5013b56 100644 --- a/src/replay_system.hpp +++ b/src/replay_system.hpp @@ -46,22 +46,13 @@ class ReplaySystem { void update_frame_offset(); - void toggle_playing() { - state = is_playing() ? NOTHING : PLAYING; - update_frame_offset(); - _update_status_label(); - } - void toggle_recording() { - state = is_recording() ? NOTHING : RECORDING; - if (!is_recording()) frame_advance = false; - else replay = Replay(default_fps, default_type); - update_frame_offset(); - _update_status_label(); - } + void toggle_playing(); + void toggle_recording(); void reset_state() { state = NOTHING; frame_advance = false; + should_restart_next_time = false; update_frame_offset(); _update_status_label(); } @@ -83,4 +74,5 @@ class ReplaySystem { bool real_time_mode = true; // fuck it we going public bool showcase_mode = false; Recorder recorder; + bool should_restart_next_time = false; // this is a great name i know }; \ No newline at end of file diff --git a/src/utils.hpp b/src/utils.hpp index 066c90e..d9ff15e 100644 --- a/src/utils.hpp +++ b/src/utils.hpp @@ -1,6 +1,7 @@ #pragma once #include "includes.h" #include +#include template T cast(R const v) { return reinterpret_cast(v); } @@ -30,3 +31,19 @@ std::string narrow(const wchar_t* str); inline auto narrow(const std::wstring& str) { return narrow(str.c_str()); } std::wstring widen(const char* str); inline auto widen(const std::string& str) { return widen(str.c_str()); } + +template +T union_cast(U value) { + static_assert(sizeof(T) == sizeof(U), "union_cast sizes must mach"); + union { + T a; + U b; + } u = {value}; + return u.a; +} + +template +using __to_handler_f_type = typename RemoveThiscall::type>::type; + +template Func> +static const auto to_handler = union_cast(thiscall::wrap); From ea3d2024f1265185b2b104a3e94e98f4fa5a1a51 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 4 Nov 2021 18:35:42 -0300 Subject: [PATCH 75/95] include version in the gui --- .gitignore | 3 ++- CMakeLists.txt | 11 +++++++++++ src/overlay_layer.cpp | 8 ++++++++ src/version.hpp.in | 3 +++ 4 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 src/version.hpp.in diff --git a/.gitignore b/.gitignore index c213ea9..f9ce9c8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ Debug/ Release/ .vs/ .vscode/ -injector.exe \ No newline at end of file +injector.exe +src/version.hpp \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 97ef44c..1b35be3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,6 +21,17 @@ file( ) add_library(replay-bot SHARED ${SOURCE_FILES}) +# https://stackoverflow.com/a/63924044/9124836 +execute_process( + COMMAND git rev-parse --short HEAD + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE COMMIT_HASH + OUTPUT_STRIP_TRAILING_WHITESPACE +) + +configure_file("${CMAKE_SOURCE_DIR}/src/version.hpp.in" + "${CMAKE_SOURCE_DIR}/src/version.hpp") + target_include_directories(replay-bot PRIVATE libraries/gd.h/include libraries/gd.h diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index cf179bb..527fc21 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -4,6 +4,7 @@ #include #include "recorder_layer.hpp" #include "nodes.hpp" +#include "version.hpp" bool OverlayLayer::init() { if (!initWithColor({ 0, 0, 0, 105 })) return false; @@ -177,6 +178,13 @@ bool OverlayLayer::init() { m_replay_info->setPosition({20, win_size.height - 133}); update_info_text(); addChild(m_replay_info); + + addChild(NodeFactory::start(REPLAYBOT_VERSION, "chatFont.fnt") + .setAnchorPoint(ccp(1, 0)) + .setScale(0.6f) + .setPosition(ccp(win_size.width - 5, 5)) + .setOpacity(100) + ); setKeypadEnabled(true); setTouchEnabled(true); diff --git a/src/version.hpp.in b/src/version.hpp.in new file mode 100644 index 0000000..84d7c88 --- /dev/null +++ b/src/version.hpp.in @@ -0,0 +1,3 @@ +#pragma once + +constexpr auto REPLAYBOT_VERSION = "v1.4.2-@COMMIT_HASH@"; \ No newline at end of file From 840eccfc039f6d9efa311242f6eb94364428dc27 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 25 Nov 2021 14:38:01 -0300 Subject: [PATCH 76/95] update mat-dash + extra audio args + fix song offset on first attempt --- libraries/mat-dash | 2 +- src/dllmain.cpp | 5 +---- src/hooks.cpp | 13 +++++++++---- src/recorder.cpp | 18 ++++++++++++++---- src/recorder.hpp | 3 ++- src/recorder_layer.cpp | 3 +++ src/utils.cpp | 4 ++-- 7 files changed, 32 insertions(+), 16 deletions(-) diff --git a/libraries/mat-dash b/libraries/mat-dash index 3fe4116..97f991a 160000 --- a/libraries/mat-dash +++ b/libraries/mat-dash @@ -1 +1 @@ -Subproject commit 3fe4116b1d517125d42bf38774aa1e4cbe82bdf1 +Subproject commit 97f991ae25d17596727fcf9fc4cef34f94831b22 diff --git a/src/dllmain.cpp b/src/dllmain.cpp index c7a626a..f7e26ab 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -1,6 +1,7 @@ #include "includes.h" #include #include +#include #include "hooks.hpp" @@ -13,8 +14,6 @@ void mod_main(HMODULE module) { std::cin.rdbuf(conin.rdbuf()); #endif - DisableThreadLibraryCalls(module); - Hooks::init(); #ifdef SHOW_CONSOLE @@ -26,5 +25,3 @@ void mod_main(HMODULE module) { FreeLibraryAndExitThread(cast(module), 0); #endif } - -#include diff --git a/src/hooks.cpp b/src/hooks.cpp index df54a53..7f1f01d 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -98,10 +98,7 @@ void Hooks::PlayLayer::resetLevel(gd::PlayLayer* self) { orig<&resetLevel>(self); auto& rs = ReplaySystem::get_instance(); rs.on_reset(); - // from what i've checked rob doesnt store this anywhere, so i have to calculate it again - if (rs.recorder.m_recording) - rs.recorder.m_song_start_offset = self->timeForXPos2( - self->m_player1->m_position.x, self->m_isTestMode) + self->m_levelSettings->m_songStartOffset; + ReplaySystem::get_instance().recorder.update_song_offset(self); } @@ -225,6 +222,14 @@ void PauseLayer_onResume(gd::PauseLayer* self, CCObject* sender) { orig<&PauseLayer_onResume>(self, sender); } +bool PlayLayer_init(gd::PlayLayer* self, gd::GJGameLevel* level) { + if (!orig<&PlayLayer_init>(self, level)) return false; + + ReplaySystem::get_instance().recorder.update_song_offset(self); + + return true; +} + auto cocos(const char* symbol) { static auto mod = GetModuleHandleA("libcocos2d.dll"); return GetProcAddress(mod, symbol); diff --git a/src/recorder.cpp b/src/recorder.cpp index 9170472..95f25cc 100644 --- a/src/recorder.cpp +++ b/src/recorder.cpp @@ -35,7 +35,8 @@ void Recorder::start(const std::string& path) { if (play_layer->m_level->songID == 0) song_file = CCFileUtils::sharedFileUtils()->fullPathForFilename(song_file.c_str(), false); auto is_testmode = play_layer->m_isTestMode; - std::thread([&, path, song_file, fade_in, fade_out, bg_volume, sfx_volume, is_testmode]() { + auto song_offset = m_song_start_offset; + std::thread([&, path, song_file, fade_in, fade_out, bg_volume, sfx_volume, is_testmode, song_offset]() { std::stringstream stream; stream << "ffmpeg -y -f rawvideo -pix_fmt rgb24 -s " << m_width << "x" << m_height << " -r " << m_fps << " -i - "; @@ -76,9 +77,11 @@ void Recorder::start(const std::string& path) { auto total_time = m_last_frame_t; // 1 frame too short? { std::stringstream stream; - stream << "ffmpeg -y -ss " << m_song_start_offset << " -i \"" << song_file - << "\" -i \"" << path << "\" -t " << total_time << " -c:v copy " - << "-filter:a \"volume=1[0:a]"; + stream << "ffmpeg -y -ss " << song_offset << " -i \"" << song_file + << "\" -i \"" << path << "\" -t " << total_time << " -c:v copy "; + if (!m_extra_audio_args.empty()) + stream << m_extra_audio_args << " "; + stream << "-filter:a \"volume=1[0:a]"; if (fade_in && !is_testmode) stream << ";[0:a]afade=t=in:d=2[0:a]"; if (fade_out && m_finished_level) @@ -176,4 +179,11 @@ void Recorder::handle_recording(gd::PlayLayer* play_layer, float dt) { } else { stop(); } +} + +void Recorder::update_song_offset(gd::PlayLayer* play_layer) { + // from what i've checked rob doesnt store this anywhere, so i have to calculate it again + if (m_recording) + m_song_start_offset = play_layer->timeForXPos2( + play_layer->m_player1->m_position.x, play_layer->m_isTestMode) + play_layer->m_levelSettings->m_songStartOffset; } \ No newline at end of file diff --git a/src/recorder.hpp b/src/recorder.hpp index d3e8b12..7d0fd0f 100644 --- a/src/recorder.hpp +++ b/src/recorder.hpp @@ -33,7 +33,7 @@ class Recorder { bool m_recording = false; double m_last_frame_t, m_extra_t; bool m_until_end = true; - std::string m_codec = "", m_bitrate = "30M", m_extra_args = ""; + std::string m_codec = "", m_bitrate = "30M", m_extra_args = "", m_extra_audio_args = ""; float m_after_end_duration = 3.f; float m_after_end_extra_time; float m_song_start_offset; @@ -44,4 +44,5 @@ class Recorder { void stop(); void capture_frame(); void handle_recording(gd::PlayLayer*, float dt); + void update_song_offset(gd::PlayLayer*); }; \ No newline at end of file diff --git a/src/recorder_layer.cpp b/src/recorder_layer.cpp index 25412bf..c7e020b 100644 --- a/src/recorder_layer.cpp +++ b/src/recorder_layer.cpp @@ -153,6 +153,9 @@ bool RecorderLayer::init() { text_input->input_node->m_sCaption = "Audio extra options"; text_input->input_node->setAllowedChars(broad_filter); text_input->input_node->setLabelPlaceholderColor({200, 200, 200}); + text_input->callback = [&rs](auto input) { + rs.recorder.m_extra_audio_args = input->get_value(); + }; layer->addChild(text_input); auto close_btn = gd::CCMenuItemSpriteExtra::create( diff --git a/src/utils.cpp b/src/utils.cpp index 7ba2fd8..b19fee5 100644 --- a/src/utils.cpp +++ b/src/utils.cpp @@ -1,7 +1,7 @@ #include "utils.hpp" std::string narrow(const wchar_t* str) { - auto size = WideCharToMultiByte(CP_UTF8, 0, str, -1, nullptr, 0, nullptr, nullptr); + int size = WideCharToMultiByte(CP_UTF8, 0, str, -1, nullptr, 0, nullptr, nullptr); if (size <= 0) { /* fuck */ } auto buffer = new char[size]; WideCharToMultiByte(CP_UTF8, 0, str, -1, buffer, size, nullptr, nullptr); @@ -11,7 +11,7 @@ std::string narrow(const wchar_t* str) { } std::wstring widen(const char* str) { - auto size = MultiByteToWideChar(CP_UTF8, 0, str, -1, nullptr, 0); + int size = MultiByteToWideChar(CP_UTF8, 0, str, -1, nullptr, 0); if (size <= 0) { /* fuck */ } auto buffer = new wchar_t[size]; MultiByteToWideChar(CP_UTF8, 0, str, -1, buffer, size); From 51dccd54cfca0ad467ac139fee41c6bb4d3446d2 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 25 Nov 2021 14:51:55 -0300 Subject: [PATCH 77/95] actually save the value --- src/recorder_layer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/recorder_layer.cpp b/src/recorder_layer.cpp index c7e020b..acc1a6d 100644 --- a/src/recorder_layer.cpp +++ b/src/recorder_layer.cpp @@ -153,6 +153,7 @@ bool RecorderLayer::init() { text_input->input_node->m_sCaption = "Audio extra options"; text_input->input_node->setAllowedChars(broad_filter); text_input->input_node->setLabelPlaceholderColor({200, 200, 200}); + text_input->set_value(rs.recorder.m_extra_audio_args); text_input->callback = [&rs](auto input) { rs.recorder.m_extra_audio_args = input->get_value(); }; From 7f03f332620f83d3574176bad89d7d8cfa3f73ed Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 25 Nov 2021 14:54:08 -0300 Subject: [PATCH 78/95] get_instance() -> get() --- src/hooks.cpp | 24 ++++++++++++------------ src/overlay_layer.cpp | 26 +++++++++++++------------- src/practice_fixes.cpp | 4 ++-- src/recorder_layer.cpp | 8 ++++---- src/replay_system.hpp | 2 +- 5 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/hooks.cpp b/src/hooks.cpp index 7f1f01d..97bd246 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -11,7 +11,7 @@ bool g_disable_render = false; float g_left_over = 0.f; void Hooks::CCScheduler_update(CCScheduler* self, float dt) { - auto& rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get(); if (rs.recorder.m_recording || rs.is_playing() || rs.is_recording() && gd::GameManager::sharedState()->getPlayLayer()) { const auto fps = rs.get_replay().get_fps(); auto speedhack = self->getTimeScale(); @@ -45,7 +45,7 @@ void Hooks::CCScheduler_update(CCScheduler* self, float dt) { } void Hooks::CCKeyboardDispatcher_dispatchKeyboardMSG(CCKeyboardDispatcher* self, int key, bool down) { - auto& rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get(); if (down) { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); if (rs.is_recording() && play_layer) { @@ -66,7 +66,7 @@ void Hooks::CCKeyboardDispatcher_dispatchKeyboardMSG(CCKeyboardDispatcher* self, float g_xpos_time = 0.f; void Hooks::PlayLayer::update(gd::PlayLayer* self, float dt) { - auto& rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get(); if (rs.get_frame_advance()) return; if (rs.is_playing()) rs.handle_playing(); if (rs.recorder.m_recording) @@ -77,7 +77,7 @@ void Hooks::PlayLayer::update(gd::PlayLayer* self, float dt) { bool _player_button_handler(bool hold, bool button) { if (gd::GameManager::sharedState()->getPlayLayer()) { - auto& rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get(); if (rs.is_playing()) return true; rs.record_action(hold, button); } @@ -96,15 +96,15 @@ void Hooks::PlayLayer::releaseButton(gd::PlayLayer* self, int idk, bool button) void Hooks::PlayLayer::resetLevel(gd::PlayLayer* self) { orig<&resetLevel>(self); - auto& rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get(); rs.on_reset(); - ReplaySystem::get_instance().recorder.update_song_offset(self); + ReplaySystem::get().recorder.update_song_offset(self); } void Hooks::PlayLayer::pauseGame(gd::PlayLayer* self, bool idk) { auto addr = cast(gd::base + 0x20D43C); - auto& rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get(); if (rs.is_recording()) rs.record_action(false, true, false); @@ -124,12 +124,12 @@ CCObject* Hooks::CheckpointObject_create() { } void Hooks::PlayLayer::levelComplete(gd::PlayLayer* self) { - ReplaySystem::get_instance().reset_state(); + ReplaySystem::get().reset_state(); return orig<&levelComplete>(self); } void _on_exit_level() { - auto& rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get(); rs.reset_state(); } @@ -178,7 +178,7 @@ bool Hooks::PauseLayer_init(gd::PauseLayer* self) { void _handle_activated_object(bool a, bool b, gd::GameObject* object) { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); - auto& rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get(); if (play_layer && play_layer->m_isPracticeMode && rs.is_recording()) { if (object->m_hasBeenActivated && !a) rs.get_practice_fixes().add_activated_object(object); @@ -214,7 +214,7 @@ void Hooks::PlayLayer::updateVisiblity(gd::PlayLayer* self) { } void PauseLayer_onResume(gd::PauseLayer* self, CCObject* sender) { - auto& rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get(); if (rs.should_restart_next_time) { self->onRestart(nullptr); rs.should_restart_next_time = false; @@ -225,7 +225,7 @@ void PauseLayer_onResume(gd::PauseLayer* self, CCObject* sender) { bool PlayLayer_init(gd::PlayLayer* self, gd::GJGameLevel* level) { if (!orig<&PlayLayer_init>(self, level)) return false; - ReplaySystem::get_instance().recorder.update_song_offset(self); + ReplaySystem::get().recorder.update_song_offset(self); return true; } diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index 527fc21..4c514f6 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -12,7 +12,7 @@ bool OverlayLayer::init() { setZOrder(20); auto win_size = CCDirector::sharedDirector()->getWinSize(); - auto& rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get(); auto menu = CCMenu::create(); menu->setPosition({0, win_size.height}); @@ -193,7 +193,7 @@ bool OverlayLayer::init() { } void OverlayLayer::update_info_text() { - auto& rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get(); auto& replay = rs.get_replay(); std::stringstream stream; stream << "Current Replay:\nFPS: " << replay.get_fps(); @@ -205,12 +205,12 @@ void OverlayLayer::update_info_text() { void OverlayLayer::_update_default_fps() { auto text = m_fps_input->getString(); if (text[0]) - ReplaySystem::get_instance().set_default_fps(std::stof(text)); + ReplaySystem::get().set_default_fps(std::stof(text)); } void OverlayLayer::FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2) { if (!btn2) { - auto& rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get(); int tag = alert->getTag(); if (tag == 1) { rs.toggle_recording(); @@ -224,7 +224,7 @@ void OverlayLayer::FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2) { void OverlayLayer::on_record(CCObject*) { _update_default_fps(); - auto& rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get(); if (!rs.is_recording()) { if (rs.get_replay().get_actions().empty()) { rs.toggle_recording(); @@ -244,14 +244,14 @@ void OverlayLayer::on_record(CCObject*) { } void OverlayLayer::on_play(CCObject*) { - ReplaySystem::get_instance().toggle_playing(); + ReplaySystem::get().toggle_playing(); } void OverlayLayer::on_save(CCObject*) { nfdchar_t* path = nullptr; auto result = NFD_SaveDialog("replay", nullptr, &path); if (result == NFD_OKAY) { - ReplaySystem::get_instance().get_replay().save(path); + ReplaySystem::get().get_replay().save(path); gd::FLAlertLayer::create(nullptr, "Info", "Ok", nullptr, "Replay saved.")->show(); free(path); } @@ -261,7 +261,7 @@ void OverlayLayer::_handle_load_replay() { nfdchar_t* path = nullptr; auto result = NFD_OpenDialog("replay", nullptr, &path); if (result == NFD_OKAY) { - ReplaySystem::get_instance().get_replay() = Replay::load(path); + ReplaySystem::get().get_replay() = Replay::load(path); update_info_text(); gd::FLAlertLayer::create(nullptr, "Info", "Ok", nullptr, "Replay loaded.")->show(); free(path); @@ -269,7 +269,7 @@ void OverlayLayer::_handle_load_replay() { } void OverlayLayer::on_load(CCObject*) { - auto& rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get(); if (rs.get_replay().get_actions().empty()) { _handle_load_replay(); } else { @@ -291,26 +291,26 @@ void OverlayLayer::keyBackClicked() { void OverlayLayer::on_x_pos(CCObject*) { m_x_pos_toggle->toggle(false); m_frame_toggle->toggle(false); - ReplaySystem::get_instance().set_default_type(ReplayType::XPOS); + ReplaySystem::get().set_default_type(ReplayType::XPOS); } void OverlayLayer::on_frame(CCObject*) { m_x_pos_toggle->toggle(false); m_frame_toggle->toggle(false); - ReplaySystem::get_instance().set_default_type(ReplayType::FRAME); + ReplaySystem::get().set_default_type(ReplayType::FRAME); } void OverlayLayer::on_toggle_real_time(CCObject* toggle_) { auto toggle = cast(toggle_); if (toggle != nullptr) { - ReplaySystem::get_instance().real_time_mode = !toggle->isOn(); // why is it flipped + ReplaySystem::get().real_time_mode = !toggle->isOn(); // why is it flipped } } void OverlayLayer::on_toggle_showcase(CCObject* toggle_) { auto toggle = cast(toggle_); if (toggle != nullptr) { - ReplaySystem::get_instance().showcase_mode = !toggle->isOn(); + ReplaySystem::get().showcase_mode = !toggle->isOn(); } } diff --git a/src/practice_fixes.cpp b/src/practice_fixes.cpp index 067417a..b2cd986 100644 --- a/src/practice_fixes.cpp +++ b/src/practice_fixes.cpp @@ -2,14 +2,14 @@ #include "replay_system.hpp" void CheckpointObjectMod::saveInfo() { - auto& rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get(); m_checkpoint = rs.get_practice_fixes().create_checkpoint(); } Checkpoint PracticeFixes::create_checkpoint() { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); if (play_layer) { - auto& rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get(); return { CheckpointData::from_player(play_layer->m_player1), CheckpointData::from_player(play_layer->m_player2), diff --git a/src/recorder_layer.cpp b/src/recorder_layer.cpp index acc1a6d..599ad57 100644 --- a/src/recorder_layer.cpp +++ b/src/recorder_layer.cpp @@ -32,7 +32,7 @@ bool RecorderLayer::init() { const auto center = win_size / 2.f; - auto& rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get(); auto toggler = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(RecorderLayer::on_toggle_recorder)); toggler->setPosition(top_left + ccp(30.f, -30.f)); @@ -185,7 +185,7 @@ void RecorderLayer::on_close(CCObject*) { } void RecorderLayer::on_toggle_recorder(CCObject* obj) { - auto& rs = ReplaySystem::get_instance(); + auto& rs = ReplaySystem::get(); auto toggler = static_cast(obj); if (toggler->isOn()) { rs.recorder.stop(); @@ -206,9 +206,9 @@ void RecorderLayer::on_toggle_recorder(CCObject* obj) { } void RecorderLayer::on_toggle_until_end(CCObject* obj) { - ReplaySystem::get_instance().recorder.m_until_end = !static_cast(obj)->isOn(); + ReplaySystem::get().recorder.m_until_end = !static_cast(obj)->isOn(); } void RecorderLayer::on_toggle_include_audio(CCObject* obj) { - ReplaySystem::get_instance().recorder.m_include_audio = !static_cast(obj)->isOn(); + ReplaySystem::get().recorder.m_include_audio = !static_cast(obj)->isOn(); } diff --git a/src/replay_system.hpp b/src/replay_system.hpp index 5013b56..07b20cf 100644 --- a/src/replay_system.hpp +++ b/src/replay_system.hpp @@ -29,7 +29,7 @@ class ReplaySystem { unsigned frame_offset = 0; public: - static auto& get_instance() { + static auto& get() { static ReplaySystem instance; return instance; } From 3e211cdca996e232f17a4618b1f46815b5e42ad1 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 25 Nov 2021 17:21:44 -0300 Subject: [PATCH 79/95] oops fix song offset again --- src/hooks.cpp | 2 ++ src/recorder.cpp | 7 +++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/hooks.cpp b/src/hooks.cpp index 97bd246..a101306 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -255,4 +255,6 @@ void Hooks::init() { add_hook<&PlayerObject_ringJump>(gd::base + 0x1f4ff0); add_hook<&GameObject_activateObject>(gd::base + 0xef0e0); add_hook<&GJBaseGameLayer_bumpPlayer>(gd::base + 0x10ed50); + + add_hook<&PlayLayer_init>(gd::base + 0x1FB780); } \ No newline at end of file diff --git a/src/recorder.cpp b/src/recorder.cpp index 95f25cc..d57c55e 100644 --- a/src/recorder.cpp +++ b/src/recorder.cpp @@ -182,8 +182,7 @@ void Recorder::handle_recording(gd::PlayLayer* play_layer, float dt) { } void Recorder::update_song_offset(gd::PlayLayer* play_layer) { - // from what i've checked rob doesnt store this anywhere, so i have to calculate it again - if (m_recording) - m_song_start_offset = play_layer->timeForXPos2( - play_layer->m_player1->m_position.x, play_layer->m_isTestMode) + play_layer->m_levelSettings->m_songStartOffset; + // from what i've checked rob doesnt store the timeforxpos result anywhere, so i have to calculate it again + m_song_start_offset = play_layer->m_levelSettings->m_songStartOffset + play_layer->timeForXPos2( + play_layer->m_player1->m_position.x, play_layer->m_isTestMode); } \ No newline at end of file From fc2eee4e11726d6ef872a262ec511a7c60676ef0 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 25 Nov 2021 22:53:57 -0300 Subject: [PATCH 80/95] minor clean ups --- src/dllmain.cpp | 2 +- src/hooks.cpp | 5 ++--- src/replay_system.hpp | 3 +++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/dllmain.cpp b/src/dllmain.cpp index f7e26ab..7dfa2b8 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -22,6 +22,6 @@ void mod_main(HMODULE module) { conout.close(); conin.close(); FreeConsole(); - FreeLibraryAndExitThread(cast(module), 0); + FreeLibraryAndExitThread(module, 0); #endif } diff --git a/src/hooks.cpp b/src/hooks.cpp index a101306..00bfb55 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -98,7 +98,7 @@ void Hooks::PlayLayer::resetLevel(gd::PlayLayer* self) { orig<&resetLevel>(self); auto& rs = ReplaySystem::get(); rs.on_reset(); - ReplaySystem::get().recorder.update_song_offset(self); + rs.recorder.update_song_offset(self); } @@ -129,8 +129,7 @@ void Hooks::PlayLayer::levelComplete(gd::PlayLayer* self) { } void _on_exit_level() { - auto& rs = ReplaySystem::get(); - rs.reset_state(); + ReplaySystem::get().reset_state(); } void Hooks::PlayLayer::onQuit(gd::PlayLayer* self) { diff --git a/src/replay_system.hpp b/src/replay_system.hpp index 07b20cf..78977ce 100644 --- a/src/replay_system.hpp +++ b/src/replay_system.hpp @@ -34,6 +34,9 @@ class ReplaySystem { return instance; } + // prevent myself from accidentally copying it + ReplaySystem(const ReplaySystem&) = delete; + inline auto& get_replay() { return replay; } inline auto get_default_fps() { return default_fps; } inline void set_default_fps(float fps) { default_fps = fps; } From f2471a70f08b4cf9529ba7fabaf2a4004d944a47 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Mon, 6 Dec 2021 15:01:47 -0300 Subject: [PATCH 81/95] remove uneeded hooks from hooks.hpp --- src/dllmain.cpp | 1 + src/hooks.cpp | 84 +++++++++++++++++++++---------------------- src/hooks.hpp | 29 ++------------- src/replay_system.cpp | 16 ++++----- 4 files changed, 51 insertions(+), 79 deletions(-) diff --git a/src/dllmain.cpp b/src/dllmain.cpp index 7dfa2b8..4b9ba5f 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -2,6 +2,7 @@ #include #include #include +#include #include "hooks.hpp" diff --git a/src/hooks.cpp b/src/hooks.cpp index 00bfb55..95a66ef 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -3,14 +3,13 @@ #include "overlay_layer.hpp" #include "recorder.hpp" #include -#include // yes these are global, too lazy to store them in replaysystem or smth // not like theyre used anywhere else atm bool g_disable_render = false; float g_left_over = 0.f; -void Hooks::CCScheduler_update(CCScheduler* self, float dt) { +void CCScheduler_update(CCScheduler* self, float dt) { auto& rs = ReplaySystem::get(); if (rs.recorder.m_recording || rs.is_playing() || rs.is_recording() && gd::GameManager::sharedState()->getPlayLayer()) { const auto fps = rs.get_replay().get_fps(); @@ -44,14 +43,23 @@ void Hooks::CCScheduler_update(CCScheduler* self, float dt) { } } -void Hooks::CCKeyboardDispatcher_dispatchKeyboardMSG(CCKeyboardDispatcher* self, int key, bool down) { +void PlayLayer_update(gd::PlayLayer* self, float dt) { + auto& rs = ReplaySystem::get(); + if (rs.get_frame_advance()) return; + if (rs.is_playing()) rs.handle_playing(); + if (rs.recorder.m_recording) + rs.recorder.handle_recording(self, dt); + orig<&PlayLayer_update, Thiscall>(self, dt); +} + +void CCKeyboardDispatcher_dispatchKeyboardMSG(CCKeyboardDispatcher* self, int key, bool down) { auto& rs = ReplaySystem::get(); if (down) { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); if (rs.is_recording() && play_layer) { if (key == 'C') { rs.set_frame_advance(false); - PlayLayer::update(play_layer, 1.f / rs.get_default_fps()); + PlayLayer_update(play_layer, 1.f / rs.get_default_fps()); rs.set_frame_advance(true); } else if (key == 'F') { rs.set_frame_advance(false); @@ -63,18 +71,6 @@ void Hooks::CCKeyboardDispatcher_dispatchKeyboardMSG(CCKeyboardDispatcher* self, orig<&CCKeyboardDispatcher_dispatchKeyboardMSG>(self, key, down); } -float g_xpos_time = 0.f; - -void Hooks::PlayLayer::update(gd::PlayLayer* self, float dt) { - auto& rs = ReplaySystem::get(); - if (rs.get_frame_advance()) return; - if (rs.is_playing()) rs.handle_playing(); - if (rs.recorder.m_recording) - rs.recorder.handle_recording(self, dt); - orig<&update, Thiscall>(self, dt); -} - - bool _player_button_handler(bool hold, bool button) { if (gd::GameManager::sharedState()->getPlayLayer()) { auto& rs = ReplaySystem::get(); @@ -84,25 +80,25 @@ bool _player_button_handler(bool hold, bool button) { return false; } -void Hooks::PlayLayer::pushButton(gd::PlayLayer* self, int idk, bool button) { +void Hooks::PlayLayer_pushButton(gd::PlayLayer* self, int idk, bool button) { if (_player_button_handler(true, button)) return; - orig<&pushButton>(self, idk, button); + orig<&PlayLayer_pushButton>(self, idk, button); } -void Hooks::PlayLayer::releaseButton(gd::PlayLayer* self, int idk, bool button) { +void Hooks::PlayLayer_releaseButton(gd::PlayLayer* self, int idk, bool button) { if (_player_button_handler(false, button)) return; - orig<&releaseButton>(self, idk, button); + orig<&PlayLayer_releaseButton>(self, idk, button); } -void Hooks::PlayLayer::resetLevel(gd::PlayLayer* self) { - orig<&resetLevel>(self); +void PlayLayer_resetLevel(gd::PlayLayer* self) { + orig<&PlayLayer_resetLevel>(self); auto& rs = ReplaySystem::get(); rs.on_reset(); rs.recorder.update_song_offset(self); } -void Hooks::PlayLayer::pauseGame(gd::PlayLayer* self, bool idk) { +void PlayLayer_pauseGame(gd::PlayLayer* self, bool idk) { auto addr = cast(gd::base + 0x20D43C); auto& rs = ReplaySystem::get(); if (rs.is_recording()) @@ -112,45 +108,45 @@ void Hooks::PlayLayer::pauseGame(gd::PlayLayer* self, bool idk) { if (should_patch) patch(addr, {0x83, 0xC4, 0x04, 0x90, 0x90}); - orig<&pauseGame>(self, idk); + orig<&PlayLayer_pauseGame>(self, idk); if (should_patch) patch(addr, {0xe8, 0x2f, 0x7b, 0xfe, 0xff}); } -CCObject* Hooks::CheckpointObject_create() { +CCObject* CheckpointObject_create() { return CheckpointObjectMod::create(); } -void Hooks::PlayLayer::levelComplete(gd::PlayLayer* self) { +void PlayLayer_levelComplete(gd::PlayLayer* self) { ReplaySystem::get().reset_state(); - return orig<&levelComplete>(self); + return orig<&PlayLayer_levelComplete>(self); } void _on_exit_level() { ReplaySystem::get().reset_state(); } -void Hooks::PlayLayer::onQuit(gd::PlayLayer* self) { +void PlayLayer_onQuit(gd::PlayLayer* self) { _on_exit_level(); - orig<&onQuit>(self); + orig<&PlayLayer_onQuit>(self); } -void Hooks::PauseLayer_onEditor(gd::PauseLayer* self, CCObject* idk) { +void PauseLayer_onEditor(gd::PauseLayer* self, CCObject* idk) { _on_exit_level(); orig<&PauseLayer_onEditor>(self, idk); } -bool Hooks::PauseLayer_init(gd::PauseLayer* self) { +bool PauseLayer_init(gd::PauseLayer* self) { static bool placed_hooks = false; if (!placed_hooks) { placed_hooks = true; // this is stupid lol, but should hopefully // stop it breaking when loading from extensions - add_hook<&PlayLayer::pushButton>(gd::base + 0x111500); - add_hook<&PlayLayer::releaseButton>(gd::base + 0x111660); - add_hook<&PlayLayer::resetLevel>(gd::base + 0x20BF00); + add_hook<&Hooks::PlayLayer_pushButton>(gd::base + 0x111500); + add_hook<&Hooks::PlayLayer_releaseButton>(gd::base + 0x111660); + add_hook<&PlayLayer_resetLevel>(gd::base + 0x20BF00); add_hook<&CheckpointObject_create, Optfastcall>(gd::base + 0x20ddd0); } if (orig<&PauseLayer_init>(self)) { @@ -186,30 +182,30 @@ void _handle_activated_object(bool a, bool b, gd::GameObject* object) { } } -void Hooks::PlayerObject_ringJump(gd::PlayerObject* self, gd::GameObject* ring) { +void PlayerObject_ringJump(gd::PlayerObject* self, gd::GameObject* ring) { bool a = ring->m_hasBeenActivated; bool b = ring->m_hasBeenActivatedP2; orig<&PlayerObject_ringJump>(self, ring); _handle_activated_object(a, b, ring); } -void Hooks::GameObject_activateObject(gd::GameObject* self, gd::PlayerObject* player) { +void GameObject_activateObject(gd::GameObject* self, gd::PlayerObject* player) { bool a = self->m_hasBeenActivated; bool b = self->m_hasBeenActivatedP2; orig<&GameObject_activateObject>(self, player); _handle_activated_object(a, b, self); } -void Hooks::GJBaseGameLayer_bumpPlayer(gd::GJBaseGameLayer* self, gd::PlayerObject* player, gd::GameObject* object) { +void GJBaseGameLayer_bumpPlayer(gd::GJBaseGameLayer* self, gd::PlayerObject* player, gd::GameObject* object) { bool a = object->m_hasBeenActivated; bool b = object->m_hasBeenActivatedP2; orig<&GJBaseGameLayer_bumpPlayer>(self, player, object); _handle_activated_object(a, b, object); } -void Hooks::PlayLayer::updateVisiblity(gd::PlayLayer* self) { +void PlayLayer_updateVisiblity(gd::PlayLayer* self) { if (!g_disable_render) - orig<&updateVisiblity>(self); + orig<&PlayLayer_updateVisiblity>(self); } void PauseLayer_onResume(gd::PauseLayer* self, CCObject* sender) { @@ -238,15 +234,15 @@ void Hooks::init() { add_hook<&CCScheduler_update, Thiscall>(cocos("?update@CCScheduler@cocos2d@@UAEXM@Z")); add_hook<&CCKeyboardDispatcher_dispatchKeyboardMSG>(cocos("?dispatchKeyboardMSG@CCKeyboardDispatcher@cocos2d@@QAE_NW4enumKeyCodes@2@_N@Z")); - add_hook<&PlayLayer::update, Thiscall>(gd::base + 0x2029C0); + add_hook<&PlayLayer_update, Thiscall>(gd::base + 0x2029C0); - add_hook<&PlayLayer::pauseGame>(gd::base + 0x20D3C0); + add_hook<&PlayLayer_pauseGame>(gd::base + 0x20D3C0); - add_hook<&PlayLayer::levelComplete>(gd::base + 0x1FD3D0); - add_hook<&PlayLayer::onQuit>(gd::base + 0x20D810); + add_hook<&PlayLayer_levelComplete>(gd::base + 0x1FD3D0); + add_hook<&PlayLayer_onQuit>(gd::base + 0x20D810); add_hook<&PauseLayer_onEditor>(gd::base + 0x1E60E0); - add_hook<&PlayLayer::updateVisiblity>(gd::base + 0x205460); + add_hook<&PlayLayer_updateVisiblity>(gd::base + 0x205460); add_hook<&PauseLayer_init>(gd::base + 0x1E4620); add_hook<&PauseLayer_onResume>(gd::base + 0x1e5fa0); diff --git a/src/hooks.hpp b/src/hooks.hpp index babdbee..955c0e9 100644 --- a/src/hooks.hpp +++ b/src/hooks.hpp @@ -6,31 +6,6 @@ namespace Hooks { void init(); - void CCScheduler_update(CCScheduler*, float dt); - void CCKeyboardDispatcher_dispatchKeyboardMSG(CCKeyboardDispatcher*, int key, bool down); - CCObject* CheckpointObject_create(); - - namespace PlayLayer { - void update(gd::PlayLayer*, float dt); - - void pushButton(gd::PlayLayer*, int, bool); - void releaseButton(gd::PlayLayer*, int, bool); - void resetLevel(gd::PlayLayer*); - - void pauseGame(gd::PlayLayer*, bool); - - void levelComplete(gd::PlayLayer*); - // these are only for stopping recording/playing - // maybe hook the destructor instead ? - void onQuit(gd::PlayLayer*); - - void updateVisiblity(gd::PlayLayer*); - } - - void PauseLayer_onEditor(gd::PauseLayer*, CCObject*); - bool PauseLayer_init(gd::PauseLayer*); - - void PlayerObject_ringJump(gd::PlayerObject*, gd::GameObject* ring); - void GameObject_activateObject(gd::GameObject*, gd::PlayerObject* player); - void GJBaseGameLayer_bumpPlayer(gd::GJBaseGameLayer*, gd::PlayerObject* player, gd::GameObject* object); + void PlayLayer_pushButton(gd::PlayLayer*, int, bool); + void PlayLayer_releaseButton(gd::PlayLayer*, int, bool); } \ No newline at end of file diff --git a/src/replay_system.cpp b/src/replay_system.cpp index e7665c9..a9a4828 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -21,8 +21,8 @@ void ReplaySystem::record_action(bool hold, bool player1, bool flip) { void ReplaySystem::play_action(const Action& action) { auto gm = gd::GameManager::sharedState(); auto flip = gm->getGameVariable("0010"); - if (action.hold) orig<&Hooks::PlayLayer::pushButton>(gm->getPlayLayer(), 0, !action.player2 ^ flip); - else orig<&Hooks::PlayLayer::releaseButton>(gm->getPlayLayer(), 0, !action.player2 ^ flip); + if (action.hold) orig<&Hooks::PlayLayer_pushButton>(gm->getPlayLayer(), 0, !action.player2 ^ flip); + else orig<&Hooks::PlayLayer_releaseButton>(gm->getPlayLayer(), 0, !action.player2 ^ flip); } unsigned ReplaySystem::get_frame() { @@ -69,8 +69,8 @@ void ReplaySystem::on_reset() { auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); if (is_playing()) { update_frame_offset(); - orig<&Hooks::PlayLayer::releaseButton>(play_layer, 0, false); - orig<&Hooks::PlayLayer::releaseButton>(play_layer, 0, true); + orig<&Hooks::PlayLayer_releaseButton>(play_layer, 0, false); + orig<&Hooks::PlayLayer_releaseButton>(play_layer, 0, true); action_index = 0; practice_fixes.activated_objects.clear(); practice_fixes.activated_objects_p2.clear(); @@ -107,13 +107,13 @@ void ReplaySystem::on_reset() { if ((holding && actions.empty()) || (!actions.empty() && actions.back().hold != holding)) { record_action(holding, true, false); if (holding) { - orig<&Hooks::PlayLayer::releaseButton>(play_layer, 0, true); - orig<&Hooks::PlayLayer::pushButton>(play_layer, 0, true); + orig<&Hooks::PlayLayer_releaseButton>(play_layer, 0, true); + orig<&Hooks::PlayLayer_pushButton>(play_layer, 0, true); play_layer->m_player1->m_hasJustHeld = true; } } else if (!actions.empty() && actions.back().hold && holding && has_checkpoints && checkpoint.player1.buffer_orb) { - orig<&Hooks::PlayLayer::releaseButton>(play_layer, 0, true); - orig<&Hooks::PlayLayer::pushButton>(play_layer, 0, true); + orig<&Hooks::PlayLayer_releaseButton>(play_layer, 0, true); + orig<&Hooks::PlayLayer_pushButton>(play_layer, 0, true); } if (play_layer->m_levelSettings->m_twoPlayerMode) record_action(false, false, false); From bf4ffda6fe2c84a1fcbd8a0f7b84a24106327598 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Mon, 6 Dec 2021 16:35:53 -0300 Subject: [PATCH 82/95] load ffmpeg exe from gd folder --- src/overlay_layer.cpp | 51 ++++++++++++++++++++++++++++++------------- src/recorder.cpp | 4 ++-- src/recorder.hpp | 1 + 3 files changed, 39 insertions(+), 17 deletions(-) diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index 4c514f6..8182da6 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -5,6 +5,7 @@ #include "recorder_layer.hpp" #include "nodes.hpp" #include "version.hpp" +#include bool OverlayLayer::init() { if (!initWithColor({ 0, 0, 0, 105 })) return false; @@ -209,16 +210,22 @@ void OverlayLayer::_update_default_fps() { } void OverlayLayer::FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2) { - if (!btn2) { - auto& rs = ReplaySystem::get(); - int tag = alert->getTag(); - if (tag == 1) { - rs.toggle_recording(); + if (alert->getTag() == 1) { + if (!btn2) { + CCApplication::sharedApplication()->openURL("https://www.gyan.dev/ffmpeg/builds/"); + } + } else { + if (!btn2) { + auto& rs = ReplaySystem::get(); + int tag = alert->getTag(); + if (tag == 1) { + rs.toggle_recording(); + update_info_text(); + } else if (tag == 2) { + _handle_load_replay(); + } update_info_text(); - } else if (tag == 2) { - _handle_load_replay(); } - update_info_text(); } } @@ -317,14 +324,28 @@ void OverlayLayer::on_toggle_showcase(CCObject* toggle_) { void OverlayLayer::on_recorder(CCObject*) { static bool has_ffmpeg = false; if (!has_ffmpeg) { - // theres prob a way to do it by not spawning a process but im lazy and hate dealing with winapi - auto process = subprocess::Popen("where ffmpeg"); - if (process.close()) - gd::FLAlertLayer::create(nullptr, "Error", "Ok", nullptr, "ffmpeg was not found in your path, recorder will not work without it")->show(); - else + char buffer[MAX_PATH]; + GetModuleFileNameA(GetModuleHandleA(NULL), buffer, MAX_PATH); + const auto path = std::filesystem::path(buffer).parent_path() / "ffmpeg.exe"; + if (std::filesystem::exists(path)) { has_ffmpeg = true; - if (!has_ffmpeg) - return; + ReplaySystem::get().recorder.m_ffmpeg_path = path.string(); + } else { + // theres prob a way to do it by not spawning a process but im lazy and hate dealing with winapi + auto process = subprocess::Popen("where ffmpeg"); + if (process.close()) { + auto popup = gd::FLAlertLayer::create(this, "Error", + "Download", "Cancel", + "ffmpeg was not found, recorder will not work without it. " + "To install ffmpeg download it and place the ffmpeg.exe (found inside the bin folder in the zip) in the gd folder" + ); + popup->setTag(1); + popup->show(); + } else + has_ffmpeg = true; + if (!has_ffmpeg) + return; + } } RecorderLayer::create()->show(); } \ No newline at end of file diff --git a/src/recorder.cpp b/src/recorder.cpp index d57c55e..8610d54 100644 --- a/src/recorder.cpp +++ b/src/recorder.cpp @@ -38,7 +38,7 @@ void Recorder::start(const std::string& path) { auto song_offset = m_song_start_offset; std::thread([&, path, song_file, fade_in, fade_out, bg_volume, sfx_volume, is_testmode, song_offset]() { std::stringstream stream; - stream << "ffmpeg -y -f rawvideo -pix_fmt rgb24 -s " << m_width << "x" << m_height << " -r " << m_fps + stream << '"' << m_ffmpeg_path << '"' << " -y -f rawvideo -pix_fmt rgb24 -s " << m_width << "x" << m_height << " -r " << m_fps << " -i - "; if (!m_codec.empty()) stream << "-c:v " << m_codec << " "; @@ -77,7 +77,7 @@ void Recorder::start(const std::string& path) { auto total_time = m_last_frame_t; // 1 frame too short? { std::stringstream stream; - stream << "ffmpeg -y -ss " << song_offset << " -i \"" << song_file + stream << '"' << m_ffmpeg_path << '"' << " -y -ss " << song_offset << " -i \"" << song_file << "\" -i \"" << path << "\" -t " << total_time << " -c:v copy "; if (!m_extra_audio_args.empty()) stream << m_extra_audio_args << " "; diff --git a/src/recorder.hpp b/src/recorder.hpp index 7d0fd0f..91d408d 100644 --- a/src/recorder.hpp +++ b/src/recorder.hpp @@ -39,6 +39,7 @@ class Recorder { float m_song_start_offset; bool m_finished_level; bool m_include_audio = true; + std::string m_ffmpeg_path = "ffmpeg"; void start(const std::string& path); void stop(); From c3c73e5ec780fedc689750e973d7a057f136bbd1 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Mon, 6 Dec 2021 17:36:43 -0300 Subject: [PATCH 83/95] oops make this wide --- src/overlay_layer.cpp | 4 ++-- src/version.hpp.in | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index 8182da6..3eab6b7 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -324,8 +324,8 @@ void OverlayLayer::on_toggle_showcase(CCObject* toggle_) { void OverlayLayer::on_recorder(CCObject*) { static bool has_ffmpeg = false; if (!has_ffmpeg) { - char buffer[MAX_PATH]; - GetModuleFileNameA(GetModuleHandleA(NULL), buffer, MAX_PATH); + wchar_t buffer[MAX_PATH]; + GetModuleFileNameW(GetModuleHandleA(NULL), buffer, MAX_PATH); const auto path = std::filesystem::path(buffer).parent_path() / "ffmpeg.exe"; if (std::filesystem::exists(path)) { has_ffmpeg = true; diff --git a/src/version.hpp.in b/src/version.hpp.in index 84d7c88..4c47e3d 100644 --- a/src/version.hpp.in +++ b/src/version.hpp.in @@ -1,3 +1,3 @@ #pragma once -constexpr auto REPLAYBOT_VERSION = "v1.4.2-@COMMIT_HASH@"; \ No newline at end of file +constexpr auto REPLAYBOT_VERSION = "v1.4.3-@COMMIT_HASH@"; \ No newline at end of file From 79e90edf5ca747898894ce16fb1c36e53396ec82 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Tue, 7 Dec 2021 15:24:09 -0300 Subject: [PATCH 84/95] fix dumb issue --- src/overlay_layer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index 3eab6b7..b539487 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -210,7 +210,7 @@ void OverlayLayer::_update_default_fps() { } void OverlayLayer::FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2) { - if (alert->getTag() == 1) { + if (alert->getTag() == 44) { if (!btn2) { CCApplication::sharedApplication()->openURL("https://www.gyan.dev/ffmpeg/builds/"); } @@ -339,7 +339,7 @@ void OverlayLayer::on_recorder(CCObject*) { "ffmpeg was not found, recorder will not work without it. " "To install ffmpeg download it and place the ffmpeg.exe (found inside the bin folder in the zip) in the gd folder" ); - popup->setTag(1); + popup->setTag(44); popup->show(); } else has_ffmpeg = true; From 64ea585d05399a7f8905a13254292570caa27fc7 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sat, 2 Apr 2022 17:43:30 -0300 Subject: [PATCH 85/95] clean subprocess.hpp and update gd.h --- libraries/gd.h | 2 +- libraries/subprocess.hpp | 17 +++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/libraries/gd.h b/libraries/gd.h index 7d62f5e..e9f6460 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit 7d62f5e9a419f653e6748d3571e2cf47df0ba762 +Subproject commit e9f64607988aa6450f4cc508467113c11f81584d diff --git a/libraries/subprocess.hpp b/libraries/subprocess.hpp index 63c26dd..26389ce 100644 --- a/libraries/subprocess.hpp +++ b/libraries/subprocess.hpp @@ -21,12 +21,12 @@ namespace subprocess { PipeHandle m_write; static PipePair create(bool inheritable) { - SECURITY_ATTRIBUTES security = {0}; + SECURITY_ATTRIBUTES security = {}; security.nLength = sizeof(security); security.bInheritHandle = inheritable; HANDLE read, write; CreatePipe(&read, &write, &security, 0); - return {read, write}; + return { { read }, { write } }; } void write(const void* const data, size_t size) { @@ -43,18 +43,11 @@ namespace subprocess { public: PipePair m_stdin; PipePair m_stdout; - PROCESS_INFORMATION m_proc_info; + PROCESS_INFORMATION m_proc_info{}; public: Popen() {} Popen(const std::string& command) { - SECURITY_ATTRIBUTES sec_attrs = {0}; - - sec_attrs.nLength = sizeof(sec_attrs); - sec_attrs.bInheritHandle = true; - sec_attrs.lpSecurityDescriptor = nullptr; - - m_proc_info = {0}; - STARTUPINFOW start_info = {0}; + STARTUPINFOW start_info = {}; start_info.cb = sizeof(start_info); start_info.hStdOutput = GetStdHandle(STD_OUTPUT_HANDLE); @@ -78,7 +71,7 @@ namespace subprocess { } int wait() { - DWORD result = WaitForSingleObject(m_proc_info.hProcess, INFINITE); + WaitForSingleObject(m_proc_info.hProcess, INFINITE); DWORD exit_code; GetExitCodeProcess(m_proc_info.hProcess, &exit_code); return exit_code; From fda3eef466d36029af01bc25ffbee09d5481089b Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sat, 2 Apr 2022 18:10:01 -0300 Subject: [PATCH 86/95] clean up some more code --- src/dllmain.cpp | 3 ++- src/hooks.cpp | 3 ++- src/includes.h | 2 +- src/recorder_layer.cpp | 4 +--- src/recorder_layer.hpp | 1 - 5 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/dllmain.cpp b/src/dllmain.cpp index 4b9ba5f..7358ef3 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -18,7 +18,8 @@ void mod_main(HMODULE module) { Hooks::init(); #ifdef SHOW_CONSOLE - std::getline(std::cin, std::string()); + std::string line; + std::getline(std::cin, line); MH_Uninitialize(); conout.close(); conin.close(); diff --git a/src/hooks.cpp b/src/hooks.cpp index 95a66ef..d2fc285 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -11,7 +11,8 @@ float g_left_over = 0.f; void CCScheduler_update(CCScheduler* self, float dt) { auto& rs = ReplaySystem::get(); - if (rs.recorder.m_recording || rs.is_playing() || rs.is_recording() && gd::GameManager::sharedState()->getPlayLayer()) { + const auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); + if (play_layer && (rs.recorder.m_recording || rs.is_playing() || rs.is_recording())) { const auto fps = rs.get_replay().get_fps(); auto speedhack = self->getTimeScale(); diff --git a/src/includes.h b/src/includes.h index 10c583c..bf1234f 100644 --- a/src/includes.h +++ b/src/includes.h @@ -3,10 +3,10 @@ #define WIN32_LEAN_AND_MEAN #include +#pragma warning(push, 0) #include #include -#pragma warning(push, 0) #include using namespace cocos2d; #pragma warning(pop) diff --git a/src/recorder_layer.cpp b/src/recorder_layer.cpp index 599ad57..b702314 100644 --- a/src/recorder_layer.cpp +++ b/src/recorder_layer.cpp @@ -30,8 +30,6 @@ bool RecorderLayer::init() { auto check_off_sprite = CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); auto check_on_sprite = CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); - const auto center = win_size / 2.f; - auto& rs = ReplaySystem::get(); auto toggler = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(RecorderLayer::on_toggle_recorder)); @@ -99,7 +97,7 @@ bool RecorderLayer::init() { layer->addChild(input); input = NumberInputNode::create(CCSize(50.f, 30.f)); - input->set_value(rs.recorder.m_after_end_duration); + input->set_value(static_cast(rs.recorder.m_after_end_duration)); input->setPosition(top_left + ccp(346.f, -65.f)); input->input_node->setMaxLabelScale(0.73f); input->callback = [&rs](auto input) { diff --git a/src/recorder_layer.hpp b/src/recorder_layer.hpp index 5afac03..f32f609 100644 --- a/src/recorder_layer.hpp +++ b/src/recorder_layer.hpp @@ -1,6 +1,5 @@ #pragma once #include "includes.h" -#include class RecorderLayer : public gd::FLAlertLayer { public: From f71bc69f7794ba779aaa97d9c343e5bb6ee6f79c Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sat, 2 Apr 2022 18:10:22 -0300 Subject: [PATCH 87/95] clang and warnings --- CMakeLists.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1b35be3..c0d7053 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,18 @@ target_include_directories(replay-bot PRIVATE libraries/nfd/src/include ) +# this is so stupid +set(CMAKE_SIZEOF_VOID_P 4) + +if (${CMAKE_CXX_COMPILER_ID} STREQUAL Clang) + # ensure 32 bit on clang + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -target i386-pc-windows-msvc ") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -target i386-pc-windows-msvc ") +else() + target_compile_options(replay-bot PRIVATE /permissive- /W4 /w14640) +endif() + + add_subdirectory(libraries/minhook) add_subdirectory(libraries/cocos-headers) From 39dbeb11ba60851ffb92c41a576de88aca3891dc Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sun, 3 Apr 2022 01:12:52 -0300 Subject: [PATCH 88/95] begin record options layer --- src/nodes.hpp | 1 + src/overlay_layer.cpp | 269 ++++++++++++++++++++++++++---------------- src/overlay_layer.hpp | 38 ++++-- 3 files changed, 197 insertions(+), 111 deletions(-) diff --git a/src/nodes.hpp b/src/nodes.hpp index 91ffa36..ae3378e 100644 --- a/src/nodes.hpp +++ b/src/nodes.hpp @@ -90,6 +90,7 @@ class NodeFactory { _gen_func(setOpacity) _gen_func(setZOrder) _gen_func(setAnchorPoint) + _gen_func(setColor) #undef _gen_func }; \ No newline at end of file diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index b539487..2bbc20a 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -78,31 +78,6 @@ bool OverlayLayer::init() { auto check_off_sprite = CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); auto check_on_sprite = CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); - m_x_pos_toggle = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(OverlayLayer::on_x_pos)); - m_x_pos_toggle->setPosition({win_size.width - 35, -120}); - menu->addChild(m_x_pos_toggle); - - m_frame_toggle = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(OverlayLayer::on_frame)); - m_frame_toggle->setPosition({win_size.width - 35, -155}); - menu->addChild(m_frame_toggle); - - if (rs.get_default_type() == ReplayType::XPOS) - m_x_pos_toggle->toggle(true); - else - m_frame_toggle->toggle(true); - - label = CCLabelBMFont::create("X Pos", "bigFont.fnt"); - label->setAnchorPoint({1, 0.5}); - label->setScale(0.8f); - label->setPosition({win_size.width - 55, win_size.height - 120}); - addChild(label); - - label = CCLabelBMFont::create("Frame", "bigFont.fnt"); - label->setAnchorPoint({1, 0.5}); - label->setScale(0.8f); - label->setPosition({win_size.width - 55, win_size.height - 155}); - addChild(label); - auto toggle = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(OverlayLayer::on_toggle_real_time)); toggle->setPosition({win_size.width - 35, -190}); toggle->toggle(rs.real_time_mode); @@ -148,32 +123,6 @@ bool OverlayLayer::init() { .setPosition(win_size - ccp(55, 260)) ); - sprite = CCSprite::create("square02b_001.png"); - sprite->setColor({0, 0, 0}); - sprite->setOpacity(69); - sprite->setPosition({110, win_size.height - 115}); - sprite->setScaleX(0.825f); - sprite->setScaleY(0.325f); - sprite->setZOrder(-1); - addChild(sprite); - - m_fps_input = gd::CCTextInputNode::create("fps", nullptr, "bigFont.fnt", 100.f, 100.f); - m_fps_input->setString(std::to_string(static_cast(rs.get_default_fps())).c_str()); - m_fps_input->setLabelPlaceholderColor({200, 200, 200}); - m_fps_input->setLabelPlaceholerScale(0.5f); - m_fps_input->setMaxLabelScale(0.7f); - m_fps_input->setMaxLabelLength(0); - m_fps_input->setAllowedChars("0123456789"); - m_fps_input->setMaxLabelLength(10); - m_fps_input->setPosition({110, win_size.height - 115}); - addChild(m_fps_input); - - label = CCLabelBMFont::create("FPS:", "bigFont.fnt"); - label->setAnchorPoint({0, 0.5f}); - label->setScale(0.7f); - label->setPosition({20, win_size.height - 115}); - addChild(label); - m_replay_info = CCLabelBMFont::create("", "chatFont.fnt"); m_replay_info->setAnchorPoint({0, 1}); m_replay_info->setPosition({20, win_size.height - 133}); @@ -203,51 +152,23 @@ void OverlayLayer::update_info_text() { m_replay_info->setString(stream.str().c_str()); } -void OverlayLayer::_update_default_fps() { - auto text = m_fps_input->getString(); - if (text[0]) - ReplaySystem::get().set_default_fps(std::stof(text)); -} - void OverlayLayer::FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2) { - if (alert->getTag() == 44) { - if (!btn2) { + if (!btn2) { + if (alert->getTag() == 44) { CCApplication::sharedApplication()->openURL("https://www.gyan.dev/ffmpeg/builds/"); - } - } else { - if (!btn2) { - auto& rs = ReplaySystem::get(); - int tag = alert->getTag(); - if (tag == 1) { - rs.toggle_recording(); - update_info_text(); - } else if (tag == 2) { - _handle_load_replay(); - } + } else { + _handle_load_replay(); update_info_text(); } } } void OverlayLayer::on_record(CCObject*) { - _update_default_fps(); auto& rs = ReplaySystem::get(); - if (!rs.is_recording()) { - if (rs.get_replay().get_actions().empty()) { - rs.toggle_recording(); - update_info_text(); - } else { - auto alert = gd::FLAlertLayer::create(this, - "Warning", - "Ok", - "Cancel", - "This will overwrite your currently loaded replay."); - alert->setTag(1); - alert->show(); - } - } else { + if (rs.is_recording()) rs.toggle_recording(); - } + else + RecordOptionsLayer::create(this)->show(); } void OverlayLayer::on_play(CCObject*) { @@ -291,22 +212,9 @@ void OverlayLayer::on_load(CCObject*) { } void OverlayLayer::keyBackClicked() { - _update_default_fps(); gd::FLAlertLayer::keyBackClicked(); } -void OverlayLayer::on_x_pos(CCObject*) { - m_x_pos_toggle->toggle(false); - m_frame_toggle->toggle(false); - ReplaySystem::get().set_default_type(ReplayType::XPOS); -} - -void OverlayLayer::on_frame(CCObject*) { - m_x_pos_toggle->toggle(false); - m_frame_toggle->toggle(false); - ReplaySystem::get().set_default_type(ReplayType::FRAME); -} - void OverlayLayer::on_toggle_real_time(CCObject* toggle_) { auto toggle = cast(toggle_); if (toggle != nullptr) { @@ -348,4 +256,167 @@ void OverlayLayer::on_recorder(CCObject*) { } } RecorderLayer::create()->show(); +} + +bool RecordOptionsLayer::init(OverlayLayer* parent) { + m_parent = parent; + + auto win_size = cocos2d::CCDirector::sharedDirector()->getWinSize(); + + if (!initWithColor({0, 0, 0, 105})) return false; + m_pLayer = CCLayer::create(); + addChild(m_pLayer); + + auto bg = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png"); + const CCSize window_size(250, 150); + bg->setContentSize(window_size); + bg->setPosition(win_size / 2); + bg->setZOrder(-5); + m_pLayer->addChild(bg); + + const CCPoint top_left = win_size / 2.f - ccp(window_size.width / 2.f, -window_size.height / 2.f); + std::cout << "top_left is " << top_left << std::endl; + + registerWithTouchDispatcher(); + CCDirector::sharedDirector()->getTouchDispatcher()->incrementForcePrio(2); + + m_pButtonMenu = CCMenu::create(); + m_pButtonMenu->setPosition(top_left); + auto* const menu = m_pButtonMenu; + m_pLayer->addChild(m_pButtonMenu); + auto* const layer = m_pLayer; + + layer->addChild( + NodeFactory::start("Record mode", "bigFont.fnt") + .setScale(0.5f) + .setPosition(top_left + ccp(10.f, -17.f)) + .setAnchorPoint(ccp(0, 0.5f)) + ); + + auto* const check_off_sprite = CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); + check_off_sprite->setScale(0.6f); + auto* const check_on_sprite = CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); + check_on_sprite->setScale(0.6f); + + m_x_pos_toggle = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(RecordOptionsLayer::on_x_pos)); + m_x_pos_toggle->setPosition(20.f, -43.f); + menu->addChild(m_x_pos_toggle); + + layer->addChild( + NodeFactory::start("X Pos", "bigFont.fnt") + .setScale(0.5f) + .setPosition(top_left + ccp(33, -42)) + .setAnchorPoint(ccp(0, .5f)) + ); + + m_frame_toggle = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(RecordOptionsLayer::on_frame)); + m_frame_toggle->setPosition(150.f, -43.f); + menu->addChild(m_frame_toggle); + + layer->addChild( + NodeFactory::start("Frame", "bigFont.fnt") + .setScale(0.5f) + .setPosition(top_left + ccp(163, -42)) + .setAnchorPoint(ccp(0, .5f)) + ); + + auto& rs = ReplaySystem::get(); + + if (rs.get_default_type() == ReplayType::XPOS) + m_x_pos_toggle->toggle(true); + else + m_frame_toggle->toggle(true); + + layer->addChild(NodeFactory::start("FPS", "bigFont.fnt") + .setAnchorPoint(ccp(0, 0.5f)) + .setScale(0.7f) + .setPosition(top_left + ccp(10, -75)) + ); + + m_fps_input = NumberInputNode::create(CCSize(64.f, 30.f)); + + m_fps_input->set_value(static_cast(rs.get_default_fps())); + m_fps_input->input_node->setMaxLabelScale(0.7f); + m_fps_input->input_node->setMaxLabelLength(10); + m_fps_input->setPosition(top_left + ccp(100, -75)); + layer->addChild(m_fps_input); + + menu->addChild( + NodeFactory::start( + gd::ButtonSprite::create("Record", 90, true, "goldFont.fnt", "GJ_button_01.png", 30.f, 0.7f), + this, menu_selector(RecordOptionsLayer::on_record) + ) + .setPosition(ccp(125, -125)) + ); + + // menu->addChild( + // NodeFactory::start( + // NodeFactory::start(CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png")).setScale(.75f), + // this, menu_selector(RecordOptionsLayer::on_close) + // ) + // .setPosition(18.f, win_size.height - 18.f) + // ); + + setKeypadEnabled(true); + setTouchEnabled(true); + + return true; +} + +void RecordOptionsLayer::keyBackClicked() { + update_default_fps(); + setKeyboardEnabled(false); + removeFromParentAndCleanup(true); +} + +void RecordOptionsLayer::on_close(CCObject*) { + keyBackClicked(); +} + +void RecordOptionsLayer::on_x_pos(CCObject*) { + m_x_pos_toggle->toggle(false); + m_frame_toggle->toggle(false); + ReplaySystem::get().set_default_type(ReplayType::XPOS); +} + +void RecordOptionsLayer::on_frame(CCObject*) { + m_x_pos_toggle->toggle(false); + m_frame_toggle->toggle(false); + ReplaySystem::get().set_default_type(ReplayType::FRAME); +} + +void RecordOptionsLayer::update_default_fps() { + ReplaySystem::get().set_default_fps(static_cast(m_fps_input->get_value())); +} + +void RecordOptionsLayer::on_record(CCObject*) { + update_default_fps(); + auto& rs = ReplaySystem::get(); + if (!rs.is_recording()) { + if (rs.get_replay().get_actions().empty()) { + rs.toggle_recording(); + m_parent->update_info_text(); + this->keyBackClicked(); + } else { + auto alert = gd::FLAlertLayer::create( + this, + "Warning", + "Ok", + "Cancel", + "This will overwrite your currently loaded replay." + ); + alert->show(); + } + } else { + rs.toggle_recording(); + } +} + +void RecordOptionsLayer::FLAlert_Clicked(gd::FLAlertLayer*, bool btn2) { + if (!btn2) { + auto& rs = ReplaySystem::get(); + rs.toggle_recording(); + m_parent->update_info_text(); + this->keyBackClicked(); + } } \ No newline at end of file diff --git a/src/overlay_layer.hpp b/src/overlay_layer.hpp index 30053a4..3299264 100644 --- a/src/overlay_layer.hpp +++ b/src/overlay_layer.hpp @@ -1,13 +1,10 @@ #pragma once #include "includes.h" +#include "nodes.hpp" class OverlayLayer : public gd::FLAlertLayer, public CCTextFieldDelegate, public gd::FLAlertLayerProtocol { - gd::CCTextInputNode* m_fps_input; CCLabelBMFont* m_replay_info; - gd::CCMenuItemToggler* m_x_pos_toggle; - gd::CCMenuItemToggler* m_frame_toggle; - inline void _update_default_fps(); void _handle_load_replay(); public: static auto create() { @@ -39,18 +36,35 @@ class OverlayLayer : public gd::FLAlertLayer, public CCTextFieldDelegate, public void on_save(CCObject*); void on_load(CCObject*); - void on_x_pos(CCObject*); - void on_frame(CCObject*); - void on_toggle_real_time(CCObject*); void on_toggle_showcase(CCObject*); void on_recorder(CCObject*); virtual void keyBackClicked(); - virtual void keyDown(enumKeyCodes key) { - // keyDown overwrites keyBackClicked, how fun - if (key == 27) keyBackClicked(); - } + // virtual void keyDown(enumKeyCodes key) { + // // keyDown overwrites keyBackClicked, how fun + // if (key == 27) keyBackClicked(); + // } + virtual void FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2); +}; + +class RecordOptionsLayer : public gd::FLAlertLayer, public gd::FLAlertLayerProtocol { +public: + NumberInputNode* m_fps_input; + gd::CCMenuItemToggler* m_x_pos_toggle; + gd::CCMenuItemToggler* m_frame_toggle; + OverlayLayer* m_parent; + + GEN_CREATE(RecordOptionsLayer) + + bool init(OverlayLayer*); + void keyBackClicked(); + void on_close(CCObject*); + void on_x_pos(CCObject*); + void on_frame(CCObject*); + void on_record(CCObject*); + + void update_default_fps(); virtual void FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2); -}; \ No newline at end of file +}; From f4cc34035492f0772d87fffaf4ea64fe38267d02 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sun, 10 Apr 2022 15:59:34 -0300 Subject: [PATCH 89/95] some changes in the ui --- src/nodes.hpp | 3 ++- src/overlay_layer.cpp | 55 ++++++++++++++++++++++++++++--------------- src/overlay_layer.hpp | 17 +++++++++---- src/utils.hpp | 12 ++++++++-- 4 files changed, 60 insertions(+), 27 deletions(-) diff --git a/src/nodes.hpp b/src/nodes.hpp index ae3378e..785b9e8 100644 --- a/src/nodes.hpp +++ b/src/nodes.hpp @@ -76,7 +76,8 @@ class NodeFactory { template static auto& start(Args... args) { return *reinterpret_cast(T::create(args...)); } - operator T*() { return reinterpret_cast(this); } + T* finish() { return reinterpret_cast(this); } + operator T*() { return finish(); } #define _gen_func(name) template \ inline auto& name(Args... args) { \ diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index 2bbc20a..d6692d1 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -31,7 +31,8 @@ bool OverlayLayer::init() { sprite = CCSprite::create("GJ_button_01.png"); sprite->setScale(0.72f); - + + // TODO: make these toggles btn = gd::CCMenuItemSpriteExtra::create(sprite, this, menu_selector(OverlayLayer::on_record)); btn->setPosition({35, -50}); menu->addChild(btn); @@ -79,25 +80,35 @@ bool OverlayLayer::init() { auto check_on_sprite = CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); auto toggle = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(OverlayLayer::on_toggle_real_time)); - toggle->setPosition({win_size.width - 35, -190}); + toggle->setPosition({win_size.width - 35, -120}); toggle->toggle(rs.real_time_mode); menu->addChild(toggle); label = CCLabelBMFont::create("Real Time", "bigFont.fnt"); label->setAnchorPoint({1, 0.5}); - label->setScale(0.8f); - label->setPosition({win_size.width - 55, win_size.height - 190}); + label->setScale(0.6f); + label->setPosition({win_size.width - 55, win_size.height - 120}); addChild(label); + // TODO: add some info button to nodes.hpp + menu->addChild( + NodeFactory::start( + NodeFactory::start(CCSprite::createWithSpriteFrameName("GJ_infoIcon_001.png")).setScale(.525f).finish(), + this, menu_selector(OverlayLayer::on_info_real_time) + ) + .setPosition(ccp(win_size.width - 11, -109)) + .setZOrder(-1) + ); + toggle = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(OverlayLayer::on_toggle_showcase)); - toggle->setPosition({win_size.width - 35, -225}); - toggle->toggle(rs.showcase_mode); + toggle->setPosition({win_size.width - 35, -155}); + toggle->toggle(!rs.showcase_mode); menu->addChild(toggle); - label = CCLabelBMFont::create("Showcase Mode", "bigFont.fnt"); + label = CCLabelBMFont::create("Status Text", "bigFont.fnt"); label->setAnchorPoint({1, 0.5}); label->setScale(0.6f); - label->setPosition({win_size.width - 55, win_size.height - 225}); + label->setPosition({win_size.width - 55, win_size.height - 155}); addChild(label); btn = gd::CCMenuItemSpriteExtra::create(CCSprite::create("GJ_button_01.png"), this, menu_selector(OverlayLayer::on_recorder)); @@ -114,18 +125,18 @@ bool OverlayLayer::init() { draw_node->setPosition(btn->getNormalImage()->getContentSize() / 2.f); } btn->getNormalImage()->setScale(0.775f); - btn->setPosition({win_size.width - 35, -260}); + btn->setPosition({win_size.width - 35, -190}); menu->addChild(btn); addChild(NodeFactory::start("Internal Renderer", "bigFont.fnt") .setAnchorPoint(ccp(1, 0.5)) .setScale(0.6f) - .setPosition(win_size - ccp(55, 260)) + .setPosition(win_size - ccp(55, 190)) ); m_replay_info = CCLabelBMFont::create("", "chatFont.fnt"); m_replay_info->setAnchorPoint({0, 1}); - m_replay_info->setPosition({20, win_size.height - 133}); + m_replay_info->setPosition({20, win_size.height - 103}); update_info_text(); addChild(m_replay_info); @@ -225,7 +236,7 @@ void OverlayLayer::on_toggle_real_time(CCObject* toggle_) { void OverlayLayer::on_toggle_showcase(CCObject* toggle_) { auto toggle = cast(toggle_); if (toggle != nullptr) { - ReplaySystem::get().showcase_mode = !toggle->isOn(); + ReplaySystem::get().showcase_mode = toggle->isOn(); } } @@ -258,6 +269,11 @@ void OverlayLayer::on_recorder(CCObject*) { RecorderLayer::create()->show(); } +void OverlayLayer::on_info_real_time(CCObject*) { + FLAlertLayer::create(nullptr, "Info", "OK", nullptr, + "Will try to run the game at full speed even if the fps doesn't match with the replay's fps.\nOnly in effect when recording or playing.")->show(); +} + bool RecordOptionsLayer::init(OverlayLayer* parent) { m_parent = parent; @@ -349,16 +365,17 @@ bool RecordOptionsLayer::init(OverlayLayer* parent) { .setPosition(ccp(125, -125)) ); - // menu->addChild( - // NodeFactory::start( - // NodeFactory::start(CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png")).setScale(.75f), - // this, menu_selector(RecordOptionsLayer::on_close) - // ) - // .setPosition(18.f, win_size.height - 18.f) - // ); + menu->addChild( + NodeFactory::start( + NodeFactory::start(CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png")).setScale(.75f).finish(), + this, menu_selector(RecordOptionsLayer::on_close) + ) + .setPosition(ccp(18.f, win_size.height - 18.f) - top_left) + ); setKeypadEnabled(true); setTouchEnabled(true); + setKeyboardEnabled(true); return true; } diff --git a/src/overlay_layer.hpp b/src/overlay_layer.hpp index 3299264..9101d84 100644 --- a/src/overlay_layer.hpp +++ b/src/overlay_layer.hpp @@ -39,13 +39,15 @@ class OverlayLayer : public gd::FLAlertLayer, public CCTextFieldDelegate, public void on_toggle_real_time(CCObject*); void on_toggle_showcase(CCObject*); + void on_info_real_time(CCObject*); + void on_recorder(CCObject*); virtual void keyBackClicked(); - // virtual void keyDown(enumKeyCodes key) { - // // keyDown overwrites keyBackClicked, how fun - // if (key == 27) keyBackClicked(); - // } + virtual void keyDown(enumKeyCodes key) { + // keyDown overwrites keyBackClicked, how fun + if (key == 27) keyBackClicked(); + } virtual void FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2); }; @@ -59,12 +61,17 @@ class RecordOptionsLayer : public gd::FLAlertLayer, public gd::FLAlertLayerProto GEN_CREATE(RecordOptionsLayer) bool init(OverlayLayer*); - void keyBackClicked(); void on_close(CCObject*); void on_x_pos(CCObject*); void on_frame(CCObject*); void on_record(CCObject*); void update_default_fps(); + + virtual void keyBackClicked(); virtual void FLAlert_Clicked(gd::FLAlertLayer* alert, bool btn2); + // TODO: pressing space in the layer just crashes??? + virtual void keyDown(enumKeyCodes key) { + if (key == 27) keyBackClicked(); + } }; diff --git a/src/utils.hpp b/src/utils.hpp index d9ff15e..b119bb9 100644 --- a/src/utils.hpp +++ b/src/utils.hpp @@ -45,5 +45,13 @@ T union_cast(U value) { template using __to_handler_f_type = typename RemoveThiscall::type>::type; -template Func> -static const auto to_handler = union_cast(thiscall::wrap); +// template Func> +// static const auto to_handler = union_cast(thiscall::wrap); + +template +S& operator<<(S& stream, const CCPoint& point) { + stream << "CCPoint{" << point.x << ", " << point.y << "}"; + return stream; +} + +using u8 = unsigned char; \ No newline at end of file From 60f9da75178ec1d43ef1da0e24481ea4d2cb10b1 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Thu, 14 Apr 2022 16:30:39 -0300 Subject: [PATCH 90/95] replace record and play buttons with toggles --- src/overlay_layer.cpp | 40 +++++++++++++++++++++++++--------------- src/overlay_layer.hpp | 3 +++ 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index d6692d1..902e04d 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -32,10 +32,13 @@ bool OverlayLayer::init() { sprite = CCSprite::create("GJ_button_01.png"); sprite->setScale(0.72f); - // TODO: make these toggles - btn = gd::CCMenuItemSpriteExtra::create(sprite, this, menu_selector(OverlayLayer::on_record)); - btn->setPosition({35, -50}); - menu->addChild(btn); + auto* const check_off_sprite = CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); + auto* const check_on_sprite = CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); + + m_record_toggle = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(OverlayLayer::on_record)); + m_record_toggle->setPosition({35, -50}); + m_record_toggle->toggle(rs.is_recording()); + menu->addChild(m_record_toggle); auto label = CCLabelBMFont::create("Record", "bigFont.fnt"); label->setAnchorPoint({0, 0.5}); @@ -43,9 +46,10 @@ bool OverlayLayer::init() { label->setPosition({55, win_size.height - 50}); addChild(label); - btn = gd::CCMenuItemSpriteExtra::create(sprite, this, menu_selector(OverlayLayer::on_play)); - btn->setPosition({35, -85}); - menu->addChild(btn); + m_play_toggle = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(OverlayLayer::on_play)); + m_play_toggle->setPosition({35, -85}); + m_play_toggle->toggle(rs.is_playing()); + menu->addChild(m_play_toggle); label = CCLabelBMFont::create("Play", "bigFont.fnt"); label->setAnchorPoint({0, 0.5}); @@ -76,10 +80,7 @@ bool OverlayLayer::init() { label->setPosition({win_size.width - 55, win_size.height - 85}); addChild(label); - auto check_off_sprite = CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); - auto check_on_sprite = CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); - - auto toggle = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(OverlayLayer::on_toggle_real_time)); + auto* toggle = gd::CCMenuItemToggler::create(check_off_sprite, check_on_sprite, this, menu_selector(OverlayLayer::on_toggle_real_time)); toggle->setPosition({win_size.width - 35, -120}); toggle->toggle(rs.real_time_mode); menu->addChild(toggle); @@ -178,12 +179,16 @@ void OverlayLayer::on_record(CCObject*) { auto& rs = ReplaySystem::get(); if (rs.is_recording()) rs.toggle_recording(); - else + else { + m_record_toggle->toggle(true); RecordOptionsLayer::create(this)->show(); + } } void OverlayLayer::on_play(CCObject*) { - ReplaySystem::get().toggle_playing(); + auto& rs = ReplaySystem::get(); + rs.toggle_playing(); + m_record_toggle->toggle(false); } void OverlayLayer::on_save(CCObject*) { @@ -271,7 +276,8 @@ void OverlayLayer::on_recorder(CCObject*) { void OverlayLayer::on_info_real_time(CCObject*) { FLAlertLayer::create(nullptr, "Info", "OK", nullptr, - "Will try to run the game at full speed even if the fps doesn't match with the replay's fps.\nOnly in effect when recording or playing.")->show(); + "Will try to run the game at full speed even if the fps doesn't match with the replay's fps.\n" + "Only in effect when recording or playing.")->show(); } bool RecordOptionsLayer::init(OverlayLayer* parent) { @@ -291,7 +297,6 @@ bool RecordOptionsLayer::init(OverlayLayer* parent) { m_pLayer->addChild(bg); const CCPoint top_left = win_size / 2.f - ccp(window_size.width / 2.f, -window_size.height / 2.f); - std::cout << "top_left is " << top_left << std::endl; registerWithTouchDispatcher(); CCDirector::sharedDirector()->getTouchDispatcher()->incrementForcePrio(2); @@ -413,6 +418,8 @@ void RecordOptionsLayer::on_record(CCObject*) { if (rs.get_replay().get_actions().empty()) { rs.toggle_recording(); m_parent->update_info_text(); + m_parent->m_record_toggle->toggle(true); + m_parent->m_play_toggle->toggle(false); this->keyBackClicked(); } else { auto alert = gd::FLAlertLayer::create( @@ -425,6 +432,7 @@ void RecordOptionsLayer::on_record(CCObject*) { alert->show(); } } else { + m_parent->m_record_toggle->toggle(false); rs.toggle_recording(); } } @@ -435,5 +443,7 @@ void RecordOptionsLayer::FLAlert_Clicked(gd::FLAlertLayer*, bool btn2) { rs.toggle_recording(); m_parent->update_info_text(); this->keyBackClicked(); + m_parent->m_record_toggle->toggle(true); + m_parent->m_play_toggle->toggle(false); } } \ No newline at end of file diff --git a/src/overlay_layer.hpp b/src/overlay_layer.hpp index 9101d84..369ab0f 100644 --- a/src/overlay_layer.hpp +++ b/src/overlay_layer.hpp @@ -7,6 +7,9 @@ class OverlayLayer : public gd::FLAlertLayer, public CCTextFieldDelegate, public void _handle_load_replay(); public: + gd::CCMenuItemToggler* m_record_toggle; + gd::CCMenuItemToggler* m_play_toggle; + static auto create() { auto node = new OverlayLayer; if (node && node->init()) { From e631af8edfffeecfe878663c7084902e5d9762bc Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Fri, 15 Apr 2022 19:10:00 -0300 Subject: [PATCH 91/95] add basic speed hack --- libraries/gd.h | 2 +- src/dllmain.cpp | 1 + src/hooks.cpp | 4 +- src/nodes.cpp | 86 ++++++++++++++++++++++++++++++++++++++++++ src/nodes.hpp | 61 +++++++++++++----------------- src/overlay_layer.cpp | 24 +++++++++++- src/recorder_layer.cpp | 32 ++++++++-------- src/replay_system.hpp | 1 + 8 files changed, 156 insertions(+), 55 deletions(-) create mode 100644 src/nodes.cpp diff --git a/libraries/gd.h b/libraries/gd.h index e9f6460..3b7e906 160000 --- a/libraries/gd.h +++ b/libraries/gd.h @@ -1 +1 @@ -Subproject commit e9f64607988aa6450f4cc508467113c11f81584d +Subproject commit 3b7e906c3ee32f3d718af67c11b9ddff9cf14896 diff --git a/src/dllmain.cpp b/src/dllmain.cpp index 7358ef3..6c51d62 100644 --- a/src/dllmain.cpp +++ b/src/dllmain.cpp @@ -13,6 +13,7 @@ void mod_main(HMODULE module) { std::ifstream conin("CONIN$", std::ios::in); std::cout.rdbuf(conout.rdbuf()); std::cin.rdbuf(conin.rdbuf()); + std::cout << std::boolalpha; #endif Hooks::init(); diff --git a/src/hooks.cpp b/src/hooks.cpp index d2fc285..7e0ffcb 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -12,10 +12,12 @@ float g_left_over = 0.f; void CCScheduler_update(CCScheduler* self, float dt) { auto& rs = ReplaySystem::get(); const auto play_layer = gd::GameManager::sharedState()->getPlayLayer(); - if (play_layer && (rs.recorder.m_recording || rs.is_playing() || rs.is_recording())) { + if (play_layer && (rs.recorder.m_recording || rs.is_playing() || rs.is_recording()) && !play_layer->m_isPaused) { const auto fps = rs.get_replay().get_fps(); auto speedhack = self->getTimeScale(); + dt *= rs.speed_hack; + const float target_dt = 1.f / fps / speedhack; if (!rs.real_time_mode) diff --git a/src/nodes.cpp b/src/nodes.cpp new file mode 100644 index 0000000..aa79eec --- /dev/null +++ b/src/nodes.cpp @@ -0,0 +1,86 @@ +#include "nodes.hpp" + +bool TextInputNode::init(CCSize size, float scale, const std::string& font) { + if (!CCNode::init()) return false; + + input_node = gd::CCTextInputNode::create("", this, font.c_str(), size.width, size.height); + input_node->setDelegate(this); + addChild(input_node); + + background = extension::CCScale9Sprite::create("square02_small.png"); + background->setContentSize(size * scale); + background->setScale(1.f / scale); + background->setOpacity(100); + background->setZOrder(-1); + addChild(background); + + return true; +} + +void TextInputNode::textChanged(gd::CCTextInputNode*) { + callback(*this); +} + +void TextInputNode::set_value(const std::string& value) { + input_node->setString(value.c_str()); +} + +std::string TextInputNode::get_value() { + return input_node->getString(); +} + + +bool NumberInputNode::init(CCSize size, float scale, const std::string& font) { + if (!TextInputNode::init(size, scale, font)) return false; + input_node->setAllowedChars("0123456789"); + return true; +} + +void NumberInputNode::textChanged(gd::CCTextInputNode*) { + callback(*this); +} + +void NumberInputNode::set_value(int value) { + input_node->setString(std::to_string(value).c_str()); +} + +int NumberInputNode::get_value() { + try { + return std::stoi(input_node->getString()); + } catch (const std::invalid_argument&) { + return -1; + } +} + + +bool FloatInputNode::init(CCSize size, float scale, const std::string& font) { + if (!TextInputNode::init(size, scale, font)) return false; + input_node->setAllowedChars("0123456789."); + return true; +} + +void FloatInputNode::textChanged(gd::CCTextInputNode*) { + callback(*this); +} + +void FloatInputNode::set_value(float value) { + // TODO: not hardcode this + std::array arr; + const auto result = std::to_chars(arr.data(), arr.data() + arr.size(), value, std::chars_format::fixed); + if (result.ec == std::errc::value_too_large) { + // TODO: have this be adjustable + input_node->setString("1"); + } else { + *result.ptr = 0; + input_node->setString(arr.data()); + } +} + +std::optional FloatInputNode::get_value() { + const auto str = input_node->getString(); + float value = 0.f; + const auto result = std::from_chars(str, str + std::strlen(str), value); + if (result.ec == std::errc::invalid_argument) + return {}; + return value; +} \ No newline at end of file diff --git a/src/nodes.hpp b/src/nodes.hpp index 785b9e8..b668476 100644 --- a/src/nodes.hpp +++ b/src/nodes.hpp @@ -3,6 +3,9 @@ #include #include #include +#include +#include +#include #define GEN_CREATE(class_name) template \ static auto create(Args... args) { \ @@ -18,54 +21,42 @@ class TextInputNode : public CCNode, public gd::TextInputDelegate { public: gd::CCTextInputNode* input_node; cocos2d::extension::CCScale9Sprite* background; - std::function callback = [](auto){}; + std::function callback = [](auto&){}; GEN_CREATE(TextInputNode) - bool init(CCSize size, float scale = 1.f, const std::string& font = "bigFont.fnt") { - if (!CCNode::init()) return false; + bool init(CCSize size, float scale = 1.f, const std::string& font = "bigFont.fnt"); - input_node = gd::CCTextInputNode::create("", this, font.c_str(), size.width, size.height); - input_node->setDelegate(this); - addChild(input_node); + virtual void textChanged(gd::CCTextInputNode*); - background = extension::CCScale9Sprite::create("square02_small.png"); - background->setContentSize(size * scale); - background->setScale(1.f / scale); - background->setOpacity(100); - background->setZOrder(-1); - addChild(background); + void set_value(const std::string& value); + std::string get_value(); +}; - return true; - } +class NumberInputNode : public TextInputNode { +public: + std::function callback = [](auto&){}; + + GEN_CREATE(NumberInputNode) - virtual void textChanged(gd::CCTextInputNode*) { callback(this); } + bool init(CCSize size, float scale = 1.f, const std::string& font = "bigFont.fnt"); + virtual void textChanged(gd::CCTextInputNode*); - void set_value(const std::string& value) { input_node->setString(value.c_str()); } - std::string get_value() { return input_node->getString(); } + void set_value(int value); + int get_value(); }; -class NumberInputNode : public TextInputNode { +class FloatInputNode : public TextInputNode { public: - std::function callback = [](auto){}; + std::function callback = [](auto&){}; - GEN_CREATE(NumberInputNode) + GEN_CREATE(FloatInputNode) - bool init(CCSize size, float scale = 1.f, const std::string& font = "bigFont.fnt") { - if (!TextInputNode::init(size, scale, font)) return false; - input_node->setAllowedChars("0123456789"); - return true; - } - virtual void textChanged(gd::CCTextInputNode*) { callback(this); } - - void set_value(int value) { input_node->setString(std::to_string(value).c_str()); } - int get_value() { - try { - return std::stoi(input_node->getString()); - } catch (const std::invalid_argument&) { - return -1; - } - } + bool init(CCSize size, float scale = 1.f, const std::string& font = "bigFont.fnt"); + virtual void textChanged(gd::CCTextInputNode*); + + void set_value(float value); + std::optional get_value(); }; template diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index 902e04d..0ac8463 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -137,15 +137,35 @@ bool OverlayLayer::init() { m_replay_info = CCLabelBMFont::create("", "chatFont.fnt"); m_replay_info->setAnchorPoint({0, 1}); - m_replay_info->setPosition({20, win_size.height - 103}); + m_replay_info->setPosition({20, win_size.height - 130}); update_info_text(); addChild(m_replay_info); + + addChild(NodeFactory::start("Speedhack", "bigFont.fnt") + .setAnchorPoint(ccp(0, .5f)) + .setPosition(ccp(20, win_size.height - 110)) + .setScale(0.6f) + ); + + { + auto input = FloatInputNode::create(CCSize(64.f, 30.f)); + input->set_value(rs.speed_hack); + input->input_node->setMaxLabelScale(0.7f); + input->input_node->setMaxLabelLength(10); + input->setPosition(ccp(162, win_size.height - 110)); + input->callback = [&](auto& input) { + const auto value = input.get_value(); + rs.speed_hack = value ? value.value() : 1.f; + std::cout << "value is now " << rs.speed_hack << std::endl; + }; + addChild(input); + } addChild(NodeFactory::start(REPLAYBOT_VERSION, "chatFont.fnt") .setAnchorPoint(ccp(1, 0)) .setScale(0.6f) .setPosition(ccp(win_size.width - 5, 5)) - .setOpacity(100) + .setOpacity(100u) ); setKeypadEnabled(true); diff --git a/src/recorder_layer.cpp b/src/recorder_layer.cpp index b702314..d031421 100644 --- a/src/recorder_layer.cpp +++ b/src/recorder_layer.cpp @@ -65,8 +65,8 @@ bool RecorderLayer::init() { input->set_value(rs.recorder.m_width); input->setPosition(top_left + ccp(49.f, -138.f)); input->input_node->setMaxLabelScale(0.73f); - input->callback = [&rs](auto input) { - rs.recorder.m_width = input->get_value(); + input->callback = [&rs](auto& input) { + rs.recorder.m_width = input.get_value(); }; layer->addChild(input); @@ -78,8 +78,8 @@ bool RecorderLayer::init() { input->set_value(rs.recorder.m_height); input->setPosition(top_left + ccp(137.f, -138.f)); input->input_node->setMaxLabelScale(0.73f); - input->callback = [&rs](auto input) { - rs.recorder.m_height = input->get_value(); + input->callback = [&rs](auto& input) { + rs.recorder.m_height = input.get_value(); }; layer->addChild(input); @@ -91,8 +91,8 @@ bool RecorderLayer::init() { input->set_value(rs.recorder.m_fps); input->setPosition(top_left + ccp(225.f, -138.f)); input->input_node->setMaxLabelScale(0.73f); - input->callback = [&rs](auto input) { - rs.recorder.m_fps = input->get_value(); + input->callback = [&rs](auto& input) { + rs.recorder.m_fps = input.get_value(); }; layer->addChild(input); @@ -100,8 +100,8 @@ bool RecorderLayer::init() { input->set_value(static_cast(rs.recorder.m_after_end_duration)); input->setPosition(top_left + ccp(346.f, -65.f)); input->input_node->setMaxLabelScale(0.73f); - input->callback = [&rs](auto input) { - rs.recorder.m_after_end_duration = static_cast(input->get_value()); + input->callback = [&rs](auto& input) { + rs.recorder.m_after_end_duration = static_cast(input.get_value()); }; layer->addChild(input); layer->addChild(NodeFactory::start("seconds to render after", "bigFont.fnt") @@ -116,8 +116,8 @@ bool RecorderLayer::init() { text_input->setPosition(top_left + ccp(291.5f, -177.f)); text_input->input_node->setAllowedChars(broad_filter); text_input->set_value(rs.recorder.m_bitrate); - text_input->callback = [&rs](auto input) { - rs.recorder.m_bitrate = input->get_value(); + text_input->callback = [&rs](auto& input) { + rs.recorder.m_bitrate = input.get_value(); }; layer->addChild(text_input); @@ -127,8 +127,8 @@ bool RecorderLayer::init() { text_input->input_node->setAllowedChars(broad_filter); text_input->input_node->setLabelPlaceholderColor({200, 200, 200}); text_input->set_value(rs.recorder.m_codec); - text_input->callback = [&rs](auto input) { - rs.recorder.m_codec = input->get_value(); + text_input->callback = [&rs](auto& input) { + rs.recorder.m_codec = input.get_value(); }; layer->addChild(text_input); @@ -137,8 +137,8 @@ bool RecorderLayer::init() { text_input->input_node->m_sCaption = "Extra options"; text_input->input_node->setAllowedChars(broad_filter); text_input->set_value(rs.recorder.m_extra_args); - text_input->callback = [&rs](auto input) { - rs.recorder.m_extra_args = input->get_value(); + text_input->callback = [&rs](auto& input) { + rs.recorder.m_extra_args = input.get_value(); }; text_input->input_node->setLabelPlaceholderColor({200, 200, 200}); layer->addChild(text_input); @@ -152,8 +152,8 @@ bool RecorderLayer::init() { text_input->input_node->setAllowedChars(broad_filter); text_input->input_node->setLabelPlaceholderColor({200, 200, 200}); text_input->set_value(rs.recorder.m_extra_audio_args); - text_input->callback = [&rs](auto input) { - rs.recorder.m_extra_audio_args = input->get_value(); + text_input->callback = [&rs](auto& input) { + rs.recorder.m_extra_audio_args = input.get_value(); }; layer->addChild(text_input); diff --git a/src/replay_system.hpp b/src/replay_system.hpp index 78977ce..e550720 100644 --- a/src/replay_system.hpp +++ b/src/replay_system.hpp @@ -78,4 +78,5 @@ class ReplaySystem { bool showcase_mode = false; Recorder recorder; bool should_restart_next_time = false; // this is a great name i know + float speed_hack = 1.f; }; \ No newline at end of file From 18bcfd4862818b6bc79faf96de60b10a9d582db0 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Fri, 15 Apr 2022 20:27:29 -0300 Subject: [PATCH 92/95] save and load settings into replaybot.txt --- src/overlay_layer.cpp | 12 ++++++-- src/replay_system.cpp | 71 +++++++++++++++++++++++++++++++++++++++++++ src/replay_system.hpp | 3 ++ src/utils.hpp | 7 ++++- 4 files changed, 89 insertions(+), 4 deletions(-) diff --git a/src/overlay_layer.cpp b/src/overlay_layer.cpp index 0ac8463..c7b2b2d 100644 --- a/src/overlay_layer.cpp +++ b/src/overlay_layer.cpp @@ -14,6 +14,12 @@ bool OverlayLayer::init() { auto win_size = CCDirector::sharedDirector()->getWinSize(); auto& rs = ReplaySystem::get(); + + static bool has_loaded = false; + if (!has_loaded) { + has_loaded = true; + rs.load(); + } auto menu = CCMenu::create(); menu->setPosition({0, win_size.height}); @@ -143,7 +149,7 @@ bool OverlayLayer::init() { addChild(NodeFactory::start("Speedhack", "bigFont.fnt") .setAnchorPoint(ccp(0, .5f)) - .setPosition(ccp(20, win_size.height - 110)) + .setPosition(ccp(20, win_size.height - 115)) .setScale(0.6f) ); @@ -152,11 +158,10 @@ bool OverlayLayer::init() { input->set_value(rs.speed_hack); input->input_node->setMaxLabelScale(0.7f); input->input_node->setMaxLabelLength(10); - input->setPosition(ccp(162, win_size.height - 110)); + input->setPosition(ccp(162, win_size.height - 115)); input->callback = [&](auto& input) { const auto value = input.get_value(); rs.speed_hack = value ? value.value() : 1.f; - std::cout << "value is now " << rs.speed_hack << std::endl; }; addChild(input); } @@ -248,6 +253,7 @@ void OverlayLayer::on_load(CCObject*) { } void OverlayLayer::keyBackClicked() { + ReplaySystem::get().save(); gd::FLAlertLayer::keyBackClicked(); } diff --git a/src/replay_system.cpp b/src/replay_system.cpp index a9a4828..0dcd2be 100644 --- a/src/replay_system.cpp +++ b/src/replay_system.cpp @@ -1,5 +1,7 @@ #include "replay_system.hpp" #include "hooks.hpp" +#include +#include void ReplaySystem::record_action(bool hold, bool player1, bool flip) { if (is_recording()) { @@ -179,4 +181,73 @@ void ReplaySystem::_update_status_label() { } else if (recorder.m_recording) { recorder.stop(); } +} + +std::filesystem::path get_save_file_path() { + const auto path = CCFileUtils::sharedFileUtils()->getWritablePath(); + return std::filesystem::path(path) / "replaybot.txt"; +} + +void ReplaySystem::save() { + const auto path = get_save_file_path(); + std::ofstream file(path); + // incredible + file << "fps=" << default_fps << '\n'; + file << "type=" << static_cast(default_type) << '\n'; + file << "real_time=" << real_time_mode << '\n'; + file << "showcase_mode=" << showcase_mode << '\n'; + file << "recorder_width=" << recorder.m_width << '\n'; + file << "recorder_height=" << recorder.m_height << '\n'; + file << "recorder_fps=" << recorder.m_fps << '\n'; + file << "recorder_until_end=" << recorder.m_until_end << '\n'; + file << "recorder_codec=" << recorder.m_codec << '\n'; + file << "recorder_bitrate=" << recorder.m_bitrate << '\n'; + file << "recorder_extra_args=" << recorder.m_extra_args << '\n'; + file << "recorder_extra_audio_args=" << recorder.m_extra_audio_args << '\n'; + file << "recorder_after_end_duration=" << recorder.m_after_end_duration << '\n'; +} + +void ReplaySystem::load() { + const auto path = get_save_file_path(); + if (!std::filesystem::exists(path)) return; + std::ifstream file(path); + std::string line; + // incredible + try { + while (std::getline(file, line)) { + if (line.empty()) continue; + const auto [key, value] = split_once(line, '='); + using namespace std::literals::string_view_literals; + // incredible + if (key == "fps"sv) + default_fps = std::stof(std::string(value)); + else if (key == "type"sv) + default_type = ReplayType(std::stoi(std::string(value))); + else if (key == "real_time"sv) + real_time_mode = value == "1"sv; + else if (key == "showcase_mode"sv) + showcase_mode = value == "1"sv; + else if (key == "recorder_width"sv) + recorder.m_width = std::stoul(std::string(value)); + else if (key == "recorder_height"sv) + recorder.m_height = std::stoul(std::string(value)); + else if (key == "recorder_fps"sv) + recorder.m_fps = std::stoul(std::string(value)); + else if (key == "recorder_until_end"sv) + recorder.m_until_end = value == "1"sv; + else if (key == "recorder_codec"sv) + recorder.m_codec = value; + else if (key == "recorder_bitrate"sv) + recorder.m_bitrate = value; + else if (key == "recorder_extra_args"sv) + recorder.m_extra_args = value; + else if (key == "recorder_extra_audio_args"sv) + recorder.m_extra_audio_args = value; + else if (key == "recorder_after_end_duration"sv) + recorder.m_after_end_duration = std::stof(std::string(value)); + } + } catch (...) { + // no care + } + } \ No newline at end of file diff --git a/src/replay_system.hpp b/src/replay_system.hpp index e550720..68a48e1 100644 --- a/src/replay_system.hpp +++ b/src/replay_system.hpp @@ -74,6 +74,9 @@ class ReplaySystem { unsigned get_frame(); + void save(); + void load(); + bool real_time_mode = true; // fuck it we going public bool showcase_mode = false; Recorder recorder; diff --git a/src/utils.hpp b/src/utils.hpp index b119bb9..a2b0a63 100644 --- a/src/utils.hpp +++ b/src/utils.hpp @@ -54,4 +54,9 @@ S& operator<<(S& stream, const CCPoint& point) { return stream; } -using u8 = unsigned char; \ No newline at end of file +using u8 = unsigned char; + +inline std::pair split_once(const std::string_view str, char split) { + const auto n = str.find(split); + return { str.substr(0, n), str.substr(n + 1) }; +} \ No newline at end of file From 0831783dcf5c3228ee411b9b99e296730e0aa221 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Fri, 15 Apr 2022 20:41:04 -0300 Subject: [PATCH 93/95] fix double restart issue and only speedhack on recording --- src/hooks.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/hooks.cpp b/src/hooks.cpp index 7e0ffcb..4c7e59c 100644 --- a/src/hooks.cpp +++ b/src/hooks.cpp @@ -16,7 +16,8 @@ void CCScheduler_update(CCScheduler* self, float dt) { const auto fps = rs.get_replay().get_fps(); auto speedhack = self->getTimeScale(); - dt *= rs.speed_hack; + if (rs.is_recording()) + dt *= rs.speed_hack; const float target_dt = 1.f / fps / speedhack; @@ -220,6 +221,12 @@ void PauseLayer_onResume(gd::PauseLayer* self, CCObject* sender) { orig<&PauseLayer_onResume>(self, sender); } +void PauseLayer_onRestart(gd::PauseLayer* self, CCObject* sender) { + auto& rs = ReplaySystem::get(); + rs.should_restart_next_time = false; + orig<&PauseLayer_onRestart>(self, sender); +} + bool PlayLayer_init(gd::PlayLayer* self, gd::GJGameLevel* level) { if (!orig<&PlayLayer_init>(self, level)) return false; @@ -249,6 +256,7 @@ void Hooks::init() { add_hook<&PauseLayer_init>(gd::base + 0x1E4620); add_hook<&PauseLayer_onResume>(gd::base + 0x1e5fa0); + add_hook<&PauseLayer_onRestart>(gd::base + 0x1e6040); add_hook<&PlayerObject_ringJump>(gd::base + 0x1f4ff0); add_hook<&GameObject_activateObject>(gd::base + 0xef0e0); From 742f5b02e49406d06cd4fca0f712af7bd5c33268 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Fri, 15 Apr 2022 21:27:11 -0300 Subject: [PATCH 94/95] bump version --- src/version.hpp.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/version.hpp.in b/src/version.hpp.in index 4c47e3d..fea4f3c 100644 --- a/src/version.hpp.in +++ b/src/version.hpp.in @@ -1,3 +1,3 @@ #pragma once -constexpr auto REPLAYBOT_VERSION = "v1.4.3-@COMMIT_HASH@"; \ No newline at end of file +constexpr auto REPLAYBOT_VERSION = "v1.5.0-@COMMIT_HASH@"; \ No newline at end of file From 9bb45e2ca6fa62aad939d9bcc18595085d90d7b6 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sun, 22 Jan 2023 01:10:30 -0300 Subject: [PATCH 95/95] fix handle issues in subprocess --- libraries/subprocess.hpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/libraries/subprocess.hpp b/libraries/subprocess.hpp index 26389ce..985d7c4 100644 --- a/libraries/subprocess.hpp +++ b/libraries/subprocess.hpp @@ -5,14 +5,19 @@ namespace subprocess { struct PipeHandle { - HANDLE handle; + HANDLE handle = nullptr; void set_inherit(bool value) { - SetHandleInformation(handle, HANDLE_FLAG_INHERIT, value * HANDLE_FLAG_INHERIT); + if (handle) { + SetHandleInformation(handle, HANDLE_FLAG_INHERIT, value * HANDLE_FLAG_INHERIT); + } } void close() { - CloseHandle(handle); + if (handle) { + CloseHandle(handle); + handle = nullptr; + } } }; @@ -42,7 +47,6 @@ namespace subprocess { class Popen { public: PipePair m_stdin; - PipePair m_stdout; PROCESS_INFORMATION m_proc_info{}; public: Popen() {} @@ -80,7 +84,6 @@ namespace subprocess { int close(bool should_wait = true) { int exit_code = 0; m_stdin.close(); - m_stdout.close(); if (should_wait) exit_code = wait(); CloseHandle(m_proc_info.hProcess); CloseHandle(m_proc_info.hThread);