From 2b0d8d266af00477fae4a9c12865b3a950998023 Mon Sep 17 00:00:00 2001 From: dsc Date: Wed, 27 Apr 2011 22:48:03 -0700 Subject: [PATCH] Removes old project. --- Littlest.xcodeproj/project.pbxproj | 1464 - .../project.xcworkspace/contents.xcworkspacedata | 7 - .../UserInterfaceState.xcuserstate |36875 -------------------- .../xcdebugger/Breakpoints.xcbkptlist | 5 - .../xcschemes/Littlest.xcscheme | 76 - .../xcschemes/xcschememanagement.plist | 22 - Littlest/AppDelegate.h | 20 - Littlest/AppDelegate.mm | 170 - Littlest/Engine/Render/GLES-Render.h | 68 - Littlest/Engine/Render/GLES-Render.mm | 179 - Littlest/Foundation/Common/Assert.h | 69 - Littlest/Foundation/Common/Base.h | 11 - Littlest/Foundation/Common/GlobalDefines.h | 152 - Littlest/Foundation/Common/GlobalInclude.h | 7 - Littlest/Foundation/Common/GlobalTypes.h | 40 - Littlest/Foundation/Common/Print.h | 10 - Littlest/Foundation/Common/Singleton.h | 42 - Littlest/Foundation/Containers/BitEncoder.h | 10 - .../Foundation/Containers/LocklessRingBuffer.cpp | 159 - .../Foundation/Containers/LocklessRingBuffer.h | 23 - .../GraphicsServices/Geometry/BasicPrimitives.h | 27 - .../GraphicsServices/Geometry/BasicPrimitives.mm | 26 - .../Foundation/GraphicsServices/OpenGLServices.h | 58 - .../Foundation/GraphicsServices/OpenGLServices.mm | 160 - .../Foundation/GraphicsServices/RenderTarget.h | 65 - .../Foundation/GraphicsServices/RenderTarget.mm | 150 - Littlest/Foundation/Hash/DJB2.h | 25 - Littlest/Foundation/Math/MathDefines.h | 14 - Littlest/Foundation/Math/MathInclude.h | 8 - Littlest/Foundation/Math/MathOperations.h | 75 - Littlest/Foundation/Math/MathTypes.h | 363 - Littlest/Foundation/Math/Matrix.h | 660 - Littlest/Foundation/Math/Quaternion.h | 100 - Littlest/Foundation/Math/Vector.h | 1176 - Littlest/Foundation/Memory/MemoryBitset.cpp | 316 - Littlest/Foundation/Memory/MemoryBitset.h | 49 - Littlest/Foundation/Memory/MemoryHeap.cpp | 33 - Littlest/Foundation/Memory/MemoryHeap.h | 41 - Littlest/Foundation/Memory/MemoryLinear.h | 110 - Littlest/Foundation/OSInterface/GLView.h | 32 - Littlest/Foundation/OSInterface/GLView.m | 156 - .../Foundation/OSInterface/LittlestAppDelegate.h | 17 - .../Foundation/OSInterface/LittlestAppDelegate.m | 48 - .../OSInterface/LittlestViewController.h | 31 - .../OSInterface/LittlestViewController.m | 408 - Littlest/Foundation/Synchronization/Atomic32Bit.h | 99 - Littlest/Foundation/Synchronization/MemorySync.h | 28 - Littlest/Game/Scene/Scene.h | 18 - Littlest/HelloWorldLayer.h | 28 - Littlest/HelloWorldLayer.mm | 258 - Littlest/OS/GameConfig.h | 28 - Littlest/OS/RootViewController.h | 16 - Littlest/OS/RootViewController.m | 152 - Littlest/Prefix.pch | 14 - Littlest/Resources/Default.png | Bin 30635 -> 0 bytes Littlest/Resources/Icon-72.png | Bin 11414 -> 0 bytes Littlest/Resources/Icon-Small-50.png | Bin 7979 -> 0 bytes Littlest/Resources/Icon-Small.png | Bin 4956 -> 0 bytes Littlest/Resources/Icon-Small@2x.png | Bin 9465 -> 0 bytes Littlest/Resources/Icon.png | Bin 9327 -> 0 bytes Littlest/Resources/Icon@2x.png | Bin 21365 -> 0 bytes Littlest/Resources/Info.plist | 55 - Littlest/Resources/blocks.png | Bin 2001 -> 0 bytes Littlest/Resources/fps_images.png | Bin 6203 -> 0 bytes Littlest/Resources/iTunesArtwork | Bin 61982 -> 0 bytes Littlest/libs/Box2D/Box2D.h | 62 - .../libs/Box2D/Collision/Shapes/b2CircleShape.cpp | 89 - .../libs/Box2D/Collision/Shapes/b2CircleShape.h | 87 - .../libs/Box2D/Collision/Shapes/b2PolygonShape.cpp | 434 - .../libs/Box2D/Collision/Shapes/b2PolygonShape.h | 131 - Littlest/libs/Box2D/Collision/Shapes/b2Shape.h | 95 - Littlest/libs/Box2D/Collision/b2BroadPhase.cpp | 116 - Littlest/libs/Box2D/Collision/b2BroadPhase.h | 229 - Littlest/libs/Box2D/Collision/b2CollideCircle.cpp | 154 - Littlest/libs/Box2D/Collision/b2CollidePolygon.cpp | 306 - Littlest/libs/Box2D/Collision/b2Collision.cpp | 250 - Littlest/libs/Box2D/Collision/b2Collision.h | 240 - Littlest/libs/Box2D/Collision/b2Distance.cpp | 571 - Littlest/libs/Box2D/Collision/b2Distance.h | 141 - Littlest/libs/Box2D/Collision/b2DynamicTree.cpp | 365 - Littlest/libs/Box2D/Collision/b2DynamicTree.h | 286 - Littlest/libs/Box2D/Collision/b2TimeOfImpact.cpp | 483 - Littlest/libs/Box2D/Collision/b2TimeOfImpact.h | 59 - Littlest/libs/Box2D/Common/b2BlockAllocator.cpp | 205 - Littlest/libs/Box2D/Common/b2BlockAllocator.h | 59 - Littlest/libs/Box2D/Common/b2Math.cpp | 55 - Littlest/libs/Box2D/Common/b2Math.h | 624 - Littlest/libs/Box2D/Common/b2Settings.cpp | 33 - Littlest/libs/Box2D/Common/b2Settings.h | 151 - Littlest/libs/Box2D/Common/b2StackAllocator.cpp | 83 - Littlest/libs/Box2D/Common/b2StackAllocator.h | 60 - .../Box2D/Dynamics/Contacts/b2CircleContact.cpp | 52 - .../libs/Box2D/Dynamics/Contacts/b2CircleContact.h | 38 - .../libs/Box2D/Dynamics/Contacts/b2Contact.cpp | 226 - Littlest/libs/Box2D/Dynamics/Contacts/b2Contact.h | 242 - .../Box2D/Dynamics/Contacts/b2ContactSolver.cpp | 623 - .../libs/Box2D/Dynamics/Contacts/b2ContactSolver.h | 78 - .../libs/Box2D/Dynamics/Contacts/b2NullContact.h | 37 - .../Contacts/b2PolygonAndCircleContact.cpp | 52 - .../Dynamics/Contacts/b2PolygonAndCircleContact.h | 38 - .../Box2D/Dynamics/Contacts/b2PolygonContact.cpp | 52 - .../Box2D/Dynamics/Contacts/b2PolygonContact.h | 38 - .../libs/Box2D/Dynamics/Contacts/b2TOISolver.cpp | 231 - .../libs/Box2D/Dynamics/Contacts/b2TOISolver.h | 51 - .../libs/Box2D/Dynamics/Joints/b2DistanceJoint.cpp | 211 - .../libs/Box2D/Dynamics/Joints/b2DistanceJoint.h | 140 - .../libs/Box2D/Dynamics/Joints/b2FrictionJoint.cpp | 229 - .../libs/Box2D/Dynamics/Joints/b2FrictionJoint.h | 99 - .../libs/Box2D/Dynamics/Joints/b2GearJoint.cpp | 259 - Littlest/libs/Box2D/Dynamics/Joints/b2GearJoint.h | 111 - Littlest/libs/Box2D/Dynamics/Joints/b2Joint.cpp | 186 - Littlest/libs/Box2D/Dynamics/Joints/b2Joint.h | 226 - .../libs/Box2D/Dynamics/Joints/b2LineJoint.cpp | 591 - Littlest/libs/Box2D/Dynamics/Joints/b2LineJoint.h | 170 - .../libs/Box2D/Dynamics/Joints/b2MouseJoint.cpp | 197 - Littlest/libs/Box2D/Dynamics/Joints/b2MouseJoint.h | 114 - .../Box2D/Dynamics/Joints/b2PrismaticJoint.cpp | 586 - .../libs/Box2D/Dynamics/Joints/b2PrismaticJoint.h | 175 - .../libs/Box2D/Dynamics/Joints/b2PulleyJoint.cpp | 427 - .../libs/Box2D/Dynamics/Joints/b2PulleyJoint.h | 148 - .../libs/Box2D/Dynamics/Joints/b2RevoluteJoint.cpp | 478 - .../libs/Box2D/Dynamics/Joints/b2RevoluteJoint.h | 174 - .../libs/Box2D/Dynamics/Joints/b2WeldJoint.cpp | 219 - Littlest/libs/Box2D/Dynamics/Joints/b2WeldJoint.h | 82 - Littlest/libs/Box2D/Dynamics/b2Body.cpp | 470 - Littlest/libs/Box2D/Dynamics/b2Body.h | 802 - Littlest/libs/Box2D/Dynamics/b2ContactManager.cpp | 266 - Littlest/libs/Box2D/Dynamics/b2ContactManager.h | 52 - Littlest/libs/Box2D/Dynamics/b2Fixture.cpp | 163 - Littlest/libs/Box2D/Dynamics/b2Fixture.h | 326 - Littlest/libs/Box2D/Dynamics/b2Island.cpp | 374 - Littlest/libs/Box2D/Dynamics/b2Island.h | 105 - Littlest/libs/Box2D/Dynamics/b2TimeStep.h | 35 - Littlest/libs/Box2D/Dynamics/b2World.cpp | 1076 - Littlest/libs/Box2D/Dynamics/b2World.h | 285 - Littlest/libs/Box2D/Dynamics/b2WorldCallbacks.cpp | 61 - Littlest/libs/Box2D/Dynamics/b2WorldCallbacks.h | 217 - Littlest/libs/CocosDenshion/CDAudioManager.h | 243 - Littlest/libs/CocosDenshion/CDAudioManager.m | 887 - Littlest/libs/CocosDenshion/CDConfig.h | 60 - Littlest/libs/CocosDenshion/CDOpenALSupport.h | 77 - Littlest/libs/CocosDenshion/CDOpenALSupport.m | 246 - Littlest/libs/CocosDenshion/CocosDenshion.h | 440 - Littlest/libs/CocosDenshion/CocosDenshion.m | 1598 - Littlest/libs/CocosDenshion/SimpleAudioEngine.h | 90 - Littlest/libs/CocosDenshion/SimpleAudioEngine.m | 220 - Littlest/libs/FontLabel/FontLabel.h | 44 - Littlest/libs/FontLabel/FontLabel.m | 195 - Littlest/libs/FontLabel/FontLabelStringDrawing.h | 69 - Littlest/libs/FontLabel/FontLabelStringDrawing.m | 892 - Littlest/libs/FontLabel/FontManager.h | 85 - Littlest/libs/FontLabel/FontManager.m | 123 - Littlest/libs/FontLabel/ZAttributedString.h | 77 - Littlest/libs/FontLabel/ZAttributedString.m | 596 - Littlest/libs/FontLabel/ZAttributedStringPrivate.h | 24 - Littlest/libs/FontLabel/ZFont.h | 47 - Littlest/libs/FontLabel/ZFont.m | 170 - Littlest/libs/TouchJSON/CDataScanner.h | 68 - Littlest/libs/TouchJSON/CDataScanner.m | 270 - .../TouchJSON/Extensions/CDataScanner_Extensions.h | 37 - .../TouchJSON/Extensions/CDataScanner_Extensions.m | 80 - .../Extensions/NSCharacterSet_Extensions.h | 36 - .../Extensions/NSCharacterSet_Extensions.m | 48 - .../Extensions/NSDictionary_JSONExtensions.h | 36 - .../Extensions/NSDictionary_JSONExtensions.m | 41 - .../TouchJSON/Extensions/NSScanner_Extensions.h | 44 - .../TouchJSON/Extensions/NSScanner_Extensions.m | 118 - Littlest/libs/TouchJSON/JSON/CJSONDeserializer.h | 59 - Littlest/libs/TouchJSON/JSON/CJSONDeserializer.m | 84 - Littlest/libs/TouchJSON/JSON/CJSONScanner.h | 43 - Littlest/libs/TouchJSON/JSON/CJSONScanner.m | 536 - Littlest/libs/TouchJSON/JSON/CJSONSerializer.h | 45 - Littlest/libs/TouchJSON/JSON/CJSONSerializer.m | 184 - Littlest/libs/cocos2d/CCAction.h | 191 - Littlest/libs/cocos2d/CCAction.m | 361 - Littlest/libs/cocos2d/CCActionCamera.h | 72 - Littlest/libs/cocos2d/CCActionCamera.m | 146 - Littlest/libs/cocos2d/CCActionEase.h | 159 - Littlest/libs/cocos2d/CCActionEase.m | 534 - Littlest/libs/cocos2d/CCActionGrid.h | 165 - Littlest/libs/cocos2d/CCActionGrid.m | 386 - Littlest/libs/cocos2d/CCActionGrid3D.h | 208 - Littlest/libs/cocos2d/CCActionGrid3D.m | 659 - Littlest/libs/cocos2d/CCActionInstant.h | 197 - Littlest/libs/cocos2d/CCActionInstant.m | 472 - Littlest/libs/cocos2d/CCActionInterval.h | 388 - Littlest/libs/cocos2d/CCActionInterval.m | 1215 - Littlest/libs/cocos2d/CCActionManager.h | 109 - Littlest/libs/cocos2d/CCActionManager.m | 344 - Littlest/libs/cocos2d/CCActionPageTurn3D.h | 42 - Littlest/libs/cocos2d/CCActionPageTurn3D.m | 86 - Littlest/libs/cocos2d/CCActionProgressTimer.h | 59 - Littlest/libs/cocos2d/CCActionProgressTimer.m | 103 - Littlest/libs/cocos2d/CCActionTiledGrid.h | 211 - Littlest/libs/cocos2d/CCActionTiledGrid.m | 768 - Littlest/libs/cocos2d/CCActionTween.h | 62 - Littlest/libs/cocos2d/CCActionTween.m | 72 - Littlest/libs/cocos2d/CCAnimation.h | 135 - Littlest/libs/cocos2d/CCAnimation.m | 152 - Littlest/libs/cocos2d/CCAnimationCache.h | 63 - Littlest/libs/cocos2d/CCAnimationCache.m | 100 - Littlest/libs/cocos2d/CCAtlasNode.h | 86 - Littlest/libs/cocos2d/CCAtlasNode.m | 205 - Littlest/libs/cocos2d/CCBlockSupport.h | 51 - Littlest/libs/cocos2d/CCBlockSupport.m | 46 - Littlest/libs/cocos2d/CCCamera.h | 94 - Littlest/libs/cocos2d/CCCamera.m | 130 - Littlest/libs/cocos2d/CCConfiguration.h | 110 - Littlest/libs/cocos2d/CCConfiguration.m | 192 - Littlest/libs/cocos2d/CCDirector.h | 304 - Littlest/libs/cocos2d/CCDirector.m | 557 - Littlest/libs/cocos2d/CCDrawingPrimitives.h | 91 - Littlest/libs/cocos2d/CCDrawingPrimitives.m | 271 - Littlest/libs/cocos2d/CCGrabber.h | 43 - Littlest/libs/cocos2d/CCGrabber.m | 95 - Littlest/libs/cocos2d/CCGrid.h | 121 - Littlest/libs/cocos2d/CCGrid.m | 571 - Littlest/libs/cocos2d/CCLabelAtlas.h | 61 - Littlest/libs/cocos2d/CCLabelAtlas.m | 189 - Littlest/libs/cocos2d/CCLabelBMFont.h | 189 - Littlest/libs/cocos2d/CCLabelBMFont.m | 672 - Littlest/libs/cocos2d/CCLabelTTF.h | 62 - Littlest/libs/cocos2d/CCLabelTTF.m | 125 - Littlest/libs/cocos2d/CCLayer.h | 292 - Littlest/libs/cocos2d/CCLayer.m | 618 - Littlest/libs/cocos2d/CCMenu.h | 92 - Littlest/libs/cocos2d/CCMenu.m | 522 - Littlest/libs/cocos2d/CCMenuItem.h | 362 - Littlest/libs/cocos2d/CCMenuItem.m | 757 - Littlest/libs/cocos2d/CCMotionStreak.h | 67 - Littlest/libs/cocos2d/CCMotionStreak.m | 104 - Littlest/libs/cocos2d/CCNode.h | 510 - Littlest/libs/cocos2d/CCNode.m | 883 - Littlest/libs/cocos2d/CCParallaxNode.h | 49 - Littlest/libs/cocos2d/CCParallaxNode.m | 160 - Littlest/libs/cocos2d/CCParticleExamples.h | 110 - Littlest/libs/cocos2d/CCParticleExamples.m | 925 - Littlest/libs/cocos2d/CCParticleSystem.h | 444 - Littlest/libs/cocos2d/CCParticleSystem.m | 795 - Littlest/libs/cocos2d/CCParticleSystemPoint.h | 64 - Littlest/libs/cocos2d/CCParticleSystemPoint.m | 208 - Littlest/libs/cocos2d/CCParticleSystemQuad.h | 74 - Littlest/libs/cocos2d/CCParticleSystemQuad.m | 316 - Littlest/libs/cocos2d/CCProgressTimer.h | 83 - Littlest/libs/cocos2d/CCProgressTimer.m | 496 - Littlest/libs/cocos2d/CCProtocols.h | 124 - Littlest/libs/cocos2d/CCRenderTexture.h | 110 - Littlest/libs/cocos2d/CCRenderTexture.m | 368 - Littlest/libs/cocos2d/CCRibbon.h | 117 - Littlest/libs/cocos2d/CCRibbon.m | 381 - Littlest/libs/cocos2d/CCScene.h | 42 - Littlest/libs/cocos2d/CCScene.m | 44 - Littlest/libs/cocos2d/CCScheduler.h | 191 - Littlest/libs/cocos2d/CCScheduler.m | 582 - Littlest/libs/cocos2d/CCSprite.h | 351 - Littlest/libs/cocos2d/CCSprite.m | 984 - Littlest/libs/cocos2d/CCSpriteBatchNode.h | 143 - Littlest/libs/cocos2d/CCSpriteBatchNode.m | 499 - Littlest/libs/cocos2d/CCSpriteFrame.h | 89 - Littlest/libs/cocos2d/CCSpriteFrame.m | 108 - Littlest/libs/cocos2d/CCSpriteFrameCache.h | 133 - Littlest/libs/cocos2d/CCSpriteFrameCache.m | 344 - Littlest/libs/cocos2d/CCTMXLayer.h | 153 - Littlest/libs/cocos2d/CCTMXLayer.m | 668 - Littlest/libs/cocos2d/CCTMXObjectGroup.h | 65 - Littlest/libs/cocos2d/CCTMXObjectGroup.m | 84 - Littlest/libs/cocos2d/CCTMXTiledMap.h | 144 - Littlest/libs/cocos2d/CCTMXTiledMap.m | 201 - Littlest/libs/cocos2d/CCTMXXMLParser.h | 201 - Littlest/libs/cocos2d/CCTMXXMLParser.m | 447 - Littlest/libs/cocos2d/CCTexture2D.h | 308 - Littlest/libs/cocos2d/CCTexture2D.m | 754 - Littlest/libs/cocos2d/CCTextureAtlas.h | 138 - Littlest/libs/cocos2d/CCTextureAtlas.m | 343 - Littlest/libs/cocos2d/CCTextureCache.h | 139 - Littlest/libs/cocos2d/CCTextureCache.m | 466 - Littlest/libs/cocos2d/CCTexturePVR.h | 118 - Littlest/libs/cocos2d/CCTexturePVR.m | 407 - Littlest/libs/cocos2d/CCTileMapAtlas.h | 82 - Littlest/libs/cocos2d/CCTileMapAtlas.m | 233 - Littlest/libs/cocos2d/CCTransition.h | 295 - Littlest/libs/cocos2d/CCTransition.m | 1057 - Littlest/libs/cocos2d/CCTransitionPageTurn.h | 60 - Littlest/libs/cocos2d/CCTransitionPageTurn.m | 117 - Littlest/libs/cocos2d/CCTransitionRadial.h | 40 - Littlest/libs/cocos2d/CCTransitionRadial.m | 115 - Littlest/libs/cocos2d/Platforms/CCGL.h | 82 - Littlest/libs/cocos2d/Platforms/CCNS.h | 62 - .../libs/cocos2d/Platforms/Mac/CCDirectorMac.h | 101 - .../libs/cocos2d/Platforms/Mac/CCDirectorMac.m | 462 - .../libs/cocos2d/Platforms/Mac/CCEventDispatcher.h | 276 - .../libs/cocos2d/Platforms/Mac/CCEventDispatcher.m | 644 - Littlest/libs/cocos2d/Platforms/Mac/MacGLView.h | 88 - Littlest/libs/cocos2d/Platforms/Mac/MacGLView.m | 241 - Littlest/libs/cocos2d/Platforms/Mac/MacWindow.h | 42 - Littlest/libs/cocos2d/Platforms/Mac/MacWindow.m | 70 - .../libs/cocos2d/Platforms/iOS/CCDirectorIOS.h | 254 - .../libs/cocos2d/Platforms/iOS/CCDirectorIOS.m | 729 - .../Platforms/iOS/CCTouchDelegateProtocol.h | 75 - .../libs/cocos2d/Platforms/iOS/CCTouchDispatcher.h | 122 - .../libs/cocos2d/Platforms/iOS/CCTouchDispatcher.m | 326 - .../libs/cocos2d/Platforms/iOS/CCTouchHandler.h | 93 - .../libs/cocos2d/Platforms/iOS/CCTouchHandler.m | 135 - Littlest/libs/cocos2d/Platforms/iOS/EAGLView.h | 155 - Littlest/libs/cocos2d/Platforms/iOS/EAGLView.m | 342 - Littlest/libs/cocos2d/Platforms/iOS/ES1Renderer.h | 71 - Littlest/libs/cocos2d/Platforms/iOS/ES1Renderer.m | 252 - Littlest/libs/cocos2d/Platforms/iOS/ESRenderer.h | 53 - Littlest/libs/cocos2d/Platforms/iOS/glu.c | 113 - Littlest/libs/cocos2d/Platforms/iOS/glu.h | 29 - Littlest/libs/cocos2d/Support/CCArray.h | 92 - Littlest/libs/cocos2d/Support/CCArray.m | 238 - Littlest/libs/cocos2d/Support/CCFileUtils.h | 61 - Littlest/libs/cocos2d/Support/CCFileUtils.m | 168 - Littlest/libs/cocos2d/Support/CCProfiling.h | 53 - Littlest/libs/cocos2d/Support/CCProfiling.m | 117 - Littlest/libs/cocos2d/Support/CGPointExtension.h | 321 - Littlest/libs/cocos2d/Support/CGPointExtension.m | 167 - Littlest/libs/cocos2d/Support/OpenGL_Internal.h | 80 - Littlest/libs/cocos2d/Support/TGAlib.h | 55 - Littlest/libs/cocos2d/Support/TGAlib.m | 272 - Littlest/libs/cocos2d/Support/TransformUtils.h | 37 - Littlest/libs/cocos2d/Support/TransformUtils.m | 46 - Littlest/libs/cocos2d/Support/ZipUtils.h | 78 - Littlest/libs/cocos2d/Support/ZipUtils.m | 246 - Littlest/libs/cocos2d/Support/base64.c | 89 - Littlest/libs/cocos2d/Support/base64.h | 33 - Littlest/libs/cocos2d/Support/ccCArray.h | 408 - Littlest/libs/cocos2d/Support/ccUtils.c | 20 - Littlest/libs/cocos2d/Support/ccUtils.h | 29 - Littlest/libs/cocos2d/Support/uthash.h | 956 - Littlest/libs/cocos2d/Support/utlist.h | 493 - Littlest/libs/cocos2d/ccConfig.h | 281 - Littlest/libs/cocos2d/ccMacros.h | 252 - Littlest/libs/cocos2d/ccTypes.h | 286 - Littlest/libs/cocos2d/cocos2d.h | 160 - Littlest/libs/cocos2d/cocos2d.m | 33 - Littlest/libs/cocoslive/CLScoreServerPost.h | 141 - Littlest/libs/cocoslive/CLScoreServerPost.m | 332 - Littlest/libs/cocoslive/CLScoreServerRequest.h | 121 - Littlest/libs/cocoslive/CLScoreServerRequest.m | 256 - Littlest/libs/cocoslive/cocoslive.h | 42 - Littlest/libs/cocoslive/cocoslive.m | 34 - Littlest/main.m | 17 - 344 files changed, 0 insertions(+), 110076 deletions(-) delete mode 100644 Littlest.xcodeproj/project.pbxproj delete mode 100644 Littlest.xcodeproj/project.xcworkspace/contents.xcworkspacedata delete mode 100644 Littlest.xcodeproj/project.xcworkspace/xcuserdata/dorischen.xcuserdatad/UserInterfaceState.xcuserstate delete mode 100644 Littlest.xcodeproj/xcuserdata/dorischen.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist delete mode 100644 Littlest.xcodeproj/xcuserdata/dorischen.xcuserdatad/xcschemes/Littlest.xcscheme delete mode 100644 Littlest.xcodeproj/xcuserdata/dorischen.xcuserdatad/xcschemes/xcschememanagement.plist delete mode 100644 Littlest/AppDelegate.h delete mode 100644 Littlest/AppDelegate.mm delete mode 100644 Littlest/Engine/Render/GLES-Render.h delete mode 100644 Littlest/Engine/Render/GLES-Render.mm delete mode 100755 Littlest/Foundation/Common/Assert.h delete mode 100755 Littlest/Foundation/Common/Base.h delete mode 100755 Littlest/Foundation/Common/GlobalDefines.h delete mode 100755 Littlest/Foundation/Common/GlobalInclude.h delete mode 100755 Littlest/Foundation/Common/GlobalTypes.h delete mode 100755 Littlest/Foundation/Common/Print.h delete mode 100755 Littlest/Foundation/Common/Singleton.h delete mode 100755 Littlest/Foundation/Containers/BitEncoder.h delete mode 100755 Littlest/Foundation/Containers/LocklessRingBuffer.cpp delete mode 100755 Littlest/Foundation/Containers/LocklessRingBuffer.h delete mode 100644 Littlest/Foundation/GraphicsServices/Geometry/BasicPrimitives.h delete mode 100644 Littlest/Foundation/GraphicsServices/Geometry/BasicPrimitives.mm delete mode 100644 Littlest/Foundation/GraphicsServices/OpenGLServices.h delete mode 100644 Littlest/Foundation/GraphicsServices/OpenGLServices.mm delete mode 100644 Littlest/Foundation/GraphicsServices/RenderTarget.h delete mode 100644 Littlest/Foundation/GraphicsServices/RenderTarget.mm delete mode 100755 Littlest/Foundation/Hash/DJB2.h delete mode 100755 Littlest/Foundation/Math/MathDefines.h delete mode 100755 Littlest/Foundation/Math/MathInclude.h delete mode 100755 Littlest/Foundation/Math/MathOperations.h delete mode 100755 Littlest/Foundation/Math/MathTypes.h delete mode 100755 Littlest/Foundation/Math/Matrix.h delete mode 100755 Littlest/Foundation/Math/Quaternion.h delete mode 100755 Littlest/Foundation/Math/Vector.h delete mode 100755 Littlest/Foundation/Memory/MemoryBitset.cpp delete mode 100755 Littlest/Foundation/Memory/MemoryBitset.h delete mode 100755 Littlest/Foundation/Memory/MemoryHeap.cpp delete mode 100755 Littlest/Foundation/Memory/MemoryHeap.h delete mode 100755 Littlest/Foundation/Memory/MemoryLinear.h delete mode 100644 Littlest/Foundation/OSInterface/GLView.h delete mode 100644 Littlest/Foundation/OSInterface/GLView.m delete mode 100644 Littlest/Foundation/OSInterface/LittlestAppDelegate.h delete mode 100644 Littlest/Foundation/OSInterface/LittlestAppDelegate.m delete mode 100644 Littlest/Foundation/OSInterface/LittlestViewController.h delete mode 100644 Littlest/Foundation/OSInterface/LittlestViewController.m delete mode 100755 Littlest/Foundation/Synchronization/Atomic32Bit.h delete mode 100755 Littlest/Foundation/Synchronization/MemorySync.h delete mode 100644 Littlest/Game/Scene/Scene.h delete mode 100644 Littlest/HelloWorldLayer.h delete mode 100644 Littlest/HelloWorldLayer.mm delete mode 100644 Littlest/OS/GameConfig.h delete mode 100644 Littlest/OS/RootViewController.h delete mode 100644 Littlest/OS/RootViewController.m delete mode 100644 Littlest/Prefix.pch delete mode 100644 Littlest/Resources/Default.png delete mode 100644 Littlest/Resources/Icon-72.png delete mode 100644 Littlest/Resources/Icon-Small-50.png delete mode 100644 Littlest/Resources/Icon-Small.png delete mode 100644 Littlest/Resources/Icon-Small@2x.png delete mode 100644 Littlest/Resources/Icon.png delete mode 100644 Littlest/Resources/Icon@2x.png delete mode 100644 Littlest/Resources/Info.plist delete mode 100755 Littlest/Resources/blocks.png delete mode 100644 Littlest/Resources/fps_images.png delete mode 100644 Littlest/Resources/iTunesArtwork delete mode 100644 Littlest/libs/Box2D/Box2D.h delete mode 100644 Littlest/libs/Box2D/Collision/Shapes/b2CircleShape.cpp delete mode 100644 Littlest/libs/Box2D/Collision/Shapes/b2CircleShape.h delete mode 100644 Littlest/libs/Box2D/Collision/Shapes/b2PolygonShape.cpp delete mode 100644 Littlest/libs/Box2D/Collision/Shapes/b2PolygonShape.h delete mode 100644 Littlest/libs/Box2D/Collision/Shapes/b2Shape.h delete mode 100644 Littlest/libs/Box2D/Collision/b2BroadPhase.cpp delete mode 100644 Littlest/libs/Box2D/Collision/b2BroadPhase.h delete mode 100644 Littlest/libs/Box2D/Collision/b2CollideCircle.cpp delete mode 100644 Littlest/libs/Box2D/Collision/b2CollidePolygon.cpp delete mode 100644 Littlest/libs/Box2D/Collision/b2Collision.cpp delete mode 100644 Littlest/libs/Box2D/Collision/b2Collision.h delete mode 100644 Littlest/libs/Box2D/Collision/b2Distance.cpp delete mode 100644 Littlest/libs/Box2D/Collision/b2Distance.h delete mode 100644 Littlest/libs/Box2D/Collision/b2DynamicTree.cpp delete mode 100644 Littlest/libs/Box2D/Collision/b2DynamicTree.h delete mode 100644 Littlest/libs/Box2D/Collision/b2TimeOfImpact.cpp delete mode 100644 Littlest/libs/Box2D/Collision/b2TimeOfImpact.h delete mode 100644 Littlest/libs/Box2D/Common/b2BlockAllocator.cpp delete mode 100644 Littlest/libs/Box2D/Common/b2BlockAllocator.h delete mode 100644 Littlest/libs/Box2D/Common/b2Math.cpp delete mode 100644 Littlest/libs/Box2D/Common/b2Math.h delete mode 100644 Littlest/libs/Box2D/Common/b2Settings.cpp delete mode 100644 Littlest/libs/Box2D/Common/b2Settings.h delete mode 100644 Littlest/libs/Box2D/Common/b2StackAllocator.cpp delete mode 100644 Littlest/libs/Box2D/Common/b2StackAllocator.h delete mode 100644 Littlest/libs/Box2D/Dynamics/Contacts/b2CircleContact.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/Contacts/b2CircleContact.h delete mode 100644 Littlest/libs/Box2D/Dynamics/Contacts/b2Contact.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/Contacts/b2Contact.h delete mode 100644 Littlest/libs/Box2D/Dynamics/Contacts/b2ContactSolver.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/Contacts/b2ContactSolver.h delete mode 100644 Littlest/libs/Box2D/Dynamics/Contacts/b2NullContact.h delete mode 100644 Littlest/libs/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.h delete mode 100644 Littlest/libs/Box2D/Dynamics/Contacts/b2PolygonContact.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/Contacts/b2PolygonContact.h delete mode 100644 Littlest/libs/Box2D/Dynamics/Contacts/b2TOISolver.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/Contacts/b2TOISolver.h delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2DistanceJoint.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2DistanceJoint.h delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2FrictionJoint.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2FrictionJoint.h delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2GearJoint.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2GearJoint.h delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2Joint.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2Joint.h delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2LineJoint.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2LineJoint.h delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2MouseJoint.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2MouseJoint.h delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2PrismaticJoint.h delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2PulleyJoint.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2PulleyJoint.h delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2RevoluteJoint.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2RevoluteJoint.h delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2WeldJoint.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/Joints/b2WeldJoint.h delete mode 100644 Littlest/libs/Box2D/Dynamics/b2Body.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/b2Body.h delete mode 100644 Littlest/libs/Box2D/Dynamics/b2ContactManager.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/b2ContactManager.h delete mode 100644 Littlest/libs/Box2D/Dynamics/b2Fixture.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/b2Fixture.h delete mode 100644 Littlest/libs/Box2D/Dynamics/b2Island.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/b2Island.h delete mode 100644 Littlest/libs/Box2D/Dynamics/b2TimeStep.h delete mode 100644 Littlest/libs/Box2D/Dynamics/b2World.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/b2World.h delete mode 100644 Littlest/libs/Box2D/Dynamics/b2WorldCallbacks.cpp delete mode 100644 Littlest/libs/Box2D/Dynamics/b2WorldCallbacks.h delete mode 100644 Littlest/libs/CocosDenshion/CDAudioManager.h delete mode 100644 Littlest/libs/CocosDenshion/CDAudioManager.m delete mode 100644 Littlest/libs/CocosDenshion/CDConfig.h delete mode 100644 Littlest/libs/CocosDenshion/CDOpenALSupport.h delete mode 100644 Littlest/libs/CocosDenshion/CDOpenALSupport.m delete mode 100644 Littlest/libs/CocosDenshion/CocosDenshion.h delete mode 100644 Littlest/libs/CocosDenshion/CocosDenshion.m delete mode 100644 Littlest/libs/CocosDenshion/SimpleAudioEngine.h delete mode 100644 Littlest/libs/CocosDenshion/SimpleAudioEngine.m delete mode 100644 Littlest/libs/FontLabel/FontLabel.h delete mode 100644 Littlest/libs/FontLabel/FontLabel.m delete mode 100644 Littlest/libs/FontLabel/FontLabelStringDrawing.h delete mode 100644 Littlest/libs/FontLabel/FontLabelStringDrawing.m delete mode 100644 Littlest/libs/FontLabel/FontManager.h delete mode 100644 Littlest/libs/FontLabel/FontManager.m delete mode 100644 Littlest/libs/FontLabel/ZAttributedString.h delete mode 100644 Littlest/libs/FontLabel/ZAttributedString.m delete mode 100644 Littlest/libs/FontLabel/ZAttributedStringPrivate.h delete mode 100644 Littlest/libs/FontLabel/ZFont.h delete mode 100644 Littlest/libs/FontLabel/ZFont.m delete mode 100644 Littlest/libs/TouchJSON/CDataScanner.h delete mode 100644 Littlest/libs/TouchJSON/CDataScanner.m delete mode 100644 Littlest/libs/TouchJSON/Extensions/CDataScanner_Extensions.h delete mode 100644 Littlest/libs/TouchJSON/Extensions/CDataScanner_Extensions.m delete mode 100644 Littlest/libs/TouchJSON/Extensions/NSCharacterSet_Extensions.h delete mode 100644 Littlest/libs/TouchJSON/Extensions/NSCharacterSet_Extensions.m delete mode 100644 Littlest/libs/TouchJSON/Extensions/NSDictionary_JSONExtensions.h delete mode 100644 Littlest/libs/TouchJSON/Extensions/NSDictionary_JSONExtensions.m delete mode 100644 Littlest/libs/TouchJSON/Extensions/NSScanner_Extensions.h delete mode 100644 Littlest/libs/TouchJSON/Extensions/NSScanner_Extensions.m delete mode 100644 Littlest/libs/TouchJSON/JSON/CJSONDeserializer.h delete mode 100644 Littlest/libs/TouchJSON/JSON/CJSONDeserializer.m delete mode 100644 Littlest/libs/TouchJSON/JSON/CJSONScanner.h delete mode 100644 Littlest/libs/TouchJSON/JSON/CJSONScanner.m delete mode 100644 Littlest/libs/TouchJSON/JSON/CJSONSerializer.h delete mode 100644 Littlest/libs/TouchJSON/JSON/CJSONSerializer.m delete mode 100644 Littlest/libs/cocos2d/CCAction.h delete mode 100644 Littlest/libs/cocos2d/CCAction.m delete mode 100644 Littlest/libs/cocos2d/CCActionCamera.h delete mode 100644 Littlest/libs/cocos2d/CCActionCamera.m delete mode 100644 Littlest/libs/cocos2d/CCActionEase.h delete mode 100644 Littlest/libs/cocos2d/CCActionEase.m delete mode 100644 Littlest/libs/cocos2d/CCActionGrid.h delete mode 100644 Littlest/libs/cocos2d/CCActionGrid.m delete mode 100644 Littlest/libs/cocos2d/CCActionGrid3D.h delete mode 100644 Littlest/libs/cocos2d/CCActionGrid3D.m delete mode 100644 Littlest/libs/cocos2d/CCActionInstant.h delete mode 100644 Littlest/libs/cocos2d/CCActionInstant.m delete mode 100644 Littlest/libs/cocos2d/CCActionInterval.h delete mode 100644 Littlest/libs/cocos2d/CCActionInterval.m delete mode 100644 Littlest/libs/cocos2d/CCActionManager.h delete mode 100644 Littlest/libs/cocos2d/CCActionManager.m delete mode 100644 Littlest/libs/cocos2d/CCActionPageTurn3D.h delete mode 100644 Littlest/libs/cocos2d/CCActionPageTurn3D.m delete mode 100644 Littlest/libs/cocos2d/CCActionProgressTimer.h delete mode 100644 Littlest/libs/cocos2d/CCActionProgressTimer.m delete mode 100644 Littlest/libs/cocos2d/CCActionTiledGrid.h delete mode 100644 Littlest/libs/cocos2d/CCActionTiledGrid.m delete mode 100644 Littlest/libs/cocos2d/CCActionTween.h delete mode 100644 Littlest/libs/cocos2d/CCActionTween.m delete mode 100644 Littlest/libs/cocos2d/CCAnimation.h delete mode 100644 Littlest/libs/cocos2d/CCAnimation.m delete mode 100644 Littlest/libs/cocos2d/CCAnimationCache.h delete mode 100644 Littlest/libs/cocos2d/CCAnimationCache.m delete mode 100644 Littlest/libs/cocos2d/CCAtlasNode.h delete mode 100644 Littlest/libs/cocos2d/CCAtlasNode.m delete mode 100644 Littlest/libs/cocos2d/CCBlockSupport.h delete mode 100644 Littlest/libs/cocos2d/CCBlockSupport.m delete mode 100644 Littlest/libs/cocos2d/CCCamera.h delete mode 100644 Littlest/libs/cocos2d/CCCamera.m delete mode 100644 Littlest/libs/cocos2d/CCConfiguration.h delete mode 100644 Littlest/libs/cocos2d/CCConfiguration.m delete mode 100644 Littlest/libs/cocos2d/CCDirector.h delete mode 100644 Littlest/libs/cocos2d/CCDirector.m delete mode 100644 Littlest/libs/cocos2d/CCDrawingPrimitives.h delete mode 100644 Littlest/libs/cocos2d/CCDrawingPrimitives.m delete mode 100644 Littlest/libs/cocos2d/CCGrabber.h delete mode 100644 Littlest/libs/cocos2d/CCGrabber.m delete mode 100644 Littlest/libs/cocos2d/CCGrid.h delete mode 100644 Littlest/libs/cocos2d/CCGrid.m delete mode 100644 Littlest/libs/cocos2d/CCLabelAtlas.h delete mode 100644 Littlest/libs/cocos2d/CCLabelAtlas.m delete mode 100644 Littlest/libs/cocos2d/CCLabelBMFont.h delete mode 100644 Littlest/libs/cocos2d/CCLabelBMFont.m delete mode 100644 Littlest/libs/cocos2d/CCLabelTTF.h delete mode 100644 Littlest/libs/cocos2d/CCLabelTTF.m delete mode 100644 Littlest/libs/cocos2d/CCLayer.h delete mode 100644 Littlest/libs/cocos2d/CCLayer.m delete mode 100644 Littlest/libs/cocos2d/CCMenu.h delete mode 100644 Littlest/libs/cocos2d/CCMenu.m delete mode 100644 Littlest/libs/cocos2d/CCMenuItem.h delete mode 100644 Littlest/libs/cocos2d/CCMenuItem.m delete mode 100644 Littlest/libs/cocos2d/CCMotionStreak.h delete mode 100644 Littlest/libs/cocos2d/CCMotionStreak.m delete mode 100644 Littlest/libs/cocos2d/CCNode.h delete mode 100644 Littlest/libs/cocos2d/CCNode.m delete mode 100644 Littlest/libs/cocos2d/CCParallaxNode.h delete mode 100644 Littlest/libs/cocos2d/CCParallaxNode.m delete mode 100644 Littlest/libs/cocos2d/CCParticleExamples.h delete mode 100644 Littlest/libs/cocos2d/CCParticleExamples.m delete mode 100644 Littlest/libs/cocos2d/CCParticleSystem.h delete mode 100644 Littlest/libs/cocos2d/CCParticleSystem.m delete mode 100644 Littlest/libs/cocos2d/CCParticleSystemPoint.h delete mode 100644 Littlest/libs/cocos2d/CCParticleSystemPoint.m delete mode 100644 Littlest/libs/cocos2d/CCParticleSystemQuad.h delete mode 100644 Littlest/libs/cocos2d/CCParticleSystemQuad.m delete mode 100644 Littlest/libs/cocos2d/CCProgressTimer.h delete mode 100644 Littlest/libs/cocos2d/CCProgressTimer.m delete mode 100644 Littlest/libs/cocos2d/CCProtocols.h delete mode 100644 Littlest/libs/cocos2d/CCRenderTexture.h delete mode 100644 Littlest/libs/cocos2d/CCRenderTexture.m delete mode 100644 Littlest/libs/cocos2d/CCRibbon.h delete mode 100644 Littlest/libs/cocos2d/CCRibbon.m delete mode 100644 Littlest/libs/cocos2d/CCScene.h delete mode 100644 Littlest/libs/cocos2d/CCScene.m delete mode 100644 Littlest/libs/cocos2d/CCScheduler.h delete mode 100644 Littlest/libs/cocos2d/CCScheduler.m delete mode 100644 Littlest/libs/cocos2d/CCSprite.h delete mode 100644 Littlest/libs/cocos2d/CCSprite.m delete mode 100644 Littlest/libs/cocos2d/CCSpriteBatchNode.h delete mode 100644 Littlest/libs/cocos2d/CCSpriteBatchNode.m delete mode 100644 Littlest/libs/cocos2d/CCSpriteFrame.h delete mode 100644 Littlest/libs/cocos2d/CCSpriteFrame.m delete mode 100644 Littlest/libs/cocos2d/CCSpriteFrameCache.h delete mode 100644 Littlest/libs/cocos2d/CCSpriteFrameCache.m delete mode 100644 Littlest/libs/cocos2d/CCTMXLayer.h delete mode 100644 Littlest/libs/cocos2d/CCTMXLayer.m delete mode 100644 Littlest/libs/cocos2d/CCTMXObjectGroup.h delete mode 100644 Littlest/libs/cocos2d/CCTMXObjectGroup.m delete mode 100644 Littlest/libs/cocos2d/CCTMXTiledMap.h delete mode 100644 Littlest/libs/cocos2d/CCTMXTiledMap.m delete mode 100644 Littlest/libs/cocos2d/CCTMXXMLParser.h delete mode 100644 Littlest/libs/cocos2d/CCTMXXMLParser.m delete mode 100644 Littlest/libs/cocos2d/CCTexture2D.h delete mode 100644 Littlest/libs/cocos2d/CCTexture2D.m delete mode 100644 Littlest/libs/cocos2d/CCTextureAtlas.h delete mode 100644 Littlest/libs/cocos2d/CCTextureAtlas.m delete mode 100644 Littlest/libs/cocos2d/CCTextureCache.h delete mode 100644 Littlest/libs/cocos2d/CCTextureCache.m delete mode 100644 Littlest/libs/cocos2d/CCTexturePVR.h delete mode 100644 Littlest/libs/cocos2d/CCTexturePVR.m delete mode 100644 Littlest/libs/cocos2d/CCTileMapAtlas.h delete mode 100644 Littlest/libs/cocos2d/CCTileMapAtlas.m delete mode 100644 Littlest/libs/cocos2d/CCTransition.h delete mode 100644 Littlest/libs/cocos2d/CCTransition.m delete mode 100644 Littlest/libs/cocos2d/CCTransitionPageTurn.h delete mode 100644 Littlest/libs/cocos2d/CCTransitionPageTurn.m delete mode 100644 Littlest/libs/cocos2d/CCTransitionRadial.h delete mode 100644 Littlest/libs/cocos2d/CCTransitionRadial.m delete mode 100644 Littlest/libs/cocos2d/Platforms/CCGL.h delete mode 100644 Littlest/libs/cocos2d/Platforms/CCNS.h delete mode 100644 Littlest/libs/cocos2d/Platforms/Mac/CCDirectorMac.h delete mode 100644 Littlest/libs/cocos2d/Platforms/Mac/CCDirectorMac.m delete mode 100644 Littlest/libs/cocos2d/Platforms/Mac/CCEventDispatcher.h delete mode 100644 Littlest/libs/cocos2d/Platforms/Mac/CCEventDispatcher.m delete mode 100644 Littlest/libs/cocos2d/Platforms/Mac/MacGLView.h delete mode 100644 Littlest/libs/cocos2d/Platforms/Mac/MacGLView.m delete mode 100644 Littlest/libs/cocos2d/Platforms/Mac/MacWindow.h delete mode 100644 Littlest/libs/cocos2d/Platforms/Mac/MacWindow.m delete mode 100644 Littlest/libs/cocos2d/Platforms/iOS/CCDirectorIOS.h delete mode 100644 Littlest/libs/cocos2d/Platforms/iOS/CCDirectorIOS.m delete mode 100644 Littlest/libs/cocos2d/Platforms/iOS/CCTouchDelegateProtocol.h delete mode 100644 Littlest/libs/cocos2d/Platforms/iOS/CCTouchDispatcher.h delete mode 100644 Littlest/libs/cocos2d/Platforms/iOS/CCTouchDispatcher.m delete mode 100644 Littlest/libs/cocos2d/Platforms/iOS/CCTouchHandler.h delete mode 100644 Littlest/libs/cocos2d/Platforms/iOS/CCTouchHandler.m delete mode 100644 Littlest/libs/cocos2d/Platforms/iOS/EAGLView.h delete mode 100644 Littlest/libs/cocos2d/Platforms/iOS/EAGLView.m delete mode 100644 Littlest/libs/cocos2d/Platforms/iOS/ES1Renderer.h delete mode 100644 Littlest/libs/cocos2d/Platforms/iOS/ES1Renderer.m delete mode 100644 Littlest/libs/cocos2d/Platforms/iOS/ESRenderer.h delete mode 100644 Littlest/libs/cocos2d/Platforms/iOS/glu.c delete mode 100644 Littlest/libs/cocos2d/Platforms/iOS/glu.h delete mode 100644 Littlest/libs/cocos2d/Support/CCArray.h delete mode 100644 Littlest/libs/cocos2d/Support/CCArray.m delete mode 100644 Littlest/libs/cocos2d/Support/CCFileUtils.h delete mode 100644 Littlest/libs/cocos2d/Support/CCFileUtils.m delete mode 100644 Littlest/libs/cocos2d/Support/CCProfiling.h delete mode 100644 Littlest/libs/cocos2d/Support/CCProfiling.m delete mode 100644 Littlest/libs/cocos2d/Support/CGPointExtension.h delete mode 100644 Littlest/libs/cocos2d/Support/CGPointExtension.m delete mode 100644 Littlest/libs/cocos2d/Support/OpenGL_Internal.h delete mode 100644 Littlest/libs/cocos2d/Support/TGAlib.h delete mode 100644 Littlest/libs/cocos2d/Support/TGAlib.m delete mode 100644 Littlest/libs/cocos2d/Support/TransformUtils.h delete mode 100644 Littlest/libs/cocos2d/Support/TransformUtils.m delete mode 100644 Littlest/libs/cocos2d/Support/ZipUtils.h delete mode 100644 Littlest/libs/cocos2d/Support/ZipUtils.m delete mode 100644 Littlest/libs/cocos2d/Support/base64.c delete mode 100644 Littlest/libs/cocos2d/Support/base64.h delete mode 100644 Littlest/libs/cocos2d/Support/ccCArray.h delete mode 100644 Littlest/libs/cocos2d/Support/ccUtils.c delete mode 100644 Littlest/libs/cocos2d/Support/ccUtils.h delete mode 100644 Littlest/libs/cocos2d/Support/uthash.h delete mode 100644 Littlest/libs/cocos2d/Support/utlist.h delete mode 100644 Littlest/libs/cocos2d/ccConfig.h delete mode 100644 Littlest/libs/cocos2d/ccMacros.h delete mode 100644 Littlest/libs/cocos2d/ccTypes.h delete mode 100644 Littlest/libs/cocos2d/cocos2d.h delete mode 100644 Littlest/libs/cocos2d/cocos2d.m delete mode 100644 Littlest/libs/cocoslive/CLScoreServerPost.h delete mode 100644 Littlest/libs/cocoslive/CLScoreServerPost.m delete mode 100644 Littlest/libs/cocoslive/CLScoreServerRequest.h delete mode 100644 Littlest/libs/cocoslive/CLScoreServerRequest.m delete mode 100644 Littlest/libs/cocoslive/cocoslive.h delete mode 100644 Littlest/libs/cocoslive/cocoslive.m delete mode 100644 Littlest/main.m diff --git a/Littlest.xcodeproj/project.pbxproj b/Littlest.xcodeproj/project.pbxproj deleted file mode 100644 index 93b507c..0000000 --- a/Littlest.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1464 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 4B8CBFB5135BFDF600B3E49F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B8CBFB4135BFDF600B3E49F /* QuartzCore.framework */; }; - 4B8CBFB7135BFDF600B3E49F /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B8CBFB6135BFDF600B3E49F /* OpenGLES.framework */; }; - 4B8CBFB9135BFDF600B3E49F /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B8CBFB8135BFDF600B3E49F /* OpenAL.framework */; }; - 4B8CBFBB135BFDF600B3E49F /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B8CBFBA135BFDF600B3E49F /* AudioToolbox.framework */; }; - 4B8CBFBD135BFDF600B3E49F /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B8CBFBC135BFDF600B3E49F /* AVFoundation.framework */; }; - 4B8CBFBF135BFDF600B3E49F /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B8CBFBE135BFDF600B3E49F /* UIKit.framework */; }; - 4B8CBFC1135BFDF600B3E49F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B8CBFC0135BFDF600B3E49F /* Foundation.framework */; }; - 4B8CBFC3135BFDF600B3E49F /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4B8CBFC2135BFDF600B3E49F /* CoreGraphics.framework */; }; - 4B8CBFC7135BFDF600B3E49F /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 4B8CBFC6135BFDF600B3E49F /* Default.png */; }; - 4B8CBFC9135BFDF600B3E49F /* fps_images.png in Resources */ = {isa = PBXBuildFile; fileRef = 4B8CBFC8135BFDF600B3E49F /* fps_images.png */; }; - 4B8CBFCB135BFDF600B3E49F /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 4B8CBFCA135BFDF600B3E49F /* Icon-72.png */; }; - 4B8CBFCD135BFDF600B3E49F /* Icon-Small-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 4B8CBFCC135BFDF600B3E49F /* Icon-Small-50.png */; }; - 4B8CBFCF135BFDF600B3E49F /* Icon-Small.png in Resources */ = {isa = PBXBuildFile; fileRef = 4B8CBFCE135BFDF600B3E49F /* Icon-Small.png */; }; - 4B8CBFD1135BFDF600B3E49F /* Icon-Small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4B8CBFD0135BFDF600B3E49F /* Icon-Small@2x.png */; }; - 4B8CBFD3135BFDF600B3E49F /* Icon.png in Resources */ = {isa = PBXBuildFile; fileRef = 4B8CBFD2135BFDF600B3E49F /* Icon.png */; }; - 4B8CBFD5135BFDF600B3E49F /* Icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 4B8CBFD4135BFDF600B3E49F /* Icon@2x.png */; }; - 4B8CBFD8135BFDF600B3E49F /* iTunesArtwork in Resources */ = {isa = PBXBuildFile; fileRef = 4B8CBFD7135BFDF600B3E49F /* iTunesArtwork */; }; - 4B8CBFDC135BFDF600B3E49F /* CCAction.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CBFDB135BFDF600B3E49F /* CCAction.m */; }; - 4B8CBFDF135BFDF600B3E49F /* CCActionCamera.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CBFDE135BFDF600B3E49F /* CCActionCamera.m */; }; - 4B8CBFE2135BFDF600B3E49F /* CCActionEase.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CBFE1135BFDF600B3E49F /* CCActionEase.m */; }; - 4B8CBFE5135BFDF600B3E49F /* CCActionGrid.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CBFE4135BFDF600B3E49F /* CCActionGrid.m */; }; - 4B8CBFE8135BFDF600B3E49F /* CCActionGrid3D.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CBFE7135BFDF600B3E49F /* CCActionGrid3D.m */; }; - 4B8CBFEB135BFDF600B3E49F /* CCActionInstant.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CBFEA135BFDF600B3E49F /* CCActionInstant.m */; }; - 4B8CBFEE135BFDF600B3E49F /* CCActionInterval.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CBFED135BFDF600B3E49F /* CCActionInterval.m */; }; - 4B8CBFF1135BFDF600B3E49F /* CCActionManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CBFF0135BFDF600B3E49F /* CCActionManager.m */; }; - 4B8CBFF4135BFDF600B3E49F /* CCActionPageTurn3D.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CBFF3135BFDF600B3E49F /* CCActionPageTurn3D.m */; }; - 4B8CBFF7135BFDF600B3E49F /* CCActionProgressTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CBFF6135BFDF600B3E49F /* CCActionProgressTimer.m */; }; - 4B8CBFFA135BFDF600B3E49F /* CCActionTiledGrid.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CBFF9135BFDF600B3E49F /* CCActionTiledGrid.m */; }; - 4B8CBFFD135BFDF700B3E49F /* CCActionTween.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CBFFC135BFDF700B3E49F /* CCActionTween.m */; }; - 4B8CC000135BFDF700B3E49F /* CCAnimation.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CBFFF135BFDF700B3E49F /* CCAnimation.m */; }; - 4B8CC003135BFDF700B3E49F /* CCAnimationCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC002135BFDF700B3E49F /* CCAnimationCache.m */; }; - 4B8CC006135BFDF700B3E49F /* CCAtlasNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC005135BFDF700B3E49F /* CCAtlasNode.m */; }; - 4B8CC009135BFDF700B3E49F /* CCBlockSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC008135BFDF700B3E49F /* CCBlockSupport.m */; }; - 4B8CC00C135BFDF700B3E49F /* CCCamera.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC00B135BFDF700B3E49F /* CCCamera.m */; }; - 4B8CC010135BFDF700B3E49F /* CCConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC00F135BFDF700B3E49F /* CCConfiguration.m */; }; - 4B8CC013135BFDF700B3E49F /* CCDirector.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC012135BFDF700B3E49F /* CCDirector.m */; }; - 4B8CC016135BFDF700B3E49F /* CCDrawingPrimitives.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC015135BFDF700B3E49F /* CCDrawingPrimitives.m */; }; - 4B8CC019135BFDF700B3E49F /* CCGrabber.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC018135BFDF700B3E49F /* CCGrabber.m */; }; - 4B8CC01C135BFDF700B3E49F /* CCGrid.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC01B135BFDF700B3E49F /* CCGrid.m */; }; - 4B8CC01F135BFDF700B3E49F /* CCLabelAtlas.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC01E135BFDF700B3E49F /* CCLabelAtlas.m */; }; - 4B8CC022135BFDF700B3E49F /* CCLabelBMFont.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC021135BFDF700B3E49F /* CCLabelBMFont.m */; }; - 4B8CC025135BFDF700B3E49F /* CCLabelTTF.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC024135BFDF700B3E49F /* CCLabelTTF.m */; }; - 4B8CC028135BFDF700B3E49F /* CCLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC027135BFDF700B3E49F /* CCLayer.m */; }; - 4B8CC02C135BFDF700B3E49F /* CCMenu.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC02B135BFDF700B3E49F /* CCMenu.m */; }; - 4B8CC02F135BFDF700B3E49F /* CCMenuItem.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC02E135BFDF700B3E49F /* CCMenuItem.m */; }; - 4B8CC032135BFDF700B3E49F /* CCMotionStreak.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC031135BFDF700B3E49F /* CCMotionStreak.m */; }; - 4B8CC035135BFDF700B3E49F /* CCNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC034135BFDF700B3E49F /* CCNode.m */; }; - 4B8CC038135BFDF700B3E49F /* CCParallaxNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC037135BFDF700B3E49F /* CCParallaxNode.m */; }; - 4B8CC03B135BFDF700B3E49F /* CCParticleExamples.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC03A135BFDF700B3E49F /* CCParticleExamples.m */; }; - 4B8CC03E135BFDF700B3E49F /* CCParticleSystem.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC03D135BFDF700B3E49F /* CCParticleSystem.m */; }; - 4B8CC041135BFDF700B3E49F /* CCParticleSystemPoint.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC040135BFDF700B3E49F /* CCParticleSystemPoint.m */; }; - 4B8CC044135BFDF700B3E49F /* CCParticleSystemQuad.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC043135BFDF700B3E49F /* CCParticleSystemQuad.m */; }; - 4B8CC047135BFDF700B3E49F /* CCProgressTimer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC046135BFDF700B3E49F /* CCProgressTimer.m */; }; - 4B8CC04B135BFDF700B3E49F /* CCRenderTexture.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC04A135BFDF700B3E49F /* CCRenderTexture.m */; }; - 4B8CC04E135BFDF700B3E49F /* CCRibbon.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC04D135BFDF700B3E49F /* CCRibbon.m */; }; - 4B8CC051135BFDF700B3E49F /* CCScene.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC050135BFDF700B3E49F /* CCScene.m */; }; - 4B8CC054135BFDF700B3E49F /* CCScheduler.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC053135BFDF700B3E49F /* CCScheduler.m */; }; - 4B8CC057135BFDF700B3E49F /* CCSprite.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC056135BFDF700B3E49F /* CCSprite.m */; }; - 4B8CC05A135BFDF700B3E49F /* CCSpriteBatchNode.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC059135BFDF700B3E49F /* CCSpriteBatchNode.m */; }; - 4B8CC05D135BFDF700B3E49F /* CCSpriteFrame.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC05C135BFDF700B3E49F /* CCSpriteFrame.m */; }; - 4B8CC060135BFDF700B3E49F /* CCSpriteFrameCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC05F135BFDF700B3E49F /* CCSpriteFrameCache.m */; }; - 4B8CC063135BFDF700B3E49F /* CCTexture2D.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC062135BFDF700B3E49F /* CCTexture2D.m */; }; - 4B8CC066135BFDF700B3E49F /* CCTextureAtlas.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC065135BFDF700B3E49F /* CCTextureAtlas.m */; }; - 4B8CC069135BFDF700B3E49F /* CCTextureCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC068135BFDF700B3E49F /* CCTextureCache.m */; }; - 4B8CC06C135BFDF700B3E49F /* CCTexturePVR.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC06B135BFDF700B3E49F /* CCTexturePVR.m */; }; - 4B8CC06F135BFDF700B3E49F /* CCTileMapAtlas.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC06E135BFDF700B3E49F /* CCTileMapAtlas.m */; }; - 4B8CC072135BFDF700B3E49F /* CCTMXLayer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC071135BFDF700B3E49F /* CCTMXLayer.m */; }; - 4B8CC075135BFDF700B3E49F /* CCTMXObjectGroup.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC074135BFDF700B3E49F /* CCTMXObjectGroup.m */; }; - 4B8CC078135BFDF700B3E49F /* CCTMXTiledMap.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC077135BFDF700B3E49F /* CCTMXTiledMap.m */; }; - 4B8CC07B135BFDF700B3E49F /* CCTMXXMLParser.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC07A135BFDF700B3E49F /* CCTMXXMLParser.m */; }; - 4B8CC07E135BFDF700B3E49F /* CCTransition.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC07D135BFDF700B3E49F /* CCTransition.m */; }; - 4B8CC081135BFDF700B3E49F /* CCTransitionPageTurn.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC080135BFDF700B3E49F /* CCTransitionPageTurn.m */; }; - 4B8CC084135BFDF800B3E49F /* CCTransitionRadial.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC083135BFDF700B3E49F /* CCTransitionRadial.m */; }; - 4B8CC088135BFDF800B3E49F /* cocos2d.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC087135BFDF800B3E49F /* cocos2d.m */; }; - 4B8CC08D135BFDF800B3E49F /* CCDirectorIOS.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC08C135BFDF800B3E49F /* CCDirectorIOS.m */; }; - 4B8CC091135BFDF800B3E49F /* CCTouchDispatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC090135BFDF800B3E49F /* CCTouchDispatcher.m */; }; - 4B8CC094135BFDF800B3E49F /* CCTouchHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC093135BFDF800B3E49F /* CCTouchHandler.m */; }; - 4B8CC097135BFDF800B3E49F /* EAGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC096135BFDF800B3E49F /* EAGLView.m */; }; - 4B8CC09A135BFDF800B3E49F /* ES1Renderer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC099135BFDF800B3E49F /* ES1Renderer.m */; }; - 4B8CC09D135BFDF800B3E49F /* glu.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC09C135BFDF800B3E49F /* glu.c */; }; - 4B8CC0A1135BFDF800B3E49F /* CCDirectorMac.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0A0135BFDF800B3E49F /* CCDirectorMac.m */; }; - 4B8CC0A4135BFDF800B3E49F /* CCEventDispatcher.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0A3135BFDF800B3E49F /* CCEventDispatcher.m */; }; - 4B8CC0A7135BFDF800B3E49F /* MacGLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0A6135BFDF800B3E49F /* MacGLView.m */; }; - 4B8CC0AA135BFDF800B3E49F /* MacWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0A9135BFDF800B3E49F /* MacWindow.m */; }; - 4B8CC0AC135BFDF800B3E49F /* base64.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0AB135BFDF800B3E49F /* base64.c */; }; - 4B8CC0B0135BFDF800B3E49F /* CCArray.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0AF135BFDF800B3E49F /* CCArray.m */; }; - 4B8CC0B4135BFDF800B3E49F /* CCFileUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0B3135BFDF800B3E49F /* CCFileUtils.m */; }; - 4B8CC0B7135BFDF800B3E49F /* CCProfiling.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0B6135BFDF800B3E49F /* CCProfiling.m */; }; - 4B8CC0B9135BFDF800B3E49F /* ccUtils.c in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0B8135BFDF800B3E49F /* ccUtils.c */; }; - 4B8CC0BD135BFDF800B3E49F /* CGPointExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0BC135BFDF800B3E49F /* CGPointExtension.m */; }; - 4B8CC0C1135BFDF800B3E49F /* TGAlib.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0C0135BFDF800B3E49F /* TGAlib.m */; }; - 4B8CC0C4135BFDF800B3E49F /* TransformUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0C3135BFDF800B3E49F /* TransformUtils.m */; }; - 4B8CC0C9135BFDF800B3E49F /* ZipUtils.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0C8135BFDF800B3E49F /* ZipUtils.m */; }; - 4B8CC0CD135BFDF800B3E49F /* CDAudioManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0CC135BFDF800B3E49F /* CDAudioManager.m */; }; - 4B8CC0D1135BFDF800B3E49F /* CDOpenALSupport.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0D0135BFDF800B3E49F /* CDOpenALSupport.m */; }; - 4B8CC0D4135BFDF800B3E49F /* CocosDenshion.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0D3135BFDF800B3E49F /* CocosDenshion.m */; }; - 4B8CC0D7135BFDF800B3E49F /* SimpleAudioEngine.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0D6135BFDF800B3E49F /* SimpleAudioEngine.m */; }; - 4B8CC0DB135BFDF800B3E49F /* CLScoreServerPost.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0DA135BFDF800B3E49F /* CLScoreServerPost.m */; }; - 4B8CC0DE135BFDF800B3E49F /* CLScoreServerRequest.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0DD135BFDF800B3E49F /* CLScoreServerRequest.m */; }; - 4B8CC0E1135BFDF800B3E49F /* cocoslive.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0E0135BFDF800B3E49F /* cocoslive.m */; }; - 4B8CC0E5135BFDF800B3E49F /* FontLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0E4135BFDF800B3E49F /* FontLabel.m */; }; - 4B8CC0E8135BFDF800B3E49F /* FontLabelStringDrawing.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0E7135BFDF800B3E49F /* FontLabelStringDrawing.m */; }; - 4B8CC0EB135BFDF800B3E49F /* FontManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0EA135BFDF800B3E49F /* FontManager.m */; }; - 4B8CC0EE135BFDF800B3E49F /* ZAttributedString.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0ED135BFDF800B3E49F /* ZAttributedString.m */; }; - 4B8CC0F2135BFDF800B3E49F /* ZFont.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0F1135BFDF800B3E49F /* ZFont.m */; }; - 4B8CC0F6135BFDF800B3E49F /* CDataScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0F5135BFDF800B3E49F /* CDataScanner.m */; }; - 4B8CC0F9135BFDF800B3E49F /* CDataScanner_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0F8135BFDF800B3E49F /* CDataScanner_Extensions.m */; }; - 4B8CC0FC135BFDF800B3E49F /* NSCharacterSet_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0FB135BFDF800B3E49F /* NSCharacterSet_Extensions.m */; }; - 4B8CC0FF135BFDF800B3E49F /* NSDictionary_JSONExtensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC0FE135BFDF800B3E49F /* NSDictionary_JSONExtensions.m */; }; - 4B8CC102135BFDF800B3E49F /* NSScanner_Extensions.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC101135BFDF800B3E49F /* NSScanner_Extensions.m */; }; - 4B8CC105135BFDF800B3E49F /* CJSONDeserializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC104135BFDF800B3E49F /* CJSONDeserializer.m */; }; - 4B8CC108135BFDF800B3E49F /* CJSONScanner.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC107135BFDF800B3E49F /* CJSONScanner.m */; }; - 4B8CC10B135BFDF800B3E49F /* CJSONSerializer.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC10A135BFDF800B3E49F /* CJSONSerializer.m */; }; - 4B8CC10F135BFDF800B3E49F /* b2BroadPhase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC10E135BFDF800B3E49F /* b2BroadPhase.cpp */; }; - 4B8CC112135BFDF800B3E49F /* b2CollideCircle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC111135BFDF800B3E49F /* b2CollideCircle.cpp */; }; - 4B8CC114135BFDF900B3E49F /* b2CollidePolygon.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC113135BFDF900B3E49F /* b2CollidePolygon.cpp */; }; - 4B8CC116135BFDF900B3E49F /* b2Collision.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC115135BFDF900B3E49F /* b2Collision.cpp */; }; - 4B8CC119135BFDF900B3E49F /* b2Distance.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC118135BFDF900B3E49F /* b2Distance.cpp */; }; - 4B8CC11C135BFDF900B3E49F /* b2DynamicTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC11B135BFDF900B3E49F /* b2DynamicTree.cpp */; }; - 4B8CC11F135BFDF900B3E49F /* b2TimeOfImpact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC11E135BFDF900B3E49F /* b2TimeOfImpact.cpp */; }; - 4B8CC122135BFDF900B3E49F /* b2CircleShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC121135BFDF900B3E49F /* b2CircleShape.cpp */; }; - 4B8CC125135BFDF900B3E49F /* b2PolygonShape.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC124135BFDF900B3E49F /* b2PolygonShape.cpp */; }; - 4B8CC129135BFDF900B3E49F /* b2BlockAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC128135BFDF900B3E49F /* b2BlockAllocator.cpp */; }; - 4B8CC12C135BFDF900B3E49F /* b2Math.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC12B135BFDF900B3E49F /* b2Math.cpp */; }; - 4B8CC12F135BFDF900B3E49F /* b2Settings.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC12E135BFDF900B3E49F /* b2Settings.cpp */; }; - 4B8CC132135BFDF900B3E49F /* b2StackAllocator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC131135BFDF900B3E49F /* b2StackAllocator.cpp */; }; - 4B8CC135135BFDF900B3E49F /* b2Body.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC134135BFDF900B3E49F /* b2Body.cpp */; }; - 4B8CC138135BFDF900B3E49F /* b2ContactManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC137135BFDF900B3E49F /* b2ContactManager.cpp */; }; - 4B8CC13B135BFDF900B3E49F /* b2Fixture.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC13A135BFDF900B3E49F /* b2Fixture.cpp */; }; - 4B8CC13E135BFDF900B3E49F /* b2Island.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC13D135BFDF900B3E49F /* b2Island.cpp */; }; - 4B8CC142135BFDF900B3E49F /* b2World.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC141135BFDF900B3E49F /* b2World.cpp */; }; - 4B8CC145135BFDF900B3E49F /* b2WorldCallbacks.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC144135BFDF900B3E49F /* b2WorldCallbacks.cpp */; }; - 4B8CC148135BFDF900B3E49F /* b2CircleContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC147135BFDF900B3E49F /* b2CircleContact.cpp */; }; - 4B8CC14B135BFDF900B3E49F /* b2Contact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC14A135BFDF900B3E49F /* b2Contact.cpp */; }; - 4B8CC14E135BFDF900B3E49F /* b2ContactSolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC14D135BFDF900B3E49F /* b2ContactSolver.cpp */; }; - 4B8CC152135BFDF900B3E49F /* b2PolygonAndCircleContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC151135BFDF900B3E49F /* b2PolygonAndCircleContact.cpp */; }; - 4B8CC155135BFDF900B3E49F /* b2PolygonContact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC154135BFDF900B3E49F /* b2PolygonContact.cpp */; }; - 4B8CC158135BFDF900B3E49F /* b2TOISolver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC157135BFDF900B3E49F /* b2TOISolver.cpp */; }; - 4B8CC15B135BFDF900B3E49F /* b2DistanceJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC15A135BFDF900B3E49F /* b2DistanceJoint.cpp */; }; - 4B8CC15E135BFDF900B3E49F /* b2FrictionJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC15D135BFDF900B3E49F /* b2FrictionJoint.cpp */; }; - 4B8CC161135BFDF900B3E49F /* b2GearJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC160135BFDF900B3E49F /* b2GearJoint.cpp */; }; - 4B8CC164135BFDF900B3E49F /* b2Joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC163135BFDF900B3E49F /* b2Joint.cpp */; }; - 4B8CC167135BFDF900B3E49F /* b2LineJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC166135BFDF900B3E49F /* b2LineJoint.cpp */; }; - 4B8CC16A135BFDF900B3E49F /* b2MouseJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC169135BFDF900B3E49F /* b2MouseJoint.cpp */; }; - 4B8CC16D135BFDF900B3E49F /* b2PrismaticJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC16C135BFDF900B3E49F /* b2PrismaticJoint.cpp */; }; - 4B8CC170135BFDF900B3E49F /* b2PulleyJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC16F135BFDF900B3E49F /* b2PulleyJoint.cpp */; }; - 4B8CC173135BFDF900B3E49F /* b2RevoluteJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC172135BFDF900B3E49F /* b2RevoluteJoint.cpp */; }; - 4B8CC176135BFDF900B3E49F /* b2WeldJoint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC175135BFDF900B3E49F /* b2WeldJoint.cpp */; }; - 4B8CC17B135BFDF900B3E49F /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC17A135BFDF900B3E49F /* main.m */; }; - 4B8CC17E135BFDF900B3E49F /* AppDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC17D135BFDF900B3E49F /* AppDelegate.mm */; }; - 4B8CC184135BFDF900B3E49F /* HelloWorldLayer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC183135BFDF900B3E49F /* HelloWorldLayer.mm */; }; - 4B8CC18A135BFDF900B3E49F /* blocks.png in Resources */ = {isa = PBXBuildFile; fileRef = 4B8CC189135BFDF900B3E49F /* blocks.png */; }; - 4B8CC1C3135BFEDE00B3E49F /* LocklessRingBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC19C135BFEDE00B3E49F /* LocklessRingBuffer.cpp */; }; - 4B8CC1C4135BFEDE00B3E49F /* BasicPrimitives.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC1A1135BFEDE00B3E49F /* BasicPrimitives.mm */; }; - 4B8CC1C5135BFEDE00B3E49F /* OpenGLServices.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC1A3135BFEDE00B3E49F /* OpenGLServices.mm */; }; - 4B8CC1C6135BFEDE00B3E49F /* RenderTarget.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC1A5135BFEDE00B3E49F /* RenderTarget.mm */; }; - 4B8CC1C7135BFEDE00B3E49F /* MemoryBitset.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC1B1135BFEDE00B3E49F /* MemoryBitset.cpp */; }; - 4B8CC1C8135BFEDE00B3E49F /* MemoryHeap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC1B3135BFEDE00B3E49F /* MemoryHeap.cpp */; }; - 4B8CC1C9135BFEDE00B3E49F /* GLView.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC1B8135BFEDE00B3E49F /* GLView.m */; }; - 4B8CC1CA135BFEDE00B3E49F /* LittlestAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC1BA135BFEDE00B3E49F /* LittlestAppDelegate.m */; }; - 4B8CC1CB135BFEDE00B3E49F /* LittlestViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B8CC1BC135BFEDE00B3E49F /* LittlestViewController.m */; }; - 4BE72E371367CCB600E8F668 /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 4BE72E361367CCB600E8F668 /* RootViewController.m */; }; - 4BE72E3D1367CE5100E8F668 /* GLES-Render.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4BE72E3C1367CE5100E8F668 /* GLES-Render.mm */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 4B8CBFB0135BFDF600B3E49F /* Littlest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Littlest.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 4B8CBFB4135BFDF600B3E49F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - 4B8CBFB6135BFDF600B3E49F /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; - 4B8CBFB8135BFDF600B3E49F /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; - 4B8CBFBA135BFDF600B3E49F /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - 4B8CBFBC135BFDF600B3E49F /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - 4B8CBFBE135BFDF600B3E49F /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - 4B8CBFC0135BFDF600B3E49F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - 4B8CBFC2135BFDF600B3E49F /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - 4B8CBFC6135BFDF600B3E49F /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = Resources/Default.png; sourceTree = ""; }; - 4B8CBFC8135BFDF600B3E49F /* fps_images.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = fps_images.png; path = Resources/fps_images.png; sourceTree = ""; }; - 4B8CBFCA135BFDF600B3E49F /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-72.png"; path = "Resources/Icon-72.png"; sourceTree = ""; }; - 4B8CBFCC135BFDF600B3E49F /* Icon-Small-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-Small-50.png"; path = "Resources/Icon-Small-50.png"; sourceTree = ""; }; - 4B8CBFCE135BFDF600B3E49F /* Icon-Small.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-Small.png"; path = "Resources/Icon-Small.png"; sourceTree = ""; }; - 4B8CBFD0135BFDF600B3E49F /* Icon-Small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-Small@2x.png"; path = "Resources/Icon-Small@2x.png"; sourceTree = ""; }; - 4B8CBFD2135BFDF600B3E49F /* Icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Icon.png; path = Resources/Icon.png; sourceTree = ""; }; - 4B8CBFD4135BFDF600B3E49F /* Icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon@2x.png"; path = "Resources/Icon@2x.png"; sourceTree = ""; }; - 4B8CBFD6135BFDF600B3E49F /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Resources/Info.plist; sourceTree = ""; }; - 4B8CBFD7135BFDF600B3E49F /* iTunesArtwork */ = {isa = PBXFileReference; lastKnownFileType = file; name = iTunesArtwork; path = Resources/iTunesArtwork; sourceTree = ""; }; - 4B8CBFDA135BFDF600B3E49F /* CCAction.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCAction.h; path = libs/cocos2d/CCAction.h; sourceTree = ""; }; - 4B8CBFDB135BFDF600B3E49F /* CCAction.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCAction.m; path = libs/cocos2d/CCAction.m; sourceTree = ""; }; - 4B8CBFDD135BFDF600B3E49F /* CCActionCamera.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCActionCamera.h; path = libs/cocos2d/CCActionCamera.h; sourceTree = ""; }; - 4B8CBFDE135BFDF600B3E49F /* CCActionCamera.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCActionCamera.m; path = libs/cocos2d/CCActionCamera.m; sourceTree = ""; }; - 4B8CBFE0135BFDF600B3E49F /* CCActionEase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCActionEase.h; path = libs/cocos2d/CCActionEase.h; sourceTree = ""; }; - 4B8CBFE1135BFDF600B3E49F /* CCActionEase.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCActionEase.m; path = libs/cocos2d/CCActionEase.m; sourceTree = ""; }; - 4B8CBFE3135BFDF600B3E49F /* CCActionGrid.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCActionGrid.h; path = libs/cocos2d/CCActionGrid.h; sourceTree = ""; }; - 4B8CBFE4135BFDF600B3E49F /* CCActionGrid.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCActionGrid.m; path = libs/cocos2d/CCActionGrid.m; sourceTree = ""; }; - 4B8CBFE6135BFDF600B3E49F /* CCActionGrid3D.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCActionGrid3D.h; path = libs/cocos2d/CCActionGrid3D.h; sourceTree = ""; }; - 4B8CBFE7135BFDF600B3E49F /* CCActionGrid3D.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCActionGrid3D.m; path = libs/cocos2d/CCActionGrid3D.m; sourceTree = ""; }; - 4B8CBFE9135BFDF600B3E49F /* CCActionInstant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCActionInstant.h; path = libs/cocos2d/CCActionInstant.h; sourceTree = ""; }; - 4B8CBFEA135BFDF600B3E49F /* CCActionInstant.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCActionInstant.m; path = libs/cocos2d/CCActionInstant.m; sourceTree = ""; }; - 4B8CBFEC135BFDF600B3E49F /* CCActionInterval.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCActionInterval.h; path = libs/cocos2d/CCActionInterval.h; sourceTree = ""; }; - 4B8CBFED135BFDF600B3E49F /* CCActionInterval.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCActionInterval.m; path = libs/cocos2d/CCActionInterval.m; sourceTree = ""; }; - 4B8CBFEF135BFDF600B3E49F /* CCActionManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCActionManager.h; path = libs/cocos2d/CCActionManager.h; sourceTree = ""; }; - 4B8CBFF0135BFDF600B3E49F /* CCActionManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCActionManager.m; path = libs/cocos2d/CCActionManager.m; sourceTree = ""; }; - 4B8CBFF2135BFDF600B3E49F /* CCActionPageTurn3D.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCActionPageTurn3D.h; path = libs/cocos2d/CCActionPageTurn3D.h; sourceTree = ""; }; - 4B8CBFF3135BFDF600B3E49F /* CCActionPageTurn3D.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCActionPageTurn3D.m; path = libs/cocos2d/CCActionPageTurn3D.m; sourceTree = ""; }; - 4B8CBFF5135BFDF600B3E49F /* CCActionProgressTimer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCActionProgressTimer.h; path = libs/cocos2d/CCActionProgressTimer.h; sourceTree = ""; }; - 4B8CBFF6135BFDF600B3E49F /* CCActionProgressTimer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCActionProgressTimer.m; path = libs/cocos2d/CCActionProgressTimer.m; sourceTree = ""; }; - 4B8CBFF8135BFDF600B3E49F /* CCActionTiledGrid.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCActionTiledGrid.h; path = libs/cocos2d/CCActionTiledGrid.h; sourceTree = ""; }; - 4B8CBFF9135BFDF600B3E49F /* CCActionTiledGrid.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCActionTiledGrid.m; path = libs/cocos2d/CCActionTiledGrid.m; sourceTree = ""; }; - 4B8CBFFB135BFDF600B3E49F /* CCActionTween.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCActionTween.h; path = libs/cocos2d/CCActionTween.h; sourceTree = ""; }; - 4B8CBFFC135BFDF700B3E49F /* CCActionTween.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCActionTween.m; path = libs/cocos2d/CCActionTween.m; sourceTree = ""; }; - 4B8CBFFE135BFDF700B3E49F /* CCAnimation.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCAnimation.h; path = libs/cocos2d/CCAnimation.h; sourceTree = ""; }; - 4B8CBFFF135BFDF700B3E49F /* CCAnimation.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCAnimation.m; path = libs/cocos2d/CCAnimation.m; sourceTree = ""; }; - 4B8CC001135BFDF700B3E49F /* CCAnimationCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCAnimationCache.h; path = libs/cocos2d/CCAnimationCache.h; sourceTree = ""; }; - 4B8CC002135BFDF700B3E49F /* CCAnimationCache.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCAnimationCache.m; path = libs/cocos2d/CCAnimationCache.m; sourceTree = ""; }; - 4B8CC004135BFDF700B3E49F /* CCAtlasNode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCAtlasNode.h; path = libs/cocos2d/CCAtlasNode.h; sourceTree = ""; }; - 4B8CC005135BFDF700B3E49F /* CCAtlasNode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCAtlasNode.m; path = libs/cocos2d/CCAtlasNode.m; sourceTree = ""; }; - 4B8CC007135BFDF700B3E49F /* CCBlockSupport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCBlockSupport.h; path = libs/cocos2d/CCBlockSupport.h; sourceTree = ""; }; - 4B8CC008135BFDF700B3E49F /* CCBlockSupport.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCBlockSupport.m; path = libs/cocos2d/CCBlockSupport.m; sourceTree = ""; }; - 4B8CC00A135BFDF700B3E49F /* CCCamera.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCCamera.h; path = libs/cocos2d/CCCamera.h; sourceTree = ""; }; - 4B8CC00B135BFDF700B3E49F /* CCCamera.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCCamera.m; path = libs/cocos2d/CCCamera.m; sourceTree = ""; }; - 4B8CC00D135BFDF700B3E49F /* ccConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ccConfig.h; path = libs/cocos2d/ccConfig.h; sourceTree = ""; }; - 4B8CC00E135BFDF700B3E49F /* CCConfiguration.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCConfiguration.h; path = libs/cocos2d/CCConfiguration.h; sourceTree = ""; }; - 4B8CC00F135BFDF700B3E49F /* CCConfiguration.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCConfiguration.m; path = libs/cocos2d/CCConfiguration.m; sourceTree = ""; }; - 4B8CC011135BFDF700B3E49F /* CCDirector.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCDirector.h; path = libs/cocos2d/CCDirector.h; sourceTree = ""; }; - 4B8CC012135BFDF700B3E49F /* CCDirector.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCDirector.m; path = libs/cocos2d/CCDirector.m; sourceTree = ""; }; - 4B8CC014135BFDF700B3E49F /* CCDrawingPrimitives.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCDrawingPrimitives.h; path = libs/cocos2d/CCDrawingPrimitives.h; sourceTree = ""; }; - 4B8CC015135BFDF700B3E49F /* CCDrawingPrimitives.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCDrawingPrimitives.m; path = libs/cocos2d/CCDrawingPrimitives.m; sourceTree = ""; }; - 4B8CC017135BFDF700B3E49F /* CCGrabber.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCGrabber.h; path = libs/cocos2d/CCGrabber.h; sourceTree = ""; }; - 4B8CC018135BFDF700B3E49F /* CCGrabber.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCGrabber.m; path = libs/cocos2d/CCGrabber.m; sourceTree = ""; }; - 4B8CC01A135BFDF700B3E49F /* CCGrid.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCGrid.h; path = libs/cocos2d/CCGrid.h; sourceTree = ""; }; - 4B8CC01B135BFDF700B3E49F /* CCGrid.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCGrid.m; path = libs/cocos2d/CCGrid.m; sourceTree = ""; }; - 4B8CC01D135BFDF700B3E49F /* CCLabelAtlas.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCLabelAtlas.h; path = libs/cocos2d/CCLabelAtlas.h; sourceTree = ""; }; - 4B8CC01E135BFDF700B3E49F /* CCLabelAtlas.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCLabelAtlas.m; path = libs/cocos2d/CCLabelAtlas.m; sourceTree = ""; }; - 4B8CC020135BFDF700B3E49F /* CCLabelBMFont.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCLabelBMFont.h; path = libs/cocos2d/CCLabelBMFont.h; sourceTree = ""; }; - 4B8CC021135BFDF700B3E49F /* CCLabelBMFont.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCLabelBMFont.m; path = libs/cocos2d/CCLabelBMFont.m; sourceTree = ""; }; - 4B8CC023135BFDF700B3E49F /* CCLabelTTF.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCLabelTTF.h; path = libs/cocos2d/CCLabelTTF.h; sourceTree = ""; }; - 4B8CC024135BFDF700B3E49F /* CCLabelTTF.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCLabelTTF.m; path = libs/cocos2d/CCLabelTTF.m; sourceTree = ""; }; - 4B8CC026135BFDF700B3E49F /* CCLayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCLayer.h; path = libs/cocos2d/CCLayer.h; sourceTree = ""; }; - 4B8CC027135BFDF700B3E49F /* CCLayer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCLayer.m; path = libs/cocos2d/CCLayer.m; sourceTree = ""; }; - 4B8CC029135BFDF700B3E49F /* ccMacros.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ccMacros.h; path = libs/cocos2d/ccMacros.h; sourceTree = ""; }; - 4B8CC02A135BFDF700B3E49F /* CCMenu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCMenu.h; path = libs/cocos2d/CCMenu.h; sourceTree = ""; }; - 4B8CC02B135BFDF700B3E49F /* CCMenu.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCMenu.m; path = libs/cocos2d/CCMenu.m; sourceTree = ""; }; - 4B8CC02D135BFDF700B3E49F /* CCMenuItem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCMenuItem.h; path = libs/cocos2d/CCMenuItem.h; sourceTree = ""; }; - 4B8CC02E135BFDF700B3E49F /* CCMenuItem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCMenuItem.m; path = libs/cocos2d/CCMenuItem.m; sourceTree = ""; }; - 4B8CC030135BFDF700B3E49F /* CCMotionStreak.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCMotionStreak.h; path = libs/cocos2d/CCMotionStreak.h; sourceTree = ""; }; - 4B8CC031135BFDF700B3E49F /* CCMotionStreak.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCMotionStreak.m; path = libs/cocos2d/CCMotionStreak.m; sourceTree = ""; }; - 4B8CC033135BFDF700B3E49F /* CCNode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCNode.h; path = libs/cocos2d/CCNode.h; sourceTree = ""; }; - 4B8CC034135BFDF700B3E49F /* CCNode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCNode.m; path = libs/cocos2d/CCNode.m; sourceTree = ""; }; - 4B8CC036135BFDF700B3E49F /* CCParallaxNode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCParallaxNode.h; path = libs/cocos2d/CCParallaxNode.h; sourceTree = ""; }; - 4B8CC037135BFDF700B3E49F /* CCParallaxNode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCParallaxNode.m; path = libs/cocos2d/CCParallaxNode.m; sourceTree = ""; }; - 4B8CC039135BFDF700B3E49F /* CCParticleExamples.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCParticleExamples.h; path = libs/cocos2d/CCParticleExamples.h; sourceTree = ""; }; - 4B8CC03A135BFDF700B3E49F /* CCParticleExamples.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCParticleExamples.m; path = libs/cocos2d/CCParticleExamples.m; sourceTree = ""; }; - 4B8CC03C135BFDF700B3E49F /* CCParticleSystem.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCParticleSystem.h; path = libs/cocos2d/CCParticleSystem.h; sourceTree = ""; }; - 4B8CC03D135BFDF700B3E49F /* CCParticleSystem.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCParticleSystem.m; path = libs/cocos2d/CCParticleSystem.m; sourceTree = ""; }; - 4B8CC03F135BFDF700B3E49F /* CCParticleSystemPoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCParticleSystemPoint.h; path = libs/cocos2d/CCParticleSystemPoint.h; sourceTree = ""; }; - 4B8CC040135BFDF700B3E49F /* CCParticleSystemPoint.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCParticleSystemPoint.m; path = libs/cocos2d/CCParticleSystemPoint.m; sourceTree = ""; }; - 4B8CC042135BFDF700B3E49F /* CCParticleSystemQuad.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCParticleSystemQuad.h; path = libs/cocos2d/CCParticleSystemQuad.h; sourceTree = ""; }; - 4B8CC043135BFDF700B3E49F /* CCParticleSystemQuad.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCParticleSystemQuad.m; path = libs/cocos2d/CCParticleSystemQuad.m; sourceTree = ""; }; - 4B8CC045135BFDF700B3E49F /* CCProgressTimer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCProgressTimer.h; path = libs/cocos2d/CCProgressTimer.h; sourceTree = ""; }; - 4B8CC046135BFDF700B3E49F /* CCProgressTimer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCProgressTimer.m; path = libs/cocos2d/CCProgressTimer.m; sourceTree = ""; }; - 4B8CC048135BFDF700B3E49F /* CCProtocols.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCProtocols.h; path = libs/cocos2d/CCProtocols.h; sourceTree = ""; }; - 4B8CC049135BFDF700B3E49F /* CCRenderTexture.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCRenderTexture.h; path = libs/cocos2d/CCRenderTexture.h; sourceTree = ""; }; - 4B8CC04A135BFDF700B3E49F /* CCRenderTexture.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCRenderTexture.m; path = libs/cocos2d/CCRenderTexture.m; sourceTree = ""; }; - 4B8CC04C135BFDF700B3E49F /* CCRibbon.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCRibbon.h; path = libs/cocos2d/CCRibbon.h; sourceTree = ""; }; - 4B8CC04D135BFDF700B3E49F /* CCRibbon.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCRibbon.m; path = libs/cocos2d/CCRibbon.m; sourceTree = ""; }; - 4B8CC04F135BFDF700B3E49F /* CCScene.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCScene.h; path = libs/cocos2d/CCScene.h; sourceTree = ""; }; - 4B8CC050135BFDF700B3E49F /* CCScene.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCScene.m; path = libs/cocos2d/CCScene.m; sourceTree = ""; }; - 4B8CC052135BFDF700B3E49F /* CCScheduler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCScheduler.h; path = libs/cocos2d/CCScheduler.h; sourceTree = ""; }; - 4B8CC053135BFDF700B3E49F /* CCScheduler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCScheduler.m; path = libs/cocos2d/CCScheduler.m; sourceTree = ""; }; - 4B8CC055135BFDF700B3E49F /* CCSprite.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCSprite.h; path = libs/cocos2d/CCSprite.h; sourceTree = ""; }; - 4B8CC056135BFDF700B3E49F /* CCSprite.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCSprite.m; path = libs/cocos2d/CCSprite.m; sourceTree = ""; }; - 4B8CC058135BFDF700B3E49F /* CCSpriteBatchNode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCSpriteBatchNode.h; path = libs/cocos2d/CCSpriteBatchNode.h; sourceTree = ""; }; - 4B8CC059135BFDF700B3E49F /* CCSpriteBatchNode.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCSpriteBatchNode.m; path = libs/cocos2d/CCSpriteBatchNode.m; sourceTree = ""; }; - 4B8CC05B135BFDF700B3E49F /* CCSpriteFrame.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCSpriteFrame.h; path = libs/cocos2d/CCSpriteFrame.h; sourceTree = ""; }; - 4B8CC05C135BFDF700B3E49F /* CCSpriteFrame.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCSpriteFrame.m; path = libs/cocos2d/CCSpriteFrame.m; sourceTree = ""; }; - 4B8CC05E135BFDF700B3E49F /* CCSpriteFrameCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCSpriteFrameCache.h; path = libs/cocos2d/CCSpriteFrameCache.h; sourceTree = ""; }; - 4B8CC05F135BFDF700B3E49F /* CCSpriteFrameCache.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCSpriteFrameCache.m; path = libs/cocos2d/CCSpriteFrameCache.m; sourceTree = ""; }; - 4B8CC061135BFDF700B3E49F /* CCTexture2D.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCTexture2D.h; path = libs/cocos2d/CCTexture2D.h; sourceTree = ""; }; - 4B8CC062135BFDF700B3E49F /* CCTexture2D.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCTexture2D.m; path = libs/cocos2d/CCTexture2D.m; sourceTree = ""; }; - 4B8CC064135BFDF700B3E49F /* CCTextureAtlas.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCTextureAtlas.h; path = libs/cocos2d/CCTextureAtlas.h; sourceTree = ""; }; - 4B8CC065135BFDF700B3E49F /* CCTextureAtlas.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCTextureAtlas.m; path = libs/cocos2d/CCTextureAtlas.m; sourceTree = ""; }; - 4B8CC067135BFDF700B3E49F /* CCTextureCache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCTextureCache.h; path = libs/cocos2d/CCTextureCache.h; sourceTree = ""; }; - 4B8CC068135BFDF700B3E49F /* CCTextureCache.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCTextureCache.m; path = libs/cocos2d/CCTextureCache.m; sourceTree = ""; }; - 4B8CC06A135BFDF700B3E49F /* CCTexturePVR.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCTexturePVR.h; path = libs/cocos2d/CCTexturePVR.h; sourceTree = ""; }; - 4B8CC06B135BFDF700B3E49F /* CCTexturePVR.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCTexturePVR.m; path = libs/cocos2d/CCTexturePVR.m; sourceTree = ""; }; - 4B8CC06D135BFDF700B3E49F /* CCTileMapAtlas.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCTileMapAtlas.h; path = libs/cocos2d/CCTileMapAtlas.h; sourceTree = ""; }; - 4B8CC06E135BFDF700B3E49F /* CCTileMapAtlas.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCTileMapAtlas.m; path = libs/cocos2d/CCTileMapAtlas.m; sourceTree = ""; }; - 4B8CC070135BFDF700B3E49F /* CCTMXLayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCTMXLayer.h; path = libs/cocos2d/CCTMXLayer.h; sourceTree = ""; }; - 4B8CC071135BFDF700B3E49F /* CCTMXLayer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCTMXLayer.m; path = libs/cocos2d/CCTMXLayer.m; sourceTree = ""; }; - 4B8CC073135BFDF700B3E49F /* CCTMXObjectGroup.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCTMXObjectGroup.h; path = libs/cocos2d/CCTMXObjectGroup.h; sourceTree = ""; }; - 4B8CC074135BFDF700B3E49F /* CCTMXObjectGroup.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCTMXObjectGroup.m; path = libs/cocos2d/CCTMXObjectGroup.m; sourceTree = ""; }; - 4B8CC076135BFDF700B3E49F /* CCTMXTiledMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCTMXTiledMap.h; path = libs/cocos2d/CCTMXTiledMap.h; sourceTree = ""; }; - 4B8CC077135BFDF700B3E49F /* CCTMXTiledMap.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCTMXTiledMap.m; path = libs/cocos2d/CCTMXTiledMap.m; sourceTree = ""; }; - 4B8CC079135BFDF700B3E49F /* CCTMXXMLParser.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCTMXXMLParser.h; path = libs/cocos2d/CCTMXXMLParser.h; sourceTree = ""; }; - 4B8CC07A135BFDF700B3E49F /* CCTMXXMLParser.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCTMXXMLParser.m; path = libs/cocos2d/CCTMXXMLParser.m; sourceTree = ""; }; - 4B8CC07C135BFDF700B3E49F /* CCTransition.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCTransition.h; path = libs/cocos2d/CCTransition.h; sourceTree = ""; }; - 4B8CC07D135BFDF700B3E49F /* CCTransition.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCTransition.m; path = libs/cocos2d/CCTransition.m; sourceTree = ""; }; - 4B8CC07F135BFDF700B3E49F /* CCTransitionPageTurn.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCTransitionPageTurn.h; path = libs/cocos2d/CCTransitionPageTurn.h; sourceTree = ""; }; - 4B8CC080135BFDF700B3E49F /* CCTransitionPageTurn.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCTransitionPageTurn.m; path = libs/cocos2d/CCTransitionPageTurn.m; sourceTree = ""; }; - 4B8CC082135BFDF700B3E49F /* CCTransitionRadial.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCTransitionRadial.h; path = libs/cocos2d/CCTransitionRadial.h; sourceTree = ""; }; - 4B8CC083135BFDF700B3E49F /* CCTransitionRadial.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCTransitionRadial.m; path = libs/cocos2d/CCTransitionRadial.m; sourceTree = ""; }; - 4B8CC085135BFDF800B3E49F /* ccTypes.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ccTypes.h; path = libs/cocos2d/ccTypes.h; sourceTree = ""; }; - 4B8CC086135BFDF800B3E49F /* cocos2d.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = cocos2d.h; path = libs/cocos2d/cocos2d.h; sourceTree = ""; }; - 4B8CC087135BFDF800B3E49F /* cocos2d.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = cocos2d.m; path = libs/cocos2d/cocos2d.m; sourceTree = ""; }; - 4B8CC089135BFDF800B3E49F /* CCGL.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCGL.h; path = libs/cocos2d/Platforms/CCGL.h; sourceTree = ""; }; - 4B8CC08A135BFDF800B3E49F /* CCNS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCNS.h; path = libs/cocos2d/Platforms/CCNS.h; sourceTree = ""; }; - 4B8CC08B135BFDF800B3E49F /* CCDirectorIOS.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCDirectorIOS.h; path = libs/cocos2d/Platforms/iOS/CCDirectorIOS.h; sourceTree = ""; }; - 4B8CC08C135BFDF800B3E49F /* CCDirectorIOS.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCDirectorIOS.m; path = libs/cocos2d/Platforms/iOS/CCDirectorIOS.m; sourceTree = ""; }; - 4B8CC08E135BFDF800B3E49F /* CCTouchDelegateProtocol.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCTouchDelegateProtocol.h; path = libs/cocos2d/Platforms/iOS/CCTouchDelegateProtocol.h; sourceTree = ""; }; - 4B8CC08F135BFDF800B3E49F /* CCTouchDispatcher.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCTouchDispatcher.h; path = libs/cocos2d/Platforms/iOS/CCTouchDispatcher.h; sourceTree = ""; }; - 4B8CC090135BFDF800B3E49F /* CCTouchDispatcher.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCTouchDispatcher.m; path = libs/cocos2d/Platforms/iOS/CCTouchDispatcher.m; sourceTree = ""; }; - 4B8CC092135BFDF800B3E49F /* CCTouchHandler.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCTouchHandler.h; path = libs/cocos2d/Platforms/iOS/CCTouchHandler.h; sourceTree = ""; }; - 4B8CC093135BFDF800B3E49F /* CCTouchHandler.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCTouchHandler.m; path = libs/cocos2d/Platforms/iOS/CCTouchHandler.m; sourceTree = ""; }; - 4B8CC095135BFDF800B3E49F /* EAGLView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = EAGLView.h; path = libs/cocos2d/Platforms/iOS/EAGLView.h; sourceTree = ""; }; - 4B8CC096135BFDF800B3E49F /* EAGLView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = EAGLView.m; path = libs/cocos2d/Platforms/iOS/EAGLView.m; sourceTree = ""; }; - 4B8CC098135BFDF800B3E49F /* ES1Renderer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ES1Renderer.h; path = libs/cocos2d/Platforms/iOS/ES1Renderer.h; sourceTree = ""; }; - 4B8CC099135BFDF800B3E49F /* ES1Renderer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = ES1Renderer.m; path = libs/cocos2d/Platforms/iOS/ES1Renderer.m; sourceTree = ""; }; - 4B8CC09B135BFDF800B3E49F /* ESRenderer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ESRenderer.h; path = libs/cocos2d/Platforms/iOS/ESRenderer.h; sourceTree = ""; }; - 4B8CC09C135BFDF800B3E49F /* glu.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = glu.c; path = libs/cocos2d/Platforms/iOS/glu.c; sourceTree = ""; }; - 4B8CC09E135BFDF800B3E49F /* glu.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = glu.h; path = libs/cocos2d/Platforms/iOS/glu.h; sourceTree = ""; }; - 4B8CC09F135BFDF800B3E49F /* CCDirectorMac.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCDirectorMac.h; path = libs/cocos2d/Platforms/Mac/CCDirectorMac.h; sourceTree = ""; }; - 4B8CC0A0135BFDF800B3E49F /* CCDirectorMac.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCDirectorMac.m; path = libs/cocos2d/Platforms/Mac/CCDirectorMac.m; sourceTree = ""; }; - 4B8CC0A2135BFDF800B3E49F /* CCEventDispatcher.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCEventDispatcher.h; path = libs/cocos2d/Platforms/Mac/CCEventDispatcher.h; sourceTree = ""; }; - 4B8CC0A3135BFDF800B3E49F /* CCEventDispatcher.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCEventDispatcher.m; path = libs/cocos2d/Platforms/Mac/CCEventDispatcher.m; sourceTree = ""; }; - 4B8CC0A5135BFDF800B3E49F /* MacGLView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MacGLView.h; path = libs/cocos2d/Platforms/Mac/MacGLView.h; sourceTree = ""; }; - 4B8CC0A6135BFDF800B3E49F /* MacGLView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MacGLView.m; path = libs/cocos2d/Platforms/Mac/MacGLView.m; sourceTree = ""; }; - 4B8CC0A8135BFDF800B3E49F /* MacWindow.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = MacWindow.h; path = libs/cocos2d/Platforms/Mac/MacWindow.h; sourceTree = ""; }; - 4B8CC0A9135BFDF800B3E49F /* MacWindow.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = MacWindow.m; path = libs/cocos2d/Platforms/Mac/MacWindow.m; sourceTree = ""; }; - 4B8CC0AB135BFDF800B3E49F /* base64.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = base64.c; path = libs/cocos2d/Support/base64.c; sourceTree = ""; }; - 4B8CC0AD135BFDF800B3E49F /* base64.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = base64.h; path = libs/cocos2d/Support/base64.h; sourceTree = ""; }; - 4B8CC0AE135BFDF800B3E49F /* CCArray.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCArray.h; path = libs/cocos2d/Support/CCArray.h; sourceTree = ""; }; - 4B8CC0AF135BFDF800B3E49F /* CCArray.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCArray.m; path = libs/cocos2d/Support/CCArray.m; sourceTree = ""; }; - 4B8CC0B1135BFDF800B3E49F /* ccCArray.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ccCArray.h; path = libs/cocos2d/Support/ccCArray.h; sourceTree = ""; }; - 4B8CC0B2135BFDF800B3E49F /* CCFileUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCFileUtils.h; path = libs/cocos2d/Support/CCFileUtils.h; sourceTree = ""; }; - 4B8CC0B3135BFDF800B3E49F /* CCFileUtils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCFileUtils.m; path = libs/cocos2d/Support/CCFileUtils.m; sourceTree = ""; }; - 4B8CC0B5135BFDF800B3E49F /* CCProfiling.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CCProfiling.h; path = libs/cocos2d/Support/CCProfiling.h; sourceTree = ""; }; - 4B8CC0B6135BFDF800B3E49F /* CCProfiling.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CCProfiling.m; path = libs/cocos2d/Support/CCProfiling.m; sourceTree = ""; }; - 4B8CC0B8135BFDF800B3E49F /* ccUtils.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = ccUtils.c; path = libs/cocos2d/Support/ccUtils.c; sourceTree = ""; }; - 4B8CC0BA135BFDF800B3E49F /* ccUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ccUtils.h; path = libs/cocos2d/Support/ccUtils.h; sourceTree = ""; }; - 4B8CC0BB135BFDF800B3E49F /* CGPointExtension.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CGPointExtension.h; path = libs/cocos2d/Support/CGPointExtension.h; sourceTree = ""; }; - 4B8CC0BC135BFDF800B3E49F /* CGPointExtension.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CGPointExtension.m; path = libs/cocos2d/Support/CGPointExtension.m; sourceTree = ""; }; - 4B8CC0BE135BFDF800B3E49F /* OpenGL_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = OpenGL_Internal.h; path = libs/cocos2d/Support/OpenGL_Internal.h; sourceTree = ""; }; - 4B8CC0BF135BFDF800B3E49F /* TGAlib.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TGAlib.h; path = libs/cocos2d/Support/TGAlib.h; sourceTree = ""; }; - 4B8CC0C0135BFDF800B3E49F /* TGAlib.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TGAlib.m; path = libs/cocos2d/Support/TGAlib.m; sourceTree = ""; }; - 4B8CC0C2135BFDF800B3E49F /* TransformUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = TransformUtils.h; path = libs/cocos2d/Support/TransformUtils.h; sourceTree = ""; }; - 4B8CC0C3135BFDF800B3E49F /* TransformUtils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = TransformUtils.m; path = libs/cocos2d/Support/TransformUtils.m; sourceTree = ""; }; - 4B8CC0C5135BFDF800B3E49F /* uthash.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = uthash.h; path = libs/cocos2d/Support/uthash.h; sourceTree = ""; }; - 4B8CC0C6135BFDF800B3E49F /* utlist.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = utlist.h; path = libs/cocos2d/Support/utlist.h; sourceTree = ""; }; - 4B8CC0C7135BFDF800B3E49F /* ZipUtils.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ZipUtils.h; path = libs/cocos2d/Support/ZipUtils.h; sourceTree = ""; }; - 4B8CC0C8135BFDF800B3E49F /* ZipUtils.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = ZipUtils.m; path = libs/cocos2d/Support/ZipUtils.m; sourceTree = ""; }; - 4B8CC0CB135BFDF800B3E49F /* CDAudioManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CDAudioManager.h; path = libs/CocosDenshion/CDAudioManager.h; sourceTree = ""; }; - 4B8CC0CC135BFDF800B3E49F /* CDAudioManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CDAudioManager.m; path = libs/CocosDenshion/CDAudioManager.m; sourceTree = ""; }; - 4B8CC0CE135BFDF800B3E49F /* CDConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CDConfig.h; path = libs/CocosDenshion/CDConfig.h; sourceTree = ""; }; - 4B8CC0CF135BFDF800B3E49F /* CDOpenALSupport.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CDOpenALSupport.h; path = libs/CocosDenshion/CDOpenALSupport.h; sourceTree = ""; }; - 4B8CC0D0135BFDF800B3E49F /* CDOpenALSupport.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CDOpenALSupport.m; path = libs/CocosDenshion/CDOpenALSupport.m; sourceTree = ""; }; - 4B8CC0D2135BFDF800B3E49F /* CocosDenshion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CocosDenshion.h; path = libs/CocosDenshion/CocosDenshion.h; sourceTree = ""; }; - 4B8CC0D3135BFDF800B3E49F /* CocosDenshion.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CocosDenshion.m; path = libs/CocosDenshion/CocosDenshion.m; sourceTree = ""; }; - 4B8CC0D5135BFDF800B3E49F /* SimpleAudioEngine.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = SimpleAudioEngine.h; path = libs/CocosDenshion/SimpleAudioEngine.h; sourceTree = ""; }; - 4B8CC0D6135BFDF800B3E49F /* SimpleAudioEngine.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = SimpleAudioEngine.m; path = libs/CocosDenshion/SimpleAudioEngine.m; sourceTree = ""; }; - 4B8CC0D9135BFDF800B3E49F /* CLScoreServerPost.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CLScoreServerPost.h; path = libs/cocoslive/CLScoreServerPost.h; sourceTree = ""; }; - 4B8CC0DA135BFDF800B3E49F /* CLScoreServerPost.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CLScoreServerPost.m; path = libs/cocoslive/CLScoreServerPost.m; sourceTree = ""; }; - 4B8CC0DC135BFDF800B3E49F /* CLScoreServerRequest.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CLScoreServerRequest.h; path = libs/cocoslive/CLScoreServerRequest.h; sourceTree = ""; }; - 4B8CC0DD135BFDF800B3E49F /* CLScoreServerRequest.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CLScoreServerRequest.m; path = libs/cocoslive/CLScoreServerRequest.m; sourceTree = ""; }; - 4B8CC0DF135BFDF800B3E49F /* cocoslive.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = cocoslive.h; path = libs/cocoslive/cocoslive.h; sourceTree = ""; }; - 4B8CC0E0135BFDF800B3E49F /* cocoslive.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = cocoslive.m; path = libs/cocoslive/cocoslive.m; sourceTree = ""; }; - 4B8CC0E3135BFDF800B3E49F /* FontLabel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FontLabel.h; path = libs/FontLabel/FontLabel.h; sourceTree = ""; }; - 4B8CC0E4135BFDF800B3E49F /* FontLabel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = FontLabel.m; path = libs/FontLabel/FontLabel.m; sourceTree = ""; }; - 4B8CC0E6135BFDF800B3E49F /* FontLabelStringDrawing.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FontLabelStringDrawing.h; path = libs/FontLabel/FontLabelStringDrawing.h; sourceTree = ""; }; - 4B8CC0E7135BFDF800B3E49F /* FontLabelStringDrawing.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = FontLabelStringDrawing.m; path = libs/FontLabel/FontLabelStringDrawing.m; sourceTree = ""; }; - 4B8CC0E9135BFDF800B3E49F /* FontManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = FontManager.h; path = libs/FontLabel/FontManager.h; sourceTree = ""; }; - 4B8CC0EA135BFDF800B3E49F /* FontManager.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = FontManager.m; path = libs/FontLabel/FontManager.m; sourceTree = ""; }; - 4B8CC0EC135BFDF800B3E49F /* ZAttributedString.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ZAttributedString.h; path = libs/FontLabel/ZAttributedString.h; sourceTree = ""; }; - 4B8CC0ED135BFDF800B3E49F /* ZAttributedString.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = ZAttributedString.m; path = libs/FontLabel/ZAttributedString.m; sourceTree = ""; }; - 4B8CC0EF135BFDF800B3E49F /* ZAttributedStringPrivate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ZAttributedStringPrivate.h; path = libs/FontLabel/ZAttributedStringPrivate.h; sourceTree = ""; }; - 4B8CC0F0135BFDF800B3E49F /* ZFont.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = ZFont.h; path = libs/FontLabel/ZFont.h; sourceTree = ""; }; - 4B8CC0F1135BFDF800B3E49F /* ZFont.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = ZFont.m; path = libs/FontLabel/ZFont.m; sourceTree = ""; }; - 4B8CC0F4135BFDF800B3E49F /* CDataScanner.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CDataScanner.h; path = libs/TouchJSON/CDataScanner.h; sourceTree = ""; }; - 4B8CC0F5135BFDF800B3E49F /* CDataScanner.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CDataScanner.m; path = libs/TouchJSON/CDataScanner.m; sourceTree = ""; }; - 4B8CC0F7135BFDF800B3E49F /* CDataScanner_Extensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CDataScanner_Extensions.h; path = libs/TouchJSON/Extensions/CDataScanner_Extensions.h; sourceTree = ""; }; - 4B8CC0F8135BFDF800B3E49F /* CDataScanner_Extensions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CDataScanner_Extensions.m; path = libs/TouchJSON/Extensions/CDataScanner_Extensions.m; sourceTree = ""; }; - 4B8CC0FA135BFDF800B3E49F /* NSCharacterSet_Extensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NSCharacterSet_Extensions.h; path = libs/TouchJSON/Extensions/NSCharacterSet_Extensions.h; sourceTree = ""; }; - 4B8CC0FB135BFDF800B3E49F /* NSCharacterSet_Extensions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = NSCharacterSet_Extensions.m; path = libs/TouchJSON/Extensions/NSCharacterSet_Extensions.m; sourceTree = ""; }; - 4B8CC0FD135BFDF800B3E49F /* NSDictionary_JSONExtensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NSDictionary_JSONExtensions.h; path = libs/TouchJSON/Extensions/NSDictionary_JSONExtensions.h; sourceTree = ""; }; - 4B8CC0FE135BFDF800B3E49F /* NSDictionary_JSONExtensions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = NSDictionary_JSONExtensions.m; path = libs/TouchJSON/Extensions/NSDictionary_JSONExtensions.m; sourceTree = ""; }; - 4B8CC100135BFDF800B3E49F /* NSScanner_Extensions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = NSScanner_Extensions.h; path = libs/TouchJSON/Extensions/NSScanner_Extensions.h; sourceTree = ""; }; - 4B8CC101135BFDF800B3E49F /* NSScanner_Extensions.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = NSScanner_Extensions.m; path = libs/TouchJSON/Extensions/NSScanner_Extensions.m; sourceTree = ""; }; - 4B8CC103135BFDF800B3E49F /* CJSONDeserializer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CJSONDeserializer.h; path = libs/TouchJSON/JSON/CJSONDeserializer.h; sourceTree = ""; }; - 4B8CC104135BFDF800B3E49F /* CJSONDeserializer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CJSONDeserializer.m; path = libs/TouchJSON/JSON/CJSONDeserializer.m; sourceTree = ""; }; - 4B8CC106135BFDF800B3E49F /* CJSONScanner.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CJSONScanner.h; path = libs/TouchJSON/JSON/CJSONScanner.h; sourceTree = ""; }; - 4B8CC107135BFDF800B3E49F /* CJSONScanner.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CJSONScanner.m; path = libs/TouchJSON/JSON/CJSONScanner.m; sourceTree = ""; }; - 4B8CC109135BFDF800B3E49F /* CJSONSerializer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = CJSONSerializer.h; path = libs/TouchJSON/JSON/CJSONSerializer.h; sourceTree = ""; }; - 4B8CC10A135BFDF800B3E49F /* CJSONSerializer.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = CJSONSerializer.m; path = libs/TouchJSON/JSON/CJSONSerializer.m; sourceTree = ""; }; - 4B8CC10D135BFDF800B3E49F /* Box2D.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = Box2D.h; path = libs/Box2D/Box2D.h; sourceTree = ""; }; - 4B8CC10E135BFDF800B3E49F /* b2BroadPhase.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2BroadPhase.cpp; path = libs/Box2D/Collision/b2BroadPhase.cpp; sourceTree = ""; }; - 4B8CC110135BFDF800B3E49F /* b2BroadPhase.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2BroadPhase.h; path = libs/Box2D/Collision/b2BroadPhase.h; sourceTree = ""; }; - 4B8CC111135BFDF800B3E49F /* b2CollideCircle.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2CollideCircle.cpp; path = libs/Box2D/Collision/b2CollideCircle.cpp; sourceTree = ""; }; - 4B8CC113135BFDF900B3E49F /* b2CollidePolygon.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2CollidePolygon.cpp; path = libs/Box2D/Collision/b2CollidePolygon.cpp; sourceTree = ""; }; - 4B8CC115135BFDF900B3E49F /* b2Collision.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2Collision.cpp; path = libs/Box2D/Collision/b2Collision.cpp; sourceTree = ""; }; - 4B8CC117135BFDF900B3E49F /* b2Collision.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2Collision.h; path = libs/Box2D/Collision/b2Collision.h; sourceTree = ""; }; - 4B8CC118135BFDF900B3E49F /* b2Distance.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2Distance.cpp; path = libs/Box2D/Collision/b2Distance.cpp; sourceTree = ""; }; - 4B8CC11A135BFDF900B3E49F /* b2Distance.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2Distance.h; path = libs/Box2D/Collision/b2Distance.h; sourceTree = ""; }; - 4B8CC11B135BFDF900B3E49F /* b2DynamicTree.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2DynamicTree.cpp; path = libs/Box2D/Collision/b2DynamicTree.cpp; sourceTree = ""; }; - 4B8CC11D135BFDF900B3E49F /* b2DynamicTree.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2DynamicTree.h; path = libs/Box2D/Collision/b2DynamicTree.h; sourceTree = ""; }; - 4B8CC11E135BFDF900B3E49F /* b2TimeOfImpact.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2TimeOfImpact.cpp; path = libs/Box2D/Collision/b2TimeOfImpact.cpp; sourceTree = ""; }; - 4B8CC120135BFDF900B3E49F /* b2TimeOfImpact.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2TimeOfImpact.h; path = libs/Box2D/Collision/b2TimeOfImpact.h; sourceTree = ""; }; - 4B8CC121135BFDF900B3E49F /* b2CircleShape.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2CircleShape.cpp; path = libs/Box2D/Collision/Shapes/b2CircleShape.cpp; sourceTree = ""; }; - 4B8CC123135BFDF900B3E49F /* b2CircleShape.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2CircleShape.h; path = libs/Box2D/Collision/Shapes/b2CircleShape.h; sourceTree = ""; }; - 4B8CC124135BFDF900B3E49F /* b2PolygonShape.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2PolygonShape.cpp; path = libs/Box2D/Collision/Shapes/b2PolygonShape.cpp; sourceTree = ""; }; - 4B8CC126135BFDF900B3E49F /* b2PolygonShape.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2PolygonShape.h; path = libs/Box2D/Collision/Shapes/b2PolygonShape.h; sourceTree = ""; }; - 4B8CC127135BFDF900B3E49F /* b2Shape.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2Shape.h; path = libs/Box2D/Collision/Shapes/b2Shape.h; sourceTree = ""; }; - 4B8CC128135BFDF900B3E49F /* b2BlockAllocator.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2BlockAllocator.cpp; path = libs/Box2D/Common/b2BlockAllocator.cpp; sourceTree = ""; }; - 4B8CC12A135BFDF900B3E49F /* b2BlockAllocator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2BlockAllocator.h; path = libs/Box2D/Common/b2BlockAllocator.h; sourceTree = ""; }; - 4B8CC12B135BFDF900B3E49F /* b2Math.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2Math.cpp; path = libs/Box2D/Common/b2Math.cpp; sourceTree = ""; }; - 4B8CC12D135BFDF900B3E49F /* b2Math.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2Math.h; path = libs/Box2D/Common/b2Math.h; sourceTree = ""; }; - 4B8CC12E135BFDF900B3E49F /* b2Settings.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2Settings.cpp; path = libs/Box2D/Common/b2Settings.cpp; sourceTree = ""; }; - 4B8CC130135BFDF900B3E49F /* b2Settings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2Settings.h; path = libs/Box2D/Common/b2Settings.h; sourceTree = ""; }; - 4B8CC131135BFDF900B3E49F /* b2StackAllocator.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2StackAllocator.cpp; path = libs/Box2D/Common/b2StackAllocator.cpp; sourceTree = ""; }; - 4B8CC133135BFDF900B3E49F /* b2StackAllocator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2StackAllocator.h; path = libs/Box2D/Common/b2StackAllocator.h; sourceTree = ""; }; - 4B8CC134135BFDF900B3E49F /* b2Body.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2Body.cpp; path = libs/Box2D/Dynamics/b2Body.cpp; sourceTree = ""; }; - 4B8CC136135BFDF900B3E49F /* b2Body.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2Body.h; path = libs/Box2D/Dynamics/b2Body.h; sourceTree = ""; }; - 4B8CC137135BFDF900B3E49F /* b2ContactManager.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2ContactManager.cpp; path = libs/Box2D/Dynamics/b2ContactManager.cpp; sourceTree = ""; }; - 4B8CC139135BFDF900B3E49F /* b2ContactManager.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2ContactManager.h; path = libs/Box2D/Dynamics/b2ContactManager.h; sourceTree = ""; }; - 4B8CC13A135BFDF900B3E49F /* b2Fixture.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2Fixture.cpp; path = libs/Box2D/Dynamics/b2Fixture.cpp; sourceTree = ""; }; - 4B8CC13C135BFDF900B3E49F /* b2Fixture.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2Fixture.h; path = libs/Box2D/Dynamics/b2Fixture.h; sourceTree = ""; }; - 4B8CC13D135BFDF900B3E49F /* b2Island.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2Island.cpp; path = libs/Box2D/Dynamics/b2Island.cpp; sourceTree = ""; }; - 4B8CC13F135BFDF900B3E49F /* b2Island.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2Island.h; path = libs/Box2D/Dynamics/b2Island.h; sourceTree = ""; }; - 4B8CC140135BFDF900B3E49F /* b2TimeStep.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2TimeStep.h; path = libs/Box2D/Dynamics/b2TimeStep.h; sourceTree = ""; }; - 4B8CC141135BFDF900B3E49F /* b2World.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2World.cpp; path = libs/Box2D/Dynamics/b2World.cpp; sourceTree = ""; }; - 4B8CC143135BFDF900B3E49F /* b2World.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2World.h; path = libs/Box2D/Dynamics/b2World.h; sourceTree = ""; }; - 4B8CC144135BFDF900B3E49F /* b2WorldCallbacks.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2WorldCallbacks.cpp; path = libs/Box2D/Dynamics/b2WorldCallbacks.cpp; sourceTree = ""; }; - 4B8CC146135BFDF900B3E49F /* b2WorldCallbacks.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2WorldCallbacks.h; path = libs/Box2D/Dynamics/b2WorldCallbacks.h; sourceTree = ""; }; - 4B8CC147135BFDF900B3E49F /* b2CircleContact.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2CircleContact.cpp; path = libs/Box2D/Dynamics/Contacts/b2CircleContact.cpp; sourceTree = ""; }; - 4B8CC149135BFDF900B3E49F /* b2CircleContact.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2CircleContact.h; path = libs/Box2D/Dynamics/Contacts/b2CircleContact.h; sourceTree = ""; }; - 4B8CC14A135BFDF900B3E49F /* b2Contact.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2Contact.cpp; path = libs/Box2D/Dynamics/Contacts/b2Contact.cpp; sourceTree = ""; }; - 4B8CC14C135BFDF900B3E49F /* b2Contact.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2Contact.h; path = libs/Box2D/Dynamics/Contacts/b2Contact.h; sourceTree = ""; }; - 4B8CC14D135BFDF900B3E49F /* b2ContactSolver.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2ContactSolver.cpp; path = libs/Box2D/Dynamics/Contacts/b2ContactSolver.cpp; sourceTree = ""; }; - 4B8CC14F135BFDF900B3E49F /* b2ContactSolver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2ContactSolver.h; path = libs/Box2D/Dynamics/Contacts/b2ContactSolver.h; sourceTree = ""; }; - 4B8CC150135BFDF900B3E49F /* b2NullContact.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2NullContact.h; path = libs/Box2D/Dynamics/Contacts/b2NullContact.h; sourceTree = ""; }; - 4B8CC151135BFDF900B3E49F /* b2PolygonAndCircleContact.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2PolygonAndCircleContact.cpp; path = libs/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.cpp; sourceTree = ""; }; - 4B8CC153135BFDF900B3E49F /* b2PolygonAndCircleContact.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2PolygonAndCircleContact.h; path = libs/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.h; sourceTree = ""; }; - 4B8CC154135BFDF900B3E49F /* b2PolygonContact.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2PolygonContact.cpp; path = libs/Box2D/Dynamics/Contacts/b2PolygonContact.cpp; sourceTree = ""; }; - 4B8CC156135BFDF900B3E49F /* b2PolygonContact.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2PolygonContact.h; path = libs/Box2D/Dynamics/Contacts/b2PolygonContact.h; sourceTree = ""; }; - 4B8CC157135BFDF900B3E49F /* b2TOISolver.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2TOISolver.cpp; path = libs/Box2D/Dynamics/Contacts/b2TOISolver.cpp; sourceTree = ""; }; - 4B8CC159135BFDF900B3E49F /* b2TOISolver.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2TOISolver.h; path = libs/Box2D/Dynamics/Contacts/b2TOISolver.h; sourceTree = ""; }; - 4B8CC15A135BFDF900B3E49F /* b2DistanceJoint.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2DistanceJoint.cpp; path = libs/Box2D/Dynamics/Joints/b2DistanceJoint.cpp; sourceTree = ""; }; - 4B8CC15C135BFDF900B3E49F /* b2DistanceJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2DistanceJoint.h; path = libs/Box2D/Dynamics/Joints/b2DistanceJoint.h; sourceTree = ""; }; - 4B8CC15D135BFDF900B3E49F /* b2FrictionJoint.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2FrictionJoint.cpp; path = libs/Box2D/Dynamics/Joints/b2FrictionJoint.cpp; sourceTree = ""; }; - 4B8CC15F135BFDF900B3E49F /* b2FrictionJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2FrictionJoint.h; path = libs/Box2D/Dynamics/Joints/b2FrictionJoint.h; sourceTree = ""; }; - 4B8CC160135BFDF900B3E49F /* b2GearJoint.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2GearJoint.cpp; path = libs/Box2D/Dynamics/Joints/b2GearJoint.cpp; sourceTree = ""; }; - 4B8CC162135BFDF900B3E49F /* b2GearJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2GearJoint.h; path = libs/Box2D/Dynamics/Joints/b2GearJoint.h; sourceTree = ""; }; - 4B8CC163135BFDF900B3E49F /* b2Joint.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2Joint.cpp; path = libs/Box2D/Dynamics/Joints/b2Joint.cpp; sourceTree = ""; }; - 4B8CC165135BFDF900B3E49F /* b2Joint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2Joint.h; path = libs/Box2D/Dynamics/Joints/b2Joint.h; sourceTree = ""; }; - 4B8CC166135BFDF900B3E49F /* b2LineJoint.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2LineJoint.cpp; path = libs/Box2D/Dynamics/Joints/b2LineJoint.cpp; sourceTree = ""; }; - 4B8CC168135BFDF900B3E49F /* b2LineJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2LineJoint.h; path = libs/Box2D/Dynamics/Joints/b2LineJoint.h; sourceTree = ""; }; - 4B8CC169135BFDF900B3E49F /* b2MouseJoint.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2MouseJoint.cpp; path = libs/Box2D/Dynamics/Joints/b2MouseJoint.cpp; sourceTree = ""; }; - 4B8CC16B135BFDF900B3E49F /* b2MouseJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2MouseJoint.h; path = libs/Box2D/Dynamics/Joints/b2MouseJoint.h; sourceTree = ""; }; - 4B8CC16C135BFDF900B3E49F /* b2PrismaticJoint.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2PrismaticJoint.cpp; path = libs/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp; sourceTree = ""; }; - 4B8CC16E135BFDF900B3E49F /* b2PrismaticJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2PrismaticJoint.h; path = libs/Box2D/Dynamics/Joints/b2PrismaticJoint.h; sourceTree = ""; }; - 4B8CC16F135BFDF900B3E49F /* b2PulleyJoint.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2PulleyJoint.cpp; path = libs/Box2D/Dynamics/Joints/b2PulleyJoint.cpp; sourceTree = ""; }; - 4B8CC171135BFDF900B3E49F /* b2PulleyJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2PulleyJoint.h; path = libs/Box2D/Dynamics/Joints/b2PulleyJoint.h; sourceTree = ""; }; - 4B8CC172135BFDF900B3E49F /* b2RevoluteJoint.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2RevoluteJoint.cpp; path = libs/Box2D/Dynamics/Joints/b2RevoluteJoint.cpp; sourceTree = ""; }; - 4B8CC174135BFDF900B3E49F /* b2RevoluteJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2RevoluteJoint.h; path = libs/Box2D/Dynamics/Joints/b2RevoluteJoint.h; sourceTree = ""; }; - 4B8CC175135BFDF900B3E49F /* b2WeldJoint.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = b2WeldJoint.cpp; path = libs/Box2D/Dynamics/Joints/b2WeldJoint.cpp; sourceTree = ""; }; - 4B8CC177135BFDF900B3E49F /* b2WeldJoint.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = b2WeldJoint.h; path = libs/Box2D/Dynamics/Joints/b2WeldJoint.h; sourceTree = ""; }; - 4B8CC179135BFDF900B3E49F /* Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; - 4B8CC17A135BFDF900B3E49F /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 4B8CC17C135BFDF900B3E49F /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - 4B8CC17D135BFDF900B3E49F /* AppDelegate.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = AppDelegate.mm; sourceTree = ""; }; - 4B8CC182135BFDF900B3E49F /* HelloWorldLayer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = HelloWorldLayer.h; sourceTree = ""; }; - 4B8CC183135BFDF900B3E49F /* HelloWorldLayer.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = HelloWorldLayer.mm; sourceTree = ""; }; - 4B8CC189135BFDF900B3E49F /* blocks.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = blocks.png; path = Resources/blocks.png; sourceTree = ""; }; - 4B8CC193135BFEDE00B3E49F /* Assert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Assert.h; sourceTree = ""; }; - 4B8CC194135BFEDE00B3E49F /* Base.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Base.h; sourceTree = ""; }; - 4B8CC195135BFEDE00B3E49F /* GlobalDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobalDefines.h; sourceTree = ""; }; - 4B8CC196135BFEDE00B3E49F /* GlobalInclude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobalInclude.h; sourceTree = ""; }; - 4B8CC197135BFEDE00B3E49F /* GlobalTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GlobalTypes.h; sourceTree = ""; }; - 4B8CC198135BFEDE00B3E49F /* Print.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Print.h; sourceTree = ""; }; - 4B8CC199135BFEDE00B3E49F /* Singleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Singleton.h; sourceTree = ""; }; - 4B8CC19B135BFEDE00B3E49F /* BitEncoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BitEncoder.h; sourceTree = ""; }; - 4B8CC19C135BFEDE00B3E49F /* LocklessRingBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LocklessRingBuffer.cpp; sourceTree = ""; }; - 4B8CC19D135BFEDE00B3E49F /* LocklessRingBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocklessRingBuffer.h; sourceTree = ""; }; - 4B8CC1A0135BFEDE00B3E49F /* BasicPrimitives.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BasicPrimitives.h; sourceTree = ""; }; - 4B8CC1A1135BFEDE00B3E49F /* BasicPrimitives.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = BasicPrimitives.mm; sourceTree = ""; }; - 4B8CC1A2135BFEDE00B3E49F /* OpenGLServices.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OpenGLServices.h; sourceTree = ""; }; - 4B8CC1A3135BFEDE00B3E49F /* OpenGLServices.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = OpenGLServices.mm; sourceTree = ""; }; - 4B8CC1A4135BFEDE00B3E49F /* RenderTarget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderTarget.h; sourceTree = ""; }; - 4B8CC1A5135BFEDE00B3E49F /* RenderTarget.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RenderTarget.mm; sourceTree = ""; }; - 4B8CC1A7135BFEDE00B3E49F /* DJB2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DJB2.h; sourceTree = ""; }; - 4B8CC1A9135BFEDE00B3E49F /* MathDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathDefines.h; sourceTree = ""; }; - 4B8CC1AA135BFEDE00B3E49F /* MathInclude.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathInclude.h; sourceTree = ""; }; - 4B8CC1AB135BFEDE00B3E49F /* MathOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathOperations.h; sourceTree = ""; }; - 4B8CC1AC135BFEDE00B3E49F /* MathTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MathTypes.h; sourceTree = ""; }; - 4B8CC1AD135BFEDE00B3E49F /* Matrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Matrix.h; sourceTree = ""; }; - 4B8CC1AE135BFEDE00B3E49F /* Quaternion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Quaternion.h; sourceTree = ""; }; - 4B8CC1AF135BFEDE00B3E49F /* Vector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Vector.h; sourceTree = ""; }; - 4B8CC1B1135BFEDE00B3E49F /* MemoryBitset.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryBitset.cpp; sourceTree = ""; }; - 4B8CC1B2135BFEDE00B3E49F /* MemoryBitset.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryBitset.h; sourceTree = ""; }; - 4B8CC1B3135BFEDE00B3E49F /* MemoryHeap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MemoryHeap.cpp; sourceTree = ""; }; - 4B8CC1B4135BFEDE00B3E49F /* MemoryHeap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryHeap.h; sourceTree = ""; }; - 4B8CC1B5135BFEDE00B3E49F /* MemoryLinear.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemoryLinear.h; sourceTree = ""; }; - 4B8CC1B7135BFEDE00B3E49F /* GLView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GLView.h; sourceTree = ""; }; - 4B8CC1B8135BFEDE00B3E49F /* GLView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GLView.m; sourceTree = ""; }; - 4B8CC1B9135BFEDE00B3E49F /* LittlestAppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LittlestAppDelegate.h; sourceTree = ""; }; - 4B8CC1BA135BFEDE00B3E49F /* LittlestAppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LittlestAppDelegate.m; sourceTree = ""; }; - 4B8CC1BB135BFEDE00B3E49F /* LittlestViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LittlestViewController.h; sourceTree = ""; }; - 4B8CC1BC135BFEDE00B3E49F /* LittlestViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LittlestViewController.m; sourceTree = ""; }; - 4B8CC1BE135BFEDE00B3E49F /* Atomic32Bit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Atomic32Bit.h; sourceTree = ""; }; - 4B8CC1BF135BFEDE00B3E49F /* MemorySync.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MemorySync.h; sourceTree = ""; }; - 4B8CC1C2135BFEDE00B3E49F /* Scene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scene.h; sourceTree = ""; }; - 4BE72E351367CCB600E8F668 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RootViewController.h; path = OS/RootViewController.h; sourceTree = ""; }; - 4BE72E361367CCB600E8F668 /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = RootViewController.m; path = OS/RootViewController.m; sourceTree = ""; }; - 4BE72E381367CD1400E8F668 /* GameConfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameConfig.h; path = OS/GameConfig.h; sourceTree = ""; }; - 4BE72E3B1367CE5100E8F668 /* GLES-Render.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "GLES-Render.h"; path = "Engine/Render/GLES-Render.h"; sourceTree = ""; }; - 4BE72E3C1367CE5100E8F668 /* GLES-Render.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = "GLES-Render.mm"; path = "Engine/Render/GLES-Render.mm"; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 4B8CBFAD135BFDF600B3E49F /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 4B8CBFB5135BFDF600B3E49F /* QuartzCore.framework in Frameworks */, - 4B8CBFB7135BFDF600B3E49F /* OpenGLES.framework in Frameworks */, - 4B8CBFB9135BFDF600B3E49F /* OpenAL.framework in Frameworks */, - 4B8CBFBB135BFDF600B3E49F /* AudioToolbox.framework in Frameworks */, - 4B8CBFBD135BFDF600B3E49F /* AVFoundation.framework in Frameworks */, - 4B8CBFBF135BFDF600B3E49F /* UIKit.framework in Frameworks */, - 4B8CBFC1135BFDF600B3E49F /* Foundation.framework in Frameworks */, - 4B8CBFC3135BFDF600B3E49F /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 4B8CBFA5135BFDF600B3E49F = { - isa = PBXGroup; - children = ( - 4B8CBFC4135BFDF600B3E49F /* Littlest */, - 4B8CBFB3135BFDF600B3E49F /* Frameworks */, - 4B8CBFC5135BFDF600B3E49F /* Resources */, - 4B8CC178135BFDF900B3E49F /* Supporting Files */, - 4B8CBFB1135BFDF600B3E49F /* Products */, - ); - sourceTree = ""; - }; - 4B8CBFB1135BFDF600B3E49F /* Products */ = { - isa = PBXGroup; - children = ( - 4B8CBFB0135BFDF600B3E49F /* Littlest.app */, - ); - name = Products; - sourceTree = ""; - }; - 4B8CBFB3135BFDF600B3E49F /* Frameworks */ = { - isa = PBXGroup; - children = ( - 4B8CBFB4135BFDF600B3E49F /* QuartzCore.framework */, - 4B8CBFB6135BFDF600B3E49F /* OpenGLES.framework */, - 4B8CBFB8135BFDF600B3E49F /* OpenAL.framework */, - 4B8CBFBA135BFDF600B3E49F /* AudioToolbox.framework */, - 4B8CBFBC135BFDF600B3E49F /* AVFoundation.framework */, - 4B8CBFBE135BFDF600B3E49F /* UIKit.framework */, - 4B8CBFC0135BFDF600B3E49F /* Foundation.framework */, - 4B8CBFC2135BFDF600B3E49F /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - 4B8CBFC4135BFDF600B3E49F /* Littlest */ = { - isa = PBXGroup; - children = ( - 4BE72E391367CE3000E8F668 /* Engine */, - 4BE72E341367CC9A00E8F668 /* OS */, - 4B8CC191135BFEDE00B3E49F /* Foundation */, - 4B8CC1C0135BFEDE00B3E49F /* Game */, - 4B8CC190135BFE3B00B3E49F /* libs */, - 4B8CC17C135BFDF900B3E49F /* AppDelegate.h */, - 4B8CC17D135BFDF900B3E49F /* AppDelegate.mm */, - 4B8CC182135BFDF900B3E49F /* HelloWorldLayer.h */, - 4B8CC183135BFDF900B3E49F /* HelloWorldLayer.mm */, - ); - path = Littlest; - sourceTree = ""; - }; - 4B8CBFC5135BFDF600B3E49F /* Resources */ = { - isa = PBXGroup; - children = ( - 4B8CBFC6135BFDF600B3E49F /* Default.png */, - 4B8CBFC8135BFDF600B3E49F /* fps_images.png */, - 4B8CBFCA135BFDF600B3E49F /* Icon-72.png */, - 4B8CBFCC135BFDF600B3E49F /* Icon-Small-50.png */, - 4B8CBFCE135BFDF600B3E49F /* Icon-Small.png */, - 4B8CBFD0135BFDF600B3E49F /* Icon-Small@2x.png */, - 4B8CBFD2135BFDF600B3E49F /* Icon.png */, - 4B8CBFD4135BFDF600B3E49F /* Icon@2x.png */, - 4B8CBFD6135BFDF600B3E49F /* Info.plist */, - 4B8CBFD7135BFDF600B3E49F /* iTunesArtwork */, - 4B8CC189135BFDF900B3E49F /* blocks.png */, - ); - name = Resources; - path = Littlest; - sourceTree = ""; - }; - 4B8CBFD9135BFDF600B3E49F /* cocos2d */ = { - isa = PBXGroup; - children = ( - 4B8CBFDA135BFDF600B3E49F /* CCAction.h */, - 4B8CBFDB135BFDF600B3E49F /* CCAction.m */, - 4B8CBFDD135BFDF600B3E49F /* CCActionCamera.h */, - 4B8CBFDE135BFDF600B3E49F /* CCActionCamera.m */, - 4B8CBFE0135BFDF600B3E49F /* CCActionEase.h */, - 4B8CBFE1135BFDF600B3E49F /* CCActionEase.m */, - 4B8CBFE3135BFDF600B3E49F /* CCActionGrid.h */, - 4B8CBFE4135BFDF600B3E49F /* CCActionGrid.m */, - 4B8CBFE6135BFDF600B3E49F /* CCActionGrid3D.h */, - 4B8CBFE7135BFDF600B3E49F /* CCActionGrid3D.m */, - 4B8CBFE9135BFDF600B3E49F /* CCActionInstant.h */, - 4B8CBFEA135BFDF600B3E49F /* CCActionInstant.m */, - 4B8CBFEC135BFDF600B3E49F /* CCActionInterval.h */, - 4B8CBFED135BFDF600B3E49F /* CCActionInterval.m */, - 4B8CBFEF135BFDF600B3E49F /* CCActionManager.h */, - 4B8CBFF0135BFDF600B3E49F /* CCActionManager.m */, - 4B8CBFF2135BFDF600B3E49F /* CCActionPageTurn3D.h */, - 4B8CBFF3135BFDF600B3E49F /* CCActionPageTurn3D.m */, - 4B8CBFF5135BFDF600B3E49F /* CCActionProgressTimer.h */, - 4B8CBFF6135BFDF600B3E49F /* CCActionProgressTimer.m */, - 4B8CBFF8135BFDF600B3E49F /* CCActionTiledGrid.h */, - 4B8CBFF9135BFDF600B3E49F /* CCActionTiledGrid.m */, - 4B8CBFFB135BFDF600B3E49F /* CCActionTween.h */, - 4B8CBFFC135BFDF700B3E49F /* CCActionTween.m */, - 4B8CBFFE135BFDF700B3E49F /* CCAnimation.h */, - 4B8CBFFF135BFDF700B3E49F /* CCAnimation.m */, - 4B8CC001135BFDF700B3E49F /* CCAnimationCache.h */, - 4B8CC002135BFDF700B3E49F /* CCAnimationCache.m */, - 4B8CC004135BFDF700B3E49F /* CCAtlasNode.h */, - 4B8CC005135BFDF700B3E49F /* CCAtlasNode.m */, - 4B8CC007135BFDF700B3E49F /* CCBlockSupport.h */, - 4B8CC008135BFDF700B3E49F /* CCBlockSupport.m */, - 4B8CC00A135BFDF700B3E49F /* CCCamera.h */, - 4B8CC00B135BFDF700B3E49F /* CCCamera.m */, - 4B8CC00D135BFDF700B3E49F /* ccConfig.h */, - 4B8CC00E135BFDF700B3E49F /* CCConfiguration.h */, - 4B8CC00F135BFDF700B3E49F /* CCConfiguration.m */, - 4B8CC011135BFDF700B3E49F /* CCDirector.h */, - 4B8CC012135BFDF700B3E49F /* CCDirector.m */, - 4B8CC014135BFDF700B3E49F /* CCDrawingPrimitives.h */, - 4B8CC015135BFDF700B3E49F /* CCDrawingPrimitives.m */, - 4B8CC017135BFDF700B3E49F /* CCGrabber.h */, - 4B8CC018135BFDF700B3E49F /* CCGrabber.m */, - 4B8CC01A135BFDF700B3E49F /* CCGrid.h */, - 4B8CC01B135BFDF700B3E49F /* CCGrid.m */, - 4B8CC01D135BFDF700B3E49F /* CCLabelAtlas.h */, - 4B8CC01E135BFDF700B3E49F /* CCLabelAtlas.m */, - 4B8CC020135BFDF700B3E49F /* CCLabelBMFont.h */, - 4B8CC021135BFDF700B3E49F /* CCLabelBMFont.m */, - 4B8CC023135BFDF700B3E49F /* CCLabelTTF.h */, - 4B8CC024135BFDF700B3E49F /* CCLabelTTF.m */, - 4B8CC026135BFDF700B3E49F /* CCLayer.h */, - 4B8CC027135BFDF700B3E49F /* CCLayer.m */, - 4B8CC029135BFDF700B3E49F /* ccMacros.h */, - 4B8CC02A135BFDF700B3E49F /* CCMenu.h */, - 4B8CC02B135BFDF700B3E49F /* CCMenu.m */, - 4B8CC02D135BFDF700B3E49F /* CCMenuItem.h */, - 4B8CC02E135BFDF700B3E49F /* CCMenuItem.m */, - 4B8CC030135BFDF700B3E49F /* CCMotionStreak.h */, - 4B8CC031135BFDF700B3E49F /* CCMotionStreak.m */, - 4B8CC033135BFDF700B3E49F /* CCNode.h */, - 4B8CC034135BFDF700B3E49F /* CCNode.m */, - 4B8CC036135BFDF700B3E49F /* CCParallaxNode.h */, - 4B8CC037135BFDF700B3E49F /* CCParallaxNode.m */, - 4B8CC039135BFDF700B3E49F /* CCParticleExamples.h */, - 4B8CC03A135BFDF700B3E49F /* CCParticleExamples.m */, - 4B8CC03C135BFDF700B3E49F /* CCParticleSystem.h */, - 4B8CC03D135BFDF700B3E49F /* CCParticleSystem.m */, - 4B8CC03F135BFDF700B3E49F /* CCParticleSystemPoint.h */, - 4B8CC040135BFDF700B3E49F /* CCParticleSystemPoint.m */, - 4B8CC042135BFDF700B3E49F /* CCParticleSystemQuad.h */, - 4B8CC043135BFDF700B3E49F /* CCParticleSystemQuad.m */, - 4B8CC045135BFDF700B3E49F /* CCProgressTimer.h */, - 4B8CC046135BFDF700B3E49F /* CCProgressTimer.m */, - 4B8CC048135BFDF700B3E49F /* CCProtocols.h */, - 4B8CC049135BFDF700B3E49F /* CCRenderTexture.h */, - 4B8CC04A135BFDF700B3E49F /* CCRenderTexture.m */, - 4B8CC04C135BFDF700B3E49F /* CCRibbon.h */, - 4B8CC04D135BFDF700B3E49F /* CCRibbon.m */, - 4B8CC04F135BFDF700B3E49F /* CCScene.h */, - 4B8CC050135BFDF700B3E49F /* CCScene.m */, - 4B8CC052135BFDF700B3E49F /* CCScheduler.h */, - 4B8CC053135BFDF700B3E49F /* CCScheduler.m */, - 4B8CC055135BFDF700B3E49F /* CCSprite.h */, - 4B8CC056135BFDF700B3E49F /* CCSprite.m */, - 4B8CC058135BFDF700B3E49F /* CCSpriteBatchNode.h */, - 4B8CC059135BFDF700B3E49F /* CCSpriteBatchNode.m */, - 4B8CC05B135BFDF700B3E49F /* CCSpriteFrame.h */, - 4B8CC05C135BFDF700B3E49F /* CCSpriteFrame.m */, - 4B8CC05E135BFDF700B3E49F /* CCSpriteFrameCache.h */, - 4B8CC05F135BFDF700B3E49F /* CCSpriteFrameCache.m */, - 4B8CC061135BFDF700B3E49F /* CCTexture2D.h */, - 4B8CC062135BFDF700B3E49F /* CCTexture2D.m */, - 4B8CC064135BFDF700B3E49F /* CCTextureAtlas.h */, - 4B8CC065135BFDF700B3E49F /* CCTextureAtlas.m */, - 4B8CC067135BFDF700B3E49F /* CCTextureCache.h */, - 4B8CC068135BFDF700B3E49F /* CCTextureCache.m */, - 4B8CC06A135BFDF700B3E49F /* CCTexturePVR.h */, - 4B8CC06B135BFDF700B3E49F /* CCTexturePVR.m */, - 4B8CC06D135BFDF700B3E49F /* CCTileMapAtlas.h */, - 4B8CC06E135BFDF700B3E49F /* CCTileMapAtlas.m */, - 4B8CC070135BFDF700B3E49F /* CCTMXLayer.h */, - 4B8CC071135BFDF700B3E49F /* CCTMXLayer.m */, - 4B8CC073135BFDF700B3E49F /* CCTMXObjectGroup.h */, - 4B8CC074135BFDF700B3E49F /* CCTMXObjectGroup.m */, - 4B8CC076135BFDF700B3E49F /* CCTMXTiledMap.h */, - 4B8CC077135BFDF700B3E49F /* CCTMXTiledMap.m */, - 4B8CC079135BFDF700B3E49F /* CCTMXXMLParser.h */, - 4B8CC07A135BFDF700B3E49F /* CCTMXXMLParser.m */, - 4B8CC07C135BFDF700B3E49F /* CCTransition.h */, - 4B8CC07D135BFDF700B3E49F /* CCTransition.m */, - 4B8CC07F135BFDF700B3E49F /* CCTransitionPageTurn.h */, - 4B8CC080135BFDF700B3E49F /* CCTransitionPageTurn.m */, - 4B8CC082135BFDF700B3E49F /* CCTransitionRadial.h */, - 4B8CC083135BFDF700B3E49F /* CCTransitionRadial.m */, - 4B8CC085135BFDF800B3E49F /* ccTypes.h */, - 4B8CC086135BFDF800B3E49F /* cocos2d.h */, - 4B8CC087135BFDF800B3E49F /* cocos2d.m */, - 4B8CC089135BFDF800B3E49F /* CCGL.h */, - 4B8CC08A135BFDF800B3E49F /* CCNS.h */, - 4B8CC08B135BFDF800B3E49F /* CCDirectorIOS.h */, - 4B8CC08C135BFDF800B3E49F /* CCDirectorIOS.m */, - 4B8CC08E135BFDF800B3E49F /* CCTouchDelegateProtocol.h */, - 4B8CC08F135BFDF800B3E49F /* CCTouchDispatcher.h */, - 4B8CC090135BFDF800B3E49F /* CCTouchDispatcher.m */, - 4B8CC092135BFDF800B3E49F /* CCTouchHandler.h */, - 4B8CC093135BFDF800B3E49F /* CCTouchHandler.m */, - 4B8CC095135BFDF800B3E49F /* EAGLView.h */, - 4B8CC096135BFDF800B3E49F /* EAGLView.m */, - 4B8CC098135BFDF800B3E49F /* ES1Renderer.h */, - 4B8CC099135BFDF800B3E49F /* ES1Renderer.m */, - 4B8CC09B135BFDF800B3E49F /* ESRenderer.h */, - 4B8CC09C135BFDF800B3E49F /* glu.c */, - 4B8CC09E135BFDF800B3E49F /* glu.h */, - 4B8CC09F135BFDF800B3E49F /* CCDirectorMac.h */, - 4B8CC0A0135BFDF800B3E49F /* CCDirectorMac.m */, - 4B8CC0A2135BFDF800B3E49F /* CCEventDispatcher.h */, - 4B8CC0A3135BFDF800B3E49F /* CCEventDispatcher.m */, - 4B8CC0A5135BFDF800B3E49F /* MacGLView.h */, - 4B8CC0A6135BFDF800B3E49F /* MacGLView.m */, - 4B8CC0A8135BFDF800B3E49F /* MacWindow.h */, - 4B8CC0A9135BFDF800B3E49F /* MacWindow.m */, - 4B8CC0AB135BFDF800B3E49F /* base64.c */, - 4B8CC0AD135BFDF800B3E49F /* base64.h */, - 4B8CC0AE135BFDF800B3E49F /* CCArray.h */, - 4B8CC0AF135BFDF800B3E49F /* CCArray.m */, - 4B8CC0B1135BFDF800B3E49F /* ccCArray.h */, - 4B8CC0B2135BFDF800B3E49F /* CCFileUtils.h */, - 4B8CC0B3135BFDF800B3E49F /* CCFileUtils.m */, - 4B8CC0B5135BFDF800B3E49F /* CCProfiling.h */, - 4B8CC0B6135BFDF800B3E49F /* CCProfiling.m */, - 4B8CC0B8135BFDF800B3E49F /* ccUtils.c */, - 4B8CC0BA135BFDF800B3E49F /* ccUtils.h */, - 4B8CC0BB135BFDF800B3E49F /* CGPointExtension.h */, - 4B8CC0BC135BFDF800B3E49F /* CGPointExtension.m */, - 4B8CC0BE135BFDF800B3E49F /* OpenGL_Internal.h */, - 4B8CC0BF135BFDF800B3E49F /* TGAlib.h */, - 4B8CC0C0135BFDF800B3E49F /* TGAlib.m */, - 4B8CC0C2135BFDF800B3E49F /* TransformUtils.h */, - 4B8CC0C3135BFDF800B3E49F /* TransformUtils.m */, - 4B8CC0C5135BFDF800B3E49F /* uthash.h */, - 4B8CC0C6135BFDF800B3E49F /* utlist.h */, - 4B8CC0C7135BFDF800B3E49F /* ZipUtils.h */, - 4B8CC0C8135BFDF800B3E49F /* ZipUtils.m */, - ); - name = cocos2d; - sourceTree = ""; - }; - 4B8CC0CA135BFDF800B3E49F /* CocosDenshion */ = { - isa = PBXGroup; - children = ( - 4B8CC0CB135BFDF800B3E49F /* CDAudioManager.h */, - 4B8CC0CC135BFDF800B3E49F /* CDAudioManager.m */, - 4B8CC0CE135BFDF800B3E49F /* CDConfig.h */, - 4B8CC0CF135BFDF800B3E49F /* CDOpenALSupport.h */, - 4B8CC0D0135BFDF800B3E49F /* CDOpenALSupport.m */, - 4B8CC0D2135BFDF800B3E49F /* CocosDenshion.h */, - 4B8CC0D3135BFDF800B3E49F /* CocosDenshion.m */, - 4B8CC0D5135BFDF800B3E49F /* SimpleAudioEngine.h */, - 4B8CC0D6135BFDF800B3E49F /* SimpleAudioEngine.m */, - ); - name = CocosDenshion; - sourceTree = ""; - }; - 4B8CC0D8135BFDF800B3E49F /* cocoslive */ = { - isa = PBXGroup; - children = ( - 4B8CC0D9135BFDF800B3E49F /* CLScoreServerPost.h */, - 4B8CC0DA135BFDF800B3E49F /* CLScoreServerPost.m */, - 4B8CC0DC135BFDF800B3E49F /* CLScoreServerRequest.h */, - 4B8CC0DD135BFDF800B3E49F /* CLScoreServerRequest.m */, - 4B8CC0DF135BFDF800B3E49F /* cocoslive.h */, - 4B8CC0E0135BFDF800B3E49F /* cocoslive.m */, - ); - name = cocoslive; - sourceTree = ""; - }; - 4B8CC0E2135BFDF800B3E49F /* FontLabel */ = { - isa = PBXGroup; - children = ( - 4B8CC0E3135BFDF800B3E49F /* FontLabel.h */, - 4B8CC0E4135BFDF800B3E49F /* FontLabel.m */, - 4B8CC0E6135BFDF800B3E49F /* FontLabelStringDrawing.h */, - 4B8CC0E7135BFDF800B3E49F /* FontLabelStringDrawing.m */, - 4B8CC0E9135BFDF800B3E49F /* FontManager.h */, - 4B8CC0EA135BFDF800B3E49F /* FontManager.m */, - 4B8CC0EC135BFDF800B3E49F /* ZAttributedString.h */, - 4B8CC0ED135BFDF800B3E49F /* ZAttributedString.m */, - 4B8CC0EF135BFDF800B3E49F /* ZAttributedStringPrivate.h */, - 4B8CC0F0135BFDF800B3E49F /* ZFont.h */, - 4B8CC0F1135BFDF800B3E49F /* ZFont.m */, - ); - name = FontLabel; - sourceTree = ""; - }; - 4B8CC0F3135BFDF800B3E49F /* TouchJSON */ = { - isa = PBXGroup; - children = ( - 4B8CC0F4135BFDF800B3E49F /* CDataScanner.h */, - 4B8CC0F5135BFDF800B3E49F /* CDataScanner.m */, - 4B8CC0F7135BFDF800B3E49F /* CDataScanner_Extensions.h */, - 4B8CC0F8135BFDF800B3E49F /* CDataScanner_Extensions.m */, - 4B8CC0FA135BFDF800B3E49F /* NSCharacterSet_Extensions.h */, - 4B8CC0FB135BFDF800B3E49F /* NSCharacterSet_Extensions.m */, - 4B8CC0FD135BFDF800B3E49F /* NSDictionary_JSONExtensions.h */, - 4B8CC0FE135BFDF800B3E49F /* NSDictionary_JSONExtensions.m */, - 4B8CC100135BFDF800B3E49F /* NSScanner_Extensions.h */, - 4B8CC101135BFDF800B3E49F /* NSScanner_Extensions.m */, - 4B8CC103135BFDF800B3E49F /* CJSONDeserializer.h */, - 4B8CC104135BFDF800B3E49F /* CJSONDeserializer.m */, - 4B8CC106135BFDF800B3E49F /* CJSONScanner.h */, - 4B8CC107135BFDF800B3E49F /* CJSONScanner.m */, - 4B8CC109135BFDF800B3E49F /* CJSONSerializer.h */, - 4B8CC10A135BFDF800B3E49F /* CJSONSerializer.m */, - ); - name = TouchJSON; - sourceTree = ""; - }; - 4B8CC10C135BFDF800B3E49F /* Box2D */ = { - isa = PBXGroup; - children = ( - 4B8CC10D135BFDF800B3E49F /* Box2D.h */, - 4B8CC10E135BFDF800B3E49F /* b2BroadPhase.cpp */, - 4B8CC110135BFDF800B3E49F /* b2BroadPhase.h */, - 4B8CC111135BFDF800B3E49F /* b2CollideCircle.cpp */, - 4B8CC113135BFDF900B3E49F /* b2CollidePolygon.cpp */, - 4B8CC115135BFDF900B3E49F /* b2Collision.cpp */, - 4B8CC117135BFDF900B3E49F /* b2Collision.h */, - 4B8CC118135BFDF900B3E49F /* b2Distance.cpp */, - 4B8CC11A135BFDF900B3E49F /* b2Distance.h */, - 4B8CC11B135BFDF900B3E49F /* b2DynamicTree.cpp */, - 4B8CC11D135BFDF900B3E49F /* b2DynamicTree.h */, - 4B8CC11E135BFDF900B3E49F /* b2TimeOfImpact.cpp */, - 4B8CC120135BFDF900B3E49F /* b2TimeOfImpact.h */, - 4B8CC121135BFDF900B3E49F /* b2CircleShape.cpp */, - 4B8CC123135BFDF900B3E49F /* b2CircleShape.h */, - 4B8CC124135BFDF900B3E49F /* b2PolygonShape.cpp */, - 4B8CC126135BFDF900B3E49F /* b2PolygonShape.h */, - 4B8CC127135BFDF900B3E49F /* b2Shape.h */, - 4B8CC128135BFDF900B3E49F /* b2BlockAllocator.cpp */, - 4B8CC12A135BFDF900B3E49F /* b2BlockAllocator.h */, - 4B8CC12B135BFDF900B3E49F /* b2Math.cpp */, - 4B8CC12D135BFDF900B3E49F /* b2Math.h */, - 4B8CC12E135BFDF900B3E49F /* b2Settings.cpp */, - 4B8CC130135BFDF900B3E49F /* b2Settings.h */, - 4B8CC131135BFDF900B3E49F /* b2StackAllocator.cpp */, - 4B8CC133135BFDF900B3E49F /* b2StackAllocator.h */, - 4B8CC134135BFDF900B3E49F /* b2Body.cpp */, - 4B8CC136135BFDF900B3E49F /* b2Body.h */, - 4B8CC137135BFDF900B3E49F /* b2ContactManager.cpp */, - 4B8CC139135BFDF900B3E49F /* b2ContactManager.h */, - 4B8CC13A135BFDF900B3E49F /* b2Fixture.cpp */, - 4B8CC13C135BFDF900B3E49F /* b2Fixture.h */, - 4B8CC13D135BFDF900B3E49F /* b2Island.cpp */, - 4B8CC13F135BFDF900B3E49F /* b2Island.h */, - 4B8CC140135BFDF900B3E49F /* b2TimeStep.h */, - 4B8CC141135BFDF900B3E49F /* b2World.cpp */, - 4B8CC143135BFDF900B3E49F /* b2World.h */, - 4B8CC144135BFDF900B3E49F /* b2WorldCallbacks.cpp */, - 4B8CC146135BFDF900B3E49F /* b2WorldCallbacks.h */, - 4B8CC147135BFDF900B3E49F /* b2CircleContact.cpp */, - 4B8CC149135BFDF900B3E49F /* b2CircleContact.h */, - 4B8CC14A135BFDF900B3E49F /* b2Contact.cpp */, - 4B8CC14C135BFDF900B3E49F /* b2Contact.h */, - 4B8CC14D135BFDF900B3E49F /* b2ContactSolver.cpp */, - 4B8CC14F135BFDF900B3E49F /* b2ContactSolver.h */, - 4B8CC150135BFDF900B3E49F /* b2NullContact.h */, - 4B8CC151135BFDF900B3E49F /* b2PolygonAndCircleContact.cpp */, - 4B8CC153135BFDF900B3E49F /* b2PolygonAndCircleContact.h */, - 4B8CC154135BFDF900B3E49F /* b2PolygonContact.cpp */, - 4B8CC156135BFDF900B3E49F /* b2PolygonContact.h */, - 4B8CC157135BFDF900B3E49F /* b2TOISolver.cpp */, - 4B8CC159135BFDF900B3E49F /* b2TOISolver.h */, - 4B8CC15A135BFDF900B3E49F /* b2DistanceJoint.cpp */, - 4B8CC15C135BFDF900B3E49F /* b2DistanceJoint.h */, - 4B8CC15D135BFDF900B3E49F /* b2FrictionJoint.cpp */, - 4B8CC15F135BFDF900B3E49F /* b2FrictionJoint.h */, - 4B8CC160135BFDF900B3E49F /* b2GearJoint.cpp */, - 4B8CC162135BFDF900B3E49F /* b2GearJoint.h */, - 4B8CC163135BFDF900B3E49F /* b2Joint.cpp */, - 4B8CC165135BFDF900B3E49F /* b2Joint.h */, - 4B8CC166135BFDF900B3E49F /* b2LineJoint.cpp */, - 4B8CC168135BFDF900B3E49F /* b2LineJoint.h */, - 4B8CC169135BFDF900B3E49F /* b2MouseJoint.cpp */, - 4B8CC16B135BFDF900B3E49F /* b2MouseJoint.h */, - 4B8CC16C135BFDF900B3E49F /* b2PrismaticJoint.cpp */, - 4B8CC16E135BFDF900B3E49F /* b2PrismaticJoint.h */, - 4B8CC16F135BFDF900B3E49F /* b2PulleyJoint.cpp */, - 4B8CC171135BFDF900B3E49F /* b2PulleyJoint.h */, - 4B8CC172135BFDF900B3E49F /* b2RevoluteJoint.cpp */, - 4B8CC174135BFDF900B3E49F /* b2RevoluteJoint.h */, - 4B8CC175135BFDF900B3E49F /* b2WeldJoint.cpp */, - 4B8CC177135BFDF900B3E49F /* b2WeldJoint.h */, - ); - name = Box2D; - sourceTree = ""; - }; - 4B8CC178135BFDF900B3E49F /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 4B8CC179135BFDF900B3E49F /* Prefix.pch */, - 4B8CC17A135BFDF900B3E49F /* main.m */, - ); - name = "Supporting Files"; - path = Littlest; - sourceTree = ""; - }; - 4B8CC190135BFE3B00B3E49F /* libs */ = { - isa = PBXGroup; - children = ( - 4B8CC10C135BFDF800B3E49F /* Box2D */, - 4B8CBFD9135BFDF600B3E49F /* cocos2d */, - 4B8CC0CA135BFDF800B3E49F /* CocosDenshion */, - 4B8CC0D8135BFDF800B3E49F /* cocoslive */, - 4B8CC0E2135BFDF800B3E49F /* FontLabel */, - 4B8CC0F3135BFDF800B3E49F /* TouchJSON */, - ); - name = libs; - sourceTree = ""; - }; - 4B8CC191135BFEDE00B3E49F /* Foundation */ = { - isa = PBXGroup; - children = ( - 4B8CC192135BFEDE00B3E49F /* Common */, - 4B8CC19A135BFEDE00B3E49F /* Containers */, - 4B8CC19E135BFEDE00B3E49F /* GraphicsServices */, - 4B8CC1A6135BFEDE00B3E49F /* Hash */, - 4B8CC1A8135BFEDE00B3E49F /* Math */, - 4B8CC1B0135BFEDE00B3E49F /* Memory */, - 4B8CC1B6135BFEDE00B3E49F /* OSInterface */, - 4B8CC1BD135BFEDE00B3E49F /* Synchronization */, - ); - path = Foundation; - sourceTree = ""; - }; - 4B8CC192135BFEDE00B3E49F /* Common */ = { - isa = PBXGroup; - children = ( - 4B8CC193135BFEDE00B3E49F /* Assert.h */, - 4B8CC194135BFEDE00B3E49F /* Base.h */, - 4B8CC195135BFEDE00B3E49F /* GlobalDefines.h */, - 4B8CC196135BFEDE00B3E49F /* GlobalInclude.h */, - 4B8CC197135BFEDE00B3E49F /* GlobalTypes.h */, - 4B8CC198135BFEDE00B3E49F /* Print.h */, - 4B8CC199135BFEDE00B3E49F /* Singleton.h */, - ); - path = Common; - sourceTree = ""; - }; - 4B8CC19A135BFEDE00B3E49F /* Containers */ = { - isa = PBXGroup; - children = ( - 4B8CC19B135BFEDE00B3E49F /* BitEncoder.h */, - 4B8CC19C135BFEDE00B3E49F /* LocklessRingBuffer.cpp */, - 4B8CC19D135BFEDE00B3E49F /* LocklessRingBuffer.h */, - ); - path = Containers; - sourceTree = ""; - }; - 4B8CC19E135BFEDE00B3E49F /* GraphicsServices */ = { - isa = PBXGroup; - children = ( - 4B8CC19F135BFEDE00B3E49F /* Geometry */, - 4B8CC1A2135BFEDE00B3E49F /* OpenGLServices.h */, - 4B8CC1A3135BFEDE00B3E49F /* OpenGLServices.mm */, - 4B8CC1A4135BFEDE00B3E49F /* RenderTarget.h */, - 4B8CC1A5135BFEDE00B3E49F /* RenderTarget.mm */, - ); - path = GraphicsServices; - sourceTree = ""; - }; - 4B8CC19F135BFEDE00B3E49F /* Geometry */ = { - isa = PBXGroup; - children = ( - 4B8CC1A0135BFEDE00B3E49F /* BasicPrimitives.h */, - 4B8CC1A1135BFEDE00B3E49F /* BasicPrimitives.mm */, - ); - path = Geometry; - sourceTree = ""; - }; - 4B8CC1A6135BFEDE00B3E49F /* Hash */ = { - isa = PBXGroup; - children = ( - 4B8CC1A7135BFEDE00B3E49F /* DJB2.h */, - ); - path = Hash; - sourceTree = ""; - }; - 4B8CC1A8135BFEDE00B3E49F /* Math */ = { - isa = PBXGroup; - children = ( - 4B8CC1A9135BFEDE00B3E49F /* MathDefines.h */, - 4B8CC1AA135BFEDE00B3E49F /* MathInclude.h */, - 4B8CC1AB135BFEDE00B3E49F /* MathOperations.h */, - 4B8CC1AC135BFEDE00B3E49F /* MathTypes.h */, - 4B8CC1AD135BFEDE00B3E49F /* Matrix.h */, - 4B8CC1AE135BFEDE00B3E49F /* Quaternion.h */, - 4B8CC1AF135BFEDE00B3E49F /* Vector.h */, - ); - path = Math; - sourceTree = ""; - }; - 4B8CC1B0135BFEDE00B3E49F /* Memory */ = { - isa = PBXGroup; - children = ( - 4B8CC1B1135BFEDE00B3E49F /* MemoryBitset.cpp */, - 4B8CC1B2135BFEDE00B3E49F /* MemoryBitset.h */, - 4B8CC1B3135BFEDE00B3E49F /* MemoryHeap.cpp */, - 4B8CC1B4135BFEDE00B3E49F /* MemoryHeap.h */, - 4B8CC1B5135BFEDE00B3E49F /* MemoryLinear.h */, - ); - path = Memory; - sourceTree = ""; - }; - 4B8CC1B6135BFEDE00B3E49F /* OSInterface */ = { - isa = PBXGroup; - children = ( - 4B8CC1B7135BFEDE00B3E49F /* GLView.h */, - 4B8CC1B8135BFEDE00B3E49F /* GLView.m */, - 4B8CC1B9135BFEDE00B3E49F /* LittlestAppDelegate.h */, - 4B8CC1BA135BFEDE00B3E49F /* LittlestAppDelegate.m */, - 4B8CC1BB135BFEDE00B3E49F /* LittlestViewController.h */, - 4B8CC1BC135BFEDE00B3E49F /* LittlestViewController.m */, - ); - path = OSInterface; - sourceTree = ""; - }; - 4B8CC1BD135BFEDE00B3E49F /* Synchronization */ = { - isa = PBXGroup; - children = ( - 4B8CC1BE135BFEDE00B3E49F /* Atomic32Bit.h */, - 4B8CC1BF135BFEDE00B3E49F /* MemorySync.h */, - ); - path = Synchronization; - sourceTree = ""; - }; - 4B8CC1C0135BFEDE00B3E49F /* Game */ = { - isa = PBXGroup; - children = ( - 4B8CC1C1135BFEDE00B3E49F /* Scene */, - ); - path = Game; - sourceTree = ""; - }; - 4B8CC1C1135BFEDE00B3E49F /* Scene */ = { - isa = PBXGroup; - children = ( - 4B8CC1C2135BFEDE00B3E49F /* Scene.h */, - ); - path = Scene; - sourceTree = ""; - }; - 4BE72E341367CC9A00E8F668 /* OS */ = { - isa = PBXGroup; - children = ( - 4BE72E381367CD1400E8F668 /* GameConfig.h */, - 4BE72E351367CCB600E8F668 /* RootViewController.h */, - 4BE72E361367CCB600E8F668 /* RootViewController.m */, - ); - name = OS; - sourceTree = ""; - }; - 4BE72E391367CE3000E8F668 /* Engine */ = { - isa = PBXGroup; - children = ( - 4BE72E3A1367CE3900E8F668 /* Render */, - ); - name = Engine; - sourceTree = ""; - }; - 4BE72E3A1367CE3900E8F668 /* Render */ = { - isa = PBXGroup; - children = ( - 4BE72E3B1367CE5100E8F668 /* GLES-Render.h */, - 4BE72E3C1367CE5100E8F668 /* GLES-Render.mm */, - ); - name = Render; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 4B8CBFAF135BFDF600B3E49F /* Littlest */ = { - isa = PBXNativeTarget; - buildConfigurationList = 4B8CC18D135BFDF900B3E49F /* Build configuration list for PBXNativeTarget "Littlest" */; - buildPhases = ( - 4B8CBFAC135BFDF600B3E49F /* Sources */, - 4B8CBFAD135BFDF600B3E49F /* Frameworks */, - 4B8CBFAE135BFDF600B3E49F /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Littlest; - productName = Littlest; - productReference = 4B8CBFB0135BFDF600B3E49F /* Littlest.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 4B8CBFA7135BFDF600B3E49F /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 4B8CBFAA135BFDF600B3E49F /* Build configuration list for PBXProject "Littlest" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 4B8CBFA5135BFDF600B3E49F; - productRefGroup = 4B8CBFB1135BFDF600B3E49F /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 4B8CBFAF135BFDF600B3E49F /* Littlest */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 4B8CBFAE135BFDF600B3E49F /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 4B8CBFC7135BFDF600B3E49F /* Default.png in Resources */, - 4B8CBFC9135BFDF600B3E49F /* fps_images.png in Resources */, - 4B8CBFCB135BFDF600B3E49F /* Icon-72.png in Resources */, - 4B8CBFCD135BFDF600B3E49F /* Icon-Small-50.png in Resources */, - 4B8CBFCF135BFDF600B3E49F /* Icon-Small.png in Resources */, - 4B8CBFD1135BFDF600B3E49F /* Icon-Small@2x.png in Resources */, - 4B8CBFD3135BFDF600B3E49F /* Icon.png in Resources */, - 4B8CBFD5135BFDF600B3E49F /* Icon@2x.png in Resources */, - 4B8CBFD8135BFDF600B3E49F /* iTunesArtwork in Resources */, - 4B8CC18A135BFDF900B3E49F /* blocks.png in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 4B8CBFAC135BFDF600B3E49F /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 4B8CBFDC135BFDF600B3E49F /* CCAction.m in Sources */, - 4B8CBFDF135BFDF600B3E49F /* CCActionCamera.m in Sources */, - 4B8CBFE2135BFDF600B3E49F /* CCActionEase.m in Sources */, - 4B8CBFE5135BFDF600B3E49F /* CCActionGrid.m in Sources */, - 4B8CBFE8135BFDF600B3E49F /* CCActionGrid3D.m in Sources */, - 4B8CBFEB135BFDF600B3E49F /* CCActionInstant.m in Sources */, - 4B8CBFEE135BFDF600B3E49F /* CCActionInterval.m in Sources */, - 4B8CBFF1135BFDF600B3E49F /* CCActionManager.m in Sources */, - 4B8CBFF4135BFDF600B3E49F /* CCActionPageTurn3D.m in Sources */, - 4B8CBFF7135BFDF600B3E49F /* CCActionProgressTimer.m in Sources */, - 4B8CBFFA135BFDF600B3E49F /* CCActionTiledGrid.m in Sources */, - 4B8CBFFD135BFDF700B3E49F /* CCActionTween.m in Sources */, - 4B8CC000135BFDF700B3E49F /* CCAnimation.m in Sources */, - 4B8CC003135BFDF700B3E49F /* CCAnimationCache.m in Sources */, - 4B8CC006135BFDF700B3E49F /* CCAtlasNode.m in Sources */, - 4B8CC009135BFDF700B3E49F /* CCBlockSupport.m in Sources */, - 4B8CC00C135BFDF700B3E49F /* CCCamera.m in Sources */, - 4B8CC010135BFDF700B3E49F /* CCConfiguration.m in Sources */, - 4B8CC013135BFDF700B3E49F /* CCDirector.m in Sources */, - 4B8CC016135BFDF700B3E49F /* CCDrawingPrimitives.m in Sources */, - 4B8CC019135BFDF700B3E49F /* CCGrabber.m in Sources */, - 4B8CC01C135BFDF700B3E49F /* CCGrid.m in Sources */, - 4B8CC01F135BFDF700B3E49F /* CCLabelAtlas.m in Sources */, - 4B8CC022135BFDF700B3E49F /* CCLabelBMFont.m in Sources */, - 4B8CC025135BFDF700B3E49F /* CCLabelTTF.m in Sources */, - 4B8CC028135BFDF700B3E49F /* CCLayer.m in Sources */, - 4B8CC02C135BFDF700B3E49F /* CCMenu.m in Sources */, - 4B8CC02F135BFDF700B3E49F /* CCMenuItem.m in Sources */, - 4B8CC032135BFDF700B3E49F /* CCMotionStreak.m in Sources */, - 4B8CC035135BFDF700B3E49F /* CCNode.m in Sources */, - 4B8CC038135BFDF700B3E49F /* CCParallaxNode.m in Sources */, - 4B8CC03B135BFDF700B3E49F /* CCParticleExamples.m in Sources */, - 4B8CC03E135BFDF700B3E49F /* CCParticleSystem.m in Sources */, - 4B8CC041135BFDF700B3E49F /* CCParticleSystemPoint.m in Sources */, - 4B8CC044135BFDF700B3E49F /* CCParticleSystemQuad.m in Sources */, - 4B8CC047135BFDF700B3E49F /* CCProgressTimer.m in Sources */, - 4B8CC04B135BFDF700B3E49F /* CCRenderTexture.m in Sources */, - 4B8CC04E135BFDF700B3E49F /* CCRibbon.m in Sources */, - 4B8CC051135BFDF700B3E49F /* CCScene.m in Sources */, - 4B8CC054135BFDF700B3E49F /* CCScheduler.m in Sources */, - 4B8CC057135BFDF700B3E49F /* CCSprite.m in Sources */, - 4B8CC05A135BFDF700B3E49F /* CCSpriteBatchNode.m in Sources */, - 4B8CC05D135BFDF700B3E49F /* CCSpriteFrame.m in Sources */, - 4B8CC060135BFDF700B3E49F /* CCSpriteFrameCache.m in Sources */, - 4B8CC063135BFDF700B3E49F /* CCTexture2D.m in Sources */, - 4B8CC066135BFDF700B3E49F /* CCTextureAtlas.m in Sources */, - 4B8CC069135BFDF700B3E49F /* CCTextureCache.m in Sources */, - 4B8CC06C135BFDF700B3E49F /* CCTexturePVR.m in Sources */, - 4B8CC06F135BFDF700B3E49F /* CCTileMapAtlas.m in Sources */, - 4B8CC072135BFDF700B3E49F /* CCTMXLayer.m in Sources */, - 4B8CC075135BFDF700B3E49F /* CCTMXObjectGroup.m in Sources */, - 4B8CC078135BFDF700B3E49F /* CCTMXTiledMap.m in Sources */, - 4B8CC07B135BFDF700B3E49F /* CCTMXXMLParser.m in Sources */, - 4B8CC07E135BFDF700B3E49F /* CCTransition.m in Sources */, - 4B8CC081135BFDF700B3E49F /* CCTransitionPageTurn.m in Sources */, - 4B8CC084135BFDF800B3E49F /* CCTransitionRadial.m in Sources */, - 4B8CC088135BFDF800B3E49F /* cocos2d.m in Sources */, - 4B8CC08D135BFDF800B3E49F /* CCDirectorIOS.m in Sources */, - 4B8CC091135BFDF800B3E49F /* CCTouchDispatcher.m in Sources */, - 4B8CC094135BFDF800B3E49F /* CCTouchHandler.m in Sources */, - 4B8CC097135BFDF800B3E49F /* EAGLView.m in Sources */, - 4B8CC09A135BFDF800B3E49F /* ES1Renderer.m in Sources */, - 4B8CC09D135BFDF800B3E49F /* glu.c in Sources */, - 4B8CC0A1135BFDF800B3E49F /* CCDirectorMac.m in Sources */, - 4B8CC0A4135BFDF800B3E49F /* CCEventDispatcher.m in Sources */, - 4B8CC0A7135BFDF800B3E49F /* MacGLView.m in Sources */, - 4B8CC0AA135BFDF800B3E49F /* MacWindow.m in Sources */, - 4B8CC0AC135BFDF800B3E49F /* base64.c in Sources */, - 4B8CC0B0135BFDF800B3E49F /* CCArray.m in Sources */, - 4B8CC0B4135BFDF800B3E49F /* CCFileUtils.m in Sources */, - 4B8CC0B7135BFDF800B3E49F /* CCProfiling.m in Sources */, - 4B8CC0B9135BFDF800B3E49F /* ccUtils.c in Sources */, - 4B8CC0BD135BFDF800B3E49F /* CGPointExtension.m in Sources */, - 4B8CC0C1135BFDF800B3E49F /* TGAlib.m in Sources */, - 4B8CC0C4135BFDF800B3E49F /* TransformUtils.m in Sources */, - 4B8CC0C9135BFDF800B3E49F /* ZipUtils.m in Sources */, - 4B8CC0CD135BFDF800B3E49F /* CDAudioManager.m in Sources */, - 4B8CC0D1135BFDF800B3E49F /* CDOpenALSupport.m in Sources */, - 4B8CC0D4135BFDF800B3E49F /* CocosDenshion.m in Sources */, - 4B8CC0D7135BFDF800B3E49F /* SimpleAudioEngine.m in Sources */, - 4B8CC0DB135BFDF800B3E49F /* CLScoreServerPost.m in Sources */, - 4B8CC0DE135BFDF800B3E49F /* CLScoreServerRequest.m in Sources */, - 4B8CC0E1135BFDF800B3E49F /* cocoslive.m in Sources */, - 4B8CC0E5135BFDF800B3E49F /* FontLabel.m in Sources */, - 4B8CC0E8135BFDF800B3E49F /* FontLabelStringDrawing.m in Sources */, - 4B8CC0EB135BFDF800B3E49F /* FontManager.m in Sources */, - 4B8CC0EE135BFDF800B3E49F /* ZAttributedString.m in Sources */, - 4B8CC0F2135BFDF800B3E49F /* ZFont.m in Sources */, - 4B8CC0F6135BFDF800B3E49F /* CDataScanner.m in Sources */, - 4B8CC0F9135BFDF800B3E49F /* CDataScanner_Extensions.m in Sources */, - 4B8CC0FC135BFDF800B3E49F /* NSCharacterSet_Extensions.m in Sources */, - 4B8CC0FF135BFDF800B3E49F /* NSDictionary_JSONExtensions.m in Sources */, - 4B8CC102135BFDF800B3E49F /* NSScanner_Extensions.m in Sources */, - 4B8CC105135BFDF800B3E49F /* CJSONDeserializer.m in Sources */, - 4B8CC108135BFDF800B3E49F /* CJSONScanner.m in Sources */, - 4B8CC10B135BFDF800B3E49F /* CJSONSerializer.m in Sources */, - 4B8CC10F135BFDF800B3E49F /* b2BroadPhase.cpp in Sources */, - 4B8CC112135BFDF800B3E49F /* b2CollideCircle.cpp in Sources */, - 4B8CC114135BFDF900B3E49F /* b2CollidePolygon.cpp in Sources */, - 4B8CC116135BFDF900B3E49F /* b2Collision.cpp in Sources */, - 4B8CC119135BFDF900B3E49F /* b2Distance.cpp in Sources */, - 4B8CC11C135BFDF900B3E49F /* b2DynamicTree.cpp in Sources */, - 4B8CC11F135BFDF900B3E49F /* b2TimeOfImpact.cpp in Sources */, - 4B8CC122135BFDF900B3E49F /* b2CircleShape.cpp in Sources */, - 4B8CC125135BFDF900B3E49F /* b2PolygonShape.cpp in Sources */, - 4B8CC129135BFDF900B3E49F /* b2BlockAllocator.cpp in Sources */, - 4B8CC12C135BFDF900B3E49F /* b2Math.cpp in Sources */, - 4B8CC12F135BFDF900B3E49F /* b2Settings.cpp in Sources */, - 4B8CC132135BFDF900B3E49F /* b2StackAllocator.cpp in Sources */, - 4B8CC135135BFDF900B3E49F /* b2Body.cpp in Sources */, - 4B8CC138135BFDF900B3E49F /* b2ContactManager.cpp in Sources */, - 4B8CC13B135BFDF900B3E49F /* b2Fixture.cpp in Sources */, - 4B8CC13E135BFDF900B3E49F /* b2Island.cpp in Sources */, - 4B8CC142135BFDF900B3E49F /* b2World.cpp in Sources */, - 4B8CC145135BFDF900B3E49F /* b2WorldCallbacks.cpp in Sources */, - 4B8CC148135BFDF900B3E49F /* b2CircleContact.cpp in Sources */, - 4B8CC14B135BFDF900B3E49F /* b2Contact.cpp in Sources */, - 4B8CC14E135BFDF900B3E49F /* b2ContactSolver.cpp in Sources */, - 4B8CC152135BFDF900B3E49F /* b2PolygonAndCircleContact.cpp in Sources */, - 4B8CC155135BFDF900B3E49F /* b2PolygonContact.cpp in Sources */, - 4B8CC158135BFDF900B3E49F /* b2TOISolver.cpp in Sources */, - 4B8CC15B135BFDF900B3E49F /* b2DistanceJoint.cpp in Sources */, - 4B8CC15E135BFDF900B3E49F /* b2FrictionJoint.cpp in Sources */, - 4B8CC161135BFDF900B3E49F /* b2GearJoint.cpp in Sources */, - 4B8CC164135BFDF900B3E49F /* b2Joint.cpp in Sources */, - 4B8CC167135BFDF900B3E49F /* b2LineJoint.cpp in Sources */, - 4B8CC16A135BFDF900B3E49F /* b2MouseJoint.cpp in Sources */, - 4B8CC16D135BFDF900B3E49F /* b2PrismaticJoint.cpp in Sources */, - 4B8CC170135BFDF900B3E49F /* b2PulleyJoint.cpp in Sources */, - 4B8CC173135BFDF900B3E49F /* b2RevoluteJoint.cpp in Sources */, - 4B8CC176135BFDF900B3E49F /* b2WeldJoint.cpp in Sources */, - 4B8CC17B135BFDF900B3E49F /* main.m in Sources */, - 4B8CC17E135BFDF900B3E49F /* AppDelegate.mm in Sources */, - 4B8CC184135BFDF900B3E49F /* HelloWorldLayer.mm in Sources */, - 4B8CC1C3135BFEDE00B3E49F /* LocklessRingBuffer.cpp in Sources */, - 4B8CC1C4135BFEDE00B3E49F /* BasicPrimitives.mm in Sources */, - 4B8CC1C5135BFEDE00B3E49F /* OpenGLServices.mm in Sources */, - 4B8CC1C6135BFEDE00B3E49F /* RenderTarget.mm in Sources */, - 4B8CC1C7135BFEDE00B3E49F /* MemoryBitset.cpp in Sources */, - 4B8CC1C8135BFEDE00B3E49F /* MemoryHeap.cpp in Sources */, - 4B8CC1C9135BFEDE00B3E49F /* GLView.m in Sources */, - 4B8CC1CA135BFEDE00B3E49F /* LittlestAppDelegate.m in Sources */, - 4B8CC1CB135BFEDE00B3E49F /* LittlestViewController.m in Sources */, - 4BE72E371367CCB600E8F668 /* RootViewController.m in Sources */, - 4BE72E3D1367CE5100E8F668 /* GLES-Render.mm in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 4B8CC18B135BFDF900B3E49F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - DEBUG, - "COCOS2D_DEBUG=1", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvmgcc42; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - SDKROOT = iphoneos; - }; - name = Debug; - }; - 4B8CC18C135BFDF900B3E49F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_BIT)"; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_PREPROCESSOR_DEFINITIONS = NDEBUG; - GCC_VERSION = com.apple.compilers.llvmgcc42; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - SDKROOT = iphoneos; - }; - name = Release; - }; - 4B8CC18E135BFDF900B3E49F /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_CHAR_IS_UNSIGNED_CHAR = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_GC = supported; - GCC_FAST_MATH = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Littlest/Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - DEBUG, - "COCOS2D_DEBUG=1", - __iOS__, - ); - "GCC_THUMB_SUPPORT[arch=armv6]" = ""; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_NEWLINE = NO; - GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; - GCC_WARN_UNUSED_FUNCTION = NO; - GCC_WARN_UNUSED_PARAMETER = NO; - HEADER_SEARCH_PATHS = ( - "$(PROJECT_DIR)/Littlest/libs", - "$(PROJECT_DIR)/Littlest", - ); - INFOPLIST_FILE = Littlest/Resources/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - OTHER_LDFLAGS = "-lz"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = ""; - WRAPPER_EXTENSION = app; - }; - name = Debug; - }; - 4B8CC18F135BFDF900B3E49F /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = YES; - GCC_CHAR_IS_UNSIGNED_CHAR = YES; - GCC_ENABLE_OBJC_GC = supported; - GCC_FAST_MATH = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = Littlest/Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - NDEBUG, - __iOS__, - ); - "GCC_THUMB_SUPPORT[arch=armv6]" = ""; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_NEWLINE = NO; - GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS = YES; - GCC_WARN_UNUSED_FUNCTION = NO; - GCC_WARN_UNUSED_PARAMETER = NO; - HEADER_SEARCH_PATHS = ( - "$(PROJECT_DIR)/Littlest/libs", - "$(PROJECT_DIR)/Littlest", - ); - INFOPLIST_FILE = Littlest/Resources/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 4.3; - OTHER_LDFLAGS = "-lz"; - PRODUCT_NAME = "$(TARGET_NAME)"; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = ""; - VALIDATE_PRODUCT = YES; - WRAPPER_EXTENSION = app; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 4B8CBFAA135BFDF600B3E49F /* Build configuration list for PBXProject "Littlest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4B8CC18B135BFDF900B3E49F /* Debug */, - 4B8CC18C135BFDF900B3E49F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 4B8CC18D135BFDF900B3E49F /* Build configuration list for PBXNativeTarget "Littlest" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 4B8CC18E135BFDF900B3E49F /* Debug */, - 4B8CC18F135BFDF900B3E49F /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 4B8CBFA7135BFDF600B3E49F /* Project object */; -} diff --git a/Littlest.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Littlest.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index d89bc53..0000000 --- a/Littlest.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/Littlest.xcodeproj/project.xcworkspace/xcuserdata/dorischen.xcuserdatad/UserInterfaceState.xcuserstate b/Littlest.xcodeproj/project.xcworkspace/xcuserdata/dorischen.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index de53970..0000000 --- a/Littlest.xcodeproj/project.xcworkspace/xcuserdata/dorischen.xcuserdatad/UserInterfaceState.xcuserstate +++ /dev/null @@ -1,36875 +0,0 @@ - - - - - $archiver - NSKeyedArchiver - $objects - - $null - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 2 - - - CF$UID - 3 - - - CF$UID - 4 - - - CF$UID - 5 - - - CF$UID - 6 - - - CF$UID - 7 - - - CF$UID - 8 - - - CF$UID - 9 - - - CF$UID - 10 - - - CF$UID - 11 - - - CF$UID - 12 - - - CF$UID - 13 - - - CF$UID - 14 - - - CF$UID - 15 - - - CF$UID - 16 - - - CF$UID - 17 - - - CF$UID - 18 - - - CF$UID - 19 - - - CF$UID - 20 - - - CF$UID - 21 - - - CF$UID - 22 - - - NS.objects - - - CF$UID - 23 - - - CF$UID - 163 - - - CF$UID - 276 - - - CF$UID - 340 - - - CF$UID - 404 - - - CF$UID - 468 - - - CF$UID - 913 - - - CF$UID - 977 - - - CF$UID - 1041 - - - CF$UID - 1198 - - - CF$UID - 1288 - - - CF$UID - 1379 - - - CF$UID - 1443 - - - CF$UID - 1507 - - - CF$UID - 1598 - - - CF$UID - 1685 - - - CF$UID - 1749 - - - CF$UID - 1836 - - - CF$UID - 1926 - - - CF$UID - 1990 - - - CF$UID - 2054 - - - - D6B50A5F-6584-4D21-9035-AB198AFCDC2A - E9F19A15-53F3-4CF8-9810-05DB5D70D8B8 - 91D127CA-A396-4C5D-A14D-DBA7CB6BC492 - 71FFC500-3C53-4D7A-ABCA-4902ED2D43B7 - 0C40D9D4-4550-4415-AE1C-D9838E93B1BF - IDEWorkspaceDocument - BBA28386-C998-482A-A4CC-85F85F452810 - CEE79290-B2E9-4AB1-AF5F-F5E449823A41 - 2CEE9F7E-99CE-400E-AE44-BC46F997F577 - 87D93973-8AED-4550-AC40-BD5CD86D4E53 - 287AB00E-D0B9-49CF-8424-E1ECCB2C3E32 - 28C38E80-47C9-4929-8742-4900354C1F50 - 71EA20D8-64B9-4F7E-A4FF-634147920FD5 - B066DAC4-DD04-4D6A-9F4D-33CFD48F871F - 467B65F1-787F-447A-B712-B1E1351F71A6 - E10248F1-B560-4534-B44D-426F036CBB91 - E5A1741C-704E-4107-AD84-CA77CC000C66 - 66B5EDB0-04BA-48FC-93A4-8A4F206DE41D - EFDF78AB-62AC-4077-BBA8-BB7DBC36F55E - 68242A45-90A9-43F4-B8D1-513D040B74DF - 358E0463-4541-45B7-94C3-EB8594ECDFB9 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 24 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 27 - - - CF$UID - 28 - - - CF$UID - 29 - - - NS.objects - - - CF$UID - 30 - - - CF$UID - 161 - - - CF$UID - 39 - - - CF$UID - 24 - - - CF$UID - 162 - - - CF$UID - 2 - - - - IDEWorkspaceTabController_94E279B3-D43A-4045-AFED-03CDB1C0BFC8 - IDEOrderedWorkspaceTabControllers - IDEWindowToolbarIsVisible - IDEActiveWorkspaceTabController - IDEWindowFrame - IDEWorkspaceWindowControllerUniqueIdentifier - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 31 - - - CF$UID - 32 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 38 - - - CF$UID - 39 - - - CF$UID - 40 - - - CF$UID - 53 - - - CF$UID - 88 - - - CF$UID - 39 - - - CF$UID - 97 - - - - AssistantEditorsLayout - IDEShowNavigator - IDEWorkspaceTabControllerUtilityAreaSplitView - IDENavigatorArea - IDEWorkspaceTabControllerDesignAreaSplitView - IDEShowUtilities - IDEEditorArea - 0 - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 42 - - - - DVTSplitViewItems - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 43 - - - CF$UID - 49 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 47 - - - - DVTIdentifier - DVTViewMagnitude - - 389 - - $classes - - NSDictionary - NSObject - - $classname - NSDictionary - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 50 - - - - 211 - - $classes - - NSMutableArray - NSArray - NSObject - - $classname - NSMutableArray - - - $classes - - NSMutableDictionary - NSDictionary - NSObject - - $classname - NSMutableDictionary - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 57 - - - CF$UID - 54 - - - CF$UID - 75 - - - - Xcode.IDEKit.Navigator.Issues - SelectedNavigator - Xcode.IDEKit.Navigator.Structure - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 68 - - - CF$UID - 69 - - - CF$UID - 71 - - - CF$UID - 72 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 73 - - - CF$UID - 39 - - - CF$UID - 74 - - - - IDEErrorFilteringEnabled - IDEVisibleRect - IDECollapsedFiles - IDEExpandedIssues - IDESelectedNavigables - IDEShowsByType - IDESchemeFilteringEnabled - IDECollapsedTypes - IDERecentFilteringEnabled - IDECollapsedGroups - {{0, 0}, {0, 0}} - - $class - - CF$UID - 70 - - NS.objects - - - - $classes - - NSMutableSet - NSSet - NSObject - - $classname - NSMutableSet - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 83 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 86 - - - CF$UID - 84 - - - - IDEVisibleRect - IDEUnsavedDocumentFilteringEnabled - IDENavigatorExpandedItemsBeforeFilteringSet - IDERecentDocumentFilteringEnabled - IDESCMStatusFilteringEnabled - IDESelectedObjects - IDEExpandedItemsSet - {{0, 0}, {259, 832}} - - $class - - CF$UID - 85 - - NS.objects - - - - $classes - - NSSet - NSObject - - $classname - NSSet - - - $class - - CF$UID - 87 - - NS.objects - - - - $classes - - NSArray - NSObject - - $classname - NSArray - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 89 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 90 - - - CF$UID - 92 - - - CF$UID - 94 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 91 - - - - 594 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 93 - - - - 746 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 96 - - - - IDEUtilitiesArea - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 106 - - - CF$UID - 112 - - - CF$UID - 124 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 152 - - - CF$UID - 160 - - - CF$UID - 39 - - - - layoutTree - IDEEditorMode_Standard - IDEEDitorArea_DebugArea - IDEShowEditor - EditorMode - DebuggerSplitView - DefaultPersistentRepresentations - ShowDebuggerArea - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 107 - - rootLayoutTreeNode - - CF$UID - 108 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 108 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 109 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 107 - - - - - $classes - - IDEWorkspaceTabControllerLayoutTreeNode - NSObject - - $classname - IDEWorkspaceTabControllerLayoutTreeNode - - - $classes - - IDEWorkspaceTabControllerLayoutTree - NSObject - - $classname - IDEWorkspaceTabControllerLayoutTree - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 114 - - - - EditorLayout_PersistentRepresentation - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 116 - - - - Main - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 120 - - - CF$UID - 38 - - - CF$UID - 122 - - - - EditorLayout_StateSavingStateDictionaries - EditorLayout_Selected - EditorLayout_Geometry - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 121 - - - - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 123 - - - - {{0, 0}, {600, 600}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 132 - - - CF$UID - 134 - - - CF$UID - 131 - - - CF$UID - 137 - - - CF$UID - 145 - - - - LayoutFocusMode - console - variables - LayoutMode - IDEDebugArea_SplitView - IDEDebuggerAreaSplitView - 1 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - ConsoleFilterMode - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - DBGVariablesViewFilterMode - 2 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 138 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 139 - - - CF$UID - 142 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 141 - - - - VariablesView - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 144 - - - - ConsoleArea - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 146 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 147 - - - CF$UID - 149 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 148 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 150 - - - - 301 - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 153 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 154 - - - CF$UID - 157 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 156 - - - - IDEEditor - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 159 - - - - IDEDebuggerArea - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 24 - - - - {{178, 349}, {600, 624}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 29 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 27 - - - CF$UID - 164 - - - CF$UID - 28 - - - NS.objects - - - CF$UID - 3 - - - CF$UID - 165 - - - CF$UID - 39 - - - CF$UID - 164 - - - CF$UID - 166 - - - CF$UID - 275 - - - - IDEWorkspaceTabController_B2AFD575-4400-4F7F-BAD2-5EBE90AC935A - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 164 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 167 - - - CF$UID - 32 - - - CF$UID - 31 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 168 - - - CF$UID - 39 - - - CF$UID - 38 - - - CF$UID - 169 - - - CF$UID - 175 - - - CF$UID - 186 - - - CF$UID - 39 - - - CF$UID - 194 - - - - IDETabLabel - b2BroadPhase.cpp - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 170 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 171 - - - CF$UID - 173 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 172 - - - - 577 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 174 - - - - 211 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 176 - - - CF$UID - 54 - - - CF$UID - 183 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 177 - - - CF$UID - 178 - - - CF$UID - 179 - - - CF$UID - 180 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 181 - - - CF$UID - 39 - - - CF$UID - 182 - - - - {{0, 0}, {0, 0}} - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 184 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 185 - - - CF$UID - 84 - - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 87 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 187 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 188 - - - CF$UID - 190 - - - CF$UID - 192 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 189 - - - - 260 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 191 - - - - 1080 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 193 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 195 - - - CF$UID - 218 - - - CF$UID - 253 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 268 - - - CF$UID - 274 - - - CF$UID - 39 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 196 - - rootLayoutTreeNode - - CF$UID - 216 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 197 - - orientation - 0 - parent - - CF$UID - 216 - - - - $class - - CF$UID - 215 - - DocumentLocation - - CF$UID - 211 - - DomainIdentifier - - CF$UID - 198 - - IdentifierPath - - CF$UID - 199 - - IndexOfDocumentIdentifier - - CF$UID - 38 - - - Xcode.IDENavigableItemDomain.WorkspaceStructure - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 200 - - - CF$UID - 203 - - - CF$UID - 205 - - - CF$UID - 207 - - - CF$UID - 209 - - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 201 - - - b2BroadPhase.cpp - - $classes - - IDEArchivableStringIndexPair - NSObject - - $classname - IDEArchivableStringIndexPair - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 204 - - - Box2D - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 206 - - - libs - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 208 - - - Littlest - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 210 - - - Littlest - - $class - - CF$UID - 214 - - documentURL - - CF$UID - 212 - - timestamp - - CF$UID - 0 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/Box2D/Collision/b2BroadPhase.cpp - - - $classes - - NSMutableString - NSString - NSObject - - $classname - NSMutableString - - - $classes - - DVTDocumentLocation - NSObject - - $classname - DVTDocumentLocation - - - $classes - - IDENavigableItemArchivableRepresentation - NSObject - - $classname - IDENavigableItemArchivableRepresentation - - - $class - - CF$UID - 110 - - children - - CF$UID - 217 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 196 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 219 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 220 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 221 - - - CF$UID - 38 - - - CF$UID - 251 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 222 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 223 - - - CF$UID - 224 - - - CF$UID - 225 - - - CF$UID - 226 - - - CF$UID - 227 - - - CF$UID - 228 - - - CF$UID - 229 - - - NS.objects - - - CF$UID - 230 - - - CF$UID - 231 - - - CF$UID - 239 - - - CF$UID - 201 - - - CF$UID - 201 - - - CF$UID - 247 - - - CF$UID - 248 - - - - FileDataType - ArchivableRepresentation - EditorState - NavigableItemName - DocumentNavigableItemName - DocumentExtensionIdentifier - DocumentURL - public.c-plus-plus-source - - $class - - CF$UID - 215 - - DocumentLocation - - CF$UID - 211 - - DomainIdentifier - - CF$UID - 198 - - IdentifierPath - - CF$UID - 232 - - IndexOfDocumentIdentifier - - CF$UID - 38 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 233 - - - CF$UID - 234 - - - CF$UID - 235 - - - CF$UID - 236 - - - CF$UID - 237 - - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 201 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 204 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 206 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 208 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 238 - - - Littlest - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 244 - - - CF$UID - 245 - - - CF$UID - 39 - - - CF$UID - 246 - - - - PrimaryDocumentTimestamp - PrimaryDocumentVisibleCharacterRange - HideAllIssues - PrimaryDocumentSelectedCharacterRange - 324798645.71748698 - {0, 1845} - {919, 0} - Xcode.IDEKit.EditorDocument.SourceCode - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 249 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/Box2D/Collision/b2BroadPhase.cpp - - $classes - - NSURL - NSObject - - $classname - NSURL - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 252 - - - - {{0, 0}, {1058, 788}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 254 - - - CF$UID - 255 - - - CF$UID - 131 - - - CF$UID - 256 - - - CF$UID - 262 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 257 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 258 - - - CF$UID - 260 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 259 - - - - 526 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 261 - - - - 531 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 263 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 264 - - - CF$UID - 266 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 265 - - - - 526 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 267 - - - - 531 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 269 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 270 - - - CF$UID - 272 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 271 - - - - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 273 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - {{220, 24}, {1058, 812}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 29 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 27 - - - CF$UID - 28 - - - CF$UID - 277 - - - NS.objects - - - CF$UID - 4 - - - CF$UID - 278 - - - CF$UID - 39 - - - CF$UID - 277 - - - CF$UID - 279 - - - CF$UID - 280 - - - - IDEWorkspaceTabController_0A175525-D973-47FD-8639-29BF0D25BACE - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 277 - - - - {{52, 487}, {600, 624}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 31 - - - CF$UID - 32 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 38 - - - CF$UID - 39 - - - CF$UID - 281 - - - CF$UID - 287 - - - CF$UID - 298 - - - CF$UID - 39 - - - CF$UID - 306 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 282 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 283 - - - CF$UID - 285 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 284 - - - - 376 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 286 - - - - 224 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 288 - - - CF$UID - 54 - - - CF$UID - 295 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 289 - - - CF$UID - 290 - - - CF$UID - 291 - - - CF$UID - 292 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 293 - - - CF$UID - 39 - - - CF$UID - 294 - - - - {{0, 0}, {0, 0}} - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 296 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 297 - - - CF$UID - 84 - - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 87 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 299 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 300 - - - CF$UID - 302 - - - CF$UID - 304 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 301 - - - - 260 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 303 - - - - 880 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 305 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 307 - - - CF$UID - 311 - - - CF$UID - 318 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 333 - - - CF$UID - 339 - - - CF$UID - 39 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 308 - - rootLayoutTreeNode - - CF$UID - 309 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 309 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 310 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 308 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 312 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 313 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 314 - - - CF$UID - 38 - - - CF$UID - 316 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 315 - - - - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 317 - - - - {{0, 0}, {600, 600}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 319 - - - CF$UID - 320 - - - CF$UID - 131 - - - CF$UID - 321 - - - CF$UID - 327 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 322 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 323 - - - CF$UID - 325 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 324 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 326 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 328 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 329 - - - CF$UID - 331 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 330 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 332 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 334 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 335 - - - CF$UID - 337 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 336 - - - - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 338 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 341 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 27 - - - CF$UID - 28 - - - CF$UID - 29 - - - NS.objects - - - CF$UID - 342 - - - CF$UID - 402 - - - CF$UID - 39 - - - CF$UID - 341 - - - CF$UID - 403 - - - CF$UID - 5 - - - - IDEWorkspaceTabController_B71AA6F6-0E9F-4181-AA98-32814D0D33A5 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 31 - - - CF$UID - 32 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 38 - - - CF$UID - 39 - - - CF$UID - 343 - - - CF$UID - 349 - - - CF$UID - 360 - - - CF$UID - 39 - - - CF$UID - 368 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 344 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 345 - - - CF$UID - 347 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 346 - - - - 376 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 348 - - - - 224 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 350 - - - CF$UID - 54 - - - CF$UID - 357 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 351 - - - CF$UID - 352 - - - CF$UID - 353 - - - CF$UID - 354 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 355 - - - CF$UID - 39 - - - CF$UID - 356 - - - - {{0, 0}, {0, 0}} - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 358 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 359 - - - CF$UID - 84 - - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 87 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 361 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 362 - - - CF$UID - 364 - - - CF$UID - 366 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 363 - - - - 260 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 365 - - - - 880 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 367 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 369 - - - CF$UID - 373 - - - CF$UID - 380 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 395 - - - CF$UID - 401 - - - CF$UID - 39 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 370 - - rootLayoutTreeNode - - CF$UID - 371 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 371 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 372 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 370 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 374 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 375 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 376 - - - CF$UID - 38 - - - CF$UID - 378 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 377 - - - - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 379 - - - - {{0, 0}, {600, 600}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 381 - - - CF$UID - 382 - - - CF$UID - 131 - - - CF$UID - 383 - - - CF$UID - 389 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 384 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 385 - - - CF$UID - 387 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 386 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 388 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 390 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 391 - - - CF$UID - 393 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 392 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 394 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 396 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 397 - - - CF$UID - 399 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 398 - - - - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 400 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 341 - - - - {{144, 400}, {600, 624}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 405 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 27 - - - CF$UID - 28 - - - CF$UID - 29 - - - NS.objects - - - CF$UID - 406 - - - CF$UID - 466 - - - CF$UID - 39 - - - CF$UID - 405 - - - CF$UID - 467 - - - CF$UID - 6 - - - - IDEWorkspaceTabController_1CAC0209-C113-449D-B793-9A27F553FA36 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 31 - - - CF$UID - 32 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 38 - - - CF$UID - 39 - - - CF$UID - 407 - - - CF$UID - 413 - - - CF$UID - 424 - - - CF$UID - 39 - - - CF$UID - 432 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 408 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 409 - - - CF$UID - 411 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 410 - - - - 389 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 412 - - - - 211 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 414 - - - CF$UID - 54 - - - CF$UID - 421 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 415 - - - CF$UID - 416 - - - CF$UID - 417 - - - CF$UID - 418 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 419 - - - CF$UID - 39 - - - CF$UID - 420 - - - - {{0, 0}, {0, 0}} - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 422 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 423 - - - CF$UID - 84 - - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 87 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 425 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 426 - - - CF$UID - 428 - - - CF$UID - 430 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 427 - - - - 260 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 429 - - - - 1080 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 431 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 433 - - - CF$UID - 437 - - - CF$UID - 444 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 459 - - - CF$UID - 465 - - - CF$UID - 39 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 434 - - rootLayoutTreeNode - - CF$UID - 435 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 435 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 436 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 434 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 438 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 439 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 440 - - - CF$UID - 38 - - - CF$UID - 442 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 441 - - - - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 443 - - - - {{0, 0}, {600, 600}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 445 - - - CF$UID - 446 - - - CF$UID - 131 - - - CF$UID - 447 - - - CF$UID - 453 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 448 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 449 - - - CF$UID - 451 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 450 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 452 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 454 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 455 - - - CF$UID - 457 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 456 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 458 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 460 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 461 - - - CF$UID - 463 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 462 - - - - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 464 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 405 - - - - {{115, 418}, {600, 624}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 469 - - - CF$UID - 470 - - - CF$UID - 471 - - - CF$UID - 472 - - - CF$UID - 473 - - - CF$UID - 474 - - - CF$UID - 475 - - - CF$UID - 476 - - - CF$UID - 477 - - - CF$UID - 478 - - - CF$UID - 479 - - - NS.objects - - - CF$UID - 151 - - - CF$UID - 480 - - - CF$UID - 38 - - - CF$UID - 828 - - - CF$UID - 833 - - - CF$UID - 836 - - - CF$UID - 861 - - - CF$UID - 862 - - - CF$UID - 893 - - - CF$UID - 39 - - - CF$UID - 39 - - - - BreakpointsActivated - DefaultEditorStatesForURLs - DebuggingWindowBehavior - ActiveRunDestination - ActiveScheme - DefaultEditorFrameSizeForURLs - DocumentWindows - LastCompletedPersistentSchemeBasedActivityReport - RecentEditorDocumentURLs - AppFocusInMiniDebugging - MiniDebuggingConsole - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 481 - - - CF$UID - 247 - - - NS.objects - - - CF$UID - 482 - - - CF$UID - 713 - - - - Xcode.Xcode3ProjectSupport.EditorDocument.Xcode3Project - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 483 - - - NS.objects - - - CF$UID - 485 - - - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 484 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest.xcodeproj/ - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 486 - - - CF$UID - 487 - - - CF$UID - 488 - - - CF$UID - 489 - - - CF$UID - 490 - - - NS.objects - - - CF$UID - 491 - - - CF$UID - 492 - - - CF$UID - 498 - - - CF$UID - 499 - - - CF$UID - 712 - - - - Xcode3ProjectEditorPreviousProjectEditorClass - Xcode3ProjectEditor.sourceList.splitview - Xcode3ProjectEditorPreviousTargetEditorClass - Xcode3ProjectEditorSelectedDocumentLocations - Xcode3ProjectEditor_Xcode3BuildSettingsEditor - Xcode3BuildSettingsEditor - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 493 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 494 - - - CF$UID - 496 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 495 - - - - 170 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 497 - - - - 576 - Xcode3BuildSettingsEditor - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 500 - - - - - $class - - CF$UID - 711 - - documentURL - - CF$UID - 501 - - selection - - CF$UID - 503 - - timestamp - - CF$UID - 502 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest.xcodeproj/ - 324798986.57572001 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 504 - - - CF$UID - 505 - - - CF$UID - 506 - - - NS.objects - - - CF$UID - 507 - - - CF$UID - 508 - - - CF$UID - 509 - - - - Editor - Target - Xcode3BuildSettingsEditorLocations - Xcode3BuildSettingsEditor - Littlest - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 510 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 511 - - - CF$UID - 512 - - - CF$UID - 513 - - - CF$UID - 514 - - - CF$UID - 515 - - - CF$UID - 516 - - - NS.objects - - - CF$UID - 517 - - - CF$UID - 709 - - - CF$UID - 38 - - - CF$UID - 38 - - - CF$UID - 38 - - - CF$UID - 131 - - - - Collapsed Build Property Categories - Selected Build Properties - Xcode3BuildSettingsEditorDisplayMode - Xcode3BuildPropertyValueDisplayMode - Xcode3BuildSettingsEditorMode - Xcode3BuildPropertyNameDisplayMode - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 518 - - - CF$UID - 519 - - - CF$UID - 520 - - - CF$UID - 521 - - - CF$UID - 522 - - - CF$UID - 523 - - - CF$UID - 524 - - - CF$UID - 525 - - - CF$UID - 526 - - - CF$UID - 527 - - - CF$UID - 528 - - - CF$UID - 529 - - - CF$UID - 530 - - - CF$UID - 531 - - - CF$UID - 532 - - - CF$UID - 533 - - - CF$UID - 534 - - - CF$UID - 535 - - - CF$UID - 536 - - - CF$UID - 537 - - - CF$UID - 538 - - - CF$UID - 539 - - - CF$UID - 540 - - - CF$UID - 541 - - - CF$UID - 542 - - - CF$UID - 543 - - - CF$UID - 544 - - - CF$UID - 545 - - - CF$UID - 546 - - - CF$UID - 547 - - - CF$UID - 548 - - - CF$UID - 549 - - - CF$UID - 550 - - - CF$UID - 551 - - - CF$UID - 552 - - - CF$UID - 553 - - - CF$UID - 554 - - - CF$UID - 555 - - - CF$UID - 556 - - - CF$UID - 557 - - - CF$UID - 558 - - - CF$UID - 559 - - - CF$UID - 560 - - - CF$UID - 561 - - - CF$UID - 562 - - - CF$UID - 563 - - - CF$UID - 564 - - - CF$UID - 565 - - - CF$UID - 566 - - - CF$UID - 567 - - - CF$UID - 568 - - - CF$UID - 569 - - - CF$UID - 570 - - - CF$UID - 571 - - - CF$UID - 572 - - - CF$UID - 573 - - - CF$UID - 574 - - - CF$UID - 575 - - - CF$UID - 576 - - - CF$UID - 577 - - - CF$UID - 578 - - - CF$UID - 579 - - - CF$UID - 580 - - - CF$UID - 581 - - - CF$UID - 582 - - - CF$UID - 583 - - - CF$UID - 584 - - - CF$UID - 585 - - - CF$UID - 586 - - - CF$UID - 587 - - - CF$UID - 588 - - - CF$UID - 589 - - - CF$UID - 590 - - - CF$UID - 591 - - - CF$UID - 592 - - - CF$UID - 593 - - - CF$UID - 594 - - - CF$UID - 595 - - - CF$UID - 596 - - - CF$UID - 597 - - - CF$UID - 598 - - - CF$UID - 599 - - - CF$UID - 600 - - - CF$UID - 601 - - - CF$UID - 602 - - - CF$UID - 603 - - - CF$UID - 604 - - - CF$UID - 605 - - - CF$UID - 606 - - - CF$UID - 607 - - - CF$UID - 608 - - - CF$UID - 609 - - - CF$UID - 610 - - - CF$UID - 611 - - - CF$UID - 612 - - - CF$UID - 613 - - - CF$UID - 614 - - - CF$UID - 615 - - - CF$UID - 616 - - - CF$UID - 617 - - - CF$UID - 618 - - - CF$UID - 619 - - - CF$UID - 620 - - - CF$UID - 621 - - - CF$UID - 622 - - - CF$UID - 623 - - - CF$UID - 624 - - - CF$UID - 625 - - - CF$UID - 626 - - - CF$UID - 627 - - - CF$UID - 628 - - - CF$UID - 629 - - - CF$UID - 630 - - - CF$UID - 631 - - - CF$UID - 632 - - - CF$UID - 633 - - - CF$UID - 634 - - - CF$UID - 635 - - - CF$UID - 636 - - - CF$UID - 637 - - - CF$UID - 638 - - - CF$UID - 639 - - - CF$UID - 640 - - - CF$UID - 641 - - - CF$UID - 642 - - - CF$UID - 643 - - - CF$UID - 644 - - - CF$UID - 645 - - - CF$UID - 646 - - - CF$UID - 647 - - - CF$UID - 648 - - - CF$UID - 649 - - - CF$UID - 650 - - - CF$UID - 651 - - - CF$UID - 652 - - - CF$UID - 653 - - - CF$UID - 654 - - - CF$UID - 655 - - - CF$UID - 656 - - - CF$UID - 657 - - - CF$UID - 658 - - - CF$UID - 659 - - - CF$UID - 660 - - - CF$UID - 661 - - - CF$UID - 662 - - - CF$UID - 663 - - - CF$UID - 664 - - - CF$UID - 665 - - - CF$UID - 666 - - - CF$UID - 667 - - - CF$UID - 668 - - - CF$UID - 669 - - - CF$UID - 670 - - - CF$UID - 671 - - - CF$UID - 672 - - - CF$UID - 673 - - - CF$UID - 674 - - - CF$UID - 675 - - - CF$UID - 676 - - - CF$UID - 677 - - - CF$UID - 678 - - - CF$UID - 679 - - - CF$UID - 680 - - - CF$UID - 681 - - - CF$UID - 682 - - - CF$UID - 683 - - - CF$UID - 684 - - - CF$UID - 685 - - - CF$UID - 686 - - - CF$UID - 687 - - - CF$UID - 688 - - - CF$UID - 689 - - - CF$UID - 690 - - - CF$UID - 691 - - - CF$UID - 692 - - - CF$UID - 693 - - - CF$UID - 694 - - - CF$UID - 695 - - - CF$UID - 696 - - - CF$UID - 697 - - - CF$UID - 698 - - - CF$UID - 699 - - - CF$UID - 700 - - - CF$UID - 701 - - - CF$UID - 702 - - - CF$UID - 703 - - - CF$UID - 704 - - - CF$UID - 705 - - - CF$UID - 706 - - - CF$UID - 707 - - - CF$UID - 708 - - - - - $class - - CF$UID - 213 - - NS.string - Architectures||ADDITIONAL_SDKS - - - $class - - CF$UID - 213 - - NS.string - Architectures||ARCHS - - - $class - - CF$UID - 213 - - NS.string - Architectures||SDKROOT - - - $class - - CF$UID - 213 - - NS.string - Architectures||ONLY_ACTIVE_ARCH - - - $class - - CF$UID - 213 - - NS.string - Architectures||SUPPORTED_PLATFORMS - - - $class - - CF$UID - 213 - - NS.string - Architectures||VALID_ARCHS - - - $class - - CF$UID - 213 - - NS.string - Build Locations||SYMROOT - - - $class - - CF$UID - 213 - - NS.string - Build Locations||OBJROOT - - - $class - - CF$UID - 213 - - NS.string - Build Locations||SHARED_PRECOMPS_DIR - - - $class - - CF$UID - 213 - - NS.string - Build Options||BUILD_VARIANTS - - - $class - - CF$UID - 213 - - NS.string - Build Options||DEBUG_INFORMATION_FORMAT - - - $class - - CF$UID - 213 - - NS.string - Build Options||ENABLE_OPENMP_SUPPORT - - - $class - - CF$UID - 213 - - NS.string - Build Options||GENERATE_PROFILING_CODE - - - $class - - CF$UID - 213 - - NS.string - Build Options||PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR - - - $class - - CF$UID - 213 - - NS.string - Build Options||RUN_CLANG_STATIC_ANALYZER - - - $class - - CF$UID - 213 - - NS.string - Build Options||SCAN_ALL_SOURCE_FILES_FOR_INCLUDES - - - $class - - CF$UID - 213 - - NS.string - Code Signing||CODE_SIGN_ENTITLEMENTS - - - $class - - CF$UID - 213 - - NS.string - Code Signing||CODE_SIGN_RESOURCE_RULES_PATH - - - $class - - CF$UID - 213 - - NS.string - Code Signing||OTHER_CODE_SIGN_FLAGS - - - $class - - CF$UID - 213 - - NS.string - Compiler Version||GCC_VERSION - - - $class - - CF$UID - 213 - - NS.string - Deployment||STRIPFLAGS - - - $class - - CF$UID - 213 - - NS.string - Deployment||ALTERNATE_GROUP - - - $class - - CF$UID - 213 - - NS.string - Deployment||ALTERNATE_OWNER - - - $class - - CF$UID - 213 - - NS.string - Deployment||ALTERNATE_MODE - - - $class - - CF$UID - 213 - - NS.string - Deployment||ALTERNATE_PERMISSIONS_FILES - - - $class - - CF$UID - 213 - - NS.string - Deployment||COMBINE_HIDPI_IMAGES - - - $class - - CF$UID - 213 - - NS.string - Deployment||DEPLOYMENT_LOCATION - - - $class - - CF$UID - 213 - - NS.string - Deployment||DEPLOYMENT_POSTPROCESSING - - - $class - - CF$UID - 213 - - NS.string - Deployment||INSTALL_GROUP - - - $class - - CF$UID - 213 - - NS.string - Deployment||INSTALL_OWNER - - - $class - - CF$UID - 213 - - NS.string - Deployment||INSTALL_MODE_FLAG - - - $class - - CF$UID - 213 - - NS.string - Deployment||DSTROOT - - - $class - - CF$UID - 213 - - NS.string - Deployment||INSTALL_PATH - - - $class - - CF$UID - 213 - - NS.string - Deployment||MACOSX_DEPLOYMENT_TARGET - - - $class - - CF$UID - 213 - - NS.string - Deployment||SKIP_INSTALL - - - $class - - CF$UID - 213 - - NS.string - Deployment||STRIP_INSTALLED_PRODUCT - - - $class - - CF$UID - 213 - - NS.string - Deployment||STRIP_STYLE - - - $class - - CF$UID - 213 - - NS.string - Deployment||TARGETED_DEVICE_FAMILY - - - $class - - CF$UID - 213 - - NS.string - Deployment||SEPARATE_STRIP - - - $class - - CF$UID - 213 - - NS.string - Deployment||IPHONEOS_DEPLOYMENT_TARGET - - - $class - - CF$UID - 213 - - NS.string - Kernel Module||MODULE_NAME - - - $class - - CF$UID - 213 - - NS.string - Kernel Module||MODULE_START - - - $class - - CF$UID - 213 - - NS.string - Kernel Module||MODULE_STOP - - - $class - - CF$UID - 213 - - NS.string - Kernel Module||MODULE_VERSION - - - $class - - CF$UID - 213 - - NS.string - Linking||BUNDLE_LOADER - - - $class - - CF$UID - 213 - - NS.string - Linking||STANDARD_C_PLUS_PLUS_LIBRARY_TYPE - - - $class - - CF$UID - 213 - - NS.string - Linking||DYLIB_COMPATIBILITY_VERSION - - - $class - - CF$UID - 213 - - NS.string - Linking||DYLIB_CURRENT_VERSION - - - $class - - CF$UID - 213 - - NS.string - Linking||DEAD_CODE_STRIPPING - - - $class - - CF$UID - 213 - - NS.string - Linking||LINKER_DISPLAYS_MANGLED_NAMES - - - $class - - CF$UID - 213 - - NS.string - Linking||LD_NO_PIE - - - $class - - CF$UID - 213 - - NS.string - Linking||PRESERVE_DEAD_CODE_INITS_AND_TERMS - - - $class - - CF$UID - 213 - - NS.string - Linking||LD_DYLIB_INSTALL_NAME - - - $class - - CF$UID - 213 - - NS.string - Linking||EXPORTED_SYMBOLS_FILE - - - $class - - CF$UID - 213 - - NS.string - Linking||INIT_ROUTINE - - - $class - - CF$UID - 213 - - NS.string - Linking||LINK_WITH_STANDARD_LIBRARIES - - - $class - - CF$UID - 213 - - NS.string - Linking||MACH_O_TYPE - - - $class - - CF$UID - 213 - - NS.string - Linking||LD_OPENMP_FLAGS - - - $class - - CF$UID - 213 - - NS.string - Linking||ORDER_FILE - - - $class - - CF$UID - 213 - - NS.string - Linking||OTHER_LDFLAGS - - - $class - - CF$UID - 213 - - NS.string - Linking||GENERATE_MASTER_OBJECT_FILE - - - $class - - CF$UID - 213 - - NS.string - Linking||PRELINK_LIBS - - - $class - - CF$UID - 213 - - NS.string - Linking||KEEP_PRIVATE_EXTERNS - - - $class - - CF$UID - 213 - - NS.string - Linking||LD_RUNPATH_SEARCH_PATHS - - - $class - - CF$UID - 213 - - NS.string - Linking||SEPARATE_SYMBOL_EDIT - - - $class - - CF$UID - 213 - - NS.string - Linking||PRELINK_FLAGS - - - $class - - CF$UID - 213 - - NS.string - Linking||SECTORDER_FLAGS - - - $class - - CF$UID - 213 - - NS.string - Linking||UNEXPORTED_SYMBOLS_FILE - - - $class - - CF$UID - 213 - - NS.string - Linking||WARNING_LDFLAGS - - - $class - - CF$UID - 213 - - NS.string - Linking||LD_GENERATE_MAP_FILE - - - $class - - CF$UID - 213 - - NS.string - Packaging||COMPRESS_PNG_FILES - - - $class - - CF$UID - 213 - - NS.string - Packaging||APPLY_RULES_IN_COPY_FILES - - - $class - - CF$UID - 213 - - NS.string - Packaging||EXECUTABLE_EXTENSION - - - $class - - CF$UID - 213 - - NS.string - Packaging||EXECUTABLE_PREFIX - - - $class - - CF$UID - 213 - - NS.string - Packaging||INFOPLIST_EXPAND_BUILD_SETTINGS - - - $class - - CF$UID - 213 - - NS.string - Packaging||GENERATE_PKGINFO_FILE - - - $class - - CF$UID - 213 - - NS.string - Packaging||FRAMEWORK_VERSION - - - $class - - CF$UID - 213 - - NS.string - Packaging||INFOPLIST_FILE - - - $class - - CF$UID - 213 - - NS.string - Packaging||INFOPLIST_OTHER_PREPROCESSOR_FLAGS - - - $class - - CF$UID - 213 - - NS.string - Packaging||INFOPLIST_OUTPUT_FORMAT - - - $class - - CF$UID - 213 - - NS.string - Packaging||INFOPLIST_PREPROCESSOR_DEFINITIONS - - - $class - - CF$UID - 213 - - NS.string - Packaging||INFOPLIST_PREFIX_HEADER - - - $class - - CF$UID - 213 - - NS.string - Packaging||INFOPLIST_PREPROCESS - - - $class - - CF$UID - 213 - - NS.string - Packaging||COPYING_PRESERVES_HFS_DATA - - - $class - - CF$UID - 213 - - NS.string - Packaging||PRIVATE_HEADERS_FOLDER_PATH - - - $class - - CF$UID - 213 - - NS.string - Packaging||PRODUCT_NAME - - - $class - - CF$UID - 213 - - NS.string - Packaging||PLIST_FILE_OUTPUT_FORMAT - - - $class - - CF$UID - 213 - - NS.string - Packaging||PUBLIC_HEADERS_FOLDER_PATH - - - $class - - CF$UID - 213 - - NS.string - Packaging||STRINGS_FILE_OUTPUT_ENCODING - - - $class - - CF$UID - 213 - - NS.string - Packaging||WRAPPER_EXTENSION - - - $class - - CF$UID - 213 - - NS.string - Search Paths||ALWAYS_SEARCH_USER_PATHS - - - $class - - CF$UID - 213 - - NS.string - Search Paths||FRAMEWORK_SEARCH_PATHS - - - $class - - CF$UID - 213 - - NS.string - Search Paths||HEADER_SEARCH_PATHS - - - $class - - CF$UID - 213 - - NS.string - Search Paths||LIBRARY_SEARCH_PATHS - - - $class - - CF$UID - 213 - - NS.string - Search Paths||REZ_SEARCH_PATHS - - - $class - - CF$UID - 213 - - NS.string - Search Paths||EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES - - - $class - - CF$UID - 213 - - NS.string - Search Paths||INCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES - - - $class - - CF$UID - 213 - - NS.string - Search Paths||USER_HEADER_SEARCH_PATHS - - - $class - - CF$UID - 213 - - NS.string - Unit Testing||OTHER_TEST_FLAGS - - - $class - - CF$UID - 213 - - NS.string - Unit Testing||TEST_AFTER_BUILD - - - $class - - CF$UID - 213 - - NS.string - Unit Testing||TEST_HOST - - - $class - - CF$UID - 213 - - NS.string - Unit Testing||TEST_RIG - - - $class - - CF$UID - 213 - - NS.string - Versioning||CURRENT_PROJECT_VERSION - - - $class - - CF$UID - 213 - - NS.string - Versioning||VERSION_INFO_FILE - - - $class - - CF$UID - 213 - - NS.string - Versioning||VERSION_INFO_EXPORT_DECL - - - $class - - CF$UID - 213 - - NS.string - Versioning||VERSION_INFO_PREFIX - - - $class - - CF$UID - 213 - - NS.string - Versioning||VERSION_INFO_SUFFIX - - - $class - - CF$UID - 213 - - NS.string - Versioning||VERSIONING_SYSTEM - - - $class - - CF$UID - 213 - - NS.string - Versioning||VERSION_INFO_BUILDER - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_FAST_OBJC_DISPATCH - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_OBJC_CALL_CXX_CDTORS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_SSE3_EXTENSIONS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_SSE41_EXTENSIONS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_SSE42_EXTENSIONS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_STRICT_ALIASING - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_FEEDBACK_DIRECTED_OPTIMIZATION - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_GENERATE_DEBUGGING_SYMBOLS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_DYNAMIC_NO_PIC - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_GENERATE_TEST_COVERAGE_FILES - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_INLINES_ARE_PRIVATE_EXTERN - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_INSTRUMENT_PROGRAM_FLOW_ARCS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_KERNEL_DEVELOPMENT - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_DEBUGGING_SYMBOLS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||LLVM_LTO - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_REUSE_STRINGS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_NO_COMMON_BLOCKS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_OBJC_GC - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_FAST_MATH - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_ENABLE_SYMBOL_SEPARATION - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_THREADSAFE_STATICS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Code Generation||GCC_UNROLL_LOOPS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_CHAR_IS_UNSIGNED_CHAR - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_ASM_KEYWORD - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_C_LANGUAGE_STANDARD - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_CHECK_RETURN_VALUE_OF_OPERATOR_NEW - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_CW_ASM_SYNTAX - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_INPUT_FILETYPE - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_CPP_EXCEPTIONS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_CPP_RTTI - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_LINK_WITH_DYNAMIC_LIBRARIES - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_OBJC_EXCEPTIONS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_TRIGRAPHS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_FLOATING_POINT_LIBRARY_CALLS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_USE_INDIRECT_FUNCTION_CALLS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_USE_REGISTER_FUNCTION_CALLS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_INCREASE_PRECOMPILED_HEADER_SHARING - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_PRECOMPILE_PREFIX_HEADER - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_PREFIX_HEADER - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_BUILTIN_FUNCTIONS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_ENABLE_PASCAL_STRINGS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_FORCE_CPU_SUBTYPE_ALL - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_SHORT_ENUMS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Language||GCC_USE_STANDARD_INCLUDE_SEARCHING - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Preprocessing||GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_CHECK_SWITCH_STATEMENTS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_EFFECTIVE_CPLUSPLUS_VIOLATIONS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_FOUR_CHARACTER_CONSTANTS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_SHADOW - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_64_TO_32_BIT_CONVERSION - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_INHIBIT_ALL_WARNINGS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_RETURN_TYPE - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_MISSING_PARENTHESES - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_MISSING_PROTOTYPES - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_MISSING_NEWLINE - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_NON_VIRTUAL_DESTRUCTOR - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||WARNING_CFLAGS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_PEDANTIC - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_POINTER_SIGNEDNESS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_PROTOTYPE_CONVERSION - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_SIGN_COMPARE - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_STRICT_SELECTOR_MATCH - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_TREAT_NONCONFORMANT_CODE_ERRORS_AS_WARNINGS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_TREAT_WARNINGS_AS_ERRORS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_TYPECHECK_CALLS_TO_PRINTF - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNDECLARED_SELECTOR - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNINITIALIZED_AUTOS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNKNOWN_PRAGMAS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNUSED_FUNCTION - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNUSED_LABEL - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNUSED_PARAMETER - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNUSED_VALUE - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_UNUSED_VARIABLE - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Warnings||GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 710 - - - - - $class - - CF$UID - 213 - - NS.string - LLVM GCC 4.2 - Preprocessing||GCC_PREPROCESSOR_DEFINITIONS||Debug - - - $classes - - Xcode3ProjectDocumentLocation - DVTDocumentLocation - NSObject - - $classname - Xcode3ProjectDocumentLocation - - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 714 - - - CF$UID - 716 - - - CF$UID - 718 - - - CF$UID - 720 - - - CF$UID - 722 - - - CF$UID - 724 - - - CF$UID - 726 - - - CF$UID - 728 - - - CF$UID - 730 - - - CF$UID - 732 - - - CF$UID - 734 - - - CF$UID - 736 - - - CF$UID - 738 - - - CF$UID - 740 - - - CF$UID - 742 - - - CF$UID - 744 - - - CF$UID - 745 - - - CF$UID - 747 - - - CF$UID - 749 - - - CF$UID - 751 - - - NS.objects - - - CF$UID - 753 - - - CF$UID - 757 - - - CF$UID - 761 - - - CF$UID - 765 - - - CF$UID - 769 - - - CF$UID - 772 - - - CF$UID - 776 - - - CF$UID - 780 - - - CF$UID - 783 - - - CF$UID - 787 - - - CF$UID - 791 - - - CF$UID - 795 - - - CF$UID - 799 - - - CF$UID - 802 - - - CF$UID - 806 - - - CF$UID - 810 - - - CF$UID - 814 - - - CF$UID - 817 - - - CF$UID - 821 - - - CF$UID - 825 - - - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 715 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/Foundation/Synchronization/MemorySync.h - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 717 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 719 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/GLES-Render.h - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 721 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/cocos2d/Support/ZipUtils.m - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 723 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/Foundation/Common/Assert.h - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 725 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/Foundation/Common/GlobalDefines.h - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 727 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/Box2D/Collision/b2Distance.cpp - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 729 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 731 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/cocos2d/CCProtocols.h - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 733 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/GLES-Render.mm - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 735 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/cocos2d/Support/CCFileUtils.m - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 737 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/Box2D/Collision/b2DynamicTree.h - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 739 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/AppDelegate.h - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 741 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/cocos2d/Platforms/iOS/EAGLView.h - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 743 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/cocos2d/Support/ccUtils.c - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 212 - - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 746 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/AppDelegate.mm - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 748 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/Box2D/Dynamics/Joints/b2LineJoint.cpp - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 750 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/cocos2d/Support/ccCArray.h - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 752 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/GameConfig.h - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 754 - - - CF$UID - 755 - - - CF$UID - 39 - - - CF$UID - 756 - - - - 324798742.52822101 - {0, 494} - {429, 0} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 758 - - - CF$UID - 759 - - - CF$UID - 39 - - - CF$UID - 760 - - - - 324799031.10751802 - {0, 2591} - {3117, 0} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 762 - - - CF$UID - 763 - - - CF$UID - 39 - - - CF$UID - 764 - - - - 324796021.48056901 - {0, 2127} - {0, 0} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 766 - - - CF$UID - 767 - - - CF$UID - 39 - - - CF$UID - 768 - - - - 324798080.73439199 - {0, 1604} - {2946, 0} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 770 - - - CF$UID - 771 - - - CF$UID - 39 - - - CF$UID - 764 - - - - 324798170.86996502 - {0, 2260} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 773 - - - CF$UID - 774 - - - CF$UID - 39 - - - CF$UID - 775 - - - - 324798922.50436002 - {0, 2013} - {345, 0} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 777 - - - CF$UID - 778 - - - CF$UID - 39 - - - CF$UID - 779 - - - - 324798995.16117603 - {4517, 1196} - {5090, 0} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 781 - - - CF$UID - 782 - - - CF$UID - 39 - - - CF$UID - 764 - - - - 324798108.647075 - {0, 2361} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 784 - - - CF$UID - 785 - - - CF$UID - 39 - - - CF$UID - 786 - - - - 324797532.043199 - {2411, 1583} - {3994, 0} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 788 - - - CF$UID - 789 - - - CF$UID - 39 - - - CF$UID - 790 - - - - 324796038.73105103 - {1070, 917} - {1399, 0} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 792 - - - CF$UID - 793 - - - CF$UID - 39 - - - CF$UID - 794 - - - - 324797929.63003498 - {0, 2027} - {1442, 0} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 796 - - - CF$UID - 797 - - - CF$UID - 39 - - - CF$UID - 798 - - - - 324797846.23129201 - {3425, 1765} - {4394, 7} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 800 - - - CF$UID - 801 - - - CF$UID - 39 - - - CF$UID - 764 - - - - 324799035.97232902 - {0, 366} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 803 - - - CF$UID - 804 - - - CF$UID - 39 - - - CF$UID - 805 - - - - 324797536.34140903 - {4483, 2534} - {7017, 0} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 807 - - - CF$UID - 808 - - - CF$UID - 39 - - - CF$UID - 809 - - - - 324797542.24128997 - {0, 364} - {364, 0} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 811 - - - CF$UID - 812 - - - CF$UID - 39 - - - CF$UID - 813 - - - - 324798644.05974603 - {0, 1845} - {919, 0} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 815 - - - CF$UID - 816 - - - CF$UID - 39 - - - CF$UID - 764 - - - - 324799031.97011203 - {0, 2142} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 818 - - - CF$UID - 819 - - - CF$UID - 39 - - - CF$UID - 820 - - - - 324798999.325517 - {2393, 2137} - {3524, 0} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 822 - - - CF$UID - 823 - - - CF$UID - 39 - - - CF$UID - 824 - - - - 324798249.63659501 - {0, 2627} - {1992, 0} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 826 - - - CF$UID - 827 - - - CF$UID - 39 - - - CF$UID - 764 - - - - 324796022.72070903 - {0, 543} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 829 - - - CF$UID - 830 - - - NS.objects - - - CF$UID - 831 - - - CF$UID - 832 - - - - IDEDeviceLocation - IDEDeviceArchitecture - dvtdevice-iphonesimulator:/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3.sdk-iPad - i386 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 834 - - - NS.objects - - - CF$UID - 835 - - - - IDENameString - Littlest - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 736 - - - CF$UID - 744 - - - CF$UID - 837 - - - CF$UID - 714 - - - CF$UID - 732 - - - CF$UID - 839 - - - NS.objects - - - CF$UID - 841 - - - CF$UID - 846 - - - CF$UID - 849 - - - CF$UID - 852 - - - CF$UID - 855 - - - CF$UID - 858 - - - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 838 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/cocos2d/Support/ccCArray.h - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 840 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/cocos2d/Platforms/iOS/EAGLView.h - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 842 - - - CF$UID - 843 - - - NS.objects - - - CF$UID - 844 - - - CF$UID - 845 - - - - width - height - 600 - 600 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 842 - - - CF$UID - 843 - - - NS.objects - - - CF$UID - 847 - - - CF$UID - 848 - - - - 1058 - 788 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 842 - - - CF$UID - 843 - - - NS.objects - - - CF$UID - 850 - - - CF$UID - 851 - - - - 600 - 600 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 842 - - - CF$UID - 843 - - - NS.objects - - - CF$UID - 853 - - - CF$UID - 854 - - - - 600 - 600 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 842 - - - CF$UID - 843 - - - NS.objects - - - CF$UID - 856 - - - CF$UID - 857 - - - - 600 - 600 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 842 - - - CF$UID - 843 - - - NS.objects - - - CF$UID - 859 - - - CF$UID - 860 - - - - 600 - 600 - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 863 - - - CF$UID - 864 - - - CF$UID - 865 - - - NS.objects - - - CF$UID - 866 - - - CF$UID - 892 - - - CF$UID - 508 - - - - IDEActivityReportCompletionSummaryStringSegments - IDEActivityReportOptions - IDEActivityReportTitle - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 867 - - - CF$UID - 874 - - - CF$UID - 878 - - - CF$UID - 883 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 868 - - - CF$UID - 869 - - - CF$UID - 870 - - - NS.objects - - - CF$UID - 871 - - - CF$UID - 872 - - - CF$UID - 873 - - - - IDEActivityReportStringSegmentPriority - IDEActivityReportStringSegmentBackSeparator - IDEActivityReportStringSegmentStringValue - 2 - - Build - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 868 - - - CF$UID - 869 - - - CF$UID - 870 - - - NS.objects - - - CF$UID - 875 - - - CF$UID - 876 - - - CF$UID - 877 - - - - 4 - : - Littlest - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 868 - - - CF$UID - 869 - - - CF$UID - 870 - - - NS.objects - - - CF$UID - 879 - - - CF$UID - 880 - - - CF$UID - 881 - - - - 1 - │ - - $class - - CF$UID - 882 - - NS.data - - YnBsaXN0MDDUAQIDBAUGOzxYJHZlcnNpb25YJG9iamVjdHNZJGFy - Y2hpdmVyVCR0b3ASAAGGoK0HCA8QGhscJCUrMTQ3VSRudWxs0wkK - CwwNDlxOU0F0dHJpYnV0ZXNWJGNsYXNzWE5TU3RyaW5ngAOADIAC - WVN1Y2NlZWRlZNMKERITFBdXTlMua2V5c1pOUy5vYmplY3RzgAui - FRaABIAFohgZgAaACVZOU0ZvbnRXTlNDb2xvctQKHR4fICEiI1ZO - U05hbWVWTlNTaXplWE5TZkZsYWdzgAiAByNAJgAAAAAAABENEF8Q - EUx1Y2lkYUdyYW5kZS1Cb2xk0iYnKClaJGNsYXNzbmFtZVgkY2xh - c3Nlc1ZOU0ZvbnSiKCpYTlNPYmplY3TTCiwtLi8wXE5TQ29sb3JT - cGFjZVdOU1doaXRlgAoQA0IwANImJzIzV05TQ29sb3KiMirSJic1 - NlxOU0RpY3Rpb25hcnmiNSrSJic4OV8QEk5TQXR0cmlidXRlZFN0 - cmluZ6I6Kl8QEk5TQXR0cmlidXRlZFN0cmluZ18QD05TS2V5ZWRB - cmNoaXZlctE9PlRyb290gAEACAARABoAIwAtADIANwBFAEsAUgBf - AGYAbwBxAHMAdQB/AIYAjgCZAJsAngCgAKIApQCnAKkAsAC4AMEA - yADPANgA2gDcAOUA6AD8AQEBDAEVARwBHwEoAS8BPAFEAUYBSAFL - AVABWAFbAWABbQFwAXUBigGNAaIBtAG3AbwAAAAAAAACAQAAAAAA - AAA/AAAAAAAAAAAAAAAAAAABvg== - - - - $classes - - NSMutableData - NSData - NSObject - - $classname - NSMutableData - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 868 - - - CF$UID - 884 - - - CF$UID - 885 - - - CF$UID - 870 - - - CF$UID - 886 - - - CF$UID - 887 - - - NS.objects - - - CF$UID - 888 - - - CF$UID - 131 - - - CF$UID - 889 - - - CF$UID - 891 - - - CF$UID - 131 - - - CF$UID - 131 - - - - IDEActivityReportStringSegmentType - IDEActivityReportStringSegmentDate - IDEActivityReportStringSegmentDateStyle - IDEActivityReportStringSegmentTimeStyle - 3 - - $class - - CF$UID - 890 - - NS.time - 324799008.79813403 - - - $classes - - NSDate - NSObject - - $classname - NSDate - - Today at 10:56 PM - 106 - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 894 - - - CF$UID - 896 - - - CF$UID - 898 - - - CF$UID - 900 - - - CF$UID - 902 - - - CF$UID - 904 - - - CF$UID - 905 - - - CF$UID - 907 - - - CF$UID - 909 - - - CF$UID - 911 - - - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 895 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/AppDelegate.h - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 897 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/AppDelegate.mm - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 899 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 901 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/Box2D/Dynamics/Joints/b2LineJoint.cpp - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 903 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/Box2D/Collision/b2Distance.cpp - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 501 - - - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 906 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/Foundation/Common/GlobalDefines.h - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 908 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/Foundation/Synchronization/MemorySync.h - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 910 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/Box2D/Collision/b2BroadPhase.cpp - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 912 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/cocos2d/Support/ccCArray.h - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 29 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 27 - - - CF$UID - 914 - - - CF$UID - 28 - - - NS.objects - - - CF$UID - 8 - - - CF$UID - 915 - - - CF$UID - 39 - - - CF$UID - 914 - - - CF$UID - 916 - - - CF$UID - 976 - - - - IDEWorkspaceTabController_CAB69E15-FE1A-4771-8B6E-B94D5D9C0309 - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 914 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 31 - - - CF$UID - 32 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 38 - - - CF$UID - 39 - - - CF$UID - 917 - - - CF$UID - 923 - - - CF$UID - 934 - - - CF$UID - 39 - - - CF$UID - 942 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 918 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 919 - - - CF$UID - 921 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 920 - - - - 376 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 922 - - - - 224 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 924 - - - CF$UID - 54 - - - CF$UID - 931 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 925 - - - CF$UID - 926 - - - CF$UID - 927 - - - CF$UID - 928 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 929 - - - CF$UID - 39 - - - CF$UID - 930 - - - - {{0, 0}, {0, 0}} - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 932 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 933 - - - CF$UID - 84 - - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 87 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 935 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 936 - - - CF$UID - 938 - - - CF$UID - 940 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 937 - - - - 260 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 939 - - - - 880 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 941 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 943 - - - CF$UID - 947 - - - CF$UID - 954 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 969 - - - CF$UID - 975 - - - CF$UID - 39 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 944 - - rootLayoutTreeNode - - CF$UID - 945 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 945 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 946 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 944 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 948 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 949 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 950 - - - CF$UID - 38 - - - CF$UID - 952 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 951 - - - - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 953 - - - - {{0, 0}, {600, 600}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 955 - - - CF$UID - 956 - - - CF$UID - 131 - - - CF$UID - 957 - - - CF$UID - 963 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 958 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 959 - - - CF$UID - 961 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 960 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 962 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 964 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 965 - - - CF$UID - 967 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 966 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 968 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 970 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 971 - - - CF$UID - 973 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 972 - - - - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 974 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - {{31, 510}, {600, 624}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 29 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 978 - - - CF$UID - 27 - - - CF$UID - 28 - - - NS.objects - - - CF$UID - 9 - - - CF$UID - 979 - - - CF$UID - 39 - - - CF$UID - 980 - - - CF$UID - 978 - - - CF$UID - 1040 - - - - IDEWorkspaceTabController_F41C7749-7CA9-49DB-96FA-09EBA0ADFE75 - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 978 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 31 - - - CF$UID - 32 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 38 - - - CF$UID - 39 - - - CF$UID - 981 - - - CF$UID - 987 - - - CF$UID - 998 - - - CF$UID - 39 - - - CF$UID - 1006 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 982 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 983 - - - CF$UID - 985 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 984 - - - - 376 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 986 - - - - 224 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 988 - - - CF$UID - 54 - - - CF$UID - 995 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 989 - - - CF$UID - 990 - - - CF$UID - 991 - - - CF$UID - 992 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 993 - - - CF$UID - 39 - - - CF$UID - 994 - - - - {{0, 0}, {0, 0}} - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 996 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 997 - - - CF$UID - 84 - - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 87 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 999 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1000 - - - CF$UID - 1002 - - - CF$UID - 1004 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 1001 - - - - 260 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 1003 - - - - 880 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 1005 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 1007 - - - CF$UID - 1011 - - - CF$UID - 1018 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 1033 - - - CF$UID - 1039 - - - CF$UID - 39 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 1008 - - rootLayoutTreeNode - - CF$UID - 1009 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 1009 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 1010 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1008 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 1012 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 1013 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 1014 - - - CF$UID - 38 - - - CF$UID - 1016 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1015 - - - - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1017 - - - - {{0, 0}, {600, 600}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 1019 - - - CF$UID - 1020 - - - CF$UID - 131 - - - CF$UID - 1021 - - - CF$UID - 1027 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1022 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1023 - - - CF$UID - 1025 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1024 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1026 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1028 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1029 - - - CF$UID - 1031 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1030 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1032 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1034 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1035 - - - CF$UID - 1037 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 1036 - - - - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 1038 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - {{165, 377}, {600, 624}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 29 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 27 - - - CF$UID - 1042 - - - CF$UID - 28 - - - NS.objects - - - CF$UID - 10 - - - CF$UID - 1043 - - - CF$UID - 151 - - - CF$UID - 1042 - - - CF$UID - 1044 - - - CF$UID - 1197 - - - - IDEWorkspaceTabController_E2E6AD07-6BD6-47BB-BF66-5478490C095F - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1042 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 31 - - - CF$UID - 32 - - - CF$UID - 167 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 38 - - - CF$UID - 151 - - - CF$UID - 1045 - - - CF$UID - 1046 - - - CF$UID - 1052 - - - CF$UID - 1135 - - - CF$UID - 151 - - - CF$UID - 1143 - - - - AppDelegate.h - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1047 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1048 - - - CF$UID - 1050 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1049 - - - - 878 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1051 - - - - 224 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 1053 - - - CF$UID - 1054 - - - CF$UID - 55 - - - CF$UID - 54 - - - CF$UID - 1055 - - - CF$UID - 56 - - - CF$UID - 1056 - - - NS.objects - - - CF$UID - 1057 - - - CF$UID - 1061 - - - CF$UID - 56 - - - CF$UID - 1073 - - - CF$UID - 1112 - - - CF$UID - 1117 - - - CF$UID - 1127 - - - - Xcode.DebuggerKit.ThreadsStacksNavigator - Xcode.IDEKit.Navigator.BatchFind - Xcode.IDEKit.Navigator.Breakpoints - Xcode.IDEKit.Navigator.Logs - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 1058 - - - CF$UID - 1059 - - - CF$UID - 1060 - - - NS.objects - - - CF$UID - 136 - - - CF$UID - 38 - - - CF$UID - 39 - - - - IDEStackCompressionValue - IDEThreadsOrQueuesMode - IDEHideAncestorForNonInterestingFrames - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 1062 - - - CF$UID - 1063 - - - CF$UID - 1064 - - - CF$UID - 1065 - - - CF$UID - 1066 - - - CF$UID - 1067 - - - CF$UID - 1068 - - - NS.objects - - - CF$UID - 38 - - - CF$UID - 39 - - - CF$UID - 46 - - - CF$UID - 46 - - - CF$UID - 1069 - - - CF$UID - 38 - - - CF$UID - 1071 - - - - IDEBatchFindNavigatorScrollPosition - IDEBatchFindNavigatorShowsOptions - IDEBatchFindNavigatorReplaceString - IDEBatchFindNavigatorFindString - IDEBatchFindNavigatorSelectedRowIndexes - IDEBatchFindNavigatorFindMode - IDEBatchFindNavigatorCollapsedGroups - - $class - - CF$UID - 1070 - - NSRangeCount - 0 - - - $classes - - NSIndexSet - NSObject - - $classname - NSIndexSet - - - $class - - CF$UID - 1072 - - NSRangeCount - 0 - - - $classes - - NSMutableIndexSet - NSIndexSet - NSObject - - $classname - NSMutableIndexSet - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 1074 - - - CF$UID - 1075 - - - CF$UID - 1076 - - - CF$UID - 1109 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1110 - - - CF$UID - 39 - - - CF$UID - 1111 - - - - {{0, 0}, {291, 1036}} - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - CF$UID - 1077 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 1078 - - - CF$UID - 1079 - - - CF$UID - 1080 - - - CF$UID - 1081 - - - CF$UID - 1082 - - - NS.objects - - - CF$UID - 1083 - - - CF$UID - 1087 - - - CF$UID - 1088 - - - CF$UID - 1108 - - - CF$UID - 1087 - - - - documentLocations - fullMessage - subissues - type - shortMessage - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1084 - - - - - $class - - CF$UID - 1086 - - characterRangeLen - 0 - characterRangeLoc - -1 - documentURL - - CF$UID - 1085 - - endingColumnNumber - -1 - endingLineNumber - 134 - startingColumnNumber - -1 - startingLineNumber - 134 - timestamp - - CF$UID - 0 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Littlest/libs/Box2D/Collision/b2DynamicTree.h - - - $classes - - DVTTextDocumentLocation - DVTDocumentLocation - NSObject - - $classname - DVTTextDocumentLocation - - 'assert' was not declared in this scope - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1089 - - - CF$UID - 1096 - - - CF$UID - 1102 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 1078 - - - CF$UID - 1079 - - - CF$UID - 1080 - - - CF$UID - 1081 - - - CF$UID - 1082 - - - NS.objects - - - CF$UID - 1090 - - - CF$UID - 1093 - - - CF$UID - 1094 - - - CF$UID - 1095 - - - CF$UID - 1093 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1091 - - - - - $class - - CF$UID - 1086 - - characterRangeLen - 0 - characterRangeLoc - -1 - documentURL - - CF$UID - 1092 - - endingColumnNumber - -1 - endingLineNumber - 18 - startingColumnNumber - -1 - startingLineNumber - 18 - timestamp - - CF$UID - 0 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/Box2D/Collision/b2BroadPhase.cpp - - In file included from /Users/dorischen/Documents/Temp/Littlest/Littlest/libs/Box2D/Collision/b2BroadPhase.cpp - - $class - - CF$UID - 51 - - NS.objects - - - Uncategorized - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 1078 - - - CF$UID - 1079 - - - CF$UID - 1080 - - - CF$UID - 1081 - - - CF$UID - 1082 - - - NS.objects - - - CF$UID - 1097 - - - CF$UID - 1100 - - - CF$UID - 1101 - - - CF$UID - 1095 - - - CF$UID - 1100 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1098 - - - - - $class - - CF$UID - 1086 - - characterRangeLen - 0 - characterRangeLoc - -1 - documentURL - - CF$UID - 1099 - - endingColumnNumber - -1 - endingLineNumber - 23 - startingColumnNumber - -1 - startingLineNumber - 23 - timestamp - - CF$UID - 0 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Littlest/libs/Box2D/Collision/b2BroadPhase.h - - In file included from Littlest/libs/Box2D/Collision/b2BroadPhase.h - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 1078 - - - CF$UID - 1079 - - - CF$UID - 1080 - - - CF$UID - 1081 - - - CF$UID - 1082 - - - NS.objects - - - CF$UID - 1103 - - - CF$UID - 1106 - - - CF$UID - 1107 - - - CF$UID - 1095 - - - CF$UID - 1106 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1104 - - - - - $class - - CF$UID - 1086 - - characterRangeLen - 0 - characterRangeLoc - -1 - documentURL - - CF$UID - 1105 - - endingColumnNumber - -1 - endingLineNumber - 134 - startingColumnNumber - -1 - startingLineNumber - 134 - timestamp - - CF$UID - 0 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Littlest/libs/Box2D/Collision/b2DynamicTree.h - - 'assert' was not declared in this scope in Littlest/libs/Box2D/Collision/b2DynamicTree.h - - $class - - CF$UID - 51 - - NS.objects - - - '*' was not declared in this scope - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 1113 - - - CF$UID - 1114 - - - CF$UID - 81 - - - CF$UID - 76 - - - NS.objects - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 1115 - - - CF$UID - 1116 - - - - IDECollapsedtemsSet - IDEBreakpointNavigatorFilterOnEnabled - - $class - - CF$UID - 87 - - NS.objects - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 1118 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1119 - - - CF$UID - 1123 - - - - {{0, 0}, {291, 1058}} - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1120 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1121 - - - CF$UID - 208 - - - CF$UID - 1122 - - - - Littlest - AppDelegate.h - - $class - - CF$UID - 85 - - NS.objects - - - CF$UID - 1124 - - - CF$UID - 1125 - - - CF$UID - 1126 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1121 - - - CF$UID - 208 - - - CF$UID - 206 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1121 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1121 - - - CF$UID - 208 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 1128 - - - CF$UID - 1129 - - - CF$UID - 1130 - - - CF$UID - 1131 - - - NS.objects - - - CF$UID - 1132 - - - CF$UID - 1133 - - - CF$UID - 39 - - - CF$UID - 1134 - - - - IDELogNavigatorExpandedItemsStateKey - IDELogNavigatorSelectedObjectsStateKey - IDELogNavigatorRecentFilterStateKey - IDELogNavigatorVisibleRectStateKey - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1136 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1137 - - - CF$UID - 1139 - - - CF$UID - 1141 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 1138 - - - - 292 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 1140 - - - - 1048 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 1142 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 100 - - - CF$UID - 99 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 1144 - - - CF$UID - 1156 - - - CF$UID - 1171 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 1190 - - - CF$UID - 1196 - - - CF$UID - 151 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 1145 - - rootLayoutTreeNode - - CF$UID - 1154 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 1146 - - orientation - 0 - parent - - CF$UID - 1154 - - - - $class - - CF$UID - 215 - - DocumentLocation - - CF$UID - 1153 - - DomainIdentifier - - CF$UID - 1147 - - IdentifierPath - - CF$UID - 1148 - - IndexOfDocumentIdentifier - - CF$UID - 38 - - - Xcode.IDENavigableItemDomain.WorkspaceStructure - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1149 - - - CF$UID - 1150 - - - CF$UID - 1151 - - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1122 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 208 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1152 - - - Littlest - - $class - - CF$UID - 214 - - documentURL - - CF$UID - 739 - - timestamp - - CF$UID - 0 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 1155 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1145 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 1157 - - - CF$UID - 1158 - - - CF$UID - 131 - - - CF$UID - 1159 - - - CF$UID - 1165 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1160 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1161 - - - CF$UID - 1163 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1162 - - - - 351 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1164 - - - - 696 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1166 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1167 - - - CF$UID - 1169 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1168 - - - - 351 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1170 - - - - 696 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 1172 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 1173 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 1174 - - - CF$UID - 38 - - - CF$UID - 1188 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1175 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 223 - - - CF$UID - 224 - - - CF$UID - 225 - - - CF$UID - 226 - - - CF$UID - 227 - - - CF$UID - 228 - - - CF$UID - 229 - - - NS.objects - - - CF$UID - 1176 - - - CF$UID - 1177 - - - CF$UID - 1183 - - - CF$UID - 1122 - - - CF$UID - 1122 - - - CF$UID - 247 - - - CF$UID - 1186 - - - - public.c-header - - $class - - CF$UID - 215 - - DocumentLocation - - CF$UID - 1153 - - DomainIdentifier - - CF$UID - 1147 - - IdentifierPath - - CF$UID - 1178 - - IndexOfDocumentIdentifier - - CF$UID - 38 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1179 - - - CF$UID - 1180 - - - CF$UID - 1181 - - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1122 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 208 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1182 - - - Littlest - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 1184 - - - CF$UID - 1185 - - - CF$UID - 39 - - - CF$UID - 764 - - - - 324799035.97469199 - {0, 366} - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 1187 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/AppDelegate.h - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1189 - - - - {{0, 0}, {1048, 965}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1191 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1192 - - - CF$UID - 1194 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 1193 - - - - 987 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 1195 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - {{0, 0}, {1600, 1178}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 1199 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 27 - - - CF$UID - 28 - - - CF$UID - 29 - - - NS.objects - - - CF$UID - 1200 - - - CF$UID - 1286 - - - CF$UID - 39 - - - CF$UID - 1199 - - - CF$UID - 1287 - - - CF$UID - 11 - - - - IDEWorkspaceTabController_F5B0B4A4-79EE-4BDE-8DBB-ED05BA0E2AFA - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 167 - - - CF$UID - 32 - - - CF$UID - 31 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 1201 - - - CF$UID - 39 - - - CF$UID - 38 - - - CF$UID - 1202 - - - CF$UID - 1208 - - - CF$UID - 1220 - - - CF$UID - 39 - - - CF$UID - 1228 - - - - b2DynamicTree.h - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1203 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1204 - - - CF$UID - 1206 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1205 - - - - 376 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1207 - - - - 224 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 56 - - - CF$UID - 1209 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 1210 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1211 - - - CF$UID - 1215 - - - - {{0, 0}, {0, 0}} - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1212 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1213 - - - CF$UID - 208 - - - CF$UID - 206 - - - CF$UID - 204 - - - CF$UID - 1214 - - - - Littlest - b2DynamicTree.h - - $class - - CF$UID - 85 - - NS.objects - - - CF$UID - 1216 - - - CF$UID - 1217 - - - CF$UID - 1218 - - - CF$UID - 1219 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1213 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1213 - - - CF$UID - 208 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1213 - - - CF$UID - 208 - - - CF$UID - 206 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1213 - - - CF$UID - 208 - - - CF$UID - 206 - - - CF$UID - 204 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1221 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1222 - - - CF$UID - 1224 - - - CF$UID - 1226 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 1223 - - - - 260 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 1225 - - - - 880 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 1227 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 1229 - - - CF$UID - 1242 - - - CF$UID - 1264 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 1279 - - - CF$UID - 1285 - - - CF$UID - 39 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 1230 - - rootLayoutTreeNode - - CF$UID - 1240 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 1231 - - orientation - 0 - parent - - CF$UID - 1240 - - - - $class - - CF$UID - 215 - - DocumentLocation - - CF$UID - 1239 - - DomainIdentifier - - CF$UID - 1147 - - IdentifierPath - - CF$UID - 1232 - - IndexOfDocumentIdentifier - - CF$UID - 38 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1233 - - - CF$UID - 1234 - - - CF$UID - 1235 - - - CF$UID - 1236 - - - CF$UID - 1237 - - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1214 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 204 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 206 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 208 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1238 - - - Littlest - - $class - - CF$UID - 214 - - documentURL - - CF$UID - 737 - - timestamp - - CF$UID - 0 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 1241 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1230 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 1243 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 1244 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 1245 - - - CF$UID - 38 - - - CF$UID - 1262 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1246 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 223 - - - CF$UID - 224 - - - CF$UID - 225 - - - CF$UID - 226 - - - CF$UID - 227 - - - CF$UID - 228 - - - CF$UID - 229 - - - NS.objects - - - CF$UID - 1176 - - - CF$UID - 1247 - - - CF$UID - 1255 - - - CF$UID - 1259 - - - CF$UID - 1214 - - - CF$UID - 247 - - - CF$UID - 1260 - - - - - $class - - CF$UID - 215 - - DocumentLocation - - CF$UID - 1239 - - DomainIdentifier - - CF$UID - 1147 - - IdentifierPath - - CF$UID - 1248 - - IndexOfDocumentIdentifier - - CF$UID - 38 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1249 - - - CF$UID - 1250 - - - CF$UID - 1251 - - - CF$UID - 1252 - - - CF$UID - 1253 - - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1214 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 204 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 206 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 208 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1254 - - - Littlest - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 1256 - - - CF$UID - 1257 - - - CF$UID - 39 - - - CF$UID - 1258 - - - - 324797747.82993799 - {1542, 1488} - {2273, 6} - class b2DynamicTree - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 1261 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/Box2D/Collision/b2DynamicTree.h - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1263 - - - - {{0, 0}, {600, 600}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 1265 - - - CF$UID - 1266 - - - CF$UID - 131 - - - CF$UID - 1267 - - - CF$UID - 1273 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1268 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1269 - - - CF$UID - 1271 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1270 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1272 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1274 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1275 - - - CF$UID - 1277 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1276 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1278 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1280 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1281 - - - CF$UID - 1283 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 1282 - - - - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 1284 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1199 - - - - {{438, -848}, {600, 624}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 29 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 27 - - - CF$UID - 1289 - - - CF$UID - 28 - - - NS.objects - - - CF$UID - 12 - - - CF$UID - 1290 - - - CF$UID - 39 - - - CF$UID - 1289 - - - CF$UID - 1291 - - - CF$UID - 1378 - - - - IDEWorkspaceTabController_C9B23C9E-8AE8-4462-BB4C-E221CC490A7D - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1289 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 167 - - - CF$UID - 32 - - - CF$UID - 31 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 1292 - - - CF$UID - 39 - - - CF$UID - 38 - - - CF$UID - 1293 - - - CF$UID - 1299 - - - CF$UID - 1310 - - - CF$UID - 39 - - - CF$UID - 1318 - - - - EAGLView.h - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1294 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1295 - - - CF$UID - 1297 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1296 - - - - 376 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1298 - - - - 224 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 1300 - - - CF$UID - 54 - - - CF$UID - 1307 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 1301 - - - CF$UID - 1302 - - - CF$UID - 1303 - - - CF$UID - 1304 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1305 - - - CF$UID - 39 - - - CF$UID - 1306 - - - - {{0, 0}, {0, 0}} - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 1308 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1309 - - - CF$UID - 84 - - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 87 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1311 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1312 - - - CF$UID - 1314 - - - CF$UID - 1316 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 1313 - - - - 260 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 1315 - - - - 880 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 1317 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 1319 - - - CF$UID - 1335 - - - CF$UID - 1356 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 1371 - - - CF$UID - 1377 - - - CF$UID - 39 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 1320 - - rootLayoutTreeNode - - CF$UID - 1333 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 1321 - - orientation - 0 - parent - - CF$UID - 1333 - - - - $class - - CF$UID - 215 - - DocumentLocation - - CF$UID - 1331 - - DomainIdentifier - - CF$UID - 198 - - IdentifierPath - - CF$UID - 1322 - - IndexOfDocumentIdentifier - - CF$UID - 38 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1323 - - - CF$UID - 1325 - - - CF$UID - 1327 - - - CF$UID - 1328 - - - CF$UID - 1329 - - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1324 - - - EAGLView.h - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1326 - - - cocos2d - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 206 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 208 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1330 - - - Littlest - - $class - - CF$UID - 214 - - documentURL - - CF$UID - 1332 - - timestamp - - CF$UID - 0 - - - - $class - - CF$UID - 213 - - NS.string - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/cocos2d/Platforms/iOS/EAGLView.h - - - $class - - CF$UID - 110 - - children - - CF$UID - 1334 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1320 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 1336 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 1337 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 1338 - - - CF$UID - 38 - - - CF$UID - 1354 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1339 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 223 - - - CF$UID - 224 - - - CF$UID - 225 - - - CF$UID - 226 - - - CF$UID - 227 - - - CF$UID - 228 - - - CF$UID - 229 - - - NS.objects - - - CF$UID - 1176 - - - CF$UID - 1340 - - - CF$UID - 1348 - - - CF$UID - 1324 - - - CF$UID - 1324 - - - CF$UID - 247 - - - CF$UID - 1352 - - - - - $class - - CF$UID - 215 - - DocumentLocation - - CF$UID - 1331 - - DomainIdentifier - - CF$UID - 198 - - IdentifierPath - - CF$UID - 1341 - - IndexOfDocumentIdentifier - - CF$UID - 38 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1342 - - - CF$UID - 1343 - - - CF$UID - 1344 - - - CF$UID - 1345 - - - CF$UID - 1346 - - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1324 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1326 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 206 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 208 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1347 - - - Littlest - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 1349 - - - CF$UID - 1350 - - - CF$UID - 39 - - - CF$UID - 1351 - - - - 324797456.81506699 - {5168, 1850} - {7018, 0} - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 1353 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/cocos2d/Platforms/iOS/EAGLView.h - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1355 - - - - {{0, 0}, {600, 600}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 1357 - - - CF$UID - 1358 - - - CF$UID - 131 - - - CF$UID - 1359 - - - CF$UID - 1365 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1360 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1361 - - - CF$UID - 1363 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1362 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1364 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1366 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1367 - - - CF$UID - 1369 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1368 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1370 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1372 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1373 - - - CF$UID - 1375 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 1374 - - - - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 1376 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - {{186, 354}, {600, 624}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 29 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 1380 - - - CF$UID - 27 - - - CF$UID - 28 - - - NS.objects - - - CF$UID - 13 - - - CF$UID - 1381 - - - CF$UID - 39 - - - CF$UID - 1382 - - - CF$UID - 1380 - - - CF$UID - 1442 - - - - IDEWorkspaceTabController_7CA7805E-9440-4C14-8000-B32AB01B8595 - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1380 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 31 - - - CF$UID - 32 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 38 - - - CF$UID - 39 - - - CF$UID - 1383 - - - CF$UID - 1389 - - - CF$UID - 1400 - - - CF$UID - 39 - - - CF$UID - 1408 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1384 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1385 - - - CF$UID - 1387 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1386 - - - - 389 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1388 - - - - 211 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 1390 - - - CF$UID - 54 - - - CF$UID - 1397 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 1391 - - - CF$UID - 1392 - - - CF$UID - 1393 - - - CF$UID - 1394 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1395 - - - CF$UID - 39 - - - CF$UID - 1396 - - - - {{0, 0}, {0, 0}} - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 1398 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1399 - - - CF$UID - 84 - - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 87 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1401 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1402 - - - CF$UID - 1404 - - - CF$UID - 1406 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 1403 - - - - 594 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 1405 - - - - 746 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 1407 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 1409 - - - CF$UID - 1413 - - - CF$UID - 1420 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 1435 - - - CF$UID - 1441 - - - CF$UID - 39 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 1410 - - rootLayoutTreeNode - - CF$UID - 1411 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 1411 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 1412 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1410 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 1414 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 1415 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 1416 - - - CF$UID - 38 - - - CF$UID - 1418 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1417 - - - - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1419 - - - - {{0, 0}, {600, 600}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 1421 - - - CF$UID - 1422 - - - CF$UID - 131 - - - CF$UID - 1423 - - - CF$UID - 1429 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1424 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1425 - - - CF$UID - 1427 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1426 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1428 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1430 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1431 - - - CF$UID - 1433 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1432 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1434 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1436 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1437 - - - CF$UID - 1439 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 1438 - - - - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 1440 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - {{41, 453}, {600, 624}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 1444 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 27 - - - CF$UID - 28 - - - CF$UID - 29 - - - NS.objects - - - CF$UID - 1445 - - - CF$UID - 1505 - - - CF$UID - 39 - - - CF$UID - 1444 - - - CF$UID - 1506 - - - CF$UID - 14 - - - - IDEWorkspaceTabController_5072C56A-1125-4451-9AFD-9E07B25EEF0B - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 31 - - - CF$UID - 32 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 38 - - - CF$UID - 39 - - - CF$UID - 1446 - - - CF$UID - 1452 - - - CF$UID - 1463 - - - CF$UID - 39 - - - CF$UID - 1471 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1447 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1448 - - - CF$UID - 1450 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1449 - - - - 389 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1451 - - - - 211 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 1453 - - - CF$UID - 54 - - - CF$UID - 1460 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 1454 - - - CF$UID - 1455 - - - CF$UID - 1456 - - - CF$UID - 1457 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1458 - - - CF$UID - 39 - - - CF$UID - 1459 - - - - {{0, 0}, {0, 0}} - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 1461 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1462 - - - CF$UID - 84 - - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 87 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1464 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1465 - - - CF$UID - 1467 - - - CF$UID - 1469 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 1466 - - - - 594 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 1468 - - - - 746 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 1470 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 1472 - - - CF$UID - 1476 - - - CF$UID - 1483 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 1498 - - - CF$UID - 1504 - - - CF$UID - 39 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 1473 - - rootLayoutTreeNode - - CF$UID - 1474 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 1474 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 1475 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1473 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 1477 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 1478 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 1479 - - - CF$UID - 38 - - - CF$UID - 1481 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1480 - - - - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1482 - - - - {{0, 0}, {600, 600}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 1484 - - - CF$UID - 1485 - - - CF$UID - 131 - - - CF$UID - 1486 - - - CF$UID - 1492 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1487 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1488 - - - CF$UID - 1490 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1489 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1491 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1493 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1494 - - - CF$UID - 1496 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1495 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1497 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1499 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1500 - - - CF$UID - 1502 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 1501 - - - - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 1503 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1444 - - - - {{62, 430}, {600, 624}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 29 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 1508 - - - CF$UID - 27 - - - CF$UID - 28 - - - NS.objects - - - CF$UID - 15 - - - CF$UID - 1509 - - - CF$UID - 39 - - - CF$UID - 1510 - - - CF$UID - 1508 - - - CF$UID - 1597 - - - - IDEWorkspaceTabController_7B564551-73DB-464C-93B2-816F3512126E - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1508 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 167 - - - CF$UID - 32 - - - CF$UID - 31 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 1511 - - - CF$UID - 39 - - - CF$UID - 38 - - - CF$UID - 1512 - - - CF$UID - 1518 - - - CF$UID - 1529 - - - CF$UID - 39 - - - CF$UID - 1537 - - - - MemorySync.h - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1513 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1514 - - - CF$UID - 1516 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1515 - - - - 389 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1517 - - - - 211 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 1519 - - - CF$UID - 54 - - - CF$UID - 1526 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 1520 - - - CF$UID - 1521 - - - CF$UID - 1522 - - - CF$UID - 1523 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1524 - - - CF$UID - 39 - - - CF$UID - 1525 - - - - {{0, 0}, {0, 0}} - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 1527 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1528 - - - CF$UID - 84 - - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 87 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1530 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1531 - - - CF$UID - 1533 - - - CF$UID - 1535 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 1532 - - - - 594 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 1534 - - - - 746 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 1536 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 1538 - - - CF$UID - 1554 - - - CF$UID - 1575 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 1590 - - - CF$UID - 1596 - - - CF$UID - 39 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 1539 - - rootLayoutTreeNode - - CF$UID - 1552 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 1540 - - orientation - 0 - parent - - CF$UID - 1552 - - - - $class - - CF$UID - 215 - - DocumentLocation - - CF$UID - 1551 - - DomainIdentifier - - CF$UID - 198 - - IdentifierPath - - CF$UID - 1541 - - IndexOfDocumentIdentifier - - CF$UID - 38 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1542 - - - CF$UID - 1544 - - - CF$UID - 1546 - - - CF$UID - 1548 - - - CF$UID - 1549 - - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1543 - - - MemorySync.h - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1545 - - - Synchronization - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1547 - - - Foundation - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 208 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1550 - - - Littlest - - $class - - CF$UID - 214 - - documentURL - - CF$UID - 715 - - timestamp - - CF$UID - 0 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 1553 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1539 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 1555 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 1556 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 1557 - - - CF$UID - 38 - - - CF$UID - 1573 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1558 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 223 - - - CF$UID - 224 - - - CF$UID - 225 - - - CF$UID - 226 - - - CF$UID - 227 - - - CF$UID - 228 - - - CF$UID - 229 - - - NS.objects - - - CF$UID - 1176 - - - CF$UID - 1559 - - - CF$UID - 1567 - - - CF$UID - 1543 - - - CF$UID - 1543 - - - CF$UID - 247 - - - CF$UID - 1571 - - - - - $class - - CF$UID - 215 - - DocumentLocation - - CF$UID - 1551 - - DomainIdentifier - - CF$UID - 198 - - IdentifierPath - - CF$UID - 1560 - - IndexOfDocumentIdentifier - - CF$UID - 38 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1561 - - - CF$UID - 1562 - - - CF$UID - 1563 - - - CF$UID - 1564 - - - CF$UID - 1565 - - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1543 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1545 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1547 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 208 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1566 - - - Littlest - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 1568 - - - CF$UID - 1569 - - - CF$UID - 39 - - - CF$UID - 1570 - - - - 324798715.45595002 - {0, 494} - {429, 0} - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 1572 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/Foundation/Synchronization/MemorySync.h - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1574 - - - - {{0, 0}, {600, 600}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 1576 - - - CF$UID - 1577 - - - CF$UID - 131 - - - CF$UID - 1578 - - - CF$UID - 1584 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1579 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1580 - - - CF$UID - 1582 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1581 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1583 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1585 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1586 - - - CF$UID - 1588 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1587 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1589 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1591 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1592 - - - CF$UID - 1594 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 1593 - - - - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 1595 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - {{83, 407}, {600, 624}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 1599 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 27 - - - CF$UID - 28 - - - CF$UID - 29 - - - NS.objects - - - CF$UID - 1600 - - - CF$UID - 1683 - - - CF$UID - 39 - - - CF$UID - 1599 - - - CF$UID - 1684 - - - CF$UID - 16 - - - - IDEWorkspaceTabController_EF4A448B-D0F1-435F-956B-082FD91AA48C - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 167 - - - CF$UID - 32 - - - CF$UID - 31 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 1601 - - - CF$UID - 39 - - - CF$UID - 38 - - - CF$UID - 1602 - - - CF$UID - 1608 - - - CF$UID - 1619 - - - CF$UID - 39 - - - CF$UID - 1627 - - - - GLES-Render.mm - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1603 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1604 - - - CF$UID - 1606 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1605 - - - - 376 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1607 - - - - 224 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 1609 - - - CF$UID - 54 - - - CF$UID - 1616 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 1610 - - - CF$UID - 1611 - - - CF$UID - 1612 - - - CF$UID - 1613 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1614 - - - CF$UID - 39 - - - CF$UID - 1615 - - - - {{0, 0}, {0, 0}} - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 1617 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1618 - - - CF$UID - 84 - - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 87 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1620 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1621 - - - CF$UID - 1623 - - - CF$UID - 1625 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 1622 - - - - 260 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 1624 - - - - 1140 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 1626 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 1628 - - - CF$UID - 1640 - - - CF$UID - 1661 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 1676 - - - CF$UID - 1682 - - - CF$UID - 39 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 1629 - - rootLayoutTreeNode - - CF$UID - 1638 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 1630 - - orientation - 0 - parent - - CF$UID - 1638 - - - - $class - - CF$UID - 215 - - DocumentLocation - - CF$UID - 1637 - - DomainIdentifier - - CF$UID - 198 - - IdentifierPath - - CF$UID - 1631 - - IndexOfDocumentIdentifier - - CF$UID - 38 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1632 - - - CF$UID - 1634 - - - CF$UID - 1635 - - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1633 - - - GLES-Render.mm - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 208 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1636 - - - Littlest - - $class - - CF$UID - 214 - - documentURL - - CF$UID - 733 - - timestamp - - CF$UID - 0 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 1639 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1629 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 1641 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 1642 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 1643 - - - CF$UID - 38 - - - CF$UID - 1659 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1644 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 223 - - - CF$UID - 224 - - - CF$UID - 225 - - - CF$UID - 226 - - - CF$UID - 227 - - - CF$UID - 228 - - - CF$UID - 229 - - - NS.objects - - - CF$UID - 1645 - - - CF$UID - 1646 - - - CF$UID - 1652 - - - CF$UID - 1656 - - - CF$UID - 1633 - - - CF$UID - 247 - - - CF$UID - 1657 - - - - public.objective-c-plus-plus-source - - $class - - CF$UID - 215 - - DocumentLocation - - CF$UID - 1637 - - DomainIdentifier - - CF$UID - 198 - - IdentifierPath - - CF$UID - 1647 - - IndexOfDocumentIdentifier - - CF$UID - 38 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1648 - - - CF$UID - 1649 - - - CF$UID - 1650 - - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1633 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 208 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1651 - - - Littlest - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 1653 - - - CF$UID - 1654 - - - CF$UID - 39 - - - CF$UID - 1655 - - - - 324796045.71103501 - {1070, 917} - {1399, 0} - GLESDebugDraw::DrawPolygon(const b2Vec2* old_vertices, int32 vertexCount, const b2Color& color) - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 1658 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/GLES-Render.mm - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1660 - - - - {{0, 0}, {600, 600}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 1662 - - - CF$UID - 1663 - - - CF$UID - 131 - - - CF$UID - 1664 - - - CF$UID - 1670 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1665 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1666 - - - CF$UID - 1668 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1667 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1669 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1671 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1672 - - - CF$UID - 1674 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1673 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1675 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1677 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1678 - - - CF$UID - 1680 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 1679 - - - - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 1681 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1599 - - - - {{123, 423}, {600, 624}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 29 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 27 - - - CF$UID - 28 - - - CF$UID - 1686 - - - NS.objects - - - CF$UID - 17 - - - CF$UID - 1687 - - - CF$UID - 39 - - - CF$UID - 1686 - - - CF$UID - 1688 - - - CF$UID - 1689 - - - - IDEWorkspaceTabController_6B8F402D-8327-44A0-BAE4-095F07957571 - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1686 - - - - {{136, 395}, {600, 624}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 31 - - - CF$UID - 32 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 38 - - - CF$UID - 39 - - - CF$UID - 1690 - - - CF$UID - 1696 - - - CF$UID - 1707 - - - CF$UID - 39 - - - CF$UID - 1715 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1691 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1692 - - - CF$UID - 1694 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1693 - - - - 389 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1695 - - - - 211 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 1697 - - - CF$UID - 54 - - - CF$UID - 1704 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 1698 - - - CF$UID - 1699 - - - CF$UID - 1700 - - - CF$UID - 1701 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1702 - - - CF$UID - 39 - - - CF$UID - 1703 - - - - {{0, 0}, {0, 0}} - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 1705 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1706 - - - CF$UID - 84 - - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 87 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1708 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1709 - - - CF$UID - 1711 - - - CF$UID - 1713 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 1710 - - - - 260 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 1712 - - - - 1080 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 1714 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 1716 - - - CF$UID - 1720 - - - CF$UID - 1727 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 1742 - - - CF$UID - 1748 - - - CF$UID - 39 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 1717 - - rootLayoutTreeNode - - CF$UID - 1718 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 1718 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 1719 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1717 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 1721 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 1722 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 1723 - - - CF$UID - 38 - - - CF$UID - 1725 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1724 - - - - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1726 - - - - {{0, 0}, {600, 600}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 1728 - - - CF$UID - 1729 - - - CF$UID - 131 - - - CF$UID - 1730 - - - CF$UID - 1736 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1731 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1732 - - - CF$UID - 1734 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1733 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1735 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1737 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1738 - - - CF$UID - 1740 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1739 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1741 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1743 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1744 - - - CF$UID - 1746 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 1745 - - - - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 1747 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 29 - - - CF$UID - 25 - - - CF$UID - 1750 - - - CF$UID - 26 - - - CF$UID - 27 - - - CF$UID - 28 - - - NS.objects - - - CF$UID - 18 - - - CF$UID - 1751 - - - CF$UID - 1752 - - - CF$UID - 39 - - - CF$UID - 1750 - - - CF$UID - 1835 - - - - IDEWorkspaceTabController_740BE6ED-287E-4100-B105-F5039743207B - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1750 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 167 - - - CF$UID - 32 - - - CF$UID - 31 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 1292 - - - CF$UID - 39 - - - CF$UID - 38 - - - CF$UID - 1753 - - - CF$UID - 1759 - - - CF$UID - 1770 - - - CF$UID - 39 - - - CF$UID - 1778 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1754 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1755 - - - CF$UID - 1757 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1756 - - - - 376 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1758 - - - - 224 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 1760 - - - CF$UID - 54 - - - CF$UID - 1767 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 1761 - - - CF$UID - 1762 - - - CF$UID - 1763 - - - CF$UID - 1764 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1765 - - - CF$UID - 39 - - - CF$UID - 1766 - - - - {{0, 0}, {0, 0}} - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 1768 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1769 - - - CF$UID - 84 - - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 87 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1771 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1772 - - - CF$UID - 1774 - - - CF$UID - 1776 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 1773 - - - - 260 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 1775 - - - - 880 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 1777 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 1779 - - - CF$UID - 1792 - - - CF$UID - 1813 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 1828 - - - CF$UID - 1834 - - - CF$UID - 39 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 1780 - - rootLayoutTreeNode - - CF$UID - 1790 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 1781 - - orientation - 0 - parent - - CF$UID - 1790 - - - - $class - - CF$UID - 215 - - DocumentLocation - - CF$UID - 1789 - - DomainIdentifier - - CF$UID - 198 - - IdentifierPath - - CF$UID - 1782 - - IndexOfDocumentIdentifier - - CF$UID - 38 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1783 - - - CF$UID - 1784 - - - CF$UID - 1785 - - - CF$UID - 1786 - - - CF$UID - 1787 - - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1324 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1326 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 206 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 208 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1788 - - - Littlest - - $class - - CF$UID - 214 - - documentURL - - CF$UID - 840 - - timestamp - - CF$UID - 0 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 1791 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1780 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 1793 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 1794 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 1795 - - - CF$UID - 38 - - - CF$UID - 1811 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1796 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 223 - - - CF$UID - 224 - - - CF$UID - 225 - - - CF$UID - 226 - - - CF$UID - 227 - - - CF$UID - 228 - - - CF$UID - 229 - - - NS.objects - - - CF$UID - 1176 - - - CF$UID - 1797 - - - CF$UID - 1805 - - - CF$UID - 1324 - - - CF$UID - 1324 - - - CF$UID - 247 - - - CF$UID - 1809 - - - - - $class - - CF$UID - 215 - - DocumentLocation - - CF$UID - 1789 - - DomainIdentifier - - CF$UID - 198 - - IdentifierPath - - CF$UID - 1798 - - IndexOfDocumentIdentifier - - CF$UID - 38 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1799 - - - CF$UID - 1800 - - - CF$UID - 1801 - - - CF$UID - 1802 - - - CF$UID - 1803 - - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1324 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1326 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 206 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 208 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1804 - - - Littlest - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 1806 - - - CF$UID - 1807 - - - CF$UID - 39 - - - CF$UID - 1808 - - - - 324797464.91532201 - {5168, 1850} - {7018, 0} - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 1810 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/cocos2d/Platforms/iOS/EAGLView.h - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1812 - - - - {{0, 0}, {600, 600}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 1814 - - - CF$UID - 1815 - - - CF$UID - 131 - - - CF$UID - 1816 - - - CF$UID - 1822 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1817 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1818 - - - CF$UID - 1820 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1819 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1821 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1823 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1824 - - - CF$UID - 1826 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1825 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1827 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1829 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1830 - - - CF$UID - 1832 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 1831 - - - - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 1833 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - {{10, 331}, {600, 624}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 29 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 27 - - - CF$UID - 28 - - - CF$UID - 1837 - - - NS.objects - - - CF$UID - 19 - - - CF$UID - 1838 - - - CF$UID - 39 - - - CF$UID - 1837 - - - CF$UID - 1839 - - - CF$UID - 1840 - - - - IDEWorkspaceTabController_02BAC16A-E1D7-4E75-9779-782482E679CE - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1837 - - - - {{199, 499}, {600, 624}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 167 - - - CF$UID - 32 - - - CF$UID - 31 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 1841 - - - CF$UID - 39 - - - CF$UID - 38 - - - CF$UID - 1842 - - - CF$UID - 1848 - - - CF$UID - 1859 - - - CF$UID - 39 - - - CF$UID - 1867 - - - - ccCArray.h - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1843 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1844 - - - CF$UID - 1846 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1845 - - - - 389 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1847 - - - - 211 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 1849 - - - CF$UID - 54 - - - CF$UID - 1856 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 1850 - - - CF$UID - 1851 - - - CF$UID - 1852 - - - CF$UID - 1853 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1854 - - - CF$UID - 39 - - - CF$UID - 1855 - - - - {{0, 0}, {0, 0}} - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 1857 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1858 - - - CF$UID - 84 - - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 87 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1860 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1861 - - - CF$UID - 1863 - - - CF$UID - 1865 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 1862 - - - - 594 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 1864 - - - - 746 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 1866 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 1868 - - - CF$UID - 1882 - - - CF$UID - 1904 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 1919 - - - CF$UID - 1925 - - - CF$UID - 39 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 1869 - - rootLayoutTreeNode - - CF$UID - 1880 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 1870 - - orientation - 0 - parent - - CF$UID - 1880 - - - - $class - - CF$UID - 215 - - DocumentLocation - - CF$UID - 1879 - - DomainIdentifier - - CF$UID - 198 - - IdentifierPath - - CF$UID - 1871 - - IndexOfDocumentIdentifier - - CF$UID - 38 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1872 - - - CF$UID - 1874 - - - CF$UID - 1875 - - - CF$UID - 1876 - - - CF$UID - 1877 - - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1873 - - - ccCArray.h - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1326 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 206 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 208 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1878 - - - Littlest - - $class - - CF$UID - 214 - - documentURL - - CF$UID - 838 - - timestamp - - CF$UID - 0 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 1881 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1869 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 1883 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 1884 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 1885 - - - CF$UID - 38 - - - CF$UID - 1902 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1886 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 223 - - - CF$UID - 224 - - - CF$UID - 225 - - - CF$UID - 226 - - - CF$UID - 227 - - - CF$UID - 228 - - - CF$UID - 229 - - - NS.objects - - - CF$UID - 1176 - - - CF$UID - 1887 - - - CF$UID - 1895 - - - CF$UID - 1899 - - - CF$UID - 1873 - - - CF$UID - 247 - - - CF$UID - 1900 - - - - - $class - - CF$UID - 215 - - DocumentLocation - - CF$UID - 1879 - - DomainIdentifier - - CF$UID - 198 - - IdentifierPath - - CF$UID - 1888 - - IndexOfDocumentIdentifier - - CF$UID - 38 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1889 - - - CF$UID - 1890 - - - CF$UID - 1891 - - - CF$UID - 1892 - - - CF$UID - 1893 - - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1873 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1326 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 206 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 208 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1894 - - - Littlest - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 1896 - - - CF$UID - 1897 - - - CF$UID - 39 - - - CF$UID - 1898 - - - - 324797909.57346803 - {1119, 1306} - {9404, 0} - ccCArrayInsertValueAtIndex( ccCArray *arr, void *value, NSUInteger index) - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 1901 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/libs/cocos2d/Support/ccCArray.h - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1903 - - - - {{0, 0}, {600, 600}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 1905 - - - CF$UID - 1906 - - - CF$UID - 131 - - - CF$UID - 1907 - - - CF$UID - 1913 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1908 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1909 - - - CF$UID - 1911 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1910 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1912 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1914 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1915 - - - CF$UID - 1917 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1916 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1918 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1920 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1921 - - - CF$UID - 1923 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 1922 - - - - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 1924 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 29 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 27 - - - CF$UID - 28 - - - CF$UID - 1927 - - - NS.objects - - - CF$UID - 20 - - - CF$UID - 1928 - - - CF$UID - 39 - - - CF$UID - 1927 - - - CF$UID - 1929 - - - CF$UID - 1930 - - - - IDEWorkspaceTabController_921D7431-B97B-455B-B25D-02A34F4AAD82 - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1927 - - - - {{20, 476}, {600, 624}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 31 - - - CF$UID - 32 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 38 - - - CF$UID - 39 - - - CF$UID - 1931 - - - CF$UID - 1937 - - - CF$UID - 1948 - - - CF$UID - 39 - - - CF$UID - 1956 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1932 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1933 - - - CF$UID - 1935 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1934 - - - - 389 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1936 - - - - 211 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 1938 - - - CF$UID - 54 - - - CF$UID - 1945 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 1939 - - - CF$UID - 1940 - - - CF$UID - 1941 - - - CF$UID - 1942 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1943 - - - CF$UID - 39 - - - CF$UID - 1944 - - - - {{0, 0}, {0, 0}} - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 1946 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 1947 - - - CF$UID - 84 - - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 87 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1949 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1950 - - - CF$UID - 1952 - - - CF$UID - 1954 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 1951 - - - - 594 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 1953 - - - - 746 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 1955 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 1957 - - - CF$UID - 1961 - - - CF$UID - 1968 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 1983 - - - CF$UID - 1989 - - - CF$UID - 39 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 1958 - - rootLayoutTreeNode - - CF$UID - 1959 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 1959 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 1960 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1958 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 1962 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 1963 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 1964 - - - CF$UID - 38 - - - CF$UID - 1966 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1965 - - - - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1967 - - - - {{0, 0}, {600, 600}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 1969 - - - CF$UID - 1970 - - - CF$UID - 131 - - - CF$UID - 1971 - - - CF$UID - 1977 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1972 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1973 - - - CF$UID - 1975 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1974 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1976 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1978 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1979 - - - CF$UID - 1981 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 1980 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 1982 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1984 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1985 - - - CF$UID - 1987 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 1986 - - - - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 1988 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 29 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 1991 - - - CF$UID - 27 - - - CF$UID - 28 - - - NS.objects - - - CF$UID - 21 - - - CF$UID - 1992 - - - CF$UID - 39 - - - CF$UID - 1993 - - - CF$UID - 1991 - - - CF$UID - 2053 - - - - IDEWorkspaceTabController_C5B23B47-5712-4FAE-8695-3FC69C7FE244 - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 1991 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 31 - - - CF$UID - 32 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 38 - - - CF$UID - 39 - - - CF$UID - 1994 - - - CF$UID - 2000 - - - CF$UID - 2011 - - - CF$UID - 39 - - - CF$UID - 2019 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 1995 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 1996 - - - CF$UID - 1998 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1997 - - - - 389 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 1999 - - - - 211 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 2001 - - - CF$UID - 54 - - - CF$UID - 2008 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 2002 - - - CF$UID - 2003 - - - CF$UID - 2004 - - - CF$UID - 2005 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 2006 - - - CF$UID - 39 - - - CF$UID - 2007 - - - - {{0, 0}, {0, 0}} - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 2009 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 2010 - - - CF$UID - 84 - - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 87 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 2012 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 2013 - - - CF$UID - 2015 - - - CF$UID - 2017 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 2014 - - - - 308 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 2016 - - - - 1032 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 2018 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 2020 - - - CF$UID - 2024 - - - CF$UID - 2031 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 2046 - - - CF$UID - 2052 - - - CF$UID - 39 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 2021 - - rootLayoutTreeNode - - CF$UID - 2022 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 2022 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 2023 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 2021 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 2025 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 2026 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 2027 - - - CF$UID - 38 - - - CF$UID - 2029 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 2028 - - - - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 2030 - - - - {{0, 0}, {600, 600}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 2032 - - - CF$UID - 2033 - - - CF$UID - 131 - - - CF$UID - 2034 - - - CF$UID - 2040 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 2035 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 2036 - - - CF$UID - 2038 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 2037 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 2039 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 2041 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 2042 - - - CF$UID - 2044 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 2043 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 2045 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 2047 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 2048 - - - CF$UID - 2050 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 2049 - - - - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 2051 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - {{157, 372}, {600, 624}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 29 - - - CF$UID - 25 - - - CF$UID - 26 - - - CF$UID - 2055 - - - CF$UID - 27 - - - CF$UID - 28 - - - NS.objects - - - CF$UID - 22 - - - CF$UID - 2056 - - - CF$UID - 39 - - - CF$UID - 2057 - - - CF$UID - 2055 - - - CF$UID - 2141 - - - - IDEWorkspaceTabController_88F108EC-272F-48B4-A120-24F3DAF34F6A - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 2055 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 167 - - - CF$UID - 32 - - - CF$UID - 31 - - - CF$UID - 33 - - - CF$UID - 34 - - - CF$UID - 35 - - - CF$UID - 36 - - - CF$UID - 37 - - - NS.objects - - - CF$UID - 2058 - - - CF$UID - 39 - - - CF$UID - 38 - - - CF$UID - 2059 - - - CF$UID - 2065 - - - CF$UID - 2076 - - - CF$UID - 39 - - - CF$UID - 2084 - - - - MemorySync.h - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 2060 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 2061 - - - CF$UID - 2063 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 2062 - - - - 389 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 46 - - - CF$UID - 2064 - - - - 211 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 54 - - - CF$UID - 55 - - - CF$UID - 56 - - - NS.objects - - - CF$UID - 2066 - - - CF$UID - 54 - - - CF$UID - 2073 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 58 - - - CF$UID - 59 - - - CF$UID - 60 - - - CF$UID - 61 - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - CF$UID - 65 - - - CF$UID - 66 - - - CF$UID - 67 - - - NS.objects - - - CF$UID - 39 - - - CF$UID - 2067 - - - CF$UID - 2068 - - - CF$UID - 2069 - - - CF$UID - 2070 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 2071 - - - CF$UID - 39 - - - CF$UID - 2072 - - - - {{0, 0}, {0, 0}} - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 51 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 70 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 76 - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - CF$UID - 80 - - - CF$UID - 81 - - - CF$UID - 82 - - - NS.objects - - - CF$UID - 2074 - - - CF$UID - 39 - - - CF$UID - 84 - - - CF$UID - 39 - - - CF$UID - 39 - - - CF$UID - 2075 - - - CF$UID - 84 - - - - {{0, 0}, {259, 832}} - - $class - - CF$UID - 87 - - NS.objects - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 2077 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 2078 - - - CF$UID - 2080 - - - CF$UID - 2082 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 34 - - - CF$UID - 2079 - - - - 594 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 37 - - - CF$UID - 2081 - - - - 746 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 95 - - - CF$UID - 2083 - - - - 260 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 98 - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - CF$UID - 105 - - - NS.objects - - - CF$UID - 2085 - - - CF$UID - 2098 - - - CF$UID - 2119 - - - CF$UID - 151 - - - CF$UID - 38 - - - CF$UID - 2134 - - - CF$UID - 2140 - - - CF$UID - 39 - - - - - $class - - CF$UID - 111 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 2086 - - rootLayoutTreeNode - - CF$UID - 2096 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 2087 - - orientation - 0 - parent - - CF$UID - 2096 - - - - $class - - CF$UID - 215 - - DocumentLocation - - CF$UID - 2095 - - DomainIdentifier - - CF$UID - 198 - - IdentifierPath - - CF$UID - 2088 - - IndexOfDocumentIdentifier - - CF$UID - 38 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 2089 - - - CF$UID - 2090 - - - CF$UID - 2091 - - - CF$UID - 2092 - - - CF$UID - 2093 - - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1543 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1545 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1547 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 208 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 2094 - - - Littlest - - $class - - CF$UID - 214 - - documentURL - - CF$UID - 715 - - timestamp - - CF$UID - 0 - - - - $class - - CF$UID - 110 - - children - - CF$UID - 2097 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 2086 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 113 - - - NS.objects - - - CF$UID - 2099 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 2100 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 117 - - - CF$UID - 118 - - - CF$UID - 119 - - - NS.objects - - - CF$UID - 2101 - - - CF$UID - 38 - - - CF$UID - 2117 - - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 2102 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 223 - - - CF$UID - 224 - - - CF$UID - 225 - - - CF$UID - 226 - - - CF$UID - 227 - - - CF$UID - 228 - - - CF$UID - 229 - - - NS.objects - - - CF$UID - 1176 - - - CF$UID - 2103 - - - CF$UID - 2111 - - - CF$UID - 1543 - - - CF$UID - 1543 - - - CF$UID - 247 - - - CF$UID - 2115 - - - - - $class - - CF$UID - 215 - - DocumentLocation - - CF$UID - 2095 - - DomainIdentifier - - CF$UID - 198 - - IdentifierPath - - CF$UID - 2104 - - IndexOfDocumentIdentifier - - CF$UID - 38 - - - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 2105 - - - CF$UID - 2106 - - - CF$UID - 2107 - - - CF$UID - 2108 - - - CF$UID - 2109 - - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1543 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1545 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 1547 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 208 - - - - $class - - CF$UID - 202 - - Identifier - - CF$UID - 2110 - - - Littlest - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - NS.objects - - - CF$UID - 2112 - - - CF$UID - 2113 - - - CF$UID - 39 - - - CF$UID - 2114 - - - - 324798749.09731197 - {0, 494} - {429, 0} - - $class - - CF$UID - 250 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 2116 - - - file://localhost/Users/dorischen/Documents/Temp/Littlest/Littlest/Foundation/Synchronization/MemorySync.h - - $class - - CF$UID - 87 - - NS.objects - - - CF$UID - 2118 - - - - {{0, 0}, {600, 600}} - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 125 - - - CF$UID - 126 - - - CF$UID - 127 - - - CF$UID - 128 - - - CF$UID - 129 - - - CF$UID - 130 - - - NS.objects - - - CF$UID - 131 - - - CF$UID - 2120 - - - CF$UID - 2121 - - - CF$UID - 131 - - - CF$UID - 2122 - - - CF$UID - 2128 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 133 - - - NS.objects - - - CF$UID - 38 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 135 - - - NS.objects - - - CF$UID - 136 - - - - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 2123 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 2124 - - - CF$UID - 2126 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 2125 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 2127 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 2129 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 2130 - - - CF$UID - 2132 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 140 - - - CF$UID - 2131 - - - - 298 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 143 - - - CF$UID - 2133 - - - - 301 - - $class - - CF$UID - 52 - - NS.keys - - - CF$UID - 41 - - - NS.objects - - - CF$UID - 2135 - - - - - $class - - CF$UID - 51 - - NS.objects - - - CF$UID - 2136 - - - CF$UID - 2138 - - - - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 155 - - - CF$UID - 2137 - - - - 203 - - $class - - CF$UID - 48 - - NS.keys - - - CF$UID - 44 - - - CF$UID - 45 - - - NS.objects - - - CF$UID - 158 - - - CF$UID - 2139 - - - - 115 - - $class - - CF$UID - 52 - - NS.keys - - NS.objects - - - {{104, 384}, {600, 624}} - - $top - - State - - CF$UID - 1 - - - $version - 100000 - - diff --git a/Littlest.xcodeproj/xcuserdata/dorischen.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/Littlest.xcodeproj/xcuserdata/dorischen.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist deleted file mode 100644 index 05301bc..0000000 --- a/Littlest.xcodeproj/xcuserdata/dorischen.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist +++ /dev/null @@ -1,5 +0,0 @@ - - - diff --git a/Littlest.xcodeproj/xcuserdata/dorischen.xcuserdatad/xcschemes/Littlest.xcscheme b/Littlest.xcodeproj/xcuserdata/dorischen.xcuserdatad/xcschemes/Littlest.xcscheme deleted file mode 100644 index 7568044..0000000 --- a/Littlest.xcodeproj/xcuserdata/dorischen.xcuserdatad/xcschemes/Littlest.xcscheme +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Littlest.xcodeproj/xcuserdata/dorischen.xcuserdatad/xcschemes/xcschememanagement.plist b/Littlest.xcodeproj/xcuserdata/dorischen.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index c3cb6c2..0000000 --- a/Littlest.xcodeproj/xcuserdata/dorischen.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - SchemeUserState - - Littlest.xcscheme - - orderHint - 0 - - - SuppressBuildableAutocreation - - 4B8CBFAF135BFDF600B3E49F - - primary - - - - - diff --git a/Littlest/AppDelegate.h b/Littlest/AppDelegate.h deleted file mode 100644 index cb3d749..0000000 --- a/Littlest/AppDelegate.h +++ /dev/null @@ -1,20 +0,0 @@ -// -// AppDelegate.h -// Littlest -// -// Created by Doris Chen on 4/17/11. -// Copyright __MyCompanyName__ 2011. All rights reserved. -// - -#import - -@class RootViewController; - -@interface AppDelegate : NSObject { - UIWindow* window; - RootViewController* viewController; -} - -@property (nonatomic, retain) UIWindow *window; - -@end diff --git a/Littlest/AppDelegate.mm b/Littlest/AppDelegate.mm deleted file mode 100644 index c36c5f8..0000000 --- a/Littlest/AppDelegate.mm +++ /dev/null @@ -1,170 +0,0 @@ -// -// AppDelegate.m -// Littlest -// -// Created by Doris Chen on 4/17/11. -// Copyright __MyCompanyName__ 2011. All rights reserved. -// - -#import "cocos2d.h" - -#import "AppDelegate.h" -#import "GameConfig.h" -#import "HelloWorldLayer.h" - -#import "OS/RootViewController.h" - -@implementation AppDelegate - -@synthesize window; - -- (void) removeStartupFlicker -{ - // - // THIS CODE REMOVES THE STARTUP FLICKER - // - // Uncomment the following code if you Application only supports landscape mode - // -#if GAME_AUTOROTATION == kGameAutorotationUIViewController - - // CC_ENABLE_DEFAULT_GL_STATES(); - // CCDirector *director = [CCDirector sharedDirector]; - // CGSize size = [director winSize]; - // CCSprite *sprite = [CCSprite spriteWithFile:@"Default.png"]; - // sprite.position = ccp(size.width/2, size.height/2); - // sprite.rotation = -90; - // [sprite visit]; - // [[director openGLView] swapBuffers]; - // CC_ENABLE_DEFAULT_GL_STATES(); - -#endif // GAME_AUTOROTATION == kGameAutorotationUIViewController -} - -- (void) applicationDidFinishLaunching:(UIApplication*)application -{ - // Init the window - window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; - - // Try to use CADisplayLink director - // if it fails (SDK < 3.1) use the default director - if( ! [CCDirector setDirectorType:kCCDirectorTypeDisplayLink] ) - [CCDirector setDirectorType:kCCDirectorTypeDefault]; - - - CCDirector *director = [CCDirector sharedDirector]; - - // Init the View Controller - viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; - viewController.wantsFullScreenLayout = YES; - - // - // Create the EAGLView manually - // 1. Create a RGB565 format. Alternative: RGBA8 - // 2. depth format of 0 bit. Use 16 or 24 bit for 3d effects, like CCPageTurnTransition - // - // - EAGLView *glView = [EAGLView viewWithFrame:[window bounds] - pixelFormat:kEAGLColorFormatRGBA8 - depthFormat:0 // GL_DEPTH_COMPONENT16_OES - ]; - - // attach the openglView to the director - [director setOpenGLView:glView]; - - // Enables High Res mode (Retina Display) on iPhone 4 and maintains low res on all other devices - //if( ! [director enableRetinaDisplay:YES] ) - // CCLOG(@"Retina Display Not supported"); - - // - // VERY IMPORTANT: - // If the rotation is going to be controlled by a UIViewController - // then the device orientation should be "Portrait". - // - // IMPORTANT: - // By default, this template only supports Landscape orientations. - // Edit the RootViewController.m file to edit the supported orientations. - // -#if GAME_AUTOROTATION == kGameAutorotationUIViewController - [director setDeviceOrientation:kCCDeviceOrientationPortrait]; -#else - [director setDeviceOrientation:kCCDeviceOrientationLandscapeLeft]; -#endif - - [director setAnimationInterval:1.0/60]; - [director setDisplayFPS:YES]; - - - // make the OpenGLView a child of the view controller - [viewController setView:glView]; - - // make the View in the View Controller a child of the main window - [window addSubview: viewController.view]; - - // this also lets the system know that we're ready to handle events - [window makeKeyAndVisible]; - - // Default texture format for PNG/BMP/TIFF/JPEG/GIF images - // It can be RGBA8888, RGBA4444, RGB5_A1, RGB565 - // You can change anytime. - [CCTexture2D setDefaultAlphaPixelFormat:kCCTexture2DPixelFormat_RGBA8888]; - - - // Removes the startup flicker - [self removeStartupFlicker]; - - // Run the intro Scene - [[CCDirector sharedDirector] runWithScene: [HelloWorldLayer scene]]; -} - - -// Pausing -- (void)applicationWillResignActive:(UIApplication *)application { - [[CCDirector sharedDirector] pause]; -} - -// Resuming -- (void)applicationDidBecomeActive:(UIApplication *)application { - [[CCDirector sharedDirector] resume]; -} - -// Low on memory -- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { - [[CCDirector sharedDirector] purgeCachedData]; -} - -// Alt-tabbed out? Update but don't render? --(void) applicationDidEnterBackground:(UIApplication*)application { - [[CCDirector sharedDirector] stopAnimation]; -} - -// Alt-tabbed in? --(void) applicationWillEnterForeground:(UIApplication*)application { - [[CCDirector sharedDirector] startAnimation]; -} - -// Killing -- (void)applicationWillTerminate:(UIApplication *)application { - CCDirector *director = [CCDirector sharedDirector]; - - [[director openGLView] removeFromSuperview]; - - [viewController release]; - - [window release]; - - [director end]; -} - -// What's this? -- (void)applicationSignificantTimeChange:(UIApplication *)application { - [[CCDirector sharedDirector] setNextDeltaTimeZero:YES]; -} - -// Killed -- (void)dealloc { - [[CCDirector sharedDirector] release]; - [window release]; - [super dealloc]; -} - -@end diff --git a/Littlest/Engine/Render/GLES-Render.h b/Littlest/Engine/Render/GLES-Render.h deleted file mode 100644 index f7785d6..0000000 --- a/Littlest/Engine/Render/GLES-Render.h +++ /dev/null @@ -1,68 +0,0 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.com -* -* iPhone port by Simon Oliver - http://www.simonoliver.com - http://www.handcircus.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. -*/ - -// -// File modified for cocos2d integration -// http://www.cocos2d-iphone.org -// - -#ifndef GLES_RENDER_H -#define GLES_RENDER_H - -#import -#import -#import - -#include "Box2D.h" - -struct b2AABB; - -// This class implements debug drawing callbacks that are invoked -// inside b2World::Step. -class GLESDebugDraw : public b2DebugDraw -{ - float32 mRatio; - -public: - GLESDebugDraw(); - - GLESDebugDraw( float32 ratio ); - - void DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color); - - void DrawSolidPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color); - - void DrawCircle(const b2Vec2& center, float32 radius, const b2Color& color); - - void DrawSolidCircle(const b2Vec2& center, float32 radius, const b2Vec2& axis, const b2Color& color); - - void DrawSegment(const b2Vec2& p1, const b2Vec2& p2, const b2Color& color); - - void DrawTransform(const b2Transform& xf); - - void DrawPoint(const b2Vec2& p, float32 size, const b2Color& color); - - void DrawString(int x, int y, const char* string, ...); - - void DrawAABB(b2AABB* aabb, const b2Color& color); -}; - - -#endif // GLES_RENDER_H diff --git a/Littlest/Engine/Render/GLES-Render.mm b/Littlest/Engine/Render/GLES-Render.mm deleted file mode 100644 index 9cc1f47..0000000 --- a/Littlest/Engine/Render/GLES-Render.mm +++ /dev/null @@ -1,179 +0,0 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.com -* -* iPhone port by Simon Oliver - http://www.simonoliver.com - http://www.handcircus.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. -*/ - -// -// File modified for cocos2d integration -// http://www.cocos2d-iphone.org -// - -#include "GLES-Render.h" - - -#include -#include - -#include - -GLESDebugDraw::GLESDebugDraw() - : mRatio( 1.0f ) -{ -} -GLESDebugDraw::GLESDebugDraw( float32 ratio ) - : mRatio( ratio ) -{ -} - - -void GLESDebugDraw::DrawPolygon(const b2Vec2* old_vertices, int32 vertexCount, const b2Color& color) -{ - b2Vec2 vertices[vertexCount]; - for( int i=0;ilowerBound.x * mRatio, aabb->lowerBound.y * mRatio, - aabb->upperBound.x * mRatio, aabb->lowerBound.y * mRatio, - aabb->upperBound.x * mRatio, aabb->upperBound.y * mRatio, - aabb->lowerBound.x * mRatio, aabb->upperBound.y * mRatio - }; - glVertexPointer(2, GL_FLOAT, 0, glVertices); - glDrawArrays(GL_LINE_LOOP, 0, 8); - -} diff --git a/Littlest/Foundation/Common/Assert.h b/Littlest/Foundation/Common/Assert.h deleted file mode 100755 index bf465fa..0000000 --- a/Littlest/Foundation/Common/Assert.h +++ /dev/null @@ -1,69 +0,0 @@ -#pragma once - -#if defined(DEBUG) - -#include -#include -#include -#include -#include -#include - -#include "GlobalDefines.h" - -#if defined(__WINDOWS__) - - #define Assert(expression) if (!(expression)) __debugbreak(); - -#elif defined(__iOS__) - - // Returns true if the current process is being debugged (either - // running under the debugger or has a debugger attached post facto). - static bool AmIBeingDebugged(void) - { - int junk; - int mib[4]; - struct kinfo_proc info; - size_t size; - - // Initialize the flags so that, if sysctl fails for some bizarre - // reason, we get a predictable result. - info.kp_proc.p_flag = 0; - - // Initialize mib, which tells sysctl the info we want, in this case - // we're looking for information about a specific process ID. - mib[0] = CTL_KERN; - mib[1] = KERN_PROC; - mib[2] = KERN_PROC_PID; - mib[3] = getpid(); - - // Call sysctl. - size = sizeof(info); - junk = sysctl(mib, sizeof(mib) / sizeof(*mib), &info, &size, NULL, 0); - assert(junk == 0); - - // We're being debugged if the P_TRACED flag is set. - return ( (info.kp_proc.p_flag & P_TRACED) != 0 ); - } - - // http://iphone.m20.nl/wp/?p=1#more-1 - //#define DEBUGSTOP(signal) __asm__ __volatile__ ("mov r0, %0\nmov r1, %1\nmov r12, #37\nswi 128\n" : : "r" (getpid ()), "r" (signal) : "r12", "r0", "r1", "cc"); - //#define DEBUGGER do { int trapSignal = AmIBeingDebugged () ? SIGINT : SIGSTOP; DEBUGSTOP(trapSignal); if (trapSignal == SIGSTOP) { DEBUGSTOP (SIGINT); } } while (false); - - // Graciously copied from http://cocoawithlove.com/2008/03/break-into-debugger.html - #define DebugBreak() if (AmIBeingDebugged()) { DebugBreak(); } - - #define Assert(expression) if (!(expression)) raise(SIGTRAP); - -#endif - -#define AssertMessage(expression, message, ...) \ - if (!(expression)) Printf(message, ##__VA_ARGS__) - -#else - -// Note that the expression is still evaluated, since we declared this as an inlined function, rather than a macro. -slInline void Assert(bool expression) {} -slInline void AssertMsg(bool expression, char* msg, ...) {} - -#endif diff --git a/Littlest/Foundation/Common/Base.h b/Littlest/Foundation/Common/Base.h deleted file mode 100755 index 4cf66ae..0000000 --- a/Littlest/Foundation/Common/Base.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once - -namespace Foundation -{ - class CBase - { - public: - CBase() {} - ~CBase() {} - }; -} diff --git a/Littlest/Foundation/Common/GlobalDefines.h b/Littlest/Foundation/Common/GlobalDefines.h deleted file mode 100755 index 14712b2..0000000 --- a/Littlest/Foundation/Common/GlobalDefines.h +++ /dev/null @@ -1,152 +0,0 @@ -#pragma once - -#include "Foundation/Common/GlobalTypes.h" - -//---------------------------------------------------------------------------------------- -// OS and CPU architecture defines -#if defined(_WINDOWS) - #define __WINDOWS__ - #define __X86__ -#elif defined(__iOS__) - #include - #if TARGET_IPHONE_SIMULATOR - #define __X86__ - #elif TARGET_OS_IPHONE - #define __ARM__ - #else - #error undefined architecture! - #endif -#endif - -//---------------------------------------------------------------------------------------- -// configuration defines -#if defined(_DEBUG) && !defined(DEBUG) - #define DEBUG -#endif - -#if defined(_NDEBUG) && !defined(RELEASE) - #define RELEASE -#endif - -//---------------------------------------------------------------------------------------- -// some type defines that may or may not be defined already? -#if !defined(NULL) - #define NULL 0 -#endif - -#if !defined(FALSE) - #define FALSE 0 -#endif - -#if !defined(TRUE) - #define TRUE 1 -#endif - -//---------------------------------------------------------------------------------------- -// cache information -#if !defined(CACHE_LINE_SIZE) - #if defined(__X86__) - #define CACHE_LINE_SIZE 128 // normally equals to 2 lines for intel - #elif defined(__ARM__) - #define CACHE_LINE_SIZE 32 - #else - #define CACHE_LINE_SIZE 32 - #endif -#endif - -//---------------------------------------------------------------------------------------- -// force inline on non-debug, might make code explode -#if defined(DEBUG) - #define slInline inline -#else - #define slInline __forceinline -#endif - -// compiler determined inline -#define clInline inline - -#define slRestrict __restrict - -//---------------------------------------------------------------------------------------- -// alignment macros -#if defined(__WINDOWS__) -#define MEM_ALIGN(N) __declspec(align(N)) -#elif defined(__iOS__) -#define MEM_ALIGN(N) __attribute__((aligned (N))) -#endif - -#define IS_POWER_OF_TWO(x) ( ((x) & -(x)) == (x) ) - -//#pragma warning(disable:4146) // =( -#define ALIGN_UP(x, ALIGNMENT) ( ((x) + (ALIGNMENT) - 1) & -(ALIGNMENT) ) -#define ALIGN_DOWN(x, ALIGNMENT) ( (x) & -(ALIGNMENT) ) - -#define POWER_OF_TWO_MOD(x, N) ( (x) & ((N) - 1) ) - -#define ALIGN_CACHE ( ALIGN( CACHE_LINE_SIZE ) ) - -//---------------------------------------------------------------------------------------- -// cache macros -#if defined(__X86__) -// uhh, nothing? -#elif defined(__ARM__) -#define DCBT(x) __asm__("pld %[input]" : : [input] "r" ((x))) -#else -#error Not implemented yet! -#endif - -//---------------------------------------------------------------------------------------- -// string and memory functions -#if defined(__WINDOWS__) - #pragma intrinsic(memcpy) - #pragma intrinsic(memset) - #pragma intrinsic(strcmp) - #pragma intrinsic(strcpy) - #pragma intrinsic(strlen) - #pragma intrinsic(strcat) -#endif - -//---------------------------------------------------------------------------------------- -// color constants...this probably needs to consider endianness? -#define NULL_COLOR 0x00000000 -#define BLACK_COLOR 0x000000ff -#define RED_COLOR 0xff0000ff -#define GREEN_COLOR 0x00ff00ff -#define BLUE_COLOR 0x0000ffff -#define WHITE_COLOR 0xffffffff - -//---------------------------------------------------------------------------------------- -// some intrinsic/asm/fast stuff stuffs -- maybe this should be moved to another file -#define RightMostEnabledBit(x) ((x) & -(x)) - - -#if defined(__ARM__) - -slInline uint8_t LZCount(uint64_t x) -{ - uint8_t result; - __asm__("clz %[result] %[input]" : [result] "=r" (result) : [input] "r" (x)); - return result; -} - -#else - -slInline uint8_t LZCount(uint64_t x) -{ - uint8_t leading_zero_count = 0; - uint8_t next_shift = 32; - uint64_t copy = x; - while (next_shift != 0) - { - bool non_zero = copy >= (0x1ULL << next_shift); - uint8_t actual_shift = (uint8_t)non_zero * next_shift; - leading_zero_count += actual_shift; - copy >>= actual_shift; - next_shift >>= 1; - } - leading_zero_count += (copy == 0x1ULL); - - return leading_zero_count; -} - -#endif diff --git a/Littlest/Foundation/Common/GlobalInclude.h b/Littlest/Foundation/Common/GlobalInclude.h deleted file mode 100755 index 83fe092..0000000 --- a/Littlest/Foundation/Common/GlobalInclude.h +++ /dev/null @@ -1,7 +0,0 @@ -#pragma once - -#include -#include "GlobalDefines.h" -#include "GlobalTypes.h" -#include "Assert.h" -#include "Print.h" diff --git a/Littlest/Foundation/Common/GlobalTypes.h b/Littlest/Foundation/Common/GlobalTypes.h deleted file mode 100755 index a2d92f0..0000000 --- a/Littlest/Foundation/Common/GlobalTypes.h +++ /dev/null @@ -1,40 +0,0 @@ -#pragma once - -#if defined(uint32_t) -#undef uint32_t -#endif - -typedef signed char int8_t; -typedef unsigned char uint8_t; -typedef short int16_t; -typedef unsigned short uint16_t; -typedef int int32_t; -typedef unsigned int uint32_t; -typedef long long int64_t; -typedef unsigned long long uint64_t; -typedef uint32_t color32_t; - -union IntFloat -{ - int8_t m_Int8[4]; - uint8_t m_UInt8[4]; - int16_t m_Int16[2]; - uint16_t m_UInt16[2]; - int32_t m_Int32; - uint32_t m_UInt32; - float m_Float; -}; - -union LongDouble -{ - int8_t m_Int8[8]; - uint8_t m_UInt8[8]; - int16_t m_Int16[4]; - uint16_t m_UInt16[4]; - int32_t m_Int32[2]; - uint32_t m_UInt32[2]; - int64_t m_Int64; - uint64_t m_UInt64; - float m_Float[2]; - double m_Double; -}; diff --git a/Littlest/Foundation/Common/Print.h b/Littlest/Foundation/Common/Print.h deleted file mode 100755 index 48c0609..0000000 --- a/Littlest/Foundation/Common/Print.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include "GlobalDefines.h" -#include - -#if defined(DEBUG) - #define Printf(message, ...) printf(message, ##__VA_ARGS__) -#else - #define Printf(message, ...) {} -#endif diff --git a/Littlest/Foundation/Common/Singleton.h b/Littlest/Foundation/Common/Singleton.h deleted file mode 100755 index bc1ae03..0000000 --- a/Littlest/Foundation/Common/Singleton.h +++ /dev/null @@ -1,42 +0,0 @@ -#pragma once - -#include "Foundation/Common/GlobalInclude.h" - -//---------------------------------------------------------------------------------------- -namespace Foundation -{ - -template -class Singleton -{ -private: - static T* m_Instance; - -protected: - Singleton() { m_Instance = NULL; } - -public: - static T* Init() - { - Assert( m_Instance == NULL); - m_Instance = new (16) T(); - return m_Instance; - } - - slInline static T* GetInstance() - { - return m_Instance; - } - - static void DestroyInstance() - { - if ( m_Instance ) - { - delete m_Instance; - } - } -}; - -template T* Singleton::m_Instance = NULL; - -} diff --git a/Littlest/Foundation/Containers/BitEncoder.h b/Littlest/Foundation/Containers/BitEncoder.h deleted file mode 100755 index 102e7fc..0000000 --- a/Littlest/Foundation/Containers/BitEncoder.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include "Foundation/Common/GlobalInclude.h" - -#define SET_BITS(x, new_val, shift, mask) ((x) = (((x) & ~(mask)) | (((new_val) << (shift)) & (mask)))) -#define ZERO_BITS(x, mask) ((x) &= ~(mask)) -#define OR_BITS (x, new_val, shift, mask) ((x) |= (((new_val) << (shift)) & (mask))) -#define AND_BITS(x, new_val, shift, mask) ((x) &= (((new_val) << (shift)) & (mask))) -#define GET_BITS(x, mask) ((x) & (mask)) -#define GET_BITS_RIGHT(x, shift, mask) (((x) & (mask)) >> (shift)) diff --git a/Littlest/Foundation/Containers/LocklessRingBuffer.cpp b/Littlest/Foundation/Containers/LocklessRingBuffer.cpp deleted file mode 100755 index 0a9f9d6..0000000 --- a/Littlest/Foundation/Containers/LocklessRingBuffer.cpp +++ /dev/null @@ -1,159 +0,0 @@ -#include "LocklessRingBuffer.h" -#include "Foundation/Synchronization/MemorySync.h" - -//---------------------------------------------------------------------------------------- -void LocklessRingBuffer::Init(void* buffer, uint32_t buffer_size) -{ - m_Base = (uint8_t*)buffer; - m_BufferSize = buffer_size; - m_WriteOffset = 0; - m_ReadOffset = 0; -} - -//---------------------------------------------------------------------------------------- -void LocklessRingBuffer::Destroy() -{ - m_Base = NULL; - m_BufferSize = 0; - m_WriteOffset = 0; - m_ReadOffset = 0; -} - -//---------------------------------------------------------------------------------------- -bool LocklessRingBuffer::Write(void* entry, uint32_t entry_size) -{ - Assert(entry_size < m_BufferSize); - - uint32_t new_write_offset = m_WriteOffset; - uint32_t remaining_space = m_WriteOffset < m_ReadOffset ? m_ReadOffset - m_WriteOffset - 1 : m_ReadOffset + m_BufferSize - m_WriteOffset; - if (remaining_space < entry_size) - { - return false; - } - - bool write_will_end_lower = new_write_offset + entry_size >= m_BufferSize; - - uint32_t distance_to_top = (entry_size > m_BufferSize - new_write_offset) ? (m_BufferSize - new_write_offset) : entry_size; - memcpy(m_Base + new_write_offset, entry, distance_to_top); - new_write_offset += distance_to_top; - - if (write_will_end_lower) - { - uint32_t remainder = entry_size - distance_to_top; - memcpy(m_Base, (uint8_t*)entry + distance_to_top, remainder); - new_write_offset = remainder; - } - - ReadWriteSync(); - - m_WriteOffset = new_write_offset; - return true; -} - -//---------------------------------------------------------------------------------------- -bool LocklessRingBuffer::Write(void* entries[], uint32_t entry_sizes[], uint32_t entry_count) -{ - uint32_t total_size = 0; - for (uint32_t i = 0; i < entry_count; i++) - { - total_size += entry_sizes[i]; - } - - Assert(total_size < m_BufferSize); - - uint32_t new_write_offset = m_WriteOffset; - uint32_t remaining_space = m_WriteOffset < m_ReadOffset ? m_ReadOffset - m_WriteOffset - 1 : m_ReadOffset + m_BufferSize - m_WriteOffset; - if (remaining_space < total_size) - { - return false; - } - - for (uint32_t i = 0; i < entry_count; i++) - { - bool write_will_end_lower = new_write_offset + entry_sizes[i] >= m_BufferSize; - uint32_t distance_to_top = (entry_sizes[i] > m_BufferSize - new_write_offset) ? (m_BufferSize - new_write_offset) : entry_sizes[i]; - memcpy(m_Base + new_write_offset, entries[i], distance_to_top); - new_write_offset += distance_to_top; - - if (write_will_end_lower) - { - uint32_t remainder = entry_sizes[i] - distance_to_top; - memcpy(m_Base, (uint8_t*)entries[i] + distance_to_top, remainder); - new_write_offset = remainder; - } - } - - ReadWriteSync(); - - m_WriteOffset = new_write_offset; - return true; -} - -//---------------------------------------------------------------------------------------- -bool LocklessRingBuffer::Peek(void* read_buffer, uint32_t read_size) -{ - uint32_t read_remaining = m_WriteOffset < m_ReadOffset ? m_BufferSize - m_ReadOffset + m_WriteOffset : m_WriteOffset - m_ReadOffset; - if (read_remaining < read_size) - { - return false; - } - - uint32_t read_to_top = m_BufferSize - m_ReadOffset <= read_size ? m_BufferSize - m_ReadOffset : read_size; - memcpy(read_buffer, m_Base + m_ReadOffset, read_to_top); - if (m_BufferSize - m_ReadOffset <= read_size) - { - memcpy((uint8_t*)read_buffer + read_to_top, m_Base, read_remaining - read_to_top); - } - - return true; -} - -//---------------------------------------------------------------------------------------- -bool LocklessRingBuffer::Read(void* read_buffer, uint32_t read_size) -{ - uint32_t read_remaining = m_WriteOffset < m_ReadOffset ? m_BufferSize - m_ReadOffset + m_WriteOffset : m_WriteOffset - m_ReadOffset; - if (read_remaining < read_size) - { - return false; - } - - uint32_t read_to_top = m_BufferSize - m_ReadOffset <= read_size ? m_BufferSize - m_ReadOffset : read_size; - memcpy(read_buffer, m_Base + m_ReadOffset, read_to_top); - uint32_t new_read_offset = m_ReadOffset + read_to_top; - - if (m_BufferSize - m_ReadOffset <= read_size) - { - memcpy((uint8_t*)read_buffer + read_to_top, m_Base, read_remaining - read_to_top); - new_read_offset = read_remaining - read_to_top; - } - - ReadWriteSync(); - - m_ReadOffset = new_read_offset; - - return true; -} - -//---------------------------------------------------------------------------------------- -bool LocklessRingBuffer::ReadDiscard(uint32_t read_size) -{ - uint32_t read_remaining = m_WriteOffset < m_ReadOffset ? m_BufferSize - m_ReadOffset + m_WriteOffset : m_WriteOffset - m_ReadOffset; - if (read_remaining < read_size) - { - return false; - } - - uint32_t read_to_top = m_BufferSize - m_ReadOffset <= read_size ? m_BufferSize - m_ReadOffset : read_size; - uint32_t new_read_offset = m_ReadOffset + read_to_top; - - if (m_BufferSize - m_ReadOffset <= read_size) - { - new_read_offset = read_remaining - read_to_top; - } - - ReadWriteSync(); - - m_ReadOffset = new_read_offset; - - return true; -} diff --git a/Littlest/Foundation/Containers/LocklessRingBuffer.h b/Littlest/Foundation/Containers/LocklessRingBuffer.h deleted file mode 100755 index e098a36..0000000 --- a/Littlest/Foundation/Containers/LocklessRingBuffer.h +++ /dev/null @@ -1,23 +0,0 @@ -#pragma once - -#include "Foundation/Common/GlobalInclude.h" - -class LocklessRingBuffer -{ -private: - uint8_t* m_Base; - uint32_t m_BufferSize; - uint32_t m_WriteOffset; - uint32_t m_ReadOffset; - -public: - void Init(void* buffer, uint32_t buffer_size); - void Destroy(); - - bool Write(void* entry, uint32_t entry_size); - bool Write(void* entries[], uint32_t entry_sizes[], uint32_t entry_count); - - bool Peek(void* read_buffer, uint32_t read_size); - bool Read(void* read_buffer, uint32_t read_size); - bool ReadDiscard(uint32_t read_size); -}; diff --git a/Littlest/Foundation/GraphicsServices/Geometry/BasicPrimitives.h b/Littlest/Foundation/GraphicsServices/Geometry/BasicPrimitives.h deleted file mode 100644 index ba50ba9..0000000 --- a/Littlest/Foundation/GraphicsServices/Geometry/BasicPrimitives.h +++ /dev/null @@ -1,27 +0,0 @@ -#pragma once - -#include "Foundation/Common/GlobalInclude.h" -#include "Foundation/Math/MathInclude.h" - -//#include -#include - -//---------------------------------------------------------------------------------------- -struct Basic2DPrimitive -{ -protected: - Basic2DPrimitive(); // Only the children classes can call this. - ~Basic2DPrimitive(); - - GLuint mVertexBuffer; - uint16_t mX, mY; -}; - -//---------------------------------------------------------------------------------------- -struct Rectangle : public Basic2DPrimitive -{ -public: - GLuint mWidth, mHeight; - - Rectangle( uint16_t width, uint16_t height, uint16_t anchorX, uint16_t anchorY ); -}; diff --git a/Littlest/Foundation/GraphicsServices/Geometry/BasicPrimitives.mm b/Littlest/Foundation/GraphicsServices/Geometry/BasicPrimitives.mm deleted file mode 100644 index 4cc9da1..0000000 --- a/Littlest/Foundation/GraphicsServices/Geometry/BasicPrimitives.mm +++ /dev/null @@ -1,26 +0,0 @@ -#include "BasicPrimitives.h" - -//---------------------------------------------------------------------------------------- -Basic2DPrimitive::Basic2DPrimitive() : mVertexBuffer(0), mX(0), mY(0) -{ - glGenBuffers( 1, &mVertexBuffer ); -} - -//---------------------------------------------------------------------------------------- -Basic2DPrimitive::~Basic2DPrimitive() -{ - glDeleteBuffers( 1, &mVertexBuffer ); -} - -//---------------------------------------------------------------------------------------- -Rectangle::Rectangle( uint16_t width, uint16_t height, uint16_t anchorX, uint16_t anchorY ) : Basic2DPrimitive() -{ - Assert( mVertexBuffer ); - glBindBuffer( GL_ARRAY_BUFFER, mVertexBuffer ); - - mWidth = width; - mHeight = height; - - uint16_t values[4 * 2] = {-anchorX, height + anchorY, -anchorX, }; - glBufferData( GL_ARRAY_BUFFER, 4 * 2 * sizeof(uint16_t), values, GL_STATIC_DRAW ); -} diff --git a/Littlest/Foundation/GraphicsServices/OpenGLServices.h b/Littlest/Foundation/GraphicsServices/OpenGLServices.h deleted file mode 100644 index deadd57..0000000 --- a/Littlest/Foundation/GraphicsServices/OpenGLServices.h +++ /dev/null @@ -1,58 +0,0 @@ -#pragma once - -/***************************************************************************************** - * This is a wrapper class around all OpenGL API calls in iOS. This completely abstracts - * away all mixes between the OS-specific calls in Objective-C and the C-style inteface of - * OpenGL. - * - * Since iPhone/iPad will be single/dual cores for the near-term future, we'll basically - * only allow a single rendering context to exist at any given point in time. Therefore, - * we should never need to set context other than during startup or shutdown. - *****************************************************************************************/ - -//#include -//#include -#include -#include - -#include "Foundation/Common/GlobalInclude.h" - -//---------------------------------------------------------------------------------------- -// Some forward declarations -@class EAGLContext; -struct RenderTarget; - -//---------------------------------------------------------------------------------------- -// Some typedefs for handles. May want to move this to a separate file. -typedef GLuint TextureHandle; - -//---------------------------------------------------------------------------------------- -// Complete C(++) OpenGL wrapper. We will use this to wrap -class OpenGLServices -{ -public: - enum - { - kMaxTextureSize = 512 * 512 * 4, - }; - - OpenGLServices(); - - bool init( EAGLContext* mainContext ); - void destroy(); - - bool initScratchMem(); - void destroyScratchMem(); - - bool setRenderTarget( RenderTarget& renderTarget ); - bool present( RenderTarget& renderTarget ); - - TextureHandle loadPNGTexture( const char* fileName ); - void destroyTexture( TextureHandle texture ); - -private: - EAGLContext* mGLContext; - void* mScratchMem; - - void setContext( EAGLContext* newContext ); -}; diff --git a/Littlest/Foundation/GraphicsServices/OpenGLServices.mm b/Littlest/Foundation/GraphicsServices/OpenGLServices.mm deleted file mode 100644 index 9c1f7a2..0000000 --- a/Littlest/Foundation/GraphicsServices/OpenGLServices.mm +++ /dev/null @@ -1,160 +0,0 @@ -#import -#import - -#include "OpenGLServices.h" -#include "RenderTarget.h" - -//---------------------------------------------------------------------------------------- -OpenGLServices::OpenGLServices() : mGLContext(NULL), mScratchMem(NULL) -{ -} - -//---------------------------------------------------------------------------------------- -bool OpenGLServices::init( EAGLContext* mainContext ) -{ - if ( mGLContext ) - { - return false; - } - - mGLContext = [mainContext retain]; - Assert( [EAGLContext setCurrentContext:mGLContext] ); - - initScratchMem(); - - // Enable some common states and set their parameters. - glEnable( GL_TEXTURE_2D ); - glEnable( GL_BLEND ); - // We will premultiply alpha into the color channels of all textures (so no alpha animation). - // This is basically the A over B alpha scheme. - glBlendFunc( GL_ONE, GL_ONE_MINUS_SRC_ALPHA ); - glEnable( GL_DEPTH_TEST ); - glDepthFunc( GL_LEQUAL ); - glFrontFace( GL_CCW ); - glCullFace( GL_BACK ); - - // Disable unused stuff. - glDisable( GL_STENCIL_TEST ); - glDisable( GL_SCISSOR_TEST ); - glDisable( GL_DITHER ); - - return true; -} - -//---------------------------------------------------------------------------------------- -void OpenGLServices::destroy() -{ - if ( !mGLContext ) - { - return; - } - - destroyScratchMem(); - [mGLContext release]; - [EAGLContext setCurrentContext:nil]; -} - -//---------------------------------------------------------------------------------------- -bool OpenGLServices::initScratchMem() -{ - if (!mScratchMem) - { - mScratchMem = malloc( kMaxTextureSize ); - return mScratchMem != NULL; - } - return true; -} - -//---------------------------------------------------------------------------------------- -void OpenGLServices::destroyScratchMem() -{ - if (mScratchMem) - { - free( mScratchMem ); - mScratchMem = NULL; - } -} - -//---------------------------------------------------------------------------------------- -bool OpenGLServices::setRenderTarget( RenderTarget& renderTarget ) -{ - if (!renderTarget.getFramebuffer() || !glIsFramebuffer( renderTarget.getFramebuffer() )) - { - return false; - } - - glBindFramebuffer( GL_FRAMEBUFFER, renderTarget.getFramebuffer() ); - return true; -} - -//---------------------------------------------------------------------------------------- -bool OpenGLServices::present( RenderTarget& renderTarget ) -{ - GLuint colorBuffer = renderTarget.getColorBuffer(); - if (!colorBuffer || !glIsRenderbuffer( colorBuffer )) - { - return false; - } - - glBindRenderbuffer( GL_RENDERBUFFER, colorBuffer ); - return [renderTarget.getContext() presentRenderbuffer:GL_RENDERBUFFER]; -} - -//---------------------------------------------------------------------------------------- -TextureHandle OpenGLServices::loadPNGTexture( const char* fileName ) -{ - GLuint textureHandle; - glGenTextures( 1, &textureHandle ); - if (!textureHandle) - { - return textureHandle; - } - - glBindTexture( GL_TEXTURE_2D, textureHandle ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE ); - glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE ); - - // http://iphonedevelopment.blogspot.com/2009/05/opengl-es-from-ground-up-part-6_25.html - NSString* nsFileName = [NSString stringWithUTF8String:fileName]; - NSString* nsPath = [[NSBundle mainBundle] pathForResource:nsFileName ofType:@"png"]; - NSData* fileData = [[NSData alloc] initWithContentsOfFile:nsPath]; - UIImage* image = [[UIImage alloc] initWithData:fileData]; - AssertMessage( image != nil, "Image failed to load!\n" ); - - GLuint width = CGImageGetWidth( image.CGImage ); - GLuint height = CGImageGetHeight( image.CGImage ); - CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); - Assert( width * height * 4 <= kMaxTextureSize ); - CGContextRef context = CGBitmapContextCreate( mScratchMem, width, height, 8, 4 * width, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big ); - CGColorSpaceRelease( colorSpace ); - CGContextClearRect( context, CGRectMake( 0, 0, width, height ) ); - CGContextTranslateCTM( context, 0, 0 ); - CGContextDrawImage( context, CGRectMake( 0, 0, width, height ), image.CGImage ); - - glTexImage2D( GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, mScratchMem ); - glGenerateMipmap( GL_TEXTURE_2D ); - - CGContextRelease(context); - [image release]; - [fileData release]; - - return textureHandle; -} - -//---------------------------------------------------------------------------------------- -void OpenGLServices::destroyTexture( TextureHandle texture ) -{ - glDeleteTextures( 1, &texture ); -} - -//---------------------------------------------------------------------------------------- -void OpenGLServices::setContext( EAGLContext* newContext ) -{ - if (mGLContext != newContext) - { - mGLContext = newContext; - [EAGLContext setCurrentContext:newContext]; - } -} diff --git a/Littlest/Foundation/GraphicsServices/RenderTarget.h b/Littlest/Foundation/GraphicsServices/RenderTarget.h deleted file mode 100644 index aad5d43..0000000 --- a/Littlest/Foundation/GraphicsServices/RenderTarget.h +++ /dev/null @@ -1,65 +0,0 @@ -#pragma once - -#include -#include -#include -#include - -#include "Foundation/Common/GlobalInclude.h" - -@class EAGLContext; -@class CAEAGLLayer; - -//---------------------------------------------------------------------------------------- -struct RenderTargetInitParams -{ - RenderTargetInitParams(); - - EAGLContext* mContext; - CAEAGLLayer* mCALayer; - - // Width and height of color vs. depth buffers have to be the same. We don't resize in iOS. - int32_t mBufferWidth; - int32_t mBufferHeight; - - GLenum mColorFormat; - GLenum mDepthStencilFormat; - - uint32_t mFlags; -}; - -//---------------------------------------------------------------------------------------- -class RenderTarget -{ -public: - enum RenderTargetFlags - { - kSystemFramebuffer = 0x1 << 0, - }; - - const static uint32_t MAX_RENDER_BUFFERS = 2; - - RenderTarget(); - ~RenderTarget(); - - bool init( RenderTargetInitParams& params ); - void destroy(); - - EAGLContext* getContext() const { return mContext; } - uint32_t getWidth() const { return mRenderBufferWidth; } - uint32_t getHeight() const { return mRenderBufferHeight; } - GLuint getFramebuffer() const { return mFramebuffer; } - GLuint getColorBuffer() const { return mColorBuffer; } - -protected: - EAGLContext* mContext; - GLuint mFramebuffer; - - GLuint mColorBuffer; - GLuint mDepthStencilBuffer; - - int32_t mRenderBufferWidth; - int32_t mRenderBufferHeight; - - uint32_t mFlags; -}; diff --git a/Littlest/Foundation/GraphicsServices/RenderTarget.mm b/Littlest/Foundation/GraphicsServices/RenderTarget.mm deleted file mode 100644 index 659f7d6..0000000 --- a/Littlest/Foundation/GraphicsServices/RenderTarget.mm +++ /dev/null @@ -1,150 +0,0 @@ -#include "RenderTarget.h" - -#import - -//---------------------------------------------------------------------------------------- -RenderTargetInitParams::RenderTargetInitParams() : mContext(NULL), - mCALayer(NULL), - mBufferWidth(0), - mBufferHeight(0), - mColorFormat(GL_NONE), - mDepthStencilFormat(GL_NONE), - mFlags(0) -{ -} - -//---------------------------------------------------------------------------------------- -RenderTarget::RenderTarget() : mContext(NULL), - mFramebuffer(0), - mColorBuffer(0), - mDepthStencilBuffer(0), - mRenderBufferWidth(0), - mRenderBufferHeight(0), - mFlags(0) -{ -}; - -//---------------------------------------------------------------------------------------- -RenderTarget::~RenderTarget() -{ - if ( mFramebuffer ) - { - AssertMessage( !mFramebuffer, "RenderTarget has not been destroyed yet!" ); - destroy(); - } - else - { - mContext = NULL; - mFramebuffer = 0; - mColorBuffer = 0; - mDepthStencilBuffer = 0; - mRenderBufferWidth = 0; - mRenderBufferHeight = 0; - mFlags = 0; - } -}; - -//---------------------------------------------------------------------------------------- -bool RenderTarget::init( RenderTargetInitParams& params ) -{ - if (mFramebuffer) - { - AssertMessage( 0, "RenderTarget already initialized.\n" ); - return false; - } - - mContext = params.mContext; - AssertMessage( mContext, "Invalid context provided.\n" ); - - // Set the context first. - [EAGLContext setCurrentContext:mContext]; - - mRenderBufferWidth = params.mBufferWidth; - mRenderBufferHeight = params.mBufferHeight; - - if (params.mFlags & kSystemFramebuffer) - { - [mContext renderbufferStorage:GL_RENDERBUFFER fromDrawable:params.mCALayer]; - glGetRenderbufferParameteriv( GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &mRenderBufferWidth ); - glGetRenderbufferParameteriv( GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &mRenderBufferHeight ); - } - else - { - if (params.mColorFormat != GL_NONE) - { - glGenRenderbuffers( 1, &mColorBuffer ); - Assert( mColorBuffer ); - glBindRenderbuffer( GL_RENDERBUFFER, mColorBuffer ); - glRenderbufferStorage( GL_RENDERBUFFER, params.mColorFormat, mRenderBufferWidth, mRenderBufferHeight ); - } - } - - if (params.mDepthStencilFormat != GL_NONE) - { - // If a depth/stencil buffer is needed, we'll create one with the same dimensions as the color buffer. - glGenRenderbuffers( 1, &mDepthStencilBuffer ); - Assert( mDepthStencilBuffer ); - glBindRenderbuffer( GL_RENDERBUFFER, mDepthStencilBuffer ); - glRenderbufferStorage( GL_RENDERBUFFER, params.mDepthStencilFormat, mRenderBufferWidth, mRenderBufferHeight ); - } - - if (mColorBuffer || mDepthStencilBuffer) - { - // Create framebuffer object. - glGenFramebuffers( 1, &mFramebuffer ); - glBindFramebuffer( GL_FRAMEBUFFER, mFramebuffer ); - - if (mColorBuffer) - { - glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, mColorBuffer ); - } - - if (mDepthStencilBuffer) - { - glFramebufferRenderbuffer( GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, mDepthStencilBuffer ); - } - - AssertMessage( glCheckFramebufferStatus(GL_FRAMEBUFFER) == GL_FRAMEBUFFER_COMPLETE, "Failed to make complete framebuffer object: %x", glCheckFramebufferStatus(GL_FRAMEBUFFER) ); - } - else - { - return false; - } - - - return true; -} - -//---------------------------------------------------------------------------------------- -void RenderTarget::destroy() -{ - if (!mContext) - { - return; - } - - [EAGLContext setCurrentContext:mContext]; - - if (mColorBuffer && glIsRenderbuffer(mColorBuffer)) - { - glDeleteRenderbuffers( 1, &mColorBuffer ); - } - - if (mDepthStencilBuffer && glIsRenderbuffer(mDepthStencilBuffer)) - { - glDeleteRenderbuffers( 1, &mDepthStencilBuffer ); - } - - if (mFramebuffer) - { - glDeleteFramebuffers( 1, &mFramebuffer ); - } - - mContext = NULL; - mFramebuffer = 0; - mColorBuffer = 0; - mDepthStencilBuffer = 0; - mRenderBufferWidth = 0; - mRenderBufferHeight = 0; - mFlags = 0; -} diff --git a/Littlest/Foundation/Hash/DJB2.h b/Littlest/Foundation/Hash/DJB2.h deleted file mode 100755 index 31b863f..0000000 --- a/Littlest/Foundation/Hash/DJB2.h +++ /dev/null @@ -1,25 +0,0 @@ -#pragma once - -#include "Foundation/Common/GlobalInclude.h" - -//---------------------------------------------------------------------------------------- -// djb2 string hash function -static slInline uint32_t StrHash(const char* str) -{ - uint32_t hash = 5381; // seed value - int32_t c = *str; - - if(!str) - { - Assert(false); - return 0; - } - - while ( (*str != 0) ) - { - hash = ((hash << 5) + hash) + c; /* hash * 33 + c == ((hash * 32) + hash) + c */ - c = *(str++); - } - - return hash; -} \ No newline at end of file diff --git a/Littlest/Foundation/Math/MathDefines.h b/Littlest/Foundation/Math/MathDefines.h deleted file mode 100755 index b9bbdaa..0000000 --- a/Littlest/Foundation/Math/MathDefines.h +++ /dev/null @@ -1,14 +0,0 @@ -#pragma once - -#define kEpsilon 1e-6 -#define kSqrtEpsilon 1e-3 - -#define kPi 3.1415926535897932384626433832795 -#define kPi_2 1.5707963267948966192313216916398 -#define kPi_3 1.0471975511965977461542144610932 -#define kPi_4 0.78539816339744830961566084581988 -#define k2Pi_3 2.0943951023931954923084289221863 -#define k3Pi_4 2.3561944901923449288469825374596 -#define k2Pi 6.283185307179586476925286766559 - -#define kE 2.7182818284590452353602874713527 diff --git a/Littlest/Foundation/Math/MathInclude.h b/Littlest/Foundation/Math/MathInclude.h deleted file mode 100755 index 718190a..0000000 --- a/Littlest/Foundation/Math/MathInclude.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -#include "Foundation/Math/MathDefines.h" -#include "Foundation/Math/MathOperations.h" -#include "Foundation/Math/MathTypes.h" -#include "Foundation/Math/Vector.h" -#include "Foundation/Math/Quaternion.h" -#include "Foundation/Math/Matrix.h" diff --git a/Littlest/Foundation/Math/MathOperations.h b/Littlest/Foundation/Math/MathOperations.h deleted file mode 100755 index af49e6f..0000000 --- a/Littlest/Foundation/Math/MathOperations.h +++ /dev/null @@ -1,75 +0,0 @@ -#pragma once - -#include -#include "Foundation/Common/GlobalInclude.h" - -#if defined(__WINDOWS__) - -#pragma intrinsic(sin) -#pragma intrinsic(cos) -#pragma intrinsic(tan) -#pragma intrinsic(abs) -#pragma intrinsic(fabs) -#pragma intrinsic(asin) -#pragma intrinsic(acos) -#pragma intrinsic(atan) -#pragma intrinsic(atan2) -#pragma intrinsic(exp) -#pragma intrinsic(sqrt) -#pragma intrinsic(log) -#pragma intrinsic(log10) - -#endif - -#define Sinf(x) sin(x) -#define Cosf(x) cos(x) -#define Tanf(x) tan(x) -#define Sqrtf(x) sqrt(x) - -//---------------------------------------------------------------------------------------- -#define Min2(x, y) ( (x) <= (y) ? (x) : (y) ) -#define Max2(x, y) ( (x) >= (y) ? (x) : (y) ) -#define Min3(x, y, z) ( (x) <= (y) ? ((x) <= (z) ? (x) : (z)) : ((y) <= (z) ? (y) : (z)) ) -#define Max3(x, y, z) ( (x) >= (y) ? ((x) >= (z) ? (x) : (z)) : ((y) >= (z) ? (y) : (z)) ) - -//---------------------------------------------------------------------------------------- -slInline float Absf(const float& f) -{ - IntFloat int_float; - int_float.m_Float = f; - int_float.m_Int32 &= 0x7fffffff; - return int_float.m_Float; -} - -//---------------------------------------------------------------------------------------- -slInline bool EpsilonEquals(const float& a, const float& b, const float& epsilon) -{ - return Absf(a - b) <= epsilon; -} - -//---------------------------------------------------------------------------------------- -slInline uint16_t ConvertFloatToHalf( unsigned int f ) -{ - unsigned int s = f & 0x80000000; - signed int e = ((f & 0x7f800000) >> 23) - (127 - 15); - if (e < 0) return 0; - else if (e > 31) - { - e = 31; - } - unsigned int fo = f & 0x7fffff; - return (uint16_t)((s >> 16) | ((e << 10) & 0x7c00) | (fo >> 13)); -} - -//---------------------------------------------------------------------------------------- -slInline float ConvertHalfToFloat( unsigned short h ) -{ - unsigned int s = h & 0x8000; - unsigned int e = ((h & 0x7c00) >> 10) - 15 + 127; - unsigned int f = h & 0x3ff; - - IntFloat int_float; - int_float.m_UInt32 = ((s << 16) | ((e << 23) & 0x7f800000) | (f << 13)); - - return int_float.m_Float; -} diff --git a/Littlest/Foundation/Math/MathTypes.h b/Littlest/Foundation/Math/MathTypes.h deleted file mode 100755 index 379bf16..0000000 --- a/Littlest/Foundation/Math/MathTypes.h +++ /dev/null @@ -1,363 +0,0 @@ -#pragma once - -#include "Foundation/Common/GlobalInclude.h" -#include "Foundation/Math/MathOperations.h" - -//---------------------------------------------------------------------------------------- -struct Vec2 -{ - float x; - float y; - - slInline explicit Vec2() {} - slInline explicit Vec2(const float xy) {x = xy; y = xy;} - slInline explicit Vec2(const float ix, const float iy) {x = ix; y = iy;} - - slInline Vec2(const Vec2& v) {x = v.x; y = v.y;} // copy constructor - - slInline float* AsFloatArray() {return &x;} - slInline const float* AsFloatArray() const {return &x;} - - slInline float GetComponent(int index) const {return AsFloatArray()[index];} -}; - - -//---------------------------------------------------------------------------------------- -struct Vec3 -{ - float x; - float y; - float z; - - slInline explicit Vec3() {} - slInline explicit Vec3(const float xyz) {x = xyz; y = xyz; z = xyz;} - slInline explicit Vec3(const float ix, const float iy, const float iz) {x = ix; y = iy; z = iz;} - - slInline explicit Vec3(const Vec2& v, const float iz) {x = v.x; y = v.y; z = iz;} - - slInline Vec3(const Vec3& v) {x = v.x; y = v.y; z = v.z;} // copy constructor - - slInline Vec2 AsVec2() const {return Vec2(x, y);} - - slInline float* AsFloatArray() {return &x;} - slInline const float* AsFloatArray() const {return &x;} - - slInline float GetComponent(int index) const {return AsFloatArray()[index];} -}; - - -//---------------------------------------------------------------------------------------- -struct Vec4 -{ - float x; - float y; - float z; - float w; - - slInline explicit Vec4() {} - slInline explicit Vec4(const float xyzw) {x = xyzw; y = xyzw; z = xyzw; w = xyzw;} - slInline explicit Vec4(const float xyz, const float iw) {x = xyz; y = xyz; z = xyz; w = iw;} - slInline explicit Vec4(const float ix, const float iy, const float iz, const float iw) {x = ix; y = iy; z = iz; w = iw;} - - slInline explicit Vec4(const Vec2& u, const Vec2& v) {x = u.x; y = u.y; z = v.x; w = v.y;} - slInline explicit Vec4(const Vec2& v, const float iz, const float iw) {x = v.x; y = v.y; z = iz; w = iw;} - - slInline explicit Vec4(const Vec3& v, const float iw) {x = v.x; y = v.y; z = v.z; w = iw;} - - slInline Vec4(const Vec4& v) {x = v.x; y = v.y; z = v.z; w = v.w;} // copy constructor - - slInline Vec2 AsVec2() const {return Vec2(x, y);} - slInline Vec3 AsVec3() const {return Vec3(x, y, z);} - - slInline float* AsFloatArray() {return &x;} - slInline const float* AsFloatArray() const {return &x;} - - slInline float GetComponent(int index) const {return AsFloatArray()[index];} -}; - - -//---------------------------------------------------------------------------------------- -struct Quaternion -{ - float i; - float j; - float k; - float s; - - slInline explicit Quaternion() {} - explicit Quaternion(const float angle, const Vec3& normalized_axis); - explicit Quaternion(const float angle, const float x, const float y, const float z); - - slInline Quaternion(const Quaternion& q) {i = q.i; j = q.j; k = q.k; s = q.s;} - - Vec4 AsVec4(); - slInline float* AsFloatArray() {return &i;} - - Vec3 GetImaginary(); - slInline float GetReal() {return s;} -}; - -slInline Quaternion::Quaternion(const float angle, const Vec3& normalized_axis) -{ - Assert( EpsilonEquals(normalized_axis.x * normalized_axis.x + normalized_axis.y * normalized_axis.y + normalized_axis.z * normalized_axis.z, 1.0f, kSqrtEpsilon) ); - float half_angle = angle * 0.5f; - float sin_half_angle = (float)Sinf(half_angle); - i = normalized_axis.x * sin_half_angle; - j = normalized_axis.y * sin_half_angle; - k = normalized_axis.z * sin_half_angle; - s = (float)Cosf(half_angle); -} - -slInline Quaternion::Quaternion(const float angle, const float x, const float y, const float z) -{ - Assert( EpsilonEquals(x * x + y * y + z * z, 1.0f, kSqrtEpsilon) ); - float half_angle = angle * 0.5f; - float sin_half_angle = (float)Sinf(half_angle); - i = x * sin_half_angle; - j = y * sin_half_angle; - k = z * sin_half_angle; - s = (float)Cosf(half_angle); -} - -Vec4 Quaternion::AsVec4() -{ - Vec4 r; - r.x = i; - r.y = j; - r.z = k; - r.w = s; - return r; -} - -Vec3 Quaternion::GetImaginary() -{ - Vec3 r; - r.x = i; - r.y = j; - r.z = k; - return r; -} - - -//---------------------------------------------------------------------------------------- -struct Mat3 -{ - Vec3 v[3]; - - slInline explicit Mat3() {} - explicit Mat3(const Vec3& v0, const Vec3& v1, const Vec3& v2); - explicit Mat3(const float v00, const float v01, const float v02, - const float v10, const float v11, const float v12, - const float v20, const float v21, const float v22); - Mat3(const Mat3& m); // copy constructor - - float* AsFloatArray() {return &v[0].x;} -}; - -slInline Mat3::Mat3(const Vec3& v0, const Vec3& v1, const Vec3& v2) -{ - v[0] = v0; - v[1] = v1; - v[2] = v2; -} - -slInline Mat3::Mat3(const float v00, const float v01, const float v02, const float v10, const float v11, const float v12, const float v20, const float v21, const float v22) -{ - v[0].x = v00; v[0].y = v01; v[0].z = v02; - v[1].x = v10; v[1].y = v11; v[1].z = v12; - v[2].x = v20; v[2].y = v21; v[2].z = v22; -} - -slInline Mat3::Mat3(const Mat3& m) -{ - v[0] = m.v[0]; - v[1] = m.v[1]; - v[2] = m.v[2]; -} - - -//---------------------------------------------------------------------------------------- -struct Mat4 -{ - Vec4 v[4]; - - slInline explicit Mat4() {} - explicit Mat4(const Vec4& v0, const Vec4& v1, const Vec4& v2, const Vec4& v3); - explicit Mat4(const float v00, const float v01, const float v02, const float v03, - const float v10, const float v11, const float v12, const float v13, - const float v20, const float v21, const float v22, const float v23, - const float v30, const float v31, const float v32, const float v33); - explicit Mat4(const Mat3& m); - Mat4(const Mat4& m); // copy constructor - - float* AsFloatArray() {return &v[0].x;} -}; - -slInline Mat4::Mat4(const Vec4& v0, const Vec4& v1, const Vec4& v2, const Vec4& v3) -{ - v[0] = v0; - v[1] = v1; - v[2] = v2; - v[3] = v3; -} - -slInline Mat4::Mat4(const float v00, const float v01, const float v02, const float v03, const float v10, const float v11, const float v12, const float v13, const float v20, const float v21, const float v22, const float v23, const float v30, const float v31, const float v32, const float v33) -{ - v[0].x = v00; v[0].y = v01; v[0].z = v02; v[0].w = v03; - v[1].x = v10; v[1].y = v11; v[1].z = v12; v[1].w = v13; - v[2].x = v20; v[2].y = v21; v[2].z = v22; v[2].w = v23; - v[3].x = v30; v[3].y = v31; v[3].z = v32; v[3].w = v33; -} - -slInline Mat4::Mat4(const Mat3& m) -{ - v[0].x = m.v[0].x; v[0].y = m.v[0].y; v[0].z = m.v[0].z; v[0].w = 0.0f; - v[1].x = m.v[1].x; v[1].y = m.v[1].y; v[1].z = m.v[1].z; v[1].w = 0.0f; - v[2].x = m.v[2].x; v[2].y = m.v[2].y; v[2].z = m.v[2].z; v[2].w = 0.0f; - v[3].x = 0.0f; v[3].y = 0.0f; v[3].z = 0.0f; v[3].w = 1.0f; -} - -slInline Mat4::Mat4(const Mat4& m) -{ - v[0] = m.v[0]; - v[1] = m.v[1]; - v[2] = m.v[2]; - v[3] = m.v[3]; -} - - -//---------------------------------------------------------------------------------------- -typedef MEM_ALIGN(8) Vec2 AlignedVec2; -typedef MEM_ALIGN(16) Vec3 AlignedVec3; -typedef MEM_ALIGN(16) Vec4 AlignedVec4; - -typedef MEM_ALIGN(64) Mat3 AlignedMat3; -typedef MEM_ALIGN(64) Mat4 AlignedMat4; - - -//---------------------------------------------------------------------------------------- -// SIMD Structures -//---------------------------------------------------------------------------------------- -struct Vec2SOA -{ - uint32_t m_Count; - uint32_t m_MaxCount; - - float* m_X; - float* m_Y; - - slInline explicit Vec2SOA() {m_Count = 0; m_MaxCount = 0; m_X = NULL; m_Y = NULL;} - bool InitVec2SOA(float* buffer, uint32_t buffer_size); - - void GetVec2AtIndex(Vec2& v, uint32_t index) {Assert(index < m_Count); v.x = m_X[index]; v.y = m_Y[index];} -}; - -slInline bool Vec2SOA::InitVec2SOA(float* buffer, uint32_t max_count) -{ - m_Count = 0; - - uint64_t buffer_addr = (uint64_t)buffer; - uint64_t buffer_addr_aligned = ALIGN_UP(buffer_addr, 16); - uint64_t buffer_end = (uint64_t)(buffer + max_count); - - if (buffer_end - buffer_addr_aligned < 20) - { - m_MaxCount = 0; - m_X = NULL; - m_Y = NULL; - - return false; - } - - uint32_t remainder = (uint32_t)POWER_OF_TWO_MOD(buffer_end, 16) / 4; - uint32_t slot_count = (uint32_t)(buffer_end - buffer_addr_aligned) / 32; - - m_MaxCount = slot_count * 4 + (uint32_t)(remainder * (slot_count & 0x1)); - - m_X = (float*)buffer_addr_aligned; - m_Y = m_X + ALIGN_UP(m_MaxCount, 4); -} - - -//---------------------------------------------------------------------------------------- -struct Vec3SOA : public Vec2SOA -{ - float* m_Z; - - slInline explicit Vec3SOA() {m_Count = 0; m_MaxCount = 0; m_X = NULL; m_Y = NULL; m_Z = NULL;} - bool InitVec3SOA(float* buffer, uint32_t buffer_size); - - void GetVec3AtIndex(Vec3& v, uint32_t index) {Assert(index < m_Count); v.x = m_X[index]; v.y = m_Y[index]; v.z = m_Z[index];} -}; - -slInline bool Vec3SOA::InitVec3SOA(float* buffer, uint32_t max_count) -{ - m_Count = 0; - - uint64_t buffer_addr = (uint64_t)buffer; - uint64_t buffer_addr_aligned = ALIGN_UP(buffer_addr, 16); - uint64_t buffer_end = (uint64_t)(buffer + max_count); - - if (buffer_end - buffer_addr_aligned < 36) - { - m_MaxCount = 0; - m_X = NULL; - m_Y = NULL; - m_Z = NULL; - - return false; - } - - uint32_t remainder = (uint32_t)POWER_OF_TWO_MOD(buffer_end, 16) / 4; - uint32_t slot_count = (uint32_t)(buffer_end - buffer_addr_aligned) / 48; - - m_MaxCount = slot_count * 4 + (uint32_t)(remainder * (slot_count % 3 == 2)); - - m_X = (float*)buffer_addr_aligned; - uint32_t aligned_count = ALIGN_UP(m_MaxCount, 4); - m_Y = m_X + aligned_count; - m_Z = m_Y + aligned_count; -} - - -//---------------------------------------------------------------------------------------- -struct Vec4SOA : public Vec3SOA -{ - float* m_W; - - slInline explicit Vec4SOA() {m_Count = 0; m_MaxCount = 0; m_X = NULL; m_Y = NULL; m_Z = NULL; m_W = NULL;} - bool InitVec4SOA(float* buffer, uint32_t buffer_size); - - void GetVec4AtIndex(Vec4& v, uint32_t index) {Assert(index < m_Count); v.x = m_X[index]; v.y = m_Y[index]; v.z = m_Z[index]; v.w = m_W[index];} -}; - -slInline bool Vec4SOA::InitVec4SOA(float* buffer, uint32_t max_count) -{ - m_Count = 0; - - uint64_t buffer_addr = (uint64_t)buffer; - uint64_t buffer_addr_aligned = ALIGN_UP(buffer_addr, 16); - uint64_t buffer_end = (uint64_t)(buffer + max_count); - - if (buffer_end - buffer_addr_aligned < 52) - { - m_MaxCount = 0; - m_X = NULL; - m_Y = NULL; - m_Z = NULL; - m_W = NULL; - - return false; - } - - uint32_t remainder = (uint32_t)POWER_OF_TWO_MOD(buffer_end, 16) / 4; - uint32_t slot_count = (uint32_t)(buffer_end - buffer_addr_aligned) / 64; - - m_MaxCount = slot_count * 4 + (uint32_t)(remainder * ((slot_count & 0x3) == 4)); - - m_X = (float*)buffer_addr_aligned; - uint32_t aligned_count = ALIGN_UP(m_MaxCount, 4); - m_Y = m_X + aligned_count; - m_Z = m_Y + aligned_count; - m_W = m_Z + aligned_count; -} diff --git a/Littlest/Foundation/Math/Matrix.h b/Littlest/Foundation/Math/Matrix.h deleted file mode 100755 index 40e2a70..0000000 --- a/Littlest/Foundation/Math/Matrix.h +++ /dev/null @@ -1,660 +0,0 @@ -#pragma once - -#include "Foundation/Common/GlobalInclude.h" -#include "Foundation/Math/MathOperations.h" -#include "Foundation/Math/MathTypes.h" -#include "Foundation/Math/Vector.h" - -//---------------------------------------------------------------------------------------- -// Matrix are expressed in post-multiply row-major format. -// That is, matrix multiplication follows the form v = x * A. -// A local-to-world transform with basis a, b, c, expressed in world space, will result -// in a matrix that looks like: -// _ _ -// | a | -// | b | -// | c | -// - - -// -// Therefore, translate t will naturally follow below c, in the illustration above. -// With this, we can stuff the matrix directly into OpenGL and not have to do swizzling. -//---------------------------------------------------------------------------------------- - -//---------------------------------------------------------------------------------------- -// Mat3 -//---------------------------------------------------------------------------------------- -void SetMat3(Mat3& r, const Mat3& a); -void SetMat3(Mat3& r, const Vec3& v0, const Vec3& v1, const Vec3& v2); - -void ScaleMat3(Mat3& r, const float s, const Mat3& a); -Mat3 ScaleMat3(const float s, const Mat3& a); - -float DeterminantOfMat3(const Mat3& a); - -void TransposeMat3(Mat3& r, const Mat3& a); -Mat3 TransposeMat3(const Mat3& a); - -void InvertAffineMat3(Mat3& r, const Mat3& a); -Mat3 InvertAffineMat3(const Mat3& a); - -void InvertGeneralMat3(Mat3& r, const Mat3& a); -Mat3 InvertGeneralMat3(const Mat3& a); - -void MulMat3(Mat3& r, const Mat3& a, const Mat3& b); -Mat3 MulMat3(const Mat3& a, const Mat3& b); - -void MulMat3ByTransposedMat3(Mat3& r, const Mat3& a, const Mat3& b); -Mat3 MulMat3ByTransposedMat3(const Mat3& a, const Mat3& b); - -void MulVec3ByMat3(Vec3& r, const Vec3& v, const Mat3& a); -Vec3 MulVec3ByMat3(const Vec3& v, const Mat3& a); - -//---------------------------------------------------------------------------------------- -slInline void SetMat3(Mat3& r, const Mat3& a) -{ - r.v[0] = a.v[0]; - r.v[1] = a.v[1]; - r.v[2] = a.v[2]; -} - -//---------------------------------------------------------------------------------------- -slInline void SetMat3(Mat3& r, const Vec3& v0, const Vec3& v1, const Vec3& v2) -{ - r.v[0] = v0; - r.v[1] = v1; - r.v[2] = v2; -} - -//---------------------------------------------------------------------------------------- -slInline void ScaleMat3(Mat3& r, const float s, const Mat3& a) -{ - ScaleVec3(r.v[0], s, a.v[0]); - ScaleVec3(r.v[1], s, a.v[1]); - ScaleVec3(r.v[2], s, a.v[2]); -} - -//---------------------------------------------------------------------------------------- -slInline Mat3 ScaleMat3(const float s, const Mat3& a) -{ - Mat3 r; - ScaleVec3(r.v[0], s, a.v[0]); - ScaleVec3(r.v[1], s, a.v[1]); - ScaleVec3(r.v[2], s, a.v[2]); - return r; -} - -//---------------------------------------------------------------------------------------- -slInline float DeterminantOfMat3(const Mat3& a) -{ - return a.v[0].x * (a.v[1].y * a.v[2].z - a.v[1].z * a.v[2].y) - + a.v[0].y * (a.v[1].z * a.v[2].x - a.v[1].x * a.v[2].z) - + a.v[0].z * (a.v[1].x * a.v[2].y - a.v[1].y * a.v[2].x); -} - -//---------------------------------------------------------------------------------------- -slInline void TransposeMat3(Mat3& r, const Mat3& a) -{ - // a might be the same as r - r.v[0].x = a.v[0].x; - r.v[1].y = a.v[1].y; - r.v[2].z = a.v[2].z; - - float temp; - temp = r.v[0].y; - r.v[0].y = r.v[1].x; - r.v[1].x = temp; - - temp = r.v[0].z; - r.v[0].z = r.v[2].x; - r.v[2].x = temp; - - temp = r.v[1].z; - r.v[1].z = r.v[2].y; - r.v[2].y = temp; -} - -//---------------------------------------------------------------------------------------- -slInline Mat3 TransposeMat3(const Mat3& a) -{ - Mat3 r; - r.v[0].x = a.v[0].x; r.v[0].y = a.v[1].x; r.v[0].z = a.v[2].x; - r.v[1].x = a.v[0].y; r.v[1].y = a.v[1].y; r.v[1].z = a.v[2].y; - r.v[2].x = a.v[0].z; r.v[2].y = a.v[1].z; r.v[2].z = a.v[2].z; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void InvertAffineMat3(Mat3& r, const Mat3& a) -{ - TransposeMat3(r, a); -} - -//---------------------------------------------------------------------------------------- -slInline Mat3 InvertAffineMat3(const Mat3& a) -{ - return TransposeMat3(a); -} - -//---------------------------------------------------------------------------------------- -slInline void InvertGeneralMat3(Mat3& r, const Mat3& a) -{ - float inv_determinant = 1.0f / DeterminantOfMat3(a); - - Mat3 a_T; - TransposeMat3(a_T, a); - CrossVec3(r.v[0], a_T.v[1], a_T.v[2]); - CrossVec3(r.v[1], a_T.v[2], a_T.v[0]); - CrossVec3(r.v[2], a_T.v[0], a_T.v[1]); - - ScaleMat3(r, inv_determinant, r); -} - -//---------------------------------------------------------------------------------------- -slInline Mat3 InvertGeneralMat3(const Mat3& a) -{ - float inv_determinant = 1.0f / DeterminantOfMat3(a); - - Mat3 r; - Mat3 a_T = TransposeMat3(a); - CrossVec3(r.v[0], a_T.v[1], a_T.v[2]); - CrossVec3(r.v[1], a_T.v[2], a_T.v[0]); - CrossVec3(r.v[2], a_T.v[0], a_T.v[1]); - - return ScaleMat3(inv_determinant, r); -} - -//---------------------------------------------------------------------------------------- -slInline void MulMat3(Mat3& r, const Mat3& a, const Mat3& b) -{ - Mat3 temp; - - temp.v[0].x = DotVec3(a.v[0], b.v[0].x, b.v[1].x, b.v[2].x); - temp.v[0].y = DotVec3(a.v[0], b.v[0].y, b.v[1].y, b.v[2].y); - temp.v[0].z = DotVec3(a.v[0], b.v[0].z, b.v[1].z, b.v[2].z); - - temp.v[1].x = DotVec3(a.v[1], b.v[0].x, b.v[1].x, b.v[2].x); - temp.v[1].y = DotVec3(a.v[1], b.v[0].y, b.v[1].y, b.v[2].y); - temp.v[1].z = DotVec3(a.v[1], b.v[0].z, b.v[1].z, b.v[2].z); - - temp.v[2].x = DotVec3(a.v[2], b.v[0].x, b.v[1].x, b.v[2].x); - temp.v[2].y = DotVec3(a.v[2], b.v[0].y, b.v[1].y, b.v[2].y); - temp.v[2].z = DotVec3(a.v[2], b.v[0].z, b.v[1].z, b.v[2].z); - - SetMat3(r, temp); -} - -//---------------------------------------------------------------------------------------- -slInline Mat3 MulMat3(const Mat3& a, const Mat3& b) -{ - Mat3 r; - - r.v[0].x = DotVec3(a.v[0], b.v[0].x, b.v[1].x, b.v[2].x); - r.v[0].y = DotVec3(a.v[0], b.v[0].y, b.v[1].y, b.v[2].y); - r.v[0].z = DotVec3(a.v[0], b.v[0].z, b.v[1].z, b.v[2].z); - - r.v[1].x = DotVec3(a.v[1], b.v[0].x, b.v[1].x, b.v[2].x); - r.v[1].y = DotVec3(a.v[1], b.v[0].y, b.v[1].y, b.v[2].y); - r.v[1].z = DotVec3(a.v[1], b.v[0].z, b.v[1].z, b.v[2].z); - - r.v[2].x = DotVec3(a.v[2], b.v[0].x, b.v[1].x, b.v[2].x); - r.v[2].y = DotVec3(a.v[2], b.v[0].y, b.v[1].y, b.v[2].y); - r.v[2].z = DotVec3(a.v[2], b.v[0].z, b.v[1].z, b.v[2].z); - - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void MulMat3ByTransposedMat3(Mat3& r, const Mat3& a, const Mat3& b) -{ - Mat3 temp; - - temp.v[0].x = DotVec3(a.v[0], b.v[0]); - temp.v[0].y = DotVec3(a.v[0], b.v[1]); - temp.v[0].z = DotVec3(a.v[0], b.v[2]); - - temp.v[1].x = DotVec3(a.v[1], b.v[0]); - temp.v[1].y = DotVec3(a.v[1], b.v[1]); - temp.v[1].z = DotVec3(a.v[1], b.v[2]); - - temp.v[2].x = DotVec3(a.v[2], b.v[0]); - temp.v[2].y = DotVec3(a.v[2], b.v[1]); - temp.v[2].z = DotVec3(a.v[2], b.v[2]); - - SetMat3(r, temp); -} - -//---------------------------------------------------------------------------------------- -slInline Mat3 MulMat3ByTransposedMat3(const Mat3& a, const Mat3& b) -{ - Mat3 r; - - r.v[0].x = DotVec3(a.v[0], b.v[0]); - r.v[0].y = DotVec3(a.v[0], b.v[1]); - r.v[0].z = DotVec3(a.v[0], b.v[2]); - - r.v[1].x = DotVec3(a.v[1], b.v[0]); - r.v[1].y = DotVec3(a.v[1], b.v[1]); - r.v[1].z = DotVec3(a.v[1], b.v[2]); - - r.v[2].x = DotVec3(a.v[2], b.v[0]); - r.v[2].y = DotVec3(a.v[2], b.v[1]); - r.v[2].z = DotVec3(a.v[2], b.v[2]); - - return r; -} - -//---------------------------------------------------------------------------------------- -// do NOT pass in components of a as the r vector -slInline void MulVec3ByMat3(Vec3& r, const Vec3& v, const Mat3& a) -{ - float x = v.x * a.v[0].x + v.y * a.v[1].x + v.z * a.v[2].x; - float y = v.x * a.v[0].y + v.y * a.v[1].y + v.z * a.v[2].y; - float z = v.x * a.v[0].z + v.y * a.v[1].z + v.z * a.v[2].z; - SetVec3(r, x, y, z); -} - -//---------------------------------------------------------------------------------------- -slInline Vec3 MulVec3ByMat3(const Vec3& v, const Mat3& a) -{ - Vec3 r; - r.x = v.x * a.v[0].x + v.y * a.v[1].x + v.z * a.v[2].x; - r.y = v.x * a.v[0].y + v.y * a.v[1].y + v.z * a.v[2].y; - r.z = v.x * a.v[0].z + v.y * a.v[1].z + v.z * a.v[2].z; - return r; -} - - - -//---------------------------------------------------------------------------------------- -// Mat4 -//---------------------------------------------------------------------------------------- -void SetMat4(Mat4& r, const Mat4& a); -void SetMat4(Mat4& r, const Mat3& a); -void SetMat4(Mat4& r, const Mat3& a, const Vec3& position); - -void ScaleMat4(Mat4& r, const float s, const Mat4& a); -Mat4 ScaleMat4(const float s, const Mat4& a); - -float DeterminantOfMat4(const Mat4& a); - -void TransposeMat4(Mat4& r, const Mat4& a); -Mat4 TransposeMat4(const Mat4& a); - -void InvertAffineMat4(Mat4& r, const Mat4& a); -Mat4 InvertAffineMat4(const Mat4& a); - -void InvertGeneralMat4(Mat4& r, const Mat4& a); -Mat4 InvertGeneralMat4(const Mat4& a); - -void MulMat4(Mat4& r, const Mat4& a, const Mat4& b); -Mat4 MulMat4(const Mat4& a, const Mat4& b); - -void MulMat4ByTransposedMat4(Mat4& r, const Mat4& a, const Mat4& t); -Mat4 MulMat4ByTransposedMat4(const Mat4& a, Mat4& t); - -void MulVec4ByMat4(Vec4& r, const Vec4& v, const Mat4& a); -Vec4 MulVec4ByMat4(const Vec4& v, const Mat4& a); - -void MulVec3ByMat4(Vec4& r, const Vec3& v, const float w, const Mat4& a); -Vec4 MulVec3ByMat4(const Vec3& v, const float w, const Mat4& a); - -void MulVec4ByTransposedMat4(Vec4& r, const Vec4& v, const Mat4& t); -Vec4 MulVec4ByTransposedMat4(const Vec4& v, const Mat4& t); - -void MulVec3ByTransposedMat4(Vec4& r, const Vec3& v, const float w, const Mat4& t); -Vec4 MulVec3ByTransposedMat4(const Vec3& v, const float w, const Mat4& t); - -//---------------------------------------------------------------------------------------- -slInline void SetMat4(Mat4& r, const Mat4& a) -{ - r.v[0] = a.v[0]; - r.v[1] = a.v[1]; - r.v[2] = a.v[2]; - r.v[3] = a.v[3]; -} - -//---------------------------------------------------------------------------------------- -slInline void SetMat4(Mat4& r, const Mat3& a) -{ - SetVec4(r.v[0], a.v[0], 0.0f); - SetVec4(r.v[1], a.v[1], 0.0f); - SetVec4(r.v[2], a.v[2], 0.0f); - SetVec4(r.v[3], 0.0f, 0.0f, 0.0f, 1.0f); -} - -//---------------------------------------------------------------------------------------- -slInline void SetMat4(Mat4& r, const Mat3& a, const Vec3& position) -{ - SetVec4(r.v[0], a.v[0], 0.0f); - SetVec4(r.v[1], a.v[1], 0.0f); - SetVec4(r.v[2], a.v[2], 0.0f); - SetVec4(r.v[3], position, 1.0f); -} - -//---------------------------------------------------------------------------------------- -slInline void ScaleMat4(Mat4& r, const float s, const Mat4& a) -{ - ScaleVec4(r.v[0], s, a.v[0]); - ScaleVec4(r.v[1], s, a.v[1]); - ScaleVec4(r.v[2], s, a.v[2]); - ScaleVec4(r.v[3], s, a.v[3]); -} - -//---------------------------------------------------------------------------------------- -slInline Mat4 ScaleMat4(const float s, const Mat4& a) -{ - Mat4 r; - ScaleVec4(r.v[0], s, a.v[0]); - ScaleVec4(r.v[1], s, a.v[1]); - ScaleVec4(r.v[2], s, a.v[2]); - ScaleVec4(r.v[3], s, a.v[3]); - return r; -} - -//---------------------------------------------------------------------------------------- -slInline float DeterminantOfMat4(const Mat4& a) -{ - // is this correct? - Vec4 cross_product; - CrossVec4(cross_product, a.v[1], a.v[2], a.v[3]); - return DotVec4(a.v[0], cross_product); -} - -//---------------------------------------------------------------------------------------- -slInline void TransposeMat4(Mat4& r, const Mat4& a) -{ - // a might be the same as r - r.v[0].x = a.v[0].x; - r.v[1].y = a.v[1].y; - r.v[2].z = a.v[2].z; - r.v[3].w = a.v[3].w; - - float temp; - temp = r.v[0].y; - r.v[0].y = r.v[1].x; - r.v[1].x = temp; - - temp = r.v[0].z; - r.v[0].z = r.v[2].x; - r.v[2].x = temp; - - temp = r.v[0].w; - r.v[0].w = r.v[3].x; - r.v[3].x = temp; - - temp = r.v[1].z; - r.v[1].z = r.v[2].y; - r.v[2].y = temp; - - temp = r.v[1].w; - r.v[1].w = r.v[3].y; - r.v[3].y = temp; - - temp = r.v[2].w; - r.v[2].w = r.v[3].z; - r.v[3].z = temp; -} - -//---------------------------------------------------------------------------------------- -slInline Mat4 TransposeMat4(const Mat4& a) -{ - Mat4 r; - r.v[0].x = a.v[0].x; r.v[0].y = a.v[1].x; r.v[0].z = a.v[2].x; r.v[0].w = a.v[3].x; - r.v[1].x = a.v[0].y; r.v[1].y = a.v[1].y; r.v[1].z = a.v[2].y; r.v[1].w = a.v[3].y; - r.v[2].x = a.v[0].z; r.v[2].y = a.v[1].z; r.v[2].z = a.v[2].z; r.v[2].w = a.v[3].z; - r.v[3].x = a.v[0].w; r.v[3].y = a.v[1].w; r.v[3].z = a.v[2].w; r.v[3].w = a.v[3].w; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void InvertAffineMat4(Mat4& r, const Mat4& a) -{ - // this may not be correct... - Mat3 a3_T(a.v[0].AsVec3(), a.v[1].AsVec3(), a.v[2].AsVec3()); - InvertAffineMat3(a3_T, a3_T); - - Vec3 transpose; - MulVec3ByMat3(transpose, a.v[3].AsVec3(), a3_T); - - SetMat4(r, a3_T, transpose); -} - -//---------------------------------------------------------------------------------------- -slInline Mat4 InvertAffineMat4(const Mat4& a) -{ - Mat4 r; - - // this may not be correct... - Mat3 a3_T(a.v[0].AsVec3(), a.v[1].AsVec3(), a.v[2].AsVec3()); - InvertAffineMat3(a3_T, a3_T); - - Vec3 transpose; - MulVec3ByMat3(transpose, a.v[3].AsVec3(), a3_T); - - SetMat4(r, a3_T, transpose); - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void InvertGeneralMat4(Mat4& r, const Mat4& a) -{ - // does this work? - float inv_determinant = 1.0f / DeterminantOfMat4(a); - - Mat4 a_T; - TransposeMat4(a_T, a); - CrossVec4(r.v[0], a_T.v[1], a_T.v[2], a_T.v[3]); - CrossVec4(r.v[1], a_T.v[2], a_T.v[3], a_T.v[0]); - CrossVec4(r.v[2], a_T.v[3], a_T.v[0], a_T.v[1]); - CrossVec4(r.v[3], a_T.v[0], a_T.v[1], a_T.v[2]); - - ScaleMat4(r, inv_determinant, r); -} - -//---------------------------------------------------------------------------------------- -slInline Mat4 InvertGeneralMat4(const Mat4& a) -{ - // does this work? - Mat4 r; - float inv_determinant = 1.0f / DeterminantOfMat4(a); - - Mat4 a_T; - TransposeMat4(a_T, a); - r.v[0] = CrossVec4(a_T.v[1], a_T.v[2], a_T.v[3]); - r.v[1] = CrossVec4(a_T.v[2], a_T.v[3], a_T.v[0]); - r.v[2] = CrossVec4(a_T.v[3], a_T.v[0], a_T.v[1]); - r.v[3] = CrossVec4(a_T.v[0], a_T.v[1], a_T.v[2]); - - return ScaleMat4(inv_determinant, r); -} - -//---------------------------------------------------------------------------------------- -slInline void MulMat4(Mat4& r, const Mat4& a, const Mat4& b) -{ - Mat4 temp; - - temp.v[0].x = DotVec4(a.v[0], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x); - temp.v[0].y = DotVec4(a.v[0], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y); - temp.v[0].z = DotVec4(a.v[0], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z); - temp.v[0].w = DotVec4(a.v[0], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w); - - temp.v[1].x = DotVec4(a.v[1], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x); - temp.v[1].y = DotVec4(a.v[1], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y); - temp.v[1].z = DotVec4(a.v[1], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z); - temp.v[1].w = DotVec4(a.v[1], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w); - - temp.v[2].x = DotVec4(a.v[2], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x); - temp.v[2].y = DotVec4(a.v[2], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y); - temp.v[2].z = DotVec4(a.v[2], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z); - temp.v[2].w = DotVec4(a.v[2], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w); - - temp.v[3].x = DotVec4(a.v[3], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x); - temp.v[3].y = DotVec4(a.v[3], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y); - temp.v[3].z = DotVec4(a.v[3], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z); - temp.v[3].w = DotVec4(a.v[3], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w); - - SetMat4(r, temp); -} - -//---------------------------------------------------------------------------------------- -slInline Mat4 MulMat4(const Mat4& a, const Mat4& b) -{ - Mat4 r; - - r.v[0].x = DotVec4(a.v[0], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x); - r.v[0].y = DotVec4(a.v[0], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y); - r.v[0].z = DotVec4(a.v[0], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z); - r.v[0].w = DotVec4(a.v[0], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w); - - r.v[1].x = DotVec4(a.v[1], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x); - r.v[1].y = DotVec4(a.v[1], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y); - r.v[1].z = DotVec4(a.v[1], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z); - r.v[1].w = DotVec4(a.v[1], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w); - - r.v[2].x = DotVec4(a.v[2], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x); - r.v[2].y = DotVec4(a.v[2], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y); - r.v[2].z = DotVec4(a.v[2], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z); - r.v[2].w = DotVec4(a.v[2], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w); - - r.v[3].x = DotVec4(a.v[3], b.v[0].x, b.v[1].x, b.v[2].x, b.v[3].x); - r.v[3].y = DotVec4(a.v[3], b.v[0].y, b.v[1].y, b.v[2].y, b.v[3].y); - r.v[3].z = DotVec4(a.v[3], b.v[0].z, b.v[1].z, b.v[2].z, b.v[3].z); - r.v[3].w = DotVec4(a.v[3], b.v[0].w, b.v[1].w, b.v[2].w, b.v[3].w); - - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void MulMat4ByTransposedMat4(Mat4& r, const Mat4& a, const Mat4& t) -{ - Mat4 temp; - - temp.v[0].x = DotVec4(a.v[0], t.v[0]); - temp.v[0].y = DotVec4(a.v[0], t.v[1]); - temp.v[0].z = DotVec4(a.v[0], t.v[2]); - temp.v[0].w = DotVec4(a.v[0], t.v[3]); - - temp.v[1].x = DotVec4(a.v[1], t.v[0]); - temp.v[1].y = DotVec4(a.v[1], t.v[1]); - temp.v[1].z = DotVec4(a.v[1], t.v[2]); - temp.v[1].w = DotVec4(a.v[1], t.v[3]); - - temp.v[2].x = DotVec4(a.v[2], t.v[0]); - temp.v[2].y = DotVec4(a.v[2], t.v[1]); - temp.v[2].z = DotVec4(a.v[2], t.v[2]); - temp.v[2].w = DotVec4(a.v[2], t.v[3]); - - temp.v[3].x = DotVec4(a.v[3], t.v[0]); - temp.v[3].y = DotVec4(a.v[3], t.v[1]); - temp.v[3].z = DotVec4(a.v[3], t.v[2]); - temp.v[3].w = DotVec4(a.v[3], t.v[3]); - - SetMat4(r, temp); -} - -//---------------------------------------------------------------------------------------- -slInline Mat4 MulMat4ByTransposedMat4(const Mat4& a, const Mat4& t) -{ - Mat4 r; - - r.v[0].x = DotVec4(a.v[0], t.v[0]); - r.v[0].y = DotVec4(a.v[0], t.v[1]); - r.v[0].z = DotVec4(a.v[0], t.v[2]); - r.v[0].w = DotVec4(a.v[0], t.v[3]); - - r.v[1].x = DotVec4(a.v[1], t.v[0]); - r.v[1].y = DotVec4(a.v[1], t.v[1]); - r.v[1].z = DotVec4(a.v[1], t.v[2]); - r.v[1].w = DotVec4(a.v[1], t.v[3]); - - r.v[2].x = DotVec4(a.v[2], t.v[0]); - r.v[2].y = DotVec4(a.v[2], t.v[1]); - r.v[2].z = DotVec4(a.v[2], t.v[2]); - r.v[2].w = DotVec4(a.v[2], t.v[3]); - - r.v[3].x = DotVec4(a.v[3], t.v[0]); - r.v[3].y = DotVec4(a.v[3], t.v[1]); - r.v[3].z = DotVec4(a.v[3], t.v[2]); - r.v[3].w = DotVec4(a.v[3], t.v[3]); - - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void MulVec4ByMat4(Vec4& r, const Vec4& v, const Mat4& a) -{ - Vec4 result; - ScaleVec4(result, v.x, a.v[0]); - ScaleAddVec4(result, v.y, a.v[1], result); - ScaleAddVec4(result, v.z, a.v[2], result); - ScaleAddVec4(result, v.w, a.v[3], result); - SetVec4(r, result); -} - -//---------------------------------------------------------------------------------------- -slInline Vec4 MulVec4ByMat4(const Vec4& v, const Mat4& a) -{ - Vec4 r; - ScaleVec4(r, v.x, a.v[0]); - ScaleAddVec4(r, v.y, a.v[1], r); - ScaleAddVec4(r, v.z, a.v[2], r); - ScaleAddVec4(r, v.w, a.v[3], r); - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void MulVec3ByMat4(Vec4& r, const Vec3& v, const float iw, const Mat4& a) -{ - Vec4 result; - ScaleVec4(result, v.x, a.v[0]); - ScaleAddVec4(result, v.y, a.v[1], result); - ScaleAddVec4(result, v.z, a.v[2], result); - ScaleAddVec4(result, iw, a.v[3], result); - SetVec4(r, result); -} - -//---------------------------------------------------------------------------------------- -slInline Vec4 MulVec3ByMat4(const Vec3& v, const float iw, const Mat4& a) -{ - Vec4 r; - ScaleVec4(r, v.x, a.v[0]); - ScaleAddVec4(r, v.y, a.v[1], r); - ScaleAddVec4(r, v.z, a.v[2], r); - ScaleAddVec4(r, iw, a.v[3], r); - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void MulVec4ByTransposedMat4(Vec4& r, const Vec4& v, const Mat4& t) -{ - float x = DotVec4(v, t.v[0]); - float y = DotVec4(v, t.v[1]); - float z = DotVec4(v, t.v[2]); - float w = DotVec4(v, t.v[3]); - SetVec4(r, x, y, z, w); -} - -//---------------------------------------------------------------------------------------- -slInline Vec4 MulVec4ByTransposedMat4(const Vec4& v, const Mat4& t) -{ - Vec4 r; - r.x = DotVec4(v, t.v[0]); - r.y = DotVec4(v, t.v[1]); - r.z = DotVec4(v, t.v[2]); - r.w = DotVec4(v, t.v[3]); - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void MulVec3ByTransposedMat4(Vec4& r, const Vec3& v, const float w, const Mat4& t) -{ - Vec4 v_new(v, w); - MulVec4ByTransposedMat4(r, v_new, t); -} - -//---------------------------------------------------------------------------------------- -slInline Vec4 MulVec3ByTransposedMat4(const Vec3& v, const float w, const Mat4& t) -{ - Vec4 v_as_v4(v, w); - return MulVec4ByTransposedMat4(v_as_v4, t); -} diff --git a/Littlest/Foundation/Math/Quaternion.h b/Littlest/Foundation/Math/Quaternion.h deleted file mode 100755 index d9cce5d..0000000 --- a/Littlest/Foundation/Math/Quaternion.h +++ /dev/null @@ -1,100 +0,0 @@ -#pragma once - -#include "Foundation/Common/GlobalInclude.h" -#include "Foundation/Math/MathTypes.h" -#include "Foundation/Math/Vector.h" - -//---------------------------------------------------------------------------------------- -// Quaternion -//---------------------------------------------------------------------------------------- -void SetQuaternion(Quaternion& r, const float angle, const float x, const float y, const float z); -void SetQuaternion(Quaternion& r, const float angle, const Vec3& rotation_axis); -void ScaleQuaternion(Quaternion& r, const float s, const Quaternion& q); -void MulQuaternion(Quaternion& r, const Quaternion& p, const Quaternion& q); -void ConjugateOfQuaternion(Quaternion& r, const Quaternion& q); -float NormOfQuaternion(const Quaternion& q); -float NormSquaredOfQuaternion(const Quaternion& q); -void NormalizeQuaternion(Quaternion& r, Quaternion& q); -void InverseQuaterion(Quaternion& r, const Quaternion& q); - -//---------------------------------------------------------------------------------------- -void SetQuaternion(Quaternion& r, const float angle, const float x, const float y, const float z) -{ - Assert( EpsilonEquals(x*x + y*y + z*z, 0.0f, kSqrtEpsilon) ); - - float half_angle = angle * 0.5f; - float sin_half_angle = (float)Sinf(half_angle); - - r.i = x * sin_half_angle; - r.j = y * sin_half_angle; - r.k = z * sin_half_angle; - r.s = (float)Cosf(half_angle); -} - -//---------------------------------------------------------------------------------------- -void SetQuaternion(Quaternion& r, const float angle, const Vec3& rotation_axis) -{ - Assert( EpsilonEquals(rotation_axis.x * rotation_axis.x + rotation_axis.y * rotation_axis.y + rotation_axis.z * rotation_axis.z, 0.0f, kSqrtEpsilon) ); - - float half_angle = angle * 0.5f; - float sin_half_angle = (float)Sinf(half_angle); - - r.i = rotation_axis.x * sin_half_angle; - r.j = rotation_axis.y * sin_half_angle; - r.k = rotation_axis.z * sin_half_angle; - r.s = (float)Cosf(half_angle); -} - -//---------------------------------------------------------------------------------------- -void ScaleQuaternion(Quaternion& r, const float s, const Quaternion& q) -{ - r.i = q.i * s; - r.j = q.j * s; - r.k = q.k * s; - r.s = q.s * s; -} - -//---------------------------------------------------------------------------------------- -void MulQuaternion(Quaternion& r, const Quaternion& p, const Quaternion& q) -{ - r.i = p.s * q.i + p.i * q.s + p.j * q.k - p.k * q.j; - r.j = p.s * q.j + p.j * q.s + p.k * q.i - p.i * q.k; - r.k = p.s * q.k + p.k * q.s + p.i * q.j - p.j * q.i; - r.s = p.s * q.s - p.i * q.i - p.j * q.j - p.k * q.k; -} - -//---------------------------------------------------------------------------------------- -void ConjugateOfQuaternion(Quaternion& r, const Quaternion& q) -{ - r.i = -q.i; - r.j = -q.j; - r.k = -q.k; - r.s = q.s; -} - -//---------------------------------------------------------------------------------------- -float NormOfQuaternion(const Quaternion& q) -{ - return (float)Sqrtf( q.i * q.i + q.j * q.j + q.k * q.k + q.s * q.s); -} - -//---------------------------------------------------------------------------------------- -float NormSquaredOfQuaternion(const Quaternion& q) -{ - return q.i * q.i + q.j * q.j + q.k * q.k + q.s * q.s; -} - -//---------------------------------------------------------------------------------------- -void NormalizeQuaternion(Quaternion& r, Quaternion& q) -{ - float norm_scale = 1.0f / NormOfQuaternion( q ); - ScaleQuaternion( r, norm_scale, q ); -} - -//---------------------------------------------------------------------------------------- -void InverseQuaterion(Quaternion& r, const Quaternion& q) -{ - ConjugateOfQuaternion( r, q ); - float inv_norm_squared = 1.0f / NormSquaredOfQuaternion( q ); - ScaleQuaternion( r, inv_norm_squared, q ); -} diff --git a/Littlest/Foundation/Math/Vector.h b/Littlest/Foundation/Math/Vector.h deleted file mode 100755 index 91cc817..0000000 --- a/Littlest/Foundation/Math/Vector.h +++ /dev/null @@ -1,1176 +0,0 @@ -#pragma once - -#include "Foundation/Common/GlobalInclude.h" -#include "Foundation/Math/MathTypes.h" -#include "Foundation/Math/MathOperations.h" - -//---------------------------------------------------------------------------------------- -// Vec2 -//---------------------------------------------------------------------------------------- -void SetVec2(Vec2& r, const Vec2& v); -void SetVec2(Vec2& r, const float x, const float y); -void SetVec2(Vec2& r, const float xy); -void AbsVec2(Vec2& r, const Vec2& v); -float MinComponentVec2(const Vec2& v); -float MaxComponentVec2(const Vec2& v); -uint32_t MinIndexVec2(const Vec2& v); -uint32_t MaxIndexVec2(const Vec2& v); -float DotVec2(const Vec2& a, const Vec2& b); -float DotVec2(const Vec2& a, const float x, const float y); - -void PerpendicularVec2(Vec2& r, const Vec2& v); -Vec2 PerpendicularVec2(const Vec2& v); - -void AddVec2ByScalar(Vec2& r, const float s, const Vec2& v); -Vec2 AddVec2ByScalar(const float s, const Vec2& v); - -void AddVec2(Vec2& r, const Vec2& a, const Vec2& b); -Vec2 AddVec2(const Vec2& a, const Vec2& b); - -void AddVec2(Vec2& r, const Vec2& a, const float x, const float y); -Vec2 AddVec2(const Vec2& a, const float x, const float y); - -void SubVec2(Vec2& r, const Vec2& a, const Vec2& b); -Vec2 SubVec2(const Vec2& a, const Vec2& b); - -void SubVec2(Vec2& r, const Vec2& a, const float x, const float y); -Vec2 SubVec2(const Vec2& a, const float x, const float y); - -void ScaleVec2(Vec2& r, const float s, const Vec2& v); -Vec2 ScaleVec2(const float s, const Vec2& v); - -void MulVec2(Vec2& r, const Vec2& a, const Vec2& b); -Vec2 MulVec2(const Vec2& a, const Vec2& b); - -void MulVec2(Vec2& r, const Vec2& a, const float x, const float y); -Vec2 MulVec2(const Vec2& a, const float x, const float y); - -void DivVec2(Vec2& r, const Vec2& a, const Vec2& b); -Vec2 DivVec2(const Vec2& a, const Vec2& b); - -void DivVec2(Vec2& r, const Vec2& a, const float x, const float y); -Vec2 DivVec2(const Vec2& a, const float x, const float y); - -void ScaleAddVec2(Vec2& r, const float s, const Vec2& v_scale, const Vec2& v_add); -Vec2 ScaleAddVec2(const float s, const Vec2& v_scale, const Vec2& v_add); - -void NormalizeVec2(Vec2& r, const Vec2& a); -Vec2 NormalizeVec2(const Vec2& a); - -float LengthOfVec2(const Vec2& a); -float LengthSquaredOfVec2(const Vec2& a); - -//---------------------------------------------------------------------------------------- -slInline void SetVec2(Vec2& r, const Vec2& v) -{ - r.x = v.x; - r.y = v.y; -} - -//---------------------------------------------------------------------------------------- -slInline void SetVec2(Vec2& r, const float x, const float y) -{ - r.x = x; - r.y = y; -} - -//---------------------------------------------------------------------------------------- -slInline void SetVec2(Vec2& r, const float xy) -{ - r.x = xy; - r.y = xy; -} - -//---------------------------------------------------------------------------------------- -void AbsVec2(Vec2& r, const Vec2& v) -{ - r.x = Absf(v.x); - r.y = Absf(v.y); -} - -//---------------------------------------------------------------------------------------- -float MinComponentVec2(const Vec2& v) -{ - return v.x <= v.y ? v.x : v.y; -} - -//---------------------------------------------------------------------------------------- -float MaxComponentVec2(const Vec2& v) -{ - return v.x >= v.y ? v.x : v.y; -} - -//---------------------------------------------------------------------------------------- -uint32_t MinIndexVec2(const Vec2& v) -{ - return v.x <= v.y ? 0 : 1; -} - -//---------------------------------------------------------------------------------------- -uint32_t MaxIndexVec2(const Vec2& v) -{ - return v.x >= v.y ? 0 : 1; -} - -//---------------------------------------------------------------------------------------- -slInline float DotVec2(const Vec2& a, const Vec2& b) -{ - return a.x * b.x + a.y * b.y; -} - -//---------------------------------------------------------------------------------------- -slInline float DotVec2(const Vec2& a, const float x, const float y) -{ - return a.x * x + a.y * y; -} - -//---------------------------------------------------------------------------------------- -slInline void PerpendicularVec2(Vec2& r, const Vec2& v) -{ - r.x = -v.y; - r.y = v.x; -} - -//---------------------------------------------------------------------------------------- -slInline Vec2 PerpendicularVec2(const Vec2& v) -{ - Vec2 r; - r.x = -v.y; - r.y = v.x; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void AddVec2ByScalar(Vec2& r, const float s, Vec2& v) -{ - r.x = s + v.x; - r.y = s + v.y; -} - -//---------------------------------------------------------------------------------------- -slInline Vec2 AddVec2ByScalar(const float s, const Vec2& v) -{ - Vec2 r; - r.x = s + v.x; - r.y = s + v.y; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void AddVec2(Vec2& r, const Vec2& a, const Vec2& b) -{ - r.x = a.x + b.x; - r.y = a.y + b.y; -} - -//---------------------------------------------------------------------------------------- -slInline Vec2 AddVec2(const Vec2& a, const Vec2& b) -{ - Vec2 r; - r.x = a.x + b.x; - r.y = a.y + b.y; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void AddVec2(Vec2& r, const Vec2& a, const float x, const float y) -{ - r.x = a.x + x; - r.y = a.y + y; -} - -//---------------------------------------------------------------------------------------- -slInline Vec2 AddVec2(const Vec2& a, const float x, const float y) -{ - Vec2 r; - r.x = a.x + x; - r.y = a.y + y; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void SubVec2(Vec2& r, const Vec2& a, const Vec2& b) -{ - r.x = a.x - b.x; - r.y = a.y - b.y; -} - -//---------------------------------------------------------------------------------------- -slInline Vec2 SubVec2(const Vec2& a, const Vec2& b) -{ - Vec2 r; - r.x = a.x - b.x; - r.y = a.y - b.y; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void SubVec2(Vec2& r, const Vec2& a, const float x, const float y) -{ - r.x = a.x - x; - r.y = a.y - y; -} - -//---------------------------------------------------------------------------------------- -slInline Vec2 SubVec2(const Vec2& a, const float x, const float y) -{ - Vec2 r; - r.x = a.x - x; - r.y = a.y - y; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void ScaleVec2(Vec2& r, const float s, const Vec2& v) -{ - r.x = s * v.x; - r.y = s * v.y; -} - -//---------------------------------------------------------------------------------------- -slInline Vec2 ScaleVec2(const float s, const Vec2& v) -{ - Vec2 r; - r.x = s * v.x; - r.y = s * v.y; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void MulVec2(Vec2& r, const Vec2& a, const Vec2& b) -{ - r.x = a.x * b.x; - r.y = a.y * b.y; -} - -//---------------------------------------------------------------------------------------- -slInline Vec2 MulVec2(const Vec2& a, const Vec2& b) -{ - Vec2 r; - r.x = a.x * b.x; - r.y = a.y * b.y; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void MulVec2(Vec2& r, const Vec2& a, const float x, const float y) -{ - r.x = a.x * x; - r.y = a.y * y; -} - -//---------------------------------------------------------------------------------------- -slInline Vec2 MulVec2(const Vec2& a, const float x, const float y) -{ - Vec2 r; - r.x = a.x * x; - r.y = a.y * y; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void DivVec2(Vec2& r, const Vec2& a, const Vec2& b) -{ - r.x = a.x / b.x; - r.y = a.y / b.y; -} - -//---------------------------------------------------------------------------------------- -slInline Vec2 DivVec2(const Vec2& a, const Vec2& b) -{ - Vec2 r; - r.x = a.x / b.x; - r.y = a.y / b.y; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void DivVec2(Vec2& r, const Vec2& a, const float x, const float y) -{ - r.x = a.x / x; - r.y = a.y / y; -} - -//---------------------------------------------------------------------------------------- -slInline Vec2 DivVec2(const Vec2& a, const float x, const float y) -{ - Vec2 r; - r.x = a.x / x; - r.y = a.y / y; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void ScaleAddVec2(Vec2& r, const float s, const Vec2& v_scale, const Vec2& v_add) -{ - r.x = v_scale.x * s + v_add.x; - r.y = v_scale.y * s + v_add.y; -} - -//---------------------------------------------------------------------------------------- -slInline Vec2 ScaleAddVec2(const float s, const Vec2& v_scale, const Vec2& v_add) -{ - Vec2 r; - r.x = v_scale.x * s + v_add.x; - r.y = v_scale.y * s + v_add.y; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void NormalizeVec2(Vec2& r, const Vec2& a) -{ - float scale = 1.0f / LengthOfVec2(a); - ScaleVec2( r, scale, a ); -} - -//---------------------------------------------------------------------------------------- -slInline Vec2 NormalizeVec2(const Vec2& a) -{ - float scale = 1.0f / LengthOfVec2(a); - return ScaleVec2( scale, a ); -} - -//---------------------------------------------------------------------------------------- -slInline float LengthOfVec2(const Vec2& a) -{ - return (float)Sqrtf( DotVec2(a, a) ); -} - -//---------------------------------------------------------------------------------------- -slInline float LengthSquaredOfVec2(const Vec2& a) -{ - return DotVec2(a, a); -} - - - -//---------------------------------------------------------------------------------------- -// Vec3 -//---------------------------------------------------------------------------------------- -void SetVec3(Vec3& r, const Vec3& v); -void SetVec3(Vec3& r, const Vec2& v, const float z); -void SetVec3(Vec3& r, const float xyz); -void SetVec3(Vec3& r, const float x, const float y, const float z); - -void AbsVec3(Vec3& r, const Vec3& v); -Vec3 AbsVec3(const Vec3& v); - -float MinComponentVec3(const Vec3& v); -float MaxComponentVec3(const Vec3& v); -uint32_t MinIndexVec3(const Vec3& v); -uint32_t MaxIndexVec3(const Vec3& v); -float DotVec3(const Vec3& a, const Vec3& b); -float DotVec3(const Vec3& a, const float x, const float y, const float z); - -void CrossVec3(Vec3& r, const Vec3& a, const Vec3& b); -Vec3 CrossVec3(const Vec3& a, const Vec3& b); - -void AddVec3ByScalar(Vec3& r, const float s, Vec3& v); -Vec3 AddVec3ByScalar(const float s, Vec3& v); - -void AddVec3(Vec3& r, const Vec3& a, const Vec3& b); -Vec3 AddVec3(const Vec3& a, const Vec3& b); - -void AddVec3(Vec3& r, const Vec3& a, const float x, const float y, const float z); -Vec3 AddVec3(const Vec3& a, const float x, const float y, const float z); - -void SubVec3(Vec3& r, const Vec3& a, const Vec3& b); -Vec3 SubVec3(const Vec3& a, const Vec3& b); - -void SubVec3(Vec3& r, const Vec3& a, const float x, const float y, const float z); -Vec3 SubVec3(const Vec3& a, const float x, const float y, const float z); - -void ScaleVec3(Vec3& r, const float s, const Vec3& v); -Vec3 ScaleVec3(const float s, const Vec3& v); - -void MulVec3(Vec3& r, const Vec3& a, const Vec3& b); -Vec3 MulVec3(const Vec3& a, const Vec3& b); - -void MulVec3(Vec3& r, const Vec3& a, const float x, const float y, const float z); -Vec3 MulVec3(const Vec3& a, const float x, const float y, const float z); - -void DivVec3(Vec3& r, const Vec3& a, const Vec3& b); -Vec3 DivVec3(const Vec3& a, const Vec3& b); - -void DivVec3(Vec3& r, const Vec3& a, const float x, const float y, const float z); -Vec3 DivVec3(const Vec3& a, const float x, const float y, const float z); - -void ScaleAddVec3(Vec3& r, const float s, const Vec3& v_scale, const Vec3& v_add); -Vec3 ScaleAddVec3(const float s, const Vec3& v_scale, const Vec3& v_add); - -void NormalizeVec3(Vec3& r, const Vec3& a); -Vec3 NormalizeVec3(const Vec3& a); - -float LengthOfVec3(const Vec3& a); -float LengthSquaredVec3(const Vec3& a); - -//---------------------------------------------------------------------------------------- -slInline void SetVec3(Vec3& r, const Vec3& v) -{ - r.x = v.x; - r.y = v.y; - r.z = v.z; -} - -//---------------------------------------------------------------------------------------- -slInline void SetVec3(Vec3& r, const Vec2& v, const float z) -{ - r.x = v.x; - r.y = v.y; - r.z = z; -} - -//---------------------------------------------------------------------------------------- -slInline void SetVec3(Vec3& r, const float xyz) -{ - r.x = xyz; - r.y = xyz; - r.z = xyz; -} - -//---------------------------------------------------------------------------------------- -slInline void SetVec3(Vec3& r, const float x, const float y, const float z) -{ - r.x = x; - r.y = y; - r.z = z; -} - -//---------------------------------------------------------------------------------------- -slInline void AbsVec3(Vec3& r, const Vec3& v) -{ - r.x = Absf(v.x); - r.y = Absf(v.y); - r.z = Absf(v.z); -} - -//---------------------------------------------------------------------------------------- -slInline Vec3 AbsVec3(const Vec3& v) -{ - Vec3 r; - r.x = Absf(v.x); - r.y = Absf(v.y); - r.z = Absf(v.z); - return r; -} - -//---------------------------------------------------------------------------------------- -slInline float MinComponentVec3(const Vec3& v) -{ - float xy = v.x <= v.y ? v.x : v.y; - return xy <= v.z ? xy : v.z; -} - -//---------------------------------------------------------------------------------------- -slInline float MaxComponentVec3(const Vec3& v) -{ - float xy = v.x >= v.y ? v.x : v.y; - return xy >= v.z ? xy : v.z; -} - -//---------------------------------------------------------------------------------------- -slInline uint32_t MinIndexVec3(const Vec3& v) -{ - const float* v_array = &v.x; - uint32_t xy = v.x <= v.y ? 0 : 1; - return v_array[xy] <= v.z ? xy : 2; -} - -//---------------------------------------------------------------------------------------- -slInline uint32_t MaxIndexVec3(const Vec3& v) -{ - const float* v_array = &v.x; - uint32_t xy = v.x >= v.y ? 0 : 1; - return v_array[xy] >= v.z ? xy : 2; -} - -//---------------------------------------------------------------------------------------- -slInline float DotVec3(const Vec3& a, const Vec3& b) -{ - return a.x * b.x + a.y * b.y + a.z * b.z; -} - -//---------------------------------------------------------------------------------------- -slInline float DotVec3(const Vec3& a, const float x, const float y, const float z) -{ - return a.x * x + a.y * y + a.z * z; -} - -//---------------------------------------------------------------------------------------- -slInline void CrossVec3(Vec3& r, const Vec3& a, const Vec3& b) -{ - float x = a.y * b.z - b.y * a.z; - float y = a.z * b.x - b.z * a.x; - float z = a.x * b.y - b.x * a.y; - r.x = x; - r.y = y; - r.z = z; -} - -//---------------------------------------------------------------------------------------- -slInline Vec3 CrossVec3(const Vec3& a, const Vec3& b) -{ - Vec3 r; - r.x = a.y * b.z - b.y * a.z; - r.y = a.z * b.x - b.z * a.x; - r.z = a.x * b.y - b.x * a.y; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void AddVec3ByScalar(Vec3& r, const float s, Vec3& v) -{ - r.x = s + v.x; - r.y = s + v.y; - r.z = s + v.z; -} - -//---------------------------------------------------------------------------------------- -slInline Vec3 AddVec3ByScalar(const float s, Vec3& v) -{ - Vec3 r; - r.x = s + v.x; - r.y = s + v.y; - r.z = s + v.z; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void AddVec3(Vec3& r, const Vec3& a, const Vec3& b) -{ - r.x = a.x + b.x; - r.y = a.y + b.y; - r.z = a.z + b.z; -} - -//---------------------------------------------------------------------------------------- -slInline Vec3 AddVec3(const Vec3& a, const Vec3& b) -{ - Vec3 r; - r.x = a.x + b.x; - r.y = a.y + b.y; - r.z = a.z + b.z; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void AddVec3(Vec3& r, const Vec3& a, const float x, const float y, const float z) -{ - r.x = a.x + x; - r.y = a.y + y; - r.z = a.z + z; -} - -//---------------------------------------------------------------------------------------- -slInline Vec3 AddVec3(const Vec3& a, const float x, const float y, const float z) -{ - Vec3 r; - r.x = a.x + x; - r.y = a.y + y; - r.z = a.z + z; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void SubVec3(Vec3& r, const Vec3& a, const Vec3& b) -{ - r.x = a.x - b.x; - r.y = a.y - b.y; - r.z = a.z - b.z; -} - -//---------------------------------------------------------------------------------------- -slInline Vec3 SubVec3(const Vec3& a, const Vec3& b) -{ - Vec3 r; - r.x = a.x - b.x; - r.y = a.y - b.y; - r.z = a.z - b.z; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline Vec3 SubVec3(const Vec3& a, const float x, const float y, const float z) -{ - Vec3 r; - r.x = a.x - x; - r.y = a.y - y; - r.z = a.z - z; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void ScaleVec3(Vec3& r, const float s, const Vec3& v) -{ - r.x = s * v.x; - r.y = s * v.y; - r.z = s * v.z; -} - -//---------------------------------------------------------------------------------------- -slInline Vec3 ScaleVec3(const float s, const Vec3& v) -{ - Vec3 r; - r.x = s * v.x; - r.y = s * v.y; - r.z = s * v.z; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void MulVec3(Vec3& r, const Vec3& a, const Vec3& b) -{ - r.x = a.x * b.x; - r.y = a.y * b.y; - r.z = a.z * b.z; -} - -//---------------------------------------------------------------------------------------- -slInline Vec3 MulVec3(const Vec3& a, const Vec3& b) -{ - Vec3 r; - r.x = a.x * b.x; - r.y = a.y * b.y; - r.z = a.z * b.z; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void MulVec3(Vec3& r, const Vec3& a, const float x, const float y, const float z) -{ - r.x = a.x * x; - r.y = a.y * y; - r.z = a.z * z; -} - -//---------------------------------------------------------------------------------------- -slInline Vec3 MulVec3(const Vec3& a, const float x, const float y, const float z) -{ - Vec3 r; - r.x = a.x * x; - r.y = a.y * y; - r.z = a.z * z; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void DivVec3(Vec3& r, const Vec3& a, const Vec3& b) -{ - r.x = a.x / b.x; - r.y = a.y / b.y; - r.z = a.z / b.z; -} - -//---------------------------------------------------------------------------------------- -slInline Vec3 DivVec3(const Vec3& a, const Vec3& b) -{ - Vec3 r; - r.x = a.x / b.x; - r.y = a.y / b.y; - r.z = a.z / b.z; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void DivVec3(Vec3& r, const Vec3& a, const float x, const float y, const float z) -{ - r.x = a.x / x; - r.y = a.y / y; - r.z = a.z / z; -} - -//---------------------------------------------------------------------------------------- -slInline Vec3 DivVec3(const Vec3& a, const float x, const float y, const float z) -{ - Vec3 r; - r.x = a.x / x; - r.y = a.y / y; - r.z = a.z / z; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void ScaleAddVec3(Vec3& r, const float s, const Vec3& v_scale, const Vec3& v_add) -{ - r.x = s * v_scale.x + v_add.x; - r.y = s * v_scale.y + v_add.y; - r.z = s * v_scale.z + v_add.z; -} - -//---------------------------------------------------------------------------------------- -slInline Vec3 ScaleAddVec3(const float s, const Vec3& v_scale, const Vec3& v_add) -{ - Vec3 r; - r.x = s * v_scale.x + v_add.x; - r.y = s * v_scale.y + v_add.y; - r.z = s * v_scale.z + v_add.z; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void NormalizeVec3(Vec3& r, const Vec3& a) -{ - float scale = 1.0f / LengthOfVec3( a ); - ScaleVec3( r, scale, a ); -} - -//---------------------------------------------------------------------------------------- -slInline Vec3 NormalizeVec3(const Vec3& a) -{ - float scale = 1.0f / LengthOfVec3( a ); - return ScaleVec3( scale, a ); -} - -//---------------------------------------------------------------------------------------- -slInline float LengthOfVec3(const Vec3& a) -{ - return (float)Sqrtf( DotVec3(a, a) ); -} - -//---------------------------------------------------------------------------------------- -slInline float LengthSquaredOfVec3(const Vec3& a) -{ - return DotVec3( a, a ); -} - - - -//---------------------------------------------------------------------------------------- -// Vec4 -//---------------------------------------------------------------------------------------- -void SetVec4(Vec4& r, const Vec4& v); -void SetVec4(Vec4& r, const Vec2& a, const Vec2& b); -void SetVec4(Vec4& r, const Vec3& v, const float w); -void SetVec4(Vec4& r, const float xyzw); -void SetVec4(Vec4& r, const float x, const float y, const float z, const float w); - -void AbsVec4(Vec4& r, const Vec4& v); -Vec4 AbsVec4(const Vec4& v); - -float MinComponentVec4(const Vec4& v); -float MaxComponentVec4(const Vec4& v); -uint32_t MinIndexVec4(const Vec4& v); -uint32_t MaxIndexVec4(const Vec4& v); -float DotVec4(const Vec4& a, const Vec4& b); -float DotVec4(const Vec4& a, const float x, const float y, const float z, const float w); - -void CrossVec4(Vec4& r, const Vec4& a, const Vec4& b, const Vec4& c); -Vec4 CrossVec4(const Vec4& a, const Vec4& b, const Vec4& c); - -void AddVec4ByScalar(Vec4& r, const float s, Vec4& v); -Vec4 AddVec4ByScalar(const float s, Vec4& v); - -void AddVec4(Vec4& r, const Vec4& a, const Vec4& b); -Vec4 AddVec4(const Vec4& a, const Vec4& b); - -void AddVec4(Vec4& r, const Vec4& a, const float x, const float y, const float z, const float w); -Vec4 AddVec4(const Vec4& a, const float x, const float y, const float z, const float w); - -void SubVec4(Vec4& r, const Vec4& a, const Vec4& b); -Vec4 SubVec4(const Vec4& a, const Vec4& b); - -void SubVec4(Vec4& r, const Vec4& a, const float x, const float y, const float z, const float w); -Vec4 SubVec4(const Vec4& a, const float x, const float y, const float z, const float w); - -void ScaleVec4(Vec4& r, const float s, const Vec4& v); -Vec4 ScaleVec4(const float s, const Vec4& v); - -void MulVec4(Vec4& r, const Vec4& a, const Vec4& b); -Vec4 MulVec4(const Vec4& a, const Vec4& b); - -void MulVec4(Vec4& r, const Vec4& a, const float x, const float y, const float z, const float w); -Vec4 MulVec4(const Vec4& a, const float x, const float y, const float z, const float w); - -void DivVec4(Vec4& r, const Vec4& a, const Vec4& b); -Vec4 DivVec4(const Vec4& a, const Vec4& b); - -void DivVec4(Vec4& r, const Vec4& a, const float x, const float y, const float z, const float w); -Vec4 DivVec4(const Vec4& a, const float x, const float y, const float z, const float w); - -void ScaleAddVec4(Vec4& r, const float s, const Vec4& v_scale, const Vec4& v_add); -Vec4 ScaleAddVec4(const float s, const Vec4& v_scale, const Vec4& v_add); - -void NormalizeVec4(Vec4& r, const Vec4& a); -Vec4 NormalizeVec4(const Vec4& a); - -float LengthOfVec4(const Vec4& a); -float LengthSquaredVec4(const Vec4& a); - -//---------------------------------------------------------------------------------------- -slInline void SetVec4(Vec4& r, const Vec4& v) -{ - r.x = v.x; - r.y = v.y; - r.z = v.z; - r.w = v.w; -} - -//---------------------------------------------------------------------------------------- -slInline void SetVec4(Vec4& r, const Vec2& a, const Vec2& b) -{ - r.x = a.x; - r.y = a.y; - r.z = b.x; - r.w = b.y; -} - -//---------------------------------------------------------------------------------------- -slInline void SetVec4(Vec4& r, const Vec3& v, const float w) -{ - r.x = v.x; - r.y = v.y; - r.z = v.z; - r.w = w; -} - -//---------------------------------------------------------------------------------------- -slInline void SetVec4(Vec4& r, const float xyzw) -{ - r.x = xyzw; - r.y = xyzw; - r.z = xyzw; - r.w = xyzw; -} - -//---------------------------------------------------------------------------------------- -slInline void SetVec4(Vec4& r, const float x, const float y, const float z, const float w) -{ - r.x = x; - r.y = y; - r.z = z; - r.w = w; -} - -//---------------------------------------------------------------------------------------- -slInline void AbsVec4(Vec4& r, const Vec4& v) -{ - r.x = Absf(v.x); - r.y = Absf(v.y); - r.z = Absf(v.z); - r.w = Absf(v.w); -} - -//---------------------------------------------------------------------------------------- -slInline Vec4 AbsVec4(const Vec4& v) -{ - Vec4 r; - r.x = Absf(v.x); - r.y = Absf(v.y); - r.z = Absf(v.z); - r.w = Absf(v.w); - return r; -} - -//---------------------------------------------------------------------------------------- -slInline float MinComponentVec4(const Vec4& v) -{ - float xy = v.x <= v.y ? v.x : v.y; - float zw = v.z <= v.w ? v.z : v.w; - return xy <= zw ? xy : zw; -} - -//---------------------------------------------------------------------------------------- -slInline float MaxComponentVec4(const Vec4& v) -{ - float xy = v.x >= v.y ? v.x : v.y; - float zw = v.z >= v.w ? v.z : v.w; - return xy >= zw ? xy : zw; -} - -//---------------------------------------------------------------------------------------- -slInline uint32_t MinIndexVec4(const Vec4& v) -{ - const float* v_array = &v.x; - uint32_t xy = v.x <= v.y ? 0 : 1; - uint32_t zw = v.x <= v.y ? 2 : 3; - return v_array[xy] <= v_array[zw] ? xy : zw; -} - -//---------------------------------------------------------------------------------------- -slInline uint32_t MaxIndexVec4(const Vec4& v) -{ - const float* v_array = &v.x; - uint32_t xy = v.x >= v.y ? 0 : 1; - uint32_t zw = v.x >= v.y ? 2 : 3; - return v_array[xy] >= v_array[zw] ? xy : zw; -} - -//---------------------------------------------------------------------------------------- -slInline float DotVec4(const Vec4& a, const Vec4& b) -{ - return a.x * b.x + a.y * b.y + a.z * b.z + a.w * b.w; -} - -//---------------------------------------------------------------------------------------- -slInline float DotVec4(const Vec4& a, const float x, const float y, const float z, const float w) -{ - return a.x * x + a.y * y + a.z * z + a.w * w; -} - -//---------------------------------------------------------------------------------------- -slInline void CrossVec4(Vec4& r, const Vec4& a, const Vec4& b, const Vec4& c) -{ - // is this right? - r.x = a.y * (b.z * c.w - b.w * c.z) - a.z * (b.y * c.w - c.y * b.w) + a.w * (b.y * c.z - b.z * c.y); - r.y = -a.x * (b.z * c.w - b.w * c.z) + a.z * (b.x * c.w - c.x * b.w) - a.w * (b.x * c.z - b.z * c.x); - r.z = a.x * (b.y * c.w - b.w * c.y) - a.y * (b.x * c.w - c.x * b.w) + a.w * (b.x * c.y - b.y * c.x); - r.w = -a.x * (b.y * c.z - b.z * c.y) + a.y * (b.x * c.z - b.z * c.x) - a.z * (b.x * c.y - b.y * c.x); -} - -//---------------------------------------------------------------------------------------- -slInline Vec4 CrossVec4(const Vec4& a, const Vec4& b, const Vec4& c) -{ - Vec4 r; - // is this right? - r.x = a.y * (b.z * c.w - b.w * c.z) - a.z * (b.y * c.w - c.y * b.w) + a.w * (b.y * c.z - b.z * c.y); - r.y = -a.x * (b.z * c.w - b.w * c.z) + a.z * (b.x * c.w - c.x * b.w) - a.w * (b.x * c.z - b.z * c.x); - r.z = a.x * (b.y * c.w - b.w * c.y) - a.y * (b.x * c.w - c.x * b.w) + a.w * (b.x * c.y - b.y * c.x); - r.w = -a.x * (b.y * c.z - b.z * c.y) + a.y * (b.x * c.z - b.z * c.x) - a.z * (b.x * c.y - b.y * c.x); - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void AddVec4ByScalar(Vec4& r, const float s, Vec4& v) -{ - r.x = s * v.x; - r.y = s * v.y; - r.z = s * v.z; - r.w = s * v.w; -} - -//---------------------------------------------------------------------------------------- -slInline Vec4 AddVec4ByScalar(const float s, Vec4& v) -{ - Vec4 r; - r.x = s * v.x; - r.y = s * v.y; - r.z = s * v.z; - r.w = s * v.w; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void AddVec4(Vec4& r, const Vec4& a, const Vec4& b) -{ - r.x = a.x + b.x; - r.y = a.y + b.y; - r.z = a.z + b.z; - r.w = a.w + b.w; -} - -//---------------------------------------------------------------------------------------- -slInline Vec4 AddVec4(const Vec4& a, const Vec4& b) -{ - Vec4 r; - r.x = a.x + b.x; - r.y = a.y + b.y; - r.z = a.z + b.z; - r.w = a.w + b.w; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void AddVec4(Vec4& r, const Vec4& a, const float x, const float y, const float z, const float w) -{ - r.x = a.x + x; - r.y = a.y + y; - r.z = a.z + z; - r.w = a.w + w; -} - -//---------------------------------------------------------------------------------------- -slInline Vec4 AddVec4(const Vec4& a, const float x, const float y, const float z, const float w) -{ - Vec4 r; - r.x = a.x + x; - r.y = a.y + y; - r.z = a.z + z; - r.w = a.w + w; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void SubVec4(Vec4& r, const Vec4& a, const Vec4& b) -{ - r.x = a.x - b.x; - r.y = a.y - b.y; - r.z = a.z - b.z; - r.w = a.w - b.w; -} - -//---------------------------------------------------------------------------------------- -slInline Vec4 SubVec4(const Vec4& a, const Vec4& b) -{ - Vec4 r; - r.x = a.x - b.x; - r.y = a.y - b.y; - r.z = a.z - b.z; - r.w = a.w - b.w; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void SubVec4(Vec4& r, const Vec4& a, const float x, const float y, const float z, const float w) -{ - r.x = a.x - x; - r.y = a.y - y; - r.z = a.z - z; - r.w = a.w - w; -} - -//---------------------------------------------------------------------------------------- -slInline Vec4 SubVec4(const Vec4& a, const float x, const float y, const float z, const float w) -{ - Vec4 r; - r.x = a.x - x; - r.y = a.y - y; - r.z = a.z - z; - r.w = a.w - w; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void ScaleVec4(Vec4& r, const float s, const Vec4& v) -{ - r.x = s * v.x; - r.y = s * v.y; - r.z = s * v.z; - r.w = s * v.w; -} - -//---------------------------------------------------------------------------------------- -slInline Vec4 ScaleVec4(const float s, const Vec4& v) -{ - Vec4 r; - r.x = s * v.x; - r.y = s * v.y; - r.z = s * v.z; - r.w = s * v.w; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void MulVec4(Vec4& r, const Vec4& a, const Vec4& b) -{ - r.x = a.x * b.x; - r.y = a.y * b.y; - r.z = a.z * b.z; - r.w = a.w * b.w; -} - -//---------------------------------------------------------------------------------------- -slInline Vec4 MulVec4(const Vec4& a, const Vec4& b) -{ - Vec4 r; - r.x = a.x * b.x; - r.y = a.y * b.y; - r.z = a.z * b.z; - r.w = a.w * b.w; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void MulVec4(Vec4& r, const Vec4& a, const float x, const float y, const float z, const float w) -{ - r.x = a.x * x; - r.y = a.y * y; - r.z = a.z * z; - r.w = a.w * w; -} - -//---------------------------------------------------------------------------------------- -slInline Vec4 MulVec4(const Vec4& a, const float x, const float y, const float z, const float w) -{ - Vec4 r; - r.x = a.x * x; - r.y = a.y * y; - r.z = a.z * z; - r.w = a.w * w; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void DivVec4(Vec4& r, const Vec4& a, const Vec4& b) -{ - r.x = a.x / b.x; - r.y = a.y / b.y; - r.z = a.z / b.z; - r.w = a.w / b.w; -} - -//---------------------------------------------------------------------------------------- -slInline Vec4 DivVec4(const Vec4& a, const Vec4& b) -{ - Vec4 r; - r.x = a.x / b.x; - r.y = a.y / b.y; - r.z = a.z / b.z; - r.w = a.w / b.w; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void DivVec4(Vec4& r, const Vec4& a, const float x, const float y, const float z, const float w) -{ - r.x = a.x / x; - r.y = a.y / y; - r.z = a.z / z; - r.w = a.w / w; -} - -//---------------------------------------------------------------------------------------- -slInline Vec4 DivVec4(const Vec4& a, const float x, const float y, const float z, const float w) -{ - Vec4 r; - r.x = a.x / x; - r.y = a.y / y; - r.z = a.z / z; - r.w = a.w / w; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void ScaleAddVec4(Vec4& r, const float s, const Vec4& v_scale, const Vec4& v_add) -{ - r.x = s * v_scale.x + v_add.x; - r.y = s * v_scale.y + v_add.y; - r.z = s * v_scale.z + v_add.z; - r.w = s * v_scale.w + v_add.w; -} - -//---------------------------------------------------------------------------------------- -slInline Vec4 ScaleAddVec4(const float s, const Vec4& v_scale, const Vec4& v_add) -{ - Vec4 r; - r.x = s * v_scale.x + v_add.x; - r.y = s * v_scale.y + v_add.y; - r.z = s * v_scale.z + v_add.z; - r.w = s * v_scale.w + v_add.w; - return r; -} - -//---------------------------------------------------------------------------------------- -slInline void NormalizeVec4(Vec4& r, const Vec4& a) -{ - float scale = 1.0f / LengthOfVec4( a ); - ScaleVec4( r, scale, a ); -} - -//---------------------------------------------------------------------------------------- -slInline Vec4 NormalizeVec4(const Vec4& a) -{ - float scale = 1.0f / LengthOfVec4( a ); - return ScaleVec4( scale, a ); -} - -//---------------------------------------------------------------------------------------- -slInline float LengthOfVec4(const Vec4& a) -{ - return (float)Sqrtf( DotVec4(a, a) ); -} - -//---------------------------------------------------------------------------------------- -slInline float LengthSquaredOfVec4(const Vec4& a) -{ - return DotVec4( a, a ); -} diff --git a/Littlest/Foundation/Memory/MemoryBitset.cpp b/Littlest/Foundation/Memory/MemoryBitset.cpp deleted file mode 100755 index c832cc8..0000000 --- a/Littlest/Foundation/Memory/MemoryBitset.cpp +++ /dev/null @@ -1,316 +0,0 @@ -#include "MemoryBitset.h" - -//---------------------------------------------------------------------------------------- -int32_t MemoryBitset::FindLowestUnused(int32_t start_search_index) -{ - int32_t top_index = start_search_index / 4096; - uint64_t* top_pointer = m_TopBits + top_index; - int32_t top_offset = (start_search_index - top_index * 4096) / 64; - uint64_t first_top_mask = ~(0xffffffffffffffffULL << top_offset); - - // handling the starting case - if ((*top_pointer | first_top_mask) != 0xffffffffffffffffULL) - { - uint64_t valid_top_bits = (*top_pointer | first_top_mask); - uint64_t top_unused_bits = ~valid_top_bits; - uint64_t right_most_top_bit = RightMostEnabledBit(top_unused_bits); - int32_t bottom_index = top_index * 64 + 64 - LZCount(right_most_top_bit); - uint64_t bottom_bits = m_BottomBits[bottom_index]; - - if (start_search_index > bottom_index * 64) - { - // construct the mask for the valid bits - int32_t bottom_offset = start_search_index - bottom_index * 64; - uint64_t first_bottom_mask = ~(0xffffffffffffffffULL << bottom_offset); - bottom_bits |= first_bottom_mask; - } - - uint64_t bottom_unused_bits = ~bottom_bits; - uint64_t right_most_bottom_unused_bit = RightMostEnabledBit(bottom_unused_bits); - int32_t final_index = bottom_index * 64 + 64 - LZCount(right_most_bottom_unused_bit); - return final_index < m_MaxCount ? final_index : INVALID_INDEX; - } - - // guess the first dereference didn't get us anything - top_pointer++; - top_index++; - - // skip over all top bits that're fully allocated - while (*top_pointer == 0xffffffffffffffffULL && top_pointer <= m_MaxTopPointer) - { - top_pointer++; - top_index++; - } - - if (top_pointer > m_MaxTopPointer) - { - return INVALID_INDEX; - } - - uint64_t right_most_top_unused_bit = RightMostEnabledBit(~*top_pointer); - int32_t bottom_index = top_index * 64 + 64 - LZCount(right_most_top_unused_bit); - uint64_t* bottom_pointer = m_BottomBits + bottom_index; - - // skip over all bottom bits that're fully allocated - while (*bottom_pointer == 0xffffffffffffffffULL && bottom_pointer <= m_MaxBottomPointer) - { - bottom_pointer++; - bottom_index++; - } - - // make sure we didn't overflow - if (bottom_pointer > m_MaxBottomPointer) - { - return INVALID_INDEX; - } - - uint64_t right_most_bottom_unused_bit = RightMostEnabledBit(~*bottom_pointer); - int32_t final_index = bottom_index * 64 + 64 - LZCount(right_most_bottom_unused_bit); - - // make sure we didn't overflow - if (final_index >= m_MaxCount) - { - return INVALID_INDEX; - } - - return final_index; -} - -//---------------------------------------------------------------------------------------- -int32_t MemoryBitset::FindLowestUnused() -{ - int32_t top_index = 0; - uint64_t* top_pointer = m_TopBits; - - // skip over all top bits that're fully allocated - while (*top_pointer == 0xffffffffffffffffULL && top_pointer <= m_MaxTopPointer) - { - top_pointer++; - top_index++; - } - - uint64_t right_most_top_unused_bit = RightMostEnabledBit(~*top_pointer); - int32_t bottom_index = top_index * 64 + 64 - LZCount(right_most_top_unused_bit); - uint64_t* bottom_pointer = m_BottomBits + bottom_index; - - // skip over all bottom bits that're fully allocated - while (*bottom_pointer == 0xffffffffffffffffULL && bottom_pointer <= m_MaxBottomPointer) - { - bottom_pointer++; - bottom_index++; - } - - uint64_t right_most_bottom_unused_bit = RightMostEnabledBit(~*bottom_pointer); - int32_t final_index = bottom_index * 64 + 64 - LZCount(right_most_bottom_unused_bit); - - return final_index; -} - -//---------------------------------------------------------------------------------------- -int32_t MemoryBitset::FindHighestInUse(int32_t start_search_index) -{ - if (start_search_index < 0 || start_search_index >= m_MaxCount) - { - return INVALID_INDEX; - } - - int32_t bottom_index = start_search_index / 64; - uint64_t* bottom_pointer = m_BottomBits + bottom_index; - int32_t bottom_offset = start_search_index - bottom_index * 64; - uint64_t bottom_used_bits = *bottom_pointer & (0x1ULL << bottom_offset); - - while (bottom_used_bits == 0ULL && bottom_pointer >= m_BottomBits) - { - bottom_index--; - bottom_pointer--; - bottom_used_bits = *bottom_pointer; - } - - if (bottom_pointer < m_BottomBits) - { - return INVALID_INDEX; - } - - return bottom_index * 64 + 63 - LZCount(RightMostEnabledBit(*bottom_pointer)); -} - -//---------------------------------------------------------------------------------------- -int32_t MemoryBitset::FindHighestInUse() -{ - int32_t bottom_index = m_MaxCount / 64; - uint64_t* bottom_pointer = m_BottomBits + bottom_index; - int32_t bottom_offset = m_MaxCount - bottom_index * 64; - uint64_t bottom_used_bits = *bottom_pointer & (0x1ULL << bottom_offset); - - while (bottom_used_bits == 0ULL && bottom_pointer >= m_BottomBits) - { - bottom_index--; - bottom_pointer--; - bottom_used_bits = *bottom_pointer; - } - - if (bottom_pointer < m_BottomBits) - { - return INVALID_INDEX; - } - - return bottom_index * 64 + 63 - LZCount(RightMostEnabledBit(*bottom_pointer)); -} - -//---------------------------------------------------------------------------------------- -void MemoryBitset::GetSizesNeeded(uint32_t& top_size, uint32_t& bottom_size, int32_t entry_count) -{ - Assert(entry_count > 0); - - uint32_t aligned_4096_count = ALIGN_UP(entry_count, 4096); - top_size = aligned_4096_count / 512; - - uint32_t aligned_64_count = ALIGN_UP(entry_count, 64); - bottom_size = aligned_64_count / 8; -} - -//---------------------------------------------------------------------------------------- -bool MemoryBitset::Init(uint64_t* top_bits, uint64_t* bottom_bits, int32_t entry_count) -{ - Assert(entry_count > 0); - - m_TopBits = top_bits; - m_BottomBits = bottom_bits; - m_MaxCount = entry_count; - m_MaxTopPointer = m_TopBits + ALIGN_UP(m_MaxCount, 4096) / 4096; - m_MaxBottomPointer = m_BottomBits + ALIGN_UP(m_MaxCount, 64) / 64; - m_IndicesInUse = 0; - m_LowestUnused = 0; - m_HighestInUse = INVALID_INDEX; - - memset(m_BottomBits, 0, ALIGN_UP(m_MaxCount, 64) / 8); - memset(m_TopBits, 0, ALIGN_UP(m_MaxCount, 4096) / 512); - - return true; -} - -//---------------------------------------------------------------------------------------- -void MemoryBitset::Reset() -{ - m_IndicesInUse = 0; - m_LowestUnused = 0; - m_HighestInUse = -1; - - memset(m_BottomBits, 0, ALIGN_UP(m_MaxCount, 64) / 8); - memset(m_TopBits, 0, ALIGN_UP(m_MaxCount, 4096) / 512); -} - -//---------------------------------------------------------------------------------------- -void MemoryBitset::Destroy() -{ - m_TopBits = NULL; - m_BottomBits = NULL; - m_MaxTopPointer = NULL; - m_MaxBottomPointer = NULL; - m_MaxCount = 0; - m_IndicesInUse = 0; - m_LowestUnused = 0; - m_HighestInUse = -1; -} - -//---------------------------------------------------------------------------------------- -int32_t MemoryBitset::AllocateIndex() -{ - if (m_IndicesInUse == m_MaxCount) - { - return -1; - } - - int32_t return_index = m_LowestUnused; - - int32_t bottom_index = m_LowestUnused / 64; - int32_t bottom_offset = m_LowestUnused - bottom_index; - m_BottomBits[bottom_index] |= (0x1ULL << bottom_offset); - - if (m_BottomBits[bottom_index] = 0xffffffffffffffffULL) - { - int32_t top_index = m_LowestUnused / 4096; - int32_t top_offset = m_LowestUnused - top_index; - m_TopBits[top_index] |= (0x1ULL << top_offset); - } - - if ((uint32_t)(m_HighestInUse + 1) == m_IndicesInUse) - { - m_HighestInUse++; - m_LowestUnused++; - m_IndicesInUse++; - } - else - { - m_IndicesInUse++; - m_LowestUnused = m_IndicesInUse == m_MaxCount ? m_MaxCount : FindLowestUnused(m_LowestUnused); - } - - return return_index; -} - -//---------------------------------------------------------------------------------------- -bool MemoryBitset::AllocateSpecificIndex(int32_t index) -{ - uint32_t bottom_index = index / 64; - uint32_t bottom_offset = index - bottom_index; - uint64_t bottom_mask = (0x1ULL << bottom_offset); - - if (m_IndicesInUse == m_MaxCount || index >= m_MaxCount || (m_BottomBits[bottom_index] & bottom_mask)) - { - return false; - } - - m_BottomBits[bottom_index] |= bottom_mask; - - if (m_BottomBits[bottom_index] == 0xffffffffffffffffULL) - { - uint32_t top_index = index / 4096; - uint32_t top_offset = index - top_index; - uint64_t top_mask = (0x1ULL << top_offset); - m_TopBits[top_index] |= top_mask; - } - - m_IndicesInUse++; - - if (index > m_HighestInUse) - { - m_HighestInUse = index; - } - - if (index == m_LowestUnused) - { - m_LowestUnused = (m_IndicesInUse == m_MaxCount) ? m_MaxCount : FindLowestUnused(m_LowestUnused + 1); - } - - return true; -} - -//---------------------------------------------------------------------------------------- -void MemoryBitset::FreeIndex(int32_t index) -{ - uint32_t bottom_index = index / 64; - uint32_t bottom_offset = index - bottom_index; - uint64_t bottom_mask = (0x1ULL << bottom_offset); - - if (m_IndicesInUse == 0 || index >= m_MaxCount || !(m_BottomBits[bottom_index] & bottom_mask)) - { - return; - } - - if (m_BottomBits[bottom_index] == 0xffffffffffffffffULL) - { - uint32_t top_index = index / 4096; - uint32_t top_offset = index - top_index; - uint64_t top_mask = (0x1ULL << top_offset); - m_TopBits[top_index] &= ~top_mask; - } - - m_BottomBits[bottom_index] &= ~bottom_mask; - m_IndicesInUse--; - m_LowestUnused = index < m_LowestUnused ? index : m_LowestUnused; - if (m_HighestInUse == index) - { - m_HighestInUse = FindHighestInUse(index - 1); - } -} diff --git a/Littlest/Foundation/Memory/MemoryBitset.h b/Littlest/Foundation/Memory/MemoryBitset.h deleted file mode 100755 index 1e929f7..0000000 --- a/Littlest/Foundation/Memory/MemoryBitset.h +++ /dev/null @@ -1,49 +0,0 @@ -#pragma once - -#include "Foundation/Common/GlobalInclude.h" - -//---------------------------------------------------------------------------------------- -class MemoryBitset -{ -private: - uint64_t* m_TopBits; - uint64_t* m_BottomBits; - - uint64_t* m_MaxTopPointer; - uint64_t* m_MaxBottomPointer; - - int32_t m_MaxCount; - int32_t m_IndicesInUse; - int32_t m_LowestUnused; - int32_t m_HighestInUse; - - int32_t FindLowestUnused(int32_t start_search_index); // finds upwards to m_MaxCount - int32_t FindLowestUnused(); // finds upwards to m_MaxCount - int32_t FindHighestInUse(int32_t start_search_index); // finds downwards to 0 - int32_t FindHighestInUse(); // finds downwards to 0 - -public: - static const int32_t INVALID_INDEX = -1; - - static void GetSizesNeeded(uint32_t& top_size, uint32_t& bottom_size, int32_t entry_count); - - bool Init(uint64_t* top_bits, uint64_t* bottom_bits, int32_t entry_count); - void Reset(); - void Destroy(); - - int32_t AllocateIndex(); - bool AllocateSpecificIndex(int32_t index); - void FreeIndex(int32_t index); - - bool IsIndexAllocated(int32_t index); - int32_t GetAllocatedCount() {return m_IndicesInUse;} - int32_t GetHighestIndexInUse() {return m_HighestInUse;} -}; - -//---------------------------------------------------------------------------------------- -inline bool MemoryBitset::IsIndexAllocated(int32_t index) -{ - uint32_t bottom_index = index / 64; - uint32_t bottom_offset = index - bottom_index; - return (m_BottomBits[bottom_index] & (0x1ULL << bottom_offset)) > 0; -} diff --git a/Littlest/Foundation/Memory/MemoryHeap.cpp b/Littlest/Foundation/Memory/MemoryHeap.cpp deleted file mode 100755 index 82c87fd..0000000 --- a/Littlest/Foundation/Memory/MemoryHeap.cpp +++ /dev/null @@ -1,33 +0,0 @@ -#include "MemoryHeap.h" - -//---------------------------------------------------------------------------------------- -bool MemoryHeap::Init(void* base, size_t size) -{ - Assert(0); - if (size <= sizeof(FreeRecordInPage)) - { - return false; - } - - uint64_t base_address = ALIGN_UP( (uint64_t)base, sizeof(FreeRecordInPage) ); - m_Base = (uint8_t*)base_address; - m_Size = size; - - return true; -} - -//---------------------------------------------------------------------------------------- -void MemoryHeap::Destroy() -{ -} - -//---------------------------------------------------------------------------------------- -void* MemoryHeap::Allocate(uint32_t size, uint32_t alignment) -{ - return NULL; -} - -//---------------------------------------------------------------------------------------- -void MemoryHeap::Free(void* address) -{ -} diff --git a/Littlest/Foundation/Memory/MemoryHeap.h b/Littlest/Foundation/Memory/MemoryHeap.h deleted file mode 100755 index 4eab6e3..0000000 --- a/Littlest/Foundation/Memory/MemoryHeap.h +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once - -#include "Foundation/Common/GlobalInclude.h" - -class MemoryHeap -{ -private: - class MemoryBlock - { - static const uint32_t s_Sentinel = 0xdeadbeef; - - uint32_t m_BlockSize; - }; - -#if defined(__WINDOWS__) - static const uint32_t s_PageSize = 4096; -#elif defined(__ARM__) - static const uint32_t s_PageSize = 4096; -#elif defined(__X86__) && defined(__iOS__) - static const uint32_t s_PageSize = 4096; -#else -#error NEED TO SPECIFY THIS! -#endif - - struct FreeRecordInPage - { - uint32_t m_FreeBlockSize; - uint32_t m_NextFreeOffset; - }; - - size_t m_Size; - uint8_t* m_Base; - - uint32_t m_PageCount; - - bool Init(void* base, size_t size); - void Destroy(); - - void* Allocate(uint32_t size, uint32_t alignment); - void Free(void* address); -}; diff --git a/Littlest/Foundation/Memory/MemoryLinear.h b/Littlest/Foundation/Memory/MemoryLinear.h deleted file mode 100755 index 5b6cc09..0000000 --- a/Littlest/Foundation/Memory/MemoryLinear.h +++ /dev/null @@ -1,110 +0,0 @@ -#pragma once - -#include "Foundation/Common/GlobalInclude.h" -#include "MemoryHeap.h" - -//---------------------------------------------------------------------------------------- -class MemoryLinear -{ -private: - MemoryHeap* m_Heap; - uint8_t* m_Base; - uint32_t m_Size; - uint32_t m_Offset; - uint32_t m_OffsetTop; - -public: - bool Init(MemoryHeap* heap, uint32_t size, uint32_t alignment = 1); - void Destroy(); - - void* Allocate(uint32_t size, uint32_t alignment = 1); - void* AllocateTop(uint32_t size, uint32_t alignment = 1); - - uint32_t GetCurrentOffset(); - void RollBackOffset(uint32_t offset); - - uint32_t GetCurrentOffsetTop(); - void RollBackOffsetTop(uint32_t offset); - - void Reset(); -}; - -//---------------------------------------------------------------------------------------- -slInline bool MemoryLinear::Init(MemoryHeap* heap, uint32_t size, uint32_t alignment = 1) -{ - m_Heap = heap; - m_Base = (uint8_t*)m_Heap->Allocate(size, "MemoryLinear", alignment); - m_Size = size; - m_Offset = 0; - m_OffsetTop = 0; -} - -//---------------------------------------------------------------------------------------- -slInline void MemoryLinear::Destroy() -{ - m_Heap->Free(m_Base); - m_Heap = NULL; - m_Base = NULL; - m_Size = 0; - m_Offset = 0; - m_OffsetTop = 0; -} - -//---------------------------------------------------------------------------------------- -slInline void* MemoryLinear::Allocate(uint32_t size, uint32_t alignment) -{ - int64_t aligned_address = ALIGN_UP((int64_t)m_Base + m_Offset, alignment); - if (aligned_address + size > (int64_t)m_Base + m_Size - m_OffsetTop) - { - return NULL; - } - - m_Offset = aligned_address - (int64_t)m_Base; - return (void*)aligned_address; -} - -//---------------------------------------------------------------------------------------- -slInline void* MemoryLinear::AllocateTop(uint32_t size, uint32_t alignment) -{ - int64_t aligned_address = ALIGN_DOWN((int64_t)m_Base + m_Size - m_OffsetTop - size, alignment); - if (aligned_address < (int64_t)m_Base + m_Offset) - { - return NULL; - } - - m_OffsetTop = (int64_t)m_Base + m_Size - aligned_address); - return (void*)aligned_address; -} - -//---------------------------------------------------------------------------------------- -slInline uint32_t MemoryLinear::GetCurrentOffset() -{ - return m_Offset; -} - -//---------------------------------------------------------------------------------------- -slInline void MemoryLinear::RollBackOffset(uint32_t offset) -{ - Assert(offset <= m_Offset); - m_Offset = offset; -} - -//---------------------------------------------------------------------------------------- -slInline uint32_t MemoryLinear::GetCurrentOffsetTop() -{ - return m_OffsetTop; -} - -//---------------------------------------------------------------------------------------- -slInline void MemoryLinear::RollBackOffsetTop(uint32_t offset_top) -{ - Assert(offset_top >= m_OffsetTop); - m_OffsetTop = offset_top; -} - -//---------------------------------------------------------------------------------------- -slInline void MemoryLinear::Reset() -{ - m_Offset = 0; - m_OffsetTop = 0; -} diff --git a/Littlest/Foundation/OSInterface/GLView.h b/Littlest/Foundation/OSInterface/GLView.h deleted file mode 100644 index 0d2efa8..0000000 --- a/Littlest/Foundation/OSInterface/GLView.h +++ /dev/null @@ -1,32 +0,0 @@ -#pragma once - -#import - -#import -#import -#import -#import - -//---------------------------------------------------------------------------------------- -// This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass. -// The view content is basically an EAGL surface you render your OpenGL scene into. -// Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel. -@interface GLView : UIView -{ -@private - EAGLContext* context; - - // The pixel dimensions of the CAEAGLLayer. - GLint framebufferWidth; - GLint framebufferHeight; - - // The OpenGL ES names for the framebuffer and renderbuffer used to render to this view. - GLuint defaultFramebuffer, colorRenderbuffer; -} - -@property (nonatomic, retain) EAGLContext* context; - -- (void)setFramebuffer; -- (BOOL)presentFramebuffer; - -@end diff --git a/Littlest/Foundation/OSInterface/GLView.m b/Littlest/Foundation/OSInterface/GLView.m deleted file mode 100644 index 5ef4c57..0000000 --- a/Littlest/Foundation/OSInterface/GLView.m +++ /dev/null @@ -1,156 +0,0 @@ -#import - -#import "GLView.h" - -//----------------------------------------------------------------------------------------------------------- -@interface GLView (PrivateMethods) -- (void)createFrameBuffer; -- (void)deleteFramebuffer; -@end - -//----------------------------------------------------------------------------------------------------------- -@implementation GLView - -@dynamic context; - -//----------------------------------------------------------------------------------------------------------- -// You must implement this method -+ (Class)layerClass -{ - return [CAEAGLLayer class]; -} - -//----------------------------------------------------------------------------------------------------------- -//The EAGL view is stored in the nib file. When it's unarchived it's sent -initWithCoder:. -- (id)initWithCoder:(NSCoder*)coder -{ - self = [super initWithCoder:coder]; - if (self) - { - CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer; - - eaglLayer.opaque = TRUE; - eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys: - [NSNumber numberWithBool:FALSE], kEAGLDrawablePropertyRetainedBacking, - kEAGLColorFormatRGBA8, kEAGLDrawablePropertyColorFormat, - nil]; - } - - return self; -} - -//----------------------------------------------------------------------------------------------------------- -- (void)dealloc -{ - [self deleteFramebuffer]; - [context release]; - - [super dealloc]; -} - -//----------------------------------------------------------------------------------------------------------- -- (EAGLContext *)context -{ - return context; -} - -//----------------------------------------------------------------------------------------------------------- -- (void)setContext:(EAGLContext *)newContext -{ - if (context != newContext) - { - [self deleteFramebuffer]; - [context release]; - - context = [newContext retain]; - [EAGLContext setCurrentContext:nil]; - } -} - -//----------------------------------------------------------------------------------------------------------- -- (void)createFrameBuffer -{ - if (context && !defaultFramebuffer) - { - [EAGLContext setCurrentContext:context]; - - // Create default framebuffer object. - glGenFramebuffers(1, &defaultFramebuffer); - glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer); - - // Create color render buffer and allocate backing store. - glGenRenderbuffers(1, &colorRenderbuffer); - glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer); - [context renderbufferStorage:GL_RENDERBUFFER fromDrawable:(CAEAGLLayer *)self.layer]; - glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &framebufferWidth); - glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &framebufferHeight); - - glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, colorRenderbuffer); - - if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE) - NSLog(@"Failed to make complete framebuffer object %x", glCheckFramebufferStatus(GL_FRAMEBUFFER)); - } -} - -//----------------------------------------------------------------------------------------------------------- -- (void)deleteFramebuffer -{ - if (context) - { - [EAGLContext setCurrentContext:context]; - - if (defaultFramebuffer) - { - glDeleteFramebuffers(1, &defaultFramebuffer); - defaultFramebuffer = 0; - } - - if (colorRenderbuffer) - { - glDeleteRenderbuffers(1, &colorRenderbuffer); - colorRenderbuffer = 0; - } - } -} - -//----------------------------------------------------------------------------------------------------------- -- (void)setFramebuffer -{ - if (context) - { - [EAGLContext setCurrentContext:context]; - - if (!defaultFramebuffer) - [self createFrameBuffer]; - - glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer); - - glViewport(0, 0, framebufferWidth, framebufferHeight); - } -} - -//----------------------------------------------------------------------------------------------------------- -- (BOOL)presentFramebuffer -{ - BOOL success = FALSE; - - if (context) - { - [EAGLContext setCurrentContext:context]; - - glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer); - - success = [context presentRenderbuffer:GL_RENDERBUFFER]; - } - - return success; -} - -//----------------------------------------------------------------------------------------------------------- -- (void)layoutSubviews -{ - // The framebuffer will be re-created at the beginning of the next setFramebuffer method call. - [self deleteFramebuffer]; -} - -@end diff --git a/Littlest/Foundation/OSInterface/LittlestAppDelegate.h b/Littlest/Foundation/OSInterface/LittlestAppDelegate.h deleted file mode 100644 index 7f66aca..0000000 --- a/Littlest/Foundation/OSInterface/LittlestAppDelegate.h +++ /dev/null @@ -1,17 +0,0 @@ -#pragma once - -#import - -@class LittlestViewController; - -@interface LittlestAppDelegate : NSObject -{ - UIWindow* window; - LittlestViewController* viewController; -} - -@property (nonatomic, retain) IBOutlet UIWindow* window; -@property (nonatomic, retain) IBOutlet LittlestViewController* viewController; - -@end - diff --git a/Littlest/Foundation/OSInterface/LittlestAppDelegate.m b/Littlest/Foundation/OSInterface/LittlestAppDelegate.m deleted file mode 100644 index ad097b4..0000000 --- a/Littlest/Foundation/OSInterface/LittlestAppDelegate.m +++ /dev/null @@ -1,48 +0,0 @@ -#import "LittlestAppDelegate.h" -#import "LittlestViewController.h" - -@implementation LittlestAppDelegate - -@synthesize window; -@synthesize viewController; - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - [self.window addSubview:self.viewController.view]; - return YES; -} - -- (void)applicationWillResignActive:(UIApplication *)application -{ - [self.viewController stopAnimation]; -} - -- (void)applicationDidBecomeActive:(UIApplication *)application -{ - [self.viewController startAnimation]; -} - -- (void)applicationWillTerminate:(UIApplication *)application -{ - [self.viewController stopAnimation]; -} - -- (void)applicationDidEnterBackground:(UIApplication *)application -{ - // Handle any background procedures not related to animation here. -} - -- (void)applicationWillEnterForeground:(UIApplication *)application -{ - // Handle any foreground procedures not related to animation here. -} - -- (void)dealloc -{ - [viewController release]; - [window release]; - - [super dealloc]; -} - -@end diff --git a/Littlest/Foundation/OSInterface/LittlestViewController.h b/Littlest/Foundation/OSInterface/LittlestViewController.h deleted file mode 100644 index 3c3ab7d..0000000 --- a/Littlest/Foundation/OSInterface/LittlestViewController.h +++ /dev/null @@ -1,31 +0,0 @@ -#pragma once - -#import - -#import - -#import -#import -#import -#import - -@class CCDirector; - -@interface LittlestViewController : UIViewController -{ - EAGLContext *context; - GLuint program; - - BOOL animating; - NSInteger animationFrameInterval; - CADisplayLink *displayLink; -} - -@property (readonly, nonatomic, getter=isAnimating) BOOL animating; -@property (nonatomic) NSInteger animationFrameInterval; -@property (retain, nonatomic) CCDirector* director; - -- (void)startAnimation; -- (void)stopAnimation; - -@end diff --git a/Littlest/Foundation/OSInterface/LittlestViewController.m b/Littlest/Foundation/OSInterface/LittlestViewController.m deleted file mode 100644 index 29407af..0000000 --- a/Littlest/Foundation/OSInterface/LittlestViewController.m +++ /dev/null @@ -1,408 +0,0 @@ -#import - -#import "LittlestViewController.h" -#import "GLView.h" -#import "cocos2d/cocos2d.h" - - -//----------------------------------------------------------------------------------------------------------- -// Uniform index. -enum { - UNIFORM_TRANSLATE, - NUM_UNIFORMS -}; -GLint uniforms[NUM_UNIFORMS]; - -// Attribute index. -enum { - ATTRIB_VERTEX, - ATTRIB_COLOR, - NUM_ATTRIBUTES -}; - - -//----------------------------------------------------------------------------------------------------------- -@interface LittlestViewController () -@property (nonatomic, retain) EAGLContext *context; -@property (nonatomic, assign) CADisplayLink *displayLink; -- (BOOL)loadShaders; -- (BOOL)compileShader:(GLuint *)shader type:(GLenum)type file:(NSString *)file; -- (BOOL)linkProgram:(GLuint)prog; -- (BOOL)validateProgram:(GLuint)prog; -@end - - -//----------------------------------------------------------------------------------------------------------- -@implementation LittlestViewController - -@synthesize animating, context, displayLink, director; - -//----------------------------------------------------------------------------------------------------------- -- (void)awakeFromNib -{ - EAGLContext *aContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES2]; - - if (!aContext) - { - aContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1]; - } - - if (!aContext) - NSLog(@"Failed to create ES context"); - else if (![EAGLContext setCurrentContext:aContext]) - NSLog(@"Failed to set ES context current"); - - self.context = aContext; - [aContext release]; - - [(GLView *)self.view setContext:context]; - [(GLView *)self.view setFramebuffer]; - - if ([context API] == kEAGLRenderingAPIOpenGLES2) - [self loadShaders]; - - animating = FALSE; - animationFrameInterval = 1; - self.displayLink = nil; -} - -//----------------------------------------------------------------------------------------------------------- -- (void)dealloc -{ - if (program) - { - glDeleteProgram(program); - program = 0; - } - - // Tear down context. - if ([EAGLContext currentContext] == context) - [EAGLContext setCurrentContext:nil]; - - [context release]; - - [super dealloc]; -} - -//----------------------------------------------------------------------------------------------------------- -- (void)viewWillAppear:(BOOL)animated -{ - [self startAnimation]; - - [super viewWillAppear:animated]; -} - -//----------------------------------------------------------------------------------------------------------- -- (void)viewWillDisappear:(BOOL)animated -{ - [self stopAnimation]; - - [super viewWillDisappear:animated]; -} - -//----------------------------------------------------------------------------------------------------------- -- (void)viewDidUnload -{ - [super viewDidUnload]; - - if (program) - { - glDeleteProgram(program); - program = 0; - } - - // Tear down context. - if ([EAGLContext currentContext] == context) - [EAGLContext setCurrentContext:nil]; - self.context = nil; -} - -//----------------------------------------------------------------------------------------------------------- -- (NSInteger)animationFrameInterval -{ - return animationFrameInterval; -} - -//----------------------------------------------------------------------------------------------------------- -- (void)setAnimationFrameInterval:(NSInteger)frameInterval -{ - /* - Frame interval defines how many display frames must pass between each time the display link fires. - The display link will only fire 30 times a second when the frame internal is two on a display that refreshes 60 times a second. The default frame interval setting of one will fire 60 times a second when the display refreshes at 60 times a second. A frame interval setting of less than one results in undefined behavior. - */ - if (frameInterval >= 1) - { - animationFrameInterval = frameInterval; - - if (animating) - { - [self stopAnimation]; - [self startAnimation]; - } - } -} - -//----------------------------------------------------------------------------------------------------------- -- (void)startAnimation -{ - if (!animating) - { - CADisplayLink *aDisplayLink = [CADisplayLink displayLinkWithTarget:self selector:@selector(drawFrame)]; - [aDisplayLink setFrameInterval:animationFrameInterval]; - [aDisplayLink addToRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode]; - self.displayLink = aDisplayLink; - - animating = TRUE; - } -} - -//----------------------------------------------------------------------------------------------------------- -- (void)stopAnimation -{ - if (animating) - { - [self.displayLink invalidate]; - self.displayLink = nil; - animating = FALSE; - } -} - -//----------------------------------------------------------------------------------------------------------- -- (void)drawFrame -{ - [(GLView *)self.view setFramebuffer]; - - // Replace the implementation of this method to do your own custom drawing. - static const GLfloat squareVertices[] = { - -0.5f, -0.33f, - 0.5f, -0.33f, - -0.5f, 0.33f, - 0.5f, 0.33f, - }; - - static const GLubyte squareColors[] = { - 255, 255, 0, 255, - 0, 255, 255, 255, - 0, 0, 0, 0, - 255, 0, 255, 255, - }; - - static float transY = 0.0f; - - glClearColor(0.5f, 0.5f, 0.5f, 1.0f); - glClear(GL_COLOR_BUFFER_BIT); - - if ([context API] == kEAGLRenderingAPIOpenGLES2) - { - // Use shader program. - glUseProgram(program); - - // Update uniform value. - glUniform1f(uniforms[UNIFORM_TRANSLATE], (GLfloat)transY); - transY += 0.075f; - - // Update attribute values. - glVertexAttribPointer(ATTRIB_VERTEX, 2, GL_FLOAT, 0, 0, squareVertices); - glEnableVertexAttribArray(ATTRIB_VERTEX); - glVertexAttribPointer(ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, 1, 0, squareColors); - glEnableVertexAttribArray(ATTRIB_COLOR); - - // Validate program before drawing. This is a good check, but only really necessary in a debug build. - // DEBUG macro must be defined in your debug configurations if that's not already the case. -#if defined(DEBUG) - if (![self validateProgram:program]) - { - NSLog(@"Failed to validate program: %d", program); - return; - } -#endif - } - else - { - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - glTranslatef(0.0f, (GLfloat)(sinf(transY)/2.0f), 0.0f); - transY += 0.075f; - - glVertexPointer(2, GL_FLOAT, 0, squareVertices); - glEnableClientState(GL_VERTEX_ARRAY); - glColorPointer(4, GL_UNSIGNED_BYTE, 0, squareColors); - glEnableClientState(GL_COLOR_ARRAY); - } - - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - - [(GLView *)self.view presentFramebuffer]; -} - -//----------------------------------------------------------------------------------------------------------- -- (void)didReceiveMemoryWarning -{ - // Releases the view if it doesn't have a superview. - [super didReceiveMemoryWarning]; - - // Release any cached data, images, etc. that aren't in use. -} - -//----------------------------------------------------------------------------------------------------------- -- (BOOL)compileShader:(GLuint *)shader type:(GLenum)type file:(NSString *)file -{ - GLint status; - const GLchar *source; - - source = (GLchar *)[[NSString stringWithContentsOfFile:file encoding:NSUTF8StringEncoding error:nil] UTF8String]; - if (!source) - { - NSLog(@"Failed to load vertex shader"); - return FALSE; - } - - *shader = glCreateShader(type); - glShaderSource(*shader, 1, &source, NULL); - glCompileShader(*shader); - -#if defined(DEBUG) - GLint logLength; - glGetShaderiv(*shader, GL_INFO_LOG_LENGTH, &logLength); - if (logLength > 0) - { - GLchar *log = (GLchar *)malloc(logLength); - glGetShaderInfoLog(*shader, logLength, &logLength, log); - NSLog(@"Shader compile log:\n%s", log); - free(log); - } -#endif - - glGetShaderiv(*shader, GL_COMPILE_STATUS, &status); - if (status == 0) - { - glDeleteShader(*shader); - return FALSE; - } - - return TRUE; -} - -//----------------------------------------------------------------------------------------------------------- -- (BOOL)linkProgram:(GLuint)prog -{ - GLint status; - - glLinkProgram(prog); - -#if defined(DEBUG) - GLint logLength; - glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &logLength); - if (logLength > 0) - { - GLchar *log = (GLchar *)malloc(logLength); - glGetProgramInfoLog(prog, logLength, &logLength, log); - NSLog(@"Program link log:\n%s", log); - free(log); - } -#endif - - glGetProgramiv(prog, GL_LINK_STATUS, &status); - if (status == 0) - return FALSE; - - return TRUE; -} - -//----------------------------------------------------------------------------------------------------------- -- (BOOL)validateProgram:(GLuint)prog -{ - GLint logLength, status; - - glValidateProgram(prog); - glGetProgramiv(prog, GL_INFO_LOG_LENGTH, &logLength); - if (logLength > 0) - { - GLchar *log = (GLchar *)malloc(logLength); - glGetProgramInfoLog(prog, logLength, &logLength, log); - NSLog(@"Program validate log:\n%s", log); - free(log); - } - - glGetProgramiv(prog, GL_VALIDATE_STATUS, &status); - if (status == 0) - return FALSE; - - return TRUE; -} - -//----------------------------------------------------------------------------------------------------------- -- (BOOL)loadShaders -{ - GLuint vertShader, fragShader; - NSString *vertShaderPathname, *fragShaderPathname; - - // Create shader program. - program = glCreateProgram(); - - // Create and compile vertex shader. - vertShaderPathname = [[NSBundle mainBundle] pathForResource:@"Shader" ofType:@"vsh"]; - if (![self compileShader:&vertShader type:GL_VERTEX_SHADER file:vertShaderPathname]) - { - NSLog(@"Failed to compile vertex shader"); - return FALSE; - } - - // Create and compile fragment shader. - fragShaderPathname = [[NSBundle mainBundle] pathForResource:@"Shader" ofType:@"fsh"]; - if (![self compileShader:&fragShader type:GL_FRAGMENT_SHADER file:fragShaderPathname]) - { - NSLog(@"Failed to compile fragment shader"); - return FALSE; - } - - // Attach vertex shader to program. - glAttachShader(program, vertShader); - - // Attach fragment shader to program. - glAttachShader(program, fragShader); - - // Bind attribute locations. - // This needs to be done prior to linking. - glBindAttribLocation(program, ATTRIB_VERTEX, "position"); - glBindAttribLocation(program, ATTRIB_COLOR, "color"); - - // Link program. - if (![self linkProgram:program]) - { - NSLog(@"Failed to link program: %d", program); - - if (vertShader) - { - glDeleteShader(vertShader); - vertShader = 0; - } - if (fragShader) - { - glDeleteShader(fragShader); - fragShader = 0; - } - if (program) - { - glDeleteProgram(program); - program = 0; - } - - return FALSE; - } - - // Get uniform locations. - uniforms[UNIFORM_TRANSLATE] = glGetUniformLocation(program, "translate"); - - // Release vertex and fragment shaders. - if (vertShader) - glDeleteShader(vertShader); - if (fragShader) - glDeleteShader(fragShader); - - return TRUE; -} - -@end diff --git a/Littlest/Foundation/Synchronization/Atomic32Bit.h b/Littlest/Foundation/Synchronization/Atomic32Bit.h deleted file mode 100755 index 2290a2c..0000000 --- a/Littlest/Foundation/Synchronization/Atomic32Bit.h +++ /dev/null @@ -1,99 +0,0 @@ -#pragma once - -#include "Foundation/Common/GlobalInclude.h" - -#if defined(__WINDOWS__) - -#include - -#pragma intrinsic(InterlockedIncrement) -#pragma intrinsic(InterlockedDecrement) -#pragma intrinsic(InterlockedExchange) -#pragma intrinsic(InterlockedExchangeAdd) -#pragma intrinsic(InterlockedExchangeSubtract) -#pragma intrinsic(InterlockedCompareExchange) -#pragma intrinsic(InterlockedAnd) -#pragma intrinsic(InterlockedOr) -#pragma intrinsic(InterlockedXor) - -class Atomic32Bit -{ -private: - __declspec(align(16)) uint32_t m_LockValue; - -public: - Atomic32Bit() - { - m_LockValue = 0; - } - - ~Atomic32Bit() - { - m_LockValue = 0; - } - - // use intrinsics instead since they r automatically defined for x64 and x86 structs - uint32_t Increment(const uint32_t lock_value) //returns current value - { - return InterlockedIncrement(&m_LockValue); - - /* - volatile unsigned int* p_temp = &m_Locker; - __asm - { - mov eax, 1 - mov edx, [p_temp] - lock xadd [edx],eax - } - */ - } - - uint32_t SetValue(const uint32_t value) - { - return InterlockedExchange(&m_LockValue, value); - - /* - volatile unsigned int* p_temp = &m_Locker; - __asm - { - mov eax, Value - mov edx, [p_temp] - lock xchg [edx],eax - } - */ - } - - uint32_t Decrement(const uint32_t lock_value) //returns current value - { - return InterlockedDecrement(&m_LockValue); - - /* - volatile unsigned int* p_temp = &m_Locker; - __asm - { - mov eax, -1 - mov edx, [p_temp] - lock xadd [edx],eax - } - */ - } - - void And(uint32_t& lock_value) - { - InterlockedAnd(&m_LockValue, lock_value); - lock_value = m_LockValue; - } - - // this function can be inlined as long as the volatile is here - slInline uint32_t GetValue() - { - volatile uint32_t* p_temp = &m_LockValue; - return (unsigned int)*p_temp; - } -}; - -#else - -#error Not yet implemented! - -#endif diff --git a/Littlest/Foundation/Synchronization/MemorySync.h b/Littlest/Foundation/Synchronization/MemorySync.h deleted file mode 100755 index 156060a..0000000 --- a/Littlest/Foundation/Synchronization/MemorySync.h +++ /dev/null @@ -1,28 +0,0 @@ -#pragma once - -#include "Foundation/Common/GlobalDefines.h" - -#if defined(__WINDOWS__) - -#include - -#define ReadWriteSync() MemoryBarrier() - -#elif defined(__ARM__) - -#define ReadWriteSync() __asm__("dsb") - -#elif defined(__PPC__) - -#define ReadWriteSync() __asm__("lwsync") - -#elif defined(__X86__) && defined(__iOS__) - -#include -#define ReadWriteSync() OSMemoryBarrier() - -#else - -#error MemorySync not yet implemented for this build! - -#endif diff --git a/Littlest/Game/Scene/Scene.h b/Littlest/Game/Scene/Scene.h deleted file mode 100644 index d9ed9a1..0000000 --- a/Littlest/Game/Scene/Scene.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once - -#import - -#import "cocos2d/cocos2d.h" - -@interface Scene : CCScene -{ - -} - - - -@end - - - -@end diff --git a/Littlest/HelloWorldLayer.h b/Littlest/HelloWorldLayer.h deleted file mode 100644 index d3327e8..0000000 --- a/Littlest/HelloWorldLayer.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// HelloWorldLayer.h -// Littlest -// -// Created by Doris Chen on 4/17/11. -// Copyright __MyCompanyName__ 2011. All rights reserved. -// - - -// When you import this file, you import all the cocos2d classes -#import "cocos2d.h" -#import "Box2D.h" - -#import "Engine/Render/GLES-Render.h" - -// HelloWorldLayer -@interface HelloWorldLayer : CCLayer -{ - b2World* world; - GLESDebugDraw* m_debugDraw; -} - -// returns a CCScene that contains the HelloWorldLayer as the only child -+(CCScene *) scene; -// adds a new sprite at a given coordinate --(void) addNewSpriteWithCoords:(CGPoint)p; - -@end diff --git a/Littlest/HelloWorldLayer.mm b/Littlest/HelloWorldLayer.mm deleted file mode 100644 index 2e527a5..0000000 --- a/Littlest/HelloWorldLayer.mm +++ /dev/null @@ -1,258 +0,0 @@ -// -// HelloWorldLayer.mm -// Littlest -// -// Created by Doris Chen on 4/17/11. -// Copyright __MyCompanyName__ 2011. All rights reserved. -// - - -// Import the interfaces -#import "HelloWorldLayer.h" - -//Pixel to metres ratio. Box2D uses metres as the unit for measurement. -//This ratio defines how many pixels correspond to 1 Box2D "metre" -//Box2D is optimized for objects of 1x1 metre therefore it makes sense -//to define the ratio so that your most common object type is 1x1 metre. -#define PTM_RATIO 32 - -// enums that will be used as tags -enum { - kTagTileMap = 1, - kTagBatchNode = 1, - kTagAnimation1 = 1, -}; - - -// HelloWorldLayer implementation -@implementation HelloWorldLayer - -+(CCScene *) scene -{ - // 'scene' is an autorelease object. - CCScene *scene = [CCScene node]; - - // 'layer' is an autorelease object. - HelloWorldLayer *layer = [HelloWorldLayer node]; - - // add layer as a child to scene - [scene addChild: layer]; - - // return the scene - return scene; -} - -// on "init" you need to initialize your instance --(id) init -{ - // always call "super" init - // Apple recommends to re-assign "self" with the "super" return value - if( (self=[super init])) { - - // enable touches - self.isTouchEnabled = YES; - - // enable accelerometer - self.isAccelerometerEnabled = YES; - - CGSize screenSize = [CCDirector sharedDirector].winSize; - CCLOG(@"Screen width %0.2f screen height %0.2f",screenSize.width,screenSize.height); - - // Define the gravity vector. - b2Vec2 gravity; - gravity.Set(0.0f, -10.0f); - - // Do we want to let bodies sleep? - // This will speed up the physics simulation - bool doSleep = true; - - // Construct a world object, which will hold and simulate the rigid bodies. - world = new b2World(gravity, doSleep); - - world->SetContinuousPhysics(true); - - // Debug Draw functions - m_debugDraw = new GLESDebugDraw( PTM_RATIO ); - world->SetDebugDraw(m_debugDraw); - - uint32 flags = 0; - flags += b2DebugDraw::e_shapeBit; -// flags += b2DebugDraw::e_jointBit; -// flags += b2DebugDraw::e_aabbBit; -// flags += b2DebugDraw::e_pairBit; -// flags += b2DebugDraw::e_centerOfMassBit; - m_debugDraw->SetFlags(flags); - - - // Define the ground body. - b2BodyDef groundBodyDef; - groundBodyDef.position.Set(0, 0); // bottom-left corner - - // Call the body factory which allocates memory for the ground body - // from a pool and creates the ground box shape (also from a pool). - // The body is also added to the world. - b2Body* groundBody = world->CreateBody(&groundBodyDef); - - // Define the ground box shape. - b2PolygonShape groundBox; - - // bottom - groundBox.SetAsEdge(b2Vec2(0,0), b2Vec2(screenSize.width/PTM_RATIO,0)); - groundBody->CreateFixture(&groundBox,0); - - // top - groundBox.SetAsEdge(b2Vec2(0,screenSize.height/PTM_RATIO), b2Vec2(screenSize.width/PTM_RATIO,screenSize.height/PTM_RATIO)); - groundBody->CreateFixture(&groundBox,0); - - // left - groundBox.SetAsEdge(b2Vec2(0,screenSize.height/PTM_RATIO), b2Vec2(0,0)); - groundBody->CreateFixture(&groundBox,0); - - // right - groundBox.SetAsEdge(b2Vec2(screenSize.width/PTM_RATIO,screenSize.height/PTM_RATIO), b2Vec2(screenSize.width/PTM_RATIO,0)); - groundBody->CreateFixture(&groundBox,0); - - - //Set up the block sprites - CCSpriteBatchNode *batch = [CCSpriteBatchNode batchNodeWithFile:@"blocks.png" capacity:150]; - [self addChild:batch z:0 tag:kTagBatchNode]; - - [self addNewSpriteWithCoords:ccp(screenSize.width/2, screenSize.height/2)]; - - CCLabelTTF *label = [CCLabelTTF labelWithString:@"Tap screen" fontName:@"Marker Felt" fontSize:32]; - [self addChild:label z:0]; - [label setColor:ccc3(0,0,255)]; - label.position = ccp( screenSize.width/2, screenSize.height-50); - - [self schedule: @selector(tick:)]; - } - return self; -} - --(void) draw -{ - // Default GL states: GL_TEXTURE_2D, GL_VERTEX_ARRAY, GL_COLOR_ARRAY, GL_TEXTURE_COORD_ARRAY - // Needed states: GL_VERTEX_ARRAY, - // Unneeded states: GL_TEXTURE_2D, GL_COLOR_ARRAY, GL_TEXTURE_COORD_ARRAY - glDisable(GL_TEXTURE_2D); - glDisableClientState(GL_COLOR_ARRAY); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - - world->DrawDebugData(); - - // restore default GL states - glEnable(GL_TEXTURE_2D); - glEnableClientState(GL_COLOR_ARRAY); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - -} - --(void) addNewSpriteWithCoords:(CGPoint)p -{ - CCLOG(@"Add sprite %0.2f x %02.f",p.x,p.y); - CCSpriteBatchNode *batch = (CCSpriteBatchNode*) [self getChildByTag:kTagBatchNode]; - - //We have a 64x64 sprite sheet with 4 different 32x32 images. The following code is - //just randomly picking one of the images - int idx = (CCRANDOM_0_1() > .5 ? 0:1); - int idy = (CCRANDOM_0_1() > .5 ? 0:1); - CCSprite *sprite = [CCSprite spriteWithBatchNode:batch rect:CGRectMake(32 * idx,32 * idy,32,32)]; - [batch addChild:sprite]; - - sprite.position = ccp( p.x, p.y); - - // Define the dynamic body. - //Set up a 1m squared box in the physics world - b2BodyDef bodyDef; - bodyDef.type = b2_dynamicBody; - - bodyDef.position.Set(p.x/PTM_RATIO, p.y/PTM_RATIO); - bodyDef.userData = sprite; - b2Body *body = world->CreateBody(&bodyDef); - - // Define another box shape for our dynamic body. - b2PolygonShape dynamicBox; - dynamicBox.SetAsBox(.5f, .5f);//These are mid points for our 1m box - - // Define the dynamic body fixture. - b2FixtureDef fixtureDef; - fixtureDef.shape = &dynamicBox; - fixtureDef.density = 1.0f; - fixtureDef.friction = 0.3f; - body->CreateFixture(&fixtureDef); -} - - - --(void) tick: (ccTime) dt -{ - //It is recommended that a fixed time step is used with Box2D for stability - //of the simulation, however, we are using a variable time step here. - //You need to make an informed choice, the following URL is useful - //http://gafferongames.com/game-physics/fix-your-timestep/ - - int32 velocityIterations = 8; - int32 positionIterations = 1; - - // Instruct the world to perform a single step of simulation. It is - // generally best to keep the time step and iterations fixed. - world->Step(dt, velocityIterations, positionIterations); - - - //Iterate over the bodies in the physics world - for (b2Body* b = world->GetBodyList(); b; b = b->GetNext()) - { - if (b->GetUserData() != NULL) { - //Synchronize the AtlasSprites position and rotation with the corresponding body - CCSprite *myActor = (CCSprite*)b->GetUserData(); - myActor.position = CGPointMake( b->GetPosition().x * PTM_RATIO, b->GetPosition().y * PTM_RATIO); - myActor.rotation = -1 * CC_RADIANS_TO_DEGREES(b->GetAngle()); - } - } -} - -- (void)ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event -{ - //Add a new body/atlas sprite at the touched location - for( UITouch *touch in touches ) { - CGPoint location = [touch locationInView: [touch view]]; - - location = [[CCDirector sharedDirector] convertToGL: location]; - - [self addNewSpriteWithCoords: location]; - } -} - -- (void)accelerometer:(UIAccelerometer*)accelerometer didAccelerate:(UIAcceleration*)acceleration -{ - static float prevX=0, prevY=0; - - //#define kFilterFactor 0.05f -#define kFilterFactor 1.0f // don't use filter. the code is here just as an example - - float accelX = (float) acceleration.x * kFilterFactor + (1- kFilterFactor)*prevX; - float accelY = (float) acceleration.y * kFilterFactor + (1- kFilterFactor)*prevY; - - prevX = accelX; - prevY = accelY; - - // accelerometer values are in "Portrait" mode. Change them to Landscape left - // multiply the gravity by 10 - b2Vec2 gravity( -accelY * 10, accelX * 10); - - world->SetGravity( gravity ); -} - -// on "dealloc" you need to release all your retained objects -- (void) dealloc -{ - // in case you have something to dealloc, do it in this method - delete world; - world = NULL; - - delete m_debugDraw; - - // don't forget to call "super dealloc" - [super dealloc]; -} -@end diff --git a/Littlest/OS/GameConfig.h b/Littlest/OS/GameConfig.h deleted file mode 100644 index bad9b07..0000000 --- a/Littlest/OS/GameConfig.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// GameConfig.h -// Littlest -// -// Created by Doris Chen on 4/17/11. -// Copyright __MyCompanyName__ 2011. All rights reserved. -// - -#ifndef __GAME_CONFIG_H -#define __GAME_CONFIG_H - -// -// Supported Autorotations: -// None, -// UIViewController, -// CCDirector -// -#define kGameAutorotationNone 0 -#define kGameAutorotationCCDirector 1 -#define kGameAutorotationUIViewController 2 - -// -// Define here the type of autorotation that you want for your game -// -#define GAME_AUTOROTATION kGameAutorotationUIViewController - - -#endif // __GAME_CONFIG_H \ No newline at end of file diff --git a/Littlest/OS/RootViewController.h b/Littlest/OS/RootViewController.h deleted file mode 100644 index ca05da8..0000000 --- a/Littlest/OS/RootViewController.h +++ /dev/null @@ -1,16 +0,0 @@ -// -// RootViewController.h -// Littlest -// -// Created by Doris Chen on 4/17/11. -// Copyright __MyCompanyName__ 2011. All rights reserved. -// - -#import - - -@interface RootViewController : UIViewController { - -} - -@end diff --git a/Littlest/OS/RootViewController.m b/Littlest/OS/RootViewController.m deleted file mode 100644 index db5f37e..0000000 --- a/Littlest/OS/RootViewController.m +++ /dev/null @@ -1,152 +0,0 @@ -// -// RootViewController.m -// Littlest -// -// Created by Doris Chen on 4/17/11. -// Copyright __MyCompanyName__ 2011. All rights reserved. -// - -// -// RootViewController + iAd -// If you want to support iAd, use this class as the controller of your iAd -// - -#import "cocos2d.h" - -#import "RootViewController.h" -#import "GameConfig.h" - -@implementation RootViewController - -/* - // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. - - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { - // Custom initialization - } - return self; - } - */ - -/* - // Implement loadView to create a view hierarchy programmatically, without using a nib. - - (void)loadView { - } - */ - -/* - // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - - (void)viewDidLoad { - [super viewDidLoad]; - } - */ - - -// Override to allow orientations other than the default portrait orientation. -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - - // - // There are 2 ways to support auto-rotation: - // - The OpenGL / cocos2d way - // - Faster, but doesn't rotate the UIKit objects - // - The ViewController way - // - A bit slower, but the UiKit objects are placed in the right place - // - -#if GAME_AUTOROTATION==kGameAutorotationNone - // - // EAGLView won't be autorotated. - // Since this method should return YES in at least 1 orientation, - // we return YES only in the Portrait orientation - // - return ( interfaceOrientation == UIInterfaceOrientationPortrait ); - -#elif GAME_AUTOROTATION==kGameAutorotationCCDirector - // - // EAGLView will be rotated by cocos2d - // - // Sample: Autorotate only in landscape mode - // - if( interfaceOrientation == UIInterfaceOrientationLandscapeLeft ) { - [[CCDirector sharedDirector] setDeviceOrientation: kCCDeviceOrientationLandscapeRight]; - } else if( interfaceOrientation == UIInterfaceOrientationLandscapeRight) { - [[CCDirector sharedDirector] setDeviceOrientation: kCCDeviceOrientationLandscapeLeft]; - } - - // Since this method should return YES in at least 1 orientation, - // we return YES only in the Portrait orientation - return ( interfaceOrientation == UIInterfaceOrientationPortrait ); - -#elif GAME_AUTOROTATION == kGameAutorotationUIViewController - // - // EAGLView will be rotated by the UIViewController - // - // Sample: Autorotate only in landscpe mode - // - // return YES for the supported orientations - - return ( UIInterfaceOrientationIsLandscape( interfaceOrientation ) ); - -#else -#error Unknown value in GAME_AUTOROTATION - -#endif // GAME_AUTOROTATION - - - // Shold not happen - return NO; -} - -// -// This callback only will be called when GAME_AUTOROTATION == kGameAutorotationUIViewController -// -#if GAME_AUTOROTATION == kGameAutorotationUIViewController --(void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration -{ - // - // Assuming that the main window has the size of the screen - // BUG: This won't work if the EAGLView is not fullscreen - /// - CGRect screenRect = [[UIScreen mainScreen] bounds]; - CGRect rect; - - if(toInterfaceOrientation == UIInterfaceOrientationPortrait || toInterfaceOrientation == UIInterfaceOrientationPortraitUpsideDown) - rect = screenRect; - - else if(toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft || toInterfaceOrientation == UIInterfaceOrientationLandscapeRight) - rect.size = CGSizeMake( screenRect.size.height, screenRect.size.width ); - - CCDirector *director = [CCDirector sharedDirector]; - EAGLView *glView = [director openGLView]; - float contentScaleFactor = [director contentScaleFactor]; - - if( contentScaleFactor != 1 ) { - rect.size.width *= contentScaleFactor; - rect.size.height *= contentScaleFactor; - } - glView.frame = rect; -} -#endif // GAME_AUTOROTATION == kGameAutorotationUIViewController - - -- (void)didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. - [super didReceiveMemoryWarning]; - - // Release any cached data, images, etc that aren't in use. -} - -- (void)viewDidUnload { - [super viewDidUnload]; - // Release any retained subviews of the main view. - // e.g. self.myOutlet = nil; -} - - -- (void)dealloc { - [super dealloc]; -} - - -@end - diff --git a/Littlest/Prefix.pch b/Littlest/Prefix.pch deleted file mode 100644 index f2861ff..0000000 --- a/Littlest/Prefix.pch +++ /dev/null @@ -1,14 +0,0 @@ -// -// Prefix header for all source files of the 'Test' target in the 'Test' project -// - -#import - -#ifndef __IPHONE_3_0 -#warning "This project uses features only available in iPhone SDK 3.0 and later." -#endif - -#ifdef __OBJC__ -#import -#import -#endif diff --git a/Littlest/Resources/Default.png b/Littlest/Resources/Default.png deleted file mode 100644 index 8710d78ac8a00a3ea05bc35c3a3a1d568001a5a8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 30635 zcmb4qWl-Bqw09^4TC}Cby-?h>IK`a;h2ZY)uEn8+0>!OBfkFsQaCa{j+$BIDxZ9iO z&b%M)$2${}%x3?)M}EilEHPhHu~U?IO_y+Z+HW)lMdm}<6CQeVE*WD@aLEySO=9**aJP06vR3n$}-6 z_X$O>S1%-$qCmNM;zI zgoLAXdL({QdKK~>AmJA;SqzYnMG47Cr`H7hehDxcF*n-+d|?BaFa+;T1443cGW<~h z`oCxhP<|%@sNY#eO9O0#0p%0gu`&Q1PQZIBrCve6JR5*h0ca%;sA>Roj=#aG0ldNn zaH>Z~Facir155^KX?+0U8G!e)XF!otmWnqpW~8JtYDAjo1Z6_?U$MDj0D}d_=tFEV}$kF^E%F|22Y|M@Oys|c<%C_Y-I9(HZ3gd zY;Vsi_DbrT4g&+9thi*8*1Jb9l#9qGl3s_KE$=4C zJv3lFKTu46=v6Rl(qVqTrH=0!FP-`QoV(~ljARm1-^ZzEi_JCGdsMMCK0uY77>a)) z+h0R-)GH;1H##1jo7VuqS&MVm4C5=*5Sy@#3Ge4)@khDe9|0j&3Q4X2fRQvE``6)G z@qt$Wfb{QB=Bm$R7hS}xo#^CUXv11?P6>Vef{$D;H!70G>g$FX0bZ7@vn$7B5r89 z++0yQ@~pH_{DgNLZ~UXBdIjk4W2Cqlntr}esQ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9h@0&n&GbJ&^l$3Rx|2Whnk*HFS>`+{0(X#IXUMtVpy}Bkz#4ZNY21h_jYxZ zaY$a1qGKwXY#ou5Lg~$DKfBodUY3UZZlU_$5yB7D?#99X+sj1C^+UIliv^nGfKo? z(v(N$u_&kwaNCpTgE`zLTd^MNtlz9MbP#E0AJIc{_vVrG9trn|S@|iLx6jn+jj%#j?QlRESxU#HWxNxGRVae#63xF` zTNcP0uxndm(nun}T$Jui3NR5z?gvvL5VFva6?)Sv>)CQl)}8WcDoZQt8r&I{I#}*( zdYU05?;P}izT<17uuf+gP<$j1kpg3Al;?>eJG#e7t>#}O$iO)u8Fk~9I)g7xmsAjF zv*RwGMEO$0Klf&iVV&H{38jH3Ajss>($ENF;yjOm1=-)DNjKtfg`~8ctn&2>G<;Rw zW4a+Hz7D-|0r*xD1!i1Q1<<R&Z{m9j*}Q5Q0z5!_)Yi_S+eFs%KRB$KyPN4>~H-ih>sm^M?{s)eGM(qFq diff --git a/Littlest/Resources/Icon-72.png b/Littlest/Resources/Icon-72.png deleted file mode 100644 index 5b1ce47ad2cdad2bf3829b279ae371bdd1d86d78..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11414 zcmV;HENRn;P)Oz@Z0f2-7z;ux~O9+4z06=<WDR*FRcSTFz- zW=q650N5=6FiBTtNC2?60Km==3$g$R3;-}uh=nNt1bYBr$Ri_o0EC$U6h`t_Jn<{8 z5a%iY0C<_QJh>z}MS)ugEpZ1|S1ukX&Pf+56gFW3VVXcL!g-k)GJ!M?;PcD?0HBc- z5#WRK{dmp}uFlRjj{U%*%WZ25jX z{P*?XzTzZ-GF^d31o+^>%=Ap99M6&ogks$0k4OBs3;+Bb(;~!4V!2o<6ys46agIcq zjPo+3B8fthDa9qy|77CdEc*jK-!%ZRYCZvbku9iQV*~a}ClFY4z~c7+0P?$U!PF=S z1Au6Q;m>#f??3%Vpd|o+W=WE9003S@Bra6Svp>fO002awfhw>;8}z{#EWidF!3EsG z3;bXU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+*e{DQTg%y1{+7ZcM2ujH9HBMMYVBJT zlLSq?Y}{PcvsP8Ofj7rE-=vLq!dM1Yq8ETI(dTQvkN5NqYBdtbqS%^ko?V9%Ru7fsp0Avx+s+xl&!z>kb#VfngGyRC5<)<|m*BmI)QkPXM~1#+jE#&H z&G#S$1Tmchw_L4>QZ$bBOtx<9mWxm8<)N2m~ZT2O0{UwKbefBVW|hI&hqdMKAI<=7EBLll|3 z=P{y2iXAIeZ6$k_WcX$(X_7weG=zJD_uGs&8Zt4es_G3vMSWp>BMDk-q|7X&%q}D{ zyO8M2e8NIKLqp&fw-_Dnj(O_!l-DK#hu%n3fNCs6Hb+C#t1hH@$2QOf+fOlUUmxk| zBg(E9$FbIGPgg{LPfTxjEYv$;6y;WH#vd zj51YIX{Pzab$N^q^@t4j8XfKx2D?SP20b*HNbE#Qu_enEhlhfa8?Fc{s8z9`f)IkL z58h|q`Ybdw_`el^v0FA?Z>_z>#x9u1su*ikM124slq3z(NIkVi#(X_vzL7G&kTPG- zs5LTeq(PdA$A_Rc-`kfY4J3KZ0s$vT>_nXt3B{hLwIb!%YNcf9Dm&?^L{z&XdMb|Y zvdg0pS)3DfITxvD5Dn^mnu$*`wh3}9Ly}h1Ph-7isYmt)PVP{QSd-?gmMt$Dw`OG&$2wxt#Vc)F)V>fTeZ(rif%^S9e zF;|O`D@A0B7*i1lZ329&-|{FY$%r@qK24YW3hOPm0Xt@6?FPNI7)C>=tLn=d^ga#Y hZ%01A|K(2G{||rEhlWcno5uhE002ovPDHLkV1nCsRa5`~ diff --git a/Littlest/Resources/Icon-Small.png b/Littlest/Resources/Icon-Small.png deleted file mode 100644 index 1f11669597845b9ad3577ea779ad2319a10f5cc5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4956 zcmV-i6Qk^jP)Oz@Z0f2-7z;ux~O9+4z06=<WDR*FRcSTFz- zW=q650N5=6FiBTtNC2?60Km==3$g$R3;-}uh=nNt1bYBr$Ri_o0EC$U6h`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9K2~HU?ym*t-Q`TFV zo}SYirxzrOE!9#)Pbs2Wj;NFzm10DxU@62_e#_ZAKG6QR`nV-4hn1f1Z!YszNtq6=ZqF($MSMY zy_`~SrqWDe^*-ReBLs)4Q?-IxQ6sd9ZB-w{r=H-$l!oxbtONUtC;qv0=D*s=VVqGh z7L1XQCkbg#>P=6*k!!S`vap=8SW8%1PFSj^EZ05trYG?s6i85DHYE320 zxvbbhwIKABgvgScXqJ%~E5y!HELh3~OQjf5EjxP35!F&ex#%bt9EI3Wa0X{3(@oBx zs}F?Ki%(K~8a}i3BadE@^^f}W3qjnOkiH3=7$+FetoK-OMu?216j^#ojwH?ev)=U7 zn}K>WWx0`UL_P5|lRz`|q-m!+WqtPnv~-R(S}n59X1*6YLmUak*inuxg@UCNJ4&&k z5L;qriCp%)Gr54BleA6@O;Umn*Q!sy0N}>Iyj50Twr}>}=Qn*Y>)lA-q#>i)#I}23 zu_mV|ogu`6YDPqRRe}c}GB!W;8EE;Scpvcj=|E^5V|Kdr5CLNZoBx`^TFF5s61jl}(fjJ$Ub2S2~5U#z>_ z82ON~X4qI0vQFymen@%lmUlh2A4XTCk;f>v{hvtZnDe=RE2CYtc2#KUjPDzkha00000 LNkvXXu0mjfBlTdB diff --git a/Littlest/Resources/Icon.png b/Littlest/Resources/Icon.png deleted file mode 100644 index def898328621934d3bdb81958d285dc74c3606c2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9327 zcmV-#B#_&QP)Oz@Z0f2-7z;ux~O9+4z06=<WDR*FRcSTFz- zW=q650N5=6FiBTtNC2?60Km==3$g$R3;-}uh=nNt1bYBr$Ri_o0EC$U6h`t_Jn<{8 z5a%iY0C<_QJh>z}MS)ugEpZ1|S1ukX&Pf+56gFW3VVXcL!g-k)GJ!M?;PcD?0HBc- z5#WRK{dmp}uFlRjj{U%*%WZ25jX z{P*?XzTzZ-GF^d31o+^>%=Ap99M6&ogks$0k4OBs3;+Bb(;~!4V!2o<6ys46agIcq z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- CFBundleExecutable - ${EXECUTABLE_NAME} - CFBundleIconFile - - CFBundleIdentifier - com.CompanyName.${PRODUCT_NAME:rfc1034identifier} - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - ${PRODUCT_NAME} - CFBundlePackageType - APPL - CFBundleSignature - ???? - CFBundleVersion - 1.0 - Icon files - - Icon.png - Icon@2x.png - Icon-72.png - Icon-Small-50.png - Icon-Small.png - Icon-Small@2x.png - - LSRequiresIPhoneOS - - UIPrerenderedIcon - - UIRequiredDeviceCapabilities - - accelerometer - - opengles-1 - - - UIStatusBarHidden - - UISupportedInterfaceOrientations - - UIInterfaceOrientationPortrait - UIInterfaceOrientationPortraitUpsideDown - UIInterfaceOrientationLandscapeLeft - UIInterfaceOrientationLandscapeRight - - - diff --git a/Littlest/Resources/blocks.png b/Littlest/Resources/blocks.png deleted file mode 100755 index c409b3bbbd46d62e1fbdaf565af7f60cfefe0dc5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2001 zcmV;?2QK)DP)OpNUS z00$*WL_t(|ob8%zOk39($A2aUVhRG{NOe3lMjet{Qi+?8^uu7mA1F(tDOk#)Y?Uf* z)+(y1PNi?^%QnSmnpSDjWcJck(OS$Vt*x?YcD@jisB%)14^0?G3aDtnaF85UVK559 zFjTw`H`g&3e9v`k-*)sbS-L*=oacG&|D5xj=Q-z?`upEbVj!;m@=+tzV+L?KtyEQ& z7gh1yyQ_?k#{jTet(2D+SO4njDzR8hA)u zii*N2-Uep%p|o@tWo5f4DJd)i>+8ylTU%Q%s2)+I2r!wTq{LKk0#sdJ6_gllfYI3T z1emp}Yz?pXGB3aUApjj62l4xVk~gC^<2j!z>w9bE!#HgRX|6wp(ad|^UStU+eBLK0bJHqXB z6QK6K!(l~|_55(BLF5fBdFW@KarfX>e5jQO9A?(P7f_zQJ) zC>GK`cxHYge*}2FN{>4nR(!r^v(}xSp1U^!28vF=@_(0fx6yQh>CR6Lc(OrV9t-IV zw?ld&B+~mJKtQ_l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~9j8LOm`|%-xOBA`4SB zK&Iy9U9bs1%IBgmBSWF4zqovNZ8^4va)%-o8K=S+`7m{nZR5o{1a=0VT` zwMl-;X~@~hZYhLe>5MEas}QGS5)d?1&Qq3c>zL!Y0KJP=$V#7&eb8Yp9CfZJD|0O^ zFPEBrCQVK^3YF&eV%mhY1Ngf&UE}m2Fdb_zAqCOzud}l=`m%|qi;C+~&|C#W`{U2M z$UX+jh3JvE+2M>YVP3Oo$^MX?KzgHD9DbsE$?p9cy6XT zn4AABz~LTa_9SgkD3l2l;Cn|0_Y?uT9YjDwLL-KxnRU-5C^oT>iy`pbxUsA{wXNA@X^AC_nh~^ z?}6IA6>b7YLm&dpIg2NUWBZuO1cecqNwO=R?wr&yCkE1i=TkPl>r#j1xA(4{$OQ}6 z@Ap*{?}?(}>WcbZw+2pZn>|c3LInxy!}lv?LhwWLlT5UaqGDmMYN)<4#)wvNSUgIf z8|nyX{-GlLM5>|b&S(J^^ztq_5oyo|@bEeb2=KF7k${``Z;ewPClmhlT4h{=A8MWY==Z zU%fGE=?UmfQy}+VVD4L`mfPtlSF-%q;38(?;n!LjqQfO^AqP2w;!>T#u%BTR4-~37 za98g3o%{IQp~*vyuir%URUMf2R0=Q*e~(k@%ZX}g%GD|%@3VMEVtlGJU-?>=Du$7% z#87>$%j?jTD)oSuHvf`di=>Gt>B=rvf diff --git a/Littlest/Resources/iTunesArtwork b/Littlest/Resources/iTunesArtwork deleted file mode 100644 index b1cc056ba575a346e1bfa3baa189c20efbfe496b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 61982 zcmW(+Wn5HW6TTb7l1qog(j^TdQcFp9hk!vSBB9c-OG&772@)bDjg&|&3P`AwgtUZ6 zcW=D=e?Q#cy&vv9XJ*bkGtbO9H{R4(hnj+&0ssJNJzXtx000vo!2mfa@pc^e>ymhb z`RLj`1prEh|1J=a^Oh9=C`=w|YMPpQct7)g>f!B!(9_gJ`1pCdJ$&p60D&`k7Vef7 z8_X(a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Dtq8U$=C9uCg6&+W+Ai)htiak0EUXD49N z1@O*FN%%}g48j+?Qu=h3N^Nu#EeOk4#xia&rZC4L<|-Uufd2J;%N^HN01q(U1o$5S z-T-ikfxkyZf|^0!v-VqozuY_m{${IRo|J=%TCLy@F#b0H0+dC1H{bBc00000NkvXX Hu0mjfpM?{b diff --git a/Littlest/libs/Box2D/Box2D.h b/Littlest/libs/Box2D/Box2D.h deleted file mode 100644 index dc5701f..0000000 --- a/Littlest/libs/Box2D/Box2D.h +++ /dev/null @@ -1,62 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 BOX2D_H -#define BOX2D_H - -/** -\mainpage Box2D API Documentation - -\section intro_sec Getting Started - -For documentation please see http://box2d.org/documentation.html - -For discussion please visit http://box2d.org/forum -*/ - -// These include files constitute the main Box2D API - -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#endif diff --git a/Littlest/libs/Box2D/Collision/Shapes/b2CircleShape.cpp b/Littlest/libs/Box2D/Collision/Shapes/b2CircleShape.cpp deleted file mode 100644 index a950b0b..0000000 --- a/Littlest/libs/Box2D/Collision/Shapes/b2CircleShape.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include - -b2Shape* b2CircleShape::Clone(b2BlockAllocator* allocator) const -{ - void* mem = allocator->Allocate(sizeof(b2CircleShape)); - b2CircleShape* clone = new (mem) b2CircleShape; - *clone = *this; - return clone; -} - -bool b2CircleShape::TestPoint(const b2Transform& transform, const b2Vec2& p) const -{ - b2Vec2 center = transform.position + b2Mul(transform.R, m_p); - b2Vec2 d = p - center; - return b2Dot(d, d) <= m_radius * m_radius; -} - -// Collision Detection in Interactive 3D Environments by Gino van den Bergen -// From Section 3.1.2 -// x = s + a * r -// norm(x) = radius -bool b2CircleShape::RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& transform) const -{ - b2Vec2 position = transform.position + b2Mul(transform.R, m_p); - b2Vec2 s = input.p1 - position; - float32 b = b2Dot(s, s) - m_radius * m_radius; - - // Solve quadratic equation. - b2Vec2 r = input.p2 - input.p1; - float32 c = b2Dot(s, r); - float32 rr = b2Dot(r, r); - float32 sigma = c * c - rr * b; - - // Check for negative discriminant and short segment. - if (sigma < 0.0f || rr < b2_epsilon) - { - return false; - } - - // Find the point of intersection of the line with the circle. - float32 a = -(c + b2Sqrt(sigma)); - - // Is the intersection point on the segment? - if (0.0f <= a && a <= input.maxFraction * rr) - { - a /= rr; - output->fraction = a; - output->normal = s + a * r; - output->normal.Normalize(); - return true; - } - - return false; -} - -void b2CircleShape::ComputeAABB(b2AABB* aabb, const b2Transform& transform) const -{ - b2Vec2 p = transform.position + b2Mul(transform.R, m_p); - aabb->lowerBound.Set(p.x - m_radius, p.y - m_radius); - aabb->upperBound.Set(p.x + m_radius, p.y + m_radius); -} - -void b2CircleShape::ComputeMass(b2MassData* massData, float32 density) const -{ - massData->mass = density * b2_pi * m_radius * m_radius; - massData->center = m_p; - - // inertia about the local origin - massData->I = massData->mass * (0.5f * m_radius * m_radius + b2Dot(m_p, m_p)); -} diff --git a/Littlest/libs/Box2D/Collision/Shapes/b2CircleShape.h b/Littlest/libs/Box2D/Collision/Shapes/b2CircleShape.h deleted file mode 100644 index bb31da8..0000000 --- a/Littlest/libs/Box2D/Collision/Shapes/b2CircleShape.h +++ /dev/null @@ -1,87 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_CIRCLE_SHAPE_H -#define B2_CIRCLE_SHAPE_H - -#include - -/// A circle shape. -class b2CircleShape : public b2Shape -{ -public: - b2CircleShape(); - - /// Implement b2Shape. - b2Shape* Clone(b2BlockAllocator* allocator) const; - - /// Implement b2Shape. - bool TestPoint(const b2Transform& transform, const b2Vec2& p) const; - - /// Implement b2Shape. - bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& transform) const; - - /// @see b2Shape::ComputeAABB - void ComputeAABB(b2AABB* aabb, const b2Transform& transform) const; - - /// @see b2Shape::ComputeMass - void ComputeMass(b2MassData* massData, float32 density) const; - - /// Get the supporting vertex index in the given direction. - int32 GetSupport(const b2Vec2& d) const; - - /// Get the supporting vertex in the given direction. - const b2Vec2& GetSupportVertex(const b2Vec2& d) const; - - /// Get the vertex count. - int32 GetVertexCount() const { return 1; } - - /// Get a vertex by index. Used by b2Distance. - const b2Vec2& GetVertex(int32 index) const; - - /// Position - b2Vec2 m_p; -}; - -inline b2CircleShape::b2CircleShape() -{ - m_type = e_circle; - m_radius = 0.0f; - m_p.SetZero(); -} - -inline int32 b2CircleShape::GetSupport(const b2Vec2 &d) const -{ - B2_NOT_USED(d); - return 0; -} - -inline const b2Vec2& b2CircleShape::GetSupportVertex(const b2Vec2 &d) const -{ - B2_NOT_USED(d); - return m_p; -} - -inline const b2Vec2& b2CircleShape::GetVertex(int32 index) const -{ - B2_NOT_USED(index); - b2Assert(index == 0); - return m_p; -} - -#endif diff --git a/Littlest/libs/Box2D/Collision/Shapes/b2PolygonShape.cpp b/Littlest/libs/Box2D/Collision/Shapes/b2PolygonShape.cpp deleted file mode 100644 index 429e647..0000000 --- a/Littlest/libs/Box2D/Collision/Shapes/b2PolygonShape.cpp +++ /dev/null @@ -1,434 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include - -b2Shape* b2PolygonShape::Clone(b2BlockAllocator* allocator) const -{ - void* mem = allocator->Allocate(sizeof(b2PolygonShape)); - b2PolygonShape* clone = new (mem) b2PolygonShape; - *clone = *this; - return clone; -} - -void b2PolygonShape::SetAsBox(float32 hx, float32 hy) -{ - m_vertexCount = 4; - m_vertices[0].Set(-hx, -hy); - m_vertices[1].Set( hx, -hy); - m_vertices[2].Set( hx, hy); - m_vertices[3].Set(-hx, hy); - m_normals[0].Set(0.0f, -1.0f); - m_normals[1].Set(1.0f, 0.0f); - m_normals[2].Set(0.0f, 1.0f); - m_normals[3].Set(-1.0f, 0.0f); - m_centroid.SetZero(); -} - -void b2PolygonShape::SetAsBox(float32 hx, float32 hy, const b2Vec2& center, float32 angle) -{ - m_vertexCount = 4; - m_vertices[0].Set(-hx, -hy); - m_vertices[1].Set( hx, -hy); - m_vertices[2].Set( hx, hy); - m_vertices[3].Set(-hx, hy); - m_normals[0].Set(0.0f, -1.0f); - m_normals[1].Set(1.0f, 0.0f); - m_normals[2].Set(0.0f, 1.0f); - m_normals[3].Set(-1.0f, 0.0f); - m_centroid = center; - - b2Transform xf; - xf.position = center; - xf.R.Set(angle); - - // Transform vertices and normals. - for (int32 i = 0; i < m_vertexCount; ++i) - { - m_vertices[i] = b2Mul(xf, m_vertices[i]); - m_normals[i] = b2Mul(xf.R, m_normals[i]); - } -} - -void b2PolygonShape::SetAsEdge(const b2Vec2& v1, const b2Vec2& v2) -{ - m_vertexCount = 2; - m_vertices[0] = v1; - m_vertices[1] = v2; - m_centroid = 0.5f * (v1 + v2); - m_normals[0] = b2Cross(v2 - v1, 1.0f); - m_normals[0].Normalize(); - m_normals[1] = -m_normals[0]; -} - -static b2Vec2 ComputeCentroid(const b2Vec2* vs, int32 count) -{ - b2Assert(count >= 2); - - b2Vec2 c; c.Set(0.0f, 0.0f); - float32 area = 0.0f; - - if (count == 2) - { - c = 0.5f * (vs[0] + vs[1]); - return c; - } - - // pRef is the reference point for forming triangles. - // It's location doesn't change the result (except for rounding error). - b2Vec2 pRef(0.0f, 0.0f); -#if 0 - // This code would put the reference point inside the polygon. - for (int32 i = 0; i < count; ++i) - { - pRef += vs[i]; - } - pRef *= 1.0f / count; -#endif - - const float32 inv3 = 1.0f / 3.0f; - - for (int32 i = 0; i < count; ++i) - { - // Triangle vertices. - b2Vec2 p1 = pRef; - b2Vec2 p2 = vs[i]; - b2Vec2 p3 = i + 1 < count ? vs[i+1] : vs[0]; - - b2Vec2 e1 = p2 - p1; - b2Vec2 e2 = p3 - p1; - - float32 D = b2Cross(e1, e2); - - float32 triangleArea = 0.5f * D; - area += triangleArea; - - // Area weighted centroid - c += triangleArea * inv3 * (p1 + p2 + p3); - } - - // Centroid - b2Assert(area > b2_epsilon); - c *= 1.0f / area; - return c; -} - -void b2PolygonShape::Set(const b2Vec2* vertices, int32 count) -{ - b2Assert(2 <= count && count <= b2_maxPolygonVertices); - m_vertexCount = count; - - // Copy vertices. - for (int32 i = 0; i < m_vertexCount; ++i) - { - m_vertices[i] = vertices[i]; - } - - // Compute normals. Ensure the edges have non-zero length. - for (int32 i = 0; i < m_vertexCount; ++i) - { - int32 i1 = i; - int32 i2 = i + 1 < m_vertexCount ? i + 1 : 0; - b2Vec2 edge = m_vertices[i2] - m_vertices[i1]; - b2Assert(edge.LengthSquared() > b2_epsilon * b2_epsilon); - m_normals[i] = b2Cross(edge, 1.0f); - m_normals[i].Normalize(); - } - -#ifdef _DEBUG - // Ensure the polygon is convex and the interior - // is to the left of each edge. - for (int32 i = 0; i < m_vertexCount; ++i) - { - int32 i1 = i; - int32 i2 = i + 1 < m_vertexCount ? i + 1 : 0; - b2Vec2 edge = m_vertices[i2] - m_vertices[i1]; - - for (int32 j = 0; j < m_vertexCount; ++j) - { - // Don't check vertices on the current edge. - if (j == i1 || j == i2) - { - continue; - } - - b2Vec2 r = m_vertices[j] - m_vertices[i1]; - - // Your polygon is non-convex (it has an indentation) or - // has colinear edges. - float32 s = b2Cross(edge, r); - b2Assert(s > 0.0f); - } - } -#endif - - // Compute the polygon centroid. - m_centroid = ComputeCentroid(m_vertices, m_vertexCount); -} - -bool b2PolygonShape::TestPoint(const b2Transform& xf, const b2Vec2& p) const -{ - b2Vec2 pLocal = b2MulT(xf.R, p - xf.position); - - for (int32 i = 0; i < m_vertexCount; ++i) - { - float32 dot = b2Dot(m_normals[i], pLocal - m_vertices[i]); - if (dot > 0.0f) - { - return false; - } - } - - return true; -} - -bool b2PolygonShape::RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& xf) const -{ - // Put the ray into the polygon's frame of reference. - b2Vec2 p1 = b2MulT(xf.R, input.p1 - xf.position); - b2Vec2 p2 = b2MulT(xf.R, input.p2 - xf.position); - b2Vec2 d = p2 - p1; - - if (m_vertexCount == 2) - { - b2Vec2 v1 = m_vertices[0]; - b2Vec2 v2 = m_vertices[1]; - b2Vec2 normal = m_normals[0]; - - // q = p1 + t * d - // dot(normal, q - v1) = 0 - // dot(normal, p1 - v1) + t * dot(normal, d) = 0 - float32 numerator = b2Dot(normal, v1 - p1); - float32 denominator = b2Dot(normal, d); - - if (denominator == 0.0f) - { - return false; - } - - float32 t = numerator / denominator; - if (t < 0.0f || 1.0f < t) - { - return false; - } - - b2Vec2 q = p1 + t * d; - - // q = v1 + s * r - // s = dot(q - v1, r) / dot(r, r) - b2Vec2 r = v2 - v1; - float32 rr = b2Dot(r, r); - if (rr == 0.0f) - { - return false; - } - - float32 s = b2Dot(q - v1, r) / rr; - if (s < 0.0f || 1.0f < s) - { - return false; - } - - output->fraction = t; - if (numerator > 0.0f) - { - output->normal = -normal; - } - else - { - output->normal = normal; - } - return true; - } - else - { - float32 lower = 0.0f, upper = input.maxFraction; - - int32 index = -1; - - for (int32 i = 0; i < m_vertexCount; ++i) - { - // p = p1 + a * d - // dot(normal, p - v) = 0 - // dot(normal, p1 - v) + a * dot(normal, d) = 0 - float32 numerator = b2Dot(m_normals[i], m_vertices[i] - p1); - float32 denominator = b2Dot(m_normals[i], d); - - if (denominator == 0.0f) - { - if (numerator < 0.0f) - { - return false; - } - } - else - { - // Note: we want this predicate without division: - // lower < numerator / denominator, where denominator < 0 - // Since denominator < 0, we have to flip the inequality: - // lower < numerator / denominator <==> denominator * lower > numerator. - if (denominator < 0.0f && numerator < lower * denominator) - { - // Increase lower. - // The segment enters this half-space. - lower = numerator / denominator; - index = i; - } - else if (denominator > 0.0f && numerator < upper * denominator) - { - // Decrease upper. - // The segment exits this half-space. - upper = numerator / denominator; - } - } - - // The use of epsilon here causes the assert on lower to trip - // in some cases. Apparently the use of epsilon was to make edge - // shapes work, but now those are handled separately. - //if (upper < lower - b2_epsilon) - if (upper < lower) - { - return false; - } - } - - b2Assert(0.0f <= lower && lower <= input.maxFraction); - - if (index >= 0) - { - output->fraction = lower; - output->normal = b2Mul(xf.R, m_normals[index]); - return true; - } - } - - return false; -} - -void b2PolygonShape::ComputeAABB(b2AABB* aabb, const b2Transform& xf) const -{ - b2Vec2 lower = b2Mul(xf, m_vertices[0]); - b2Vec2 upper = lower; - - for (int32 i = 1; i < m_vertexCount; ++i) - { - b2Vec2 v = b2Mul(xf, m_vertices[i]); - lower = b2Min(lower, v); - upper = b2Max(upper, v); - } - - b2Vec2 r(m_radius, m_radius); - aabb->lowerBound = lower - r; - aabb->upperBound = upper + r; -} - -void b2PolygonShape::ComputeMass(b2MassData* massData, float32 density) const -{ - // Polygon mass, centroid, and inertia. - // Let rho be the polygon density in mass per unit area. - // Then: - // mass = rho * int(dA) - // centroid.x = (1/mass) * rho * int(x * dA) - // centroid.y = (1/mass) * rho * int(y * dA) - // I = rho * int((x*x + y*y) * dA) - // - // We can compute these integrals by summing all the integrals - // for each triangle of the polygon. To evaluate the integral - // for a single triangle, we make a change of variables to - // the (u,v) coordinates of the triangle: - // x = x0 + e1x * u + e2x * v - // y = y0 + e1y * u + e2y * v - // where 0 <= u && 0 <= v && u + v <= 1. - // - // We integrate u from [0,1-v] and then v from [0,1]. - // We also need to use the Jacobian of the transformation: - // D = cross(e1, e2) - // - // Simplification: triangle centroid = (1/3) * (p1 + p2 + p3) - // - // The rest of the derivation is handled by computer algebra. - - b2Assert(m_vertexCount >= 2); - - // A line segment has zero mass. - if (m_vertexCount == 2) - { - massData->center = 0.5f * (m_vertices[0] + m_vertices[1]); - massData->mass = 0.0f; - massData->I = 0.0f; - return; - } - - b2Vec2 center; center.Set(0.0f, 0.0f); - float32 area = 0.0f; - float32 I = 0.0f; - - // pRef is the reference point for forming triangles. - // It's location doesn't change the result (except for rounding error). - b2Vec2 pRef(0.0f, 0.0f); -#if 0 - // This code would put the reference point inside the polygon. - for (int32 i = 0; i < m_vertexCount; ++i) - { - pRef += m_vertices[i]; - } - pRef *= 1.0f / count; -#endif - - const float32 k_inv3 = 1.0f / 3.0f; - - for (int32 i = 0; i < m_vertexCount; ++i) - { - // Triangle vertices. - b2Vec2 p1 = pRef; - b2Vec2 p2 = m_vertices[i]; - b2Vec2 p3 = i + 1 < m_vertexCount ? m_vertices[i+1] : m_vertices[0]; - - b2Vec2 e1 = p2 - p1; - b2Vec2 e2 = p3 - p1; - - float32 D = b2Cross(e1, e2); - - float32 triangleArea = 0.5f * D; - area += triangleArea; - - // Area weighted centroid - center += triangleArea * k_inv3 * (p1 + p2 + p3); - - float32 px = p1.x, py = p1.y; - float32 ex1 = e1.x, ey1 = e1.y; - float32 ex2 = e2.x, ey2 = e2.y; - - float32 intx2 = k_inv3 * (0.25f * (ex1*ex1 + ex2*ex1 + ex2*ex2) + (px*ex1 + px*ex2)) + 0.5f*px*px; - float32 inty2 = k_inv3 * (0.25f * (ey1*ey1 + ey2*ey1 + ey2*ey2) + (py*ey1 + py*ey2)) + 0.5f*py*py; - - I += D * (intx2 + inty2); - } - - // Total mass - massData->mass = density * area; - - // Center of mass - b2Assert(area > b2_epsilon); - center *= 1.0f / area; - massData->center = center; - - // Inertia tensor relative to the local origin. - massData->I = density * I; -} diff --git a/Littlest/libs/Box2D/Collision/Shapes/b2PolygonShape.h b/Littlest/libs/Box2D/Collision/Shapes/b2PolygonShape.h deleted file mode 100644 index 564d4b0..0000000 --- a/Littlest/libs/Box2D/Collision/Shapes/b2PolygonShape.h +++ /dev/null @@ -1,131 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_POLYGON_SHAPE_H -#define B2_POLYGON_SHAPE_H - -#include - -/// A convex polygon. It is assumed that the interior of the polygon is to -/// the left of each edge. -class b2PolygonShape : public b2Shape -{ -public: - b2PolygonShape(); - - /// Implement b2Shape. - b2Shape* Clone(b2BlockAllocator* allocator) const; - - /// Copy vertices. This assumes the vertices define a convex polygon. - /// It is assumed that the exterior is the the right of each edge. - void Set(const b2Vec2* vertices, int32 vertexCount); - - /// Build vertices to represent an axis-aligned box. - /// @param hx the half-width. - /// @param hy the half-height. - void SetAsBox(float32 hx, float32 hy); - - /// Build vertices to represent an oriented box. - /// @param hx the half-width. - /// @param hy the half-height. - /// @param center the center of the box in local coordinates. - /// @param angle the rotation of the box in local coordinates. - void SetAsBox(float32 hx, float32 hy, const b2Vec2& center, float32 angle); - - /// Set this as a single edge. - void SetAsEdge(const b2Vec2& v1, const b2Vec2& v2); - - /// @see b2Shape::TestPoint - bool TestPoint(const b2Transform& transform, const b2Vec2& p) const; - - /// Implement b2Shape. - bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& transform) const; - - /// @see b2Shape::ComputeAABB - void ComputeAABB(b2AABB* aabb, const b2Transform& transform) const; - - /// @see b2Shape::ComputeMass - void ComputeMass(b2MassData* massData, float32 density) const; - - /// Get the supporting vertex index in the given direction. - int32 GetSupport(const b2Vec2& d) const; - - /// Get the supporting vertex in the given direction. - const b2Vec2& GetSupportVertex(const b2Vec2& d) const; - - /// Get the vertex count. - int32 GetVertexCount() const { return m_vertexCount; } - - /// Get a vertex by index. - const b2Vec2& GetVertex(int32 index) const; - - b2Vec2 m_centroid; - b2Vec2 m_vertices[b2_maxPolygonVertices]; - b2Vec2 m_normals[b2_maxPolygonVertices]; - int32 m_vertexCount; -}; - -inline b2PolygonShape::b2PolygonShape() -{ - m_type = e_polygon; - m_radius = b2_polygonRadius; - m_vertexCount = 0; - m_centroid.SetZero(); -} - -inline int32 b2PolygonShape::GetSupport(const b2Vec2& d) const -{ - int32 bestIndex = 0; - float32 bestValue = b2Dot(m_vertices[0], d); - for (int32 i = 1; i < m_vertexCount; ++i) - { - float32 value = b2Dot(m_vertices[i], d); - if (value > bestValue) - { - bestIndex = i; - bestValue = value; - } - } - - return bestIndex; -} - -inline const b2Vec2& b2PolygonShape::GetSupportVertex(const b2Vec2& d) const -{ - int32 bestIndex = 0; - float32 bestValue = b2Dot(m_vertices[0], d); - for (int32 i = 1; i < m_vertexCount; ++i) - { - float32 value = b2Dot(m_vertices[i], d); - if (value > bestValue) - { - bestIndex = i; - bestValue = value; - } - } - - return m_vertices[bestIndex]; -} - -inline const b2Vec2& b2PolygonShape::GetVertex(int32 index) const -{ - b2Assert(0 <= index && index < m_vertexCount); - return m_vertices[index]; -} - -#endif diff --git a/Littlest/libs/Box2D/Collision/Shapes/b2Shape.h b/Littlest/libs/Box2D/Collision/Shapes/b2Shape.h deleted file mode 100644 index 9082c0e..0000000 --- a/Littlest/libs/Box2D/Collision/Shapes/b2Shape.h +++ /dev/null @@ -1,95 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_SHAPE_H -#define B2_SHAPE_H - -#include -#include -#include - -/// This holds the mass data computed for a shape. -struct b2MassData -{ - /// The mass of the shape, usually in kilograms. - float32 mass; - - /// The position of the shape's centroid relative to the shape's origin. - b2Vec2 center; - - /// The rotational inertia of the shape about the local origin. - float32 I; -}; - -/// A shape is used for collision detection. You can create a shape however you like. -/// Shapes used for simulation in b2World are created automatically when a b2Fixture -/// is created. -class b2Shape -{ -public: - - enum Type - { - e_unknown= -1, - e_circle = 0, - e_polygon = 1, - e_typeCount = 2, - }; - - b2Shape() { m_type = e_unknown; } - virtual ~b2Shape() {} - - /// Clone the concrete shape using the provided allocator. - virtual b2Shape* Clone(b2BlockAllocator* allocator) const = 0; - - /// Get the type of this shape. You can use this to down cast to the concrete shape. - /// @return the shape type. - Type GetType() const; - - /// Test a point for containment in this shape. This only works for convex shapes. - /// @param xf the shape world transform. - /// @param p a point in world coordinates. - virtual bool TestPoint(const b2Transform& xf, const b2Vec2& p) const = 0; - - /// Cast a ray against this shape. - /// @param output the ray-cast results. - /// @param input the ray-cast input parameters. - /// @param transform the transform to be applied to the shape. - virtual bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input, const b2Transform& transform) const = 0; - - /// Given a transform, compute the associated axis aligned bounding box for this shape. - /// @param aabb returns the axis aligned box. - /// @param xf the world transform of the shape. - virtual void ComputeAABB(b2AABB* aabb, const b2Transform& xf) const = 0; - - /// Compute the mass properties of this shape using its dimensions and density. - /// The inertia tensor is computed about the local origin. - /// @param massData returns the mass data for this shape. - /// @param density the density in kilograms per meter squared. - virtual void ComputeMass(b2MassData* massData, float32 density) const = 0; - - Type m_type; - float32 m_radius; -}; - -inline b2Shape::Type b2Shape::GetType() const -{ - return m_type; -} - -#endif diff --git a/Littlest/libs/Box2D/Collision/b2BroadPhase.cpp b/Littlest/libs/Box2D/Collision/b2BroadPhase.cpp deleted file mode 100644 index 12c7967..0000000 --- a/Littlest/libs/Box2D/Collision/b2BroadPhase.cpp +++ /dev/null @@ -1,116 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include - -b2BroadPhase::b2BroadPhase() -{ - m_proxyCount = 0; - - m_pairCapacity = 16; - m_pairCount = 0; - m_pairBuffer = (b2Pair*)b2Alloc(m_pairCapacity * sizeof(b2Pair)); - - m_moveCapacity = 16; - m_moveCount = 0; - m_moveBuffer = (int32*)b2Alloc(m_moveCapacity * sizeof(int32)); -} - -b2BroadPhase::~b2BroadPhase() -{ - b2Free(m_moveBuffer); - b2Free(m_pairBuffer); -} - -int32 b2BroadPhase::CreateProxy(const b2AABB& aabb, void* userData) -{ - int32 proxyId = m_tree.CreateProxy(aabb, userData); - ++m_proxyCount; - BufferMove(proxyId); - return proxyId; -} - -void b2BroadPhase::DestroyProxy(int32 proxyId) -{ - UnBufferMove(proxyId); - --m_proxyCount; - m_tree.DestroyProxy(proxyId); -} - -void b2BroadPhase::MoveProxy(int32 proxyId, const b2AABB& aabb, const b2Vec2& displacement) -{ - bool buffer = m_tree.MoveProxy(proxyId, aabb, displacement); - if (buffer) - { - BufferMove(proxyId); - } -} - -void b2BroadPhase::BufferMove(int32 proxyId) -{ - if (m_moveCount == m_moveCapacity) - { - int32* oldBuffer = m_moveBuffer; - m_moveCapacity *= 2; - m_moveBuffer = (int32*)b2Alloc(m_moveCapacity * sizeof(int32)); - memcpy(m_moveBuffer, oldBuffer, m_moveCount * sizeof(int32)); - b2Free(oldBuffer); - } - - m_moveBuffer[m_moveCount] = proxyId; - ++m_moveCount; -} - -void b2BroadPhase::UnBufferMove(int32 proxyId) -{ - for (int32 i = 0; i < m_moveCount; ++i) - { - if (m_moveBuffer[i] == proxyId) - { - m_moveBuffer[i] = e_nullProxy; - return; - } - } -} - -// This is called from b2DynamicTree::Query when we are gathering pairs. -bool b2BroadPhase::QueryCallback(int32 proxyId) -{ - // A proxy cannot form a pair with itself. - if (proxyId == m_queryProxyId) - { - return true; - } - - // Grow the pair buffer as needed. - if (m_pairCount == m_pairCapacity) - { - b2Pair* oldBuffer = m_pairBuffer; - m_pairCapacity *= 2; - m_pairBuffer = (b2Pair*)b2Alloc(m_pairCapacity * sizeof(b2Pair)); - memcpy(m_pairBuffer, oldBuffer, m_pairCount * sizeof(b2Pair)); - b2Free(oldBuffer); - } - - m_pairBuffer[m_pairCount].proxyIdA = b2Min(proxyId, m_queryProxyId); - m_pairBuffer[m_pairCount].proxyIdB = b2Max(proxyId, m_queryProxyId); - ++m_pairCount; - - return true; -} diff --git a/Littlest/libs/Box2D/Collision/b2BroadPhase.h b/Littlest/libs/Box2D/Collision/b2BroadPhase.h deleted file mode 100644 index bff188e..0000000 --- a/Littlest/libs/Box2D/Collision/b2BroadPhase.h +++ /dev/null @@ -1,229 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_BROAD_PHASE_H -#define B2_BROAD_PHASE_H - -#include -#include -#include -#include - -struct b2Pair -{ - int32 proxyIdA; - int32 proxyIdB; - int32 next; -}; - -/// The broad-phase is used for computing pairs and performing volume queries and ray casts. -/// This broad-phase does not persist pairs. Instead, this reports potentially new pairs. -/// It is up to the client to consume the new pairs and to track subsequent overlap. -class b2BroadPhase -{ -public: - - enum - { - e_nullProxy = -1, - }; - - b2BroadPhase(); - ~b2BroadPhase(); - - /// Create a proxy with an initial AABB. Pairs are not reported until - /// UpdatePairs is called. - int32 CreateProxy(const b2AABB& aabb, void* userData); - - /// Destroy a proxy. It is up to the client to remove any pairs. - void DestroyProxy(int32 proxyId); - - /// Call MoveProxy as many times as you like, then when you are done - /// call UpdatePairs to finalized the proxy pairs (for your time step). - void MoveProxy(int32 proxyId, const b2AABB& aabb, const b2Vec2& displacement); - - /// Get the fat AABB for a proxy. - const b2AABB& GetFatAABB(int32 proxyId) const; - - /// Get user data from a proxy. Returns NULL if the id is invalid. - void* GetUserData(int32 proxyId) const; - - /// Test overlap of fat AABBs. - bool TestOverlap(int32 proxyIdA, int32 proxyIdB) const; - - /// Get the number of proxies. - int32 GetProxyCount() const; - - /// Update the pairs. This results in pair callbacks. This can only add pairs. - template - void UpdatePairs(T* callback); - - /// Query an AABB for overlapping proxies. The callback class - /// is called for each proxy that overlaps the supplied AABB. - template - void Query(T* callback, const b2AABB& aabb) const; - - /// Ray-cast against the proxies in the tree. This relies on the callback - /// to perform a exact ray-cast in the case were the proxy contains a shape. - /// The callback also performs the any collision filtering. This has performance - /// roughly equal to k * log(n), where k is the number of collisions and n is the - /// number of proxies in the tree. - /// @param input the ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). - /// @param callback a callback class that is called for each proxy that is hit by the ray. - template - void RayCast(T* callback, const b2RayCastInput& input) const; - - /// Compute the height of the embedded tree. - int32 ComputeHeight() const; - -private: - - friend class b2DynamicTree; - - void BufferMove(int32 proxyId); - void UnBufferMove(int32 proxyId); - - bool QueryCallback(int32 proxyId); - - b2DynamicTree m_tree; - - int32 m_proxyCount; - - int32* m_moveBuffer; - int32 m_moveCapacity; - int32 m_moveCount; - - b2Pair* m_pairBuffer; - int32 m_pairCapacity; - int32 m_pairCount; - - int32 m_queryProxyId; -}; - -/// This is used to sort pairs. -inline bool b2PairLessThan(const b2Pair& pair1, const b2Pair& pair2) -{ - if (pair1.proxyIdA < pair2.proxyIdA) - { - return true; - } - - if (pair1.proxyIdA == pair2.proxyIdA) - { - return pair1.proxyIdB < pair2.proxyIdB; - } - - return false; -} - -inline void* b2BroadPhase::GetUserData(int32 proxyId) const -{ - return m_tree.GetUserData(proxyId); -} - -inline bool b2BroadPhase::TestOverlap(int32 proxyIdA, int32 proxyIdB) const -{ - const b2AABB& aabbA = m_tree.GetFatAABB(proxyIdA); - const b2AABB& aabbB = m_tree.GetFatAABB(proxyIdB); - return b2TestOverlap(aabbA, aabbB); -} - -inline const b2AABB& b2BroadPhase::GetFatAABB(int32 proxyId) const -{ - return m_tree.GetFatAABB(proxyId); -} - -inline int32 b2BroadPhase::GetProxyCount() const -{ - return m_proxyCount; -} - -inline int32 b2BroadPhase::ComputeHeight() const -{ - return m_tree.ComputeHeight(); -} - -template -void b2BroadPhase::UpdatePairs(T* callback) -{ - // Reset pair buffer - m_pairCount = 0; - - // Perform tree queries for all moving proxies. - for (int32 i = 0; i < m_moveCount; ++i) - { - m_queryProxyId = m_moveBuffer[i]; - if (m_queryProxyId == e_nullProxy) - { - continue; - } - - // We have to query the tree with the fat AABB so that - // we don't fail to create a pair that may touch later. - const b2AABB& fatAABB = m_tree.GetFatAABB(m_queryProxyId); - - // Query tree, create pairs and add them pair buffer. - m_tree.Query(this, fatAABB); - } - - // Reset move buffer - m_moveCount = 0; - - // Sort the pair buffer to expose duplicates. - std::sort(m_pairBuffer, m_pairBuffer + m_pairCount, b2PairLessThan); - - // Send the pairs back to the client. - int32 i = 0; - while (i < m_pairCount) - { - b2Pair* primaryPair = m_pairBuffer + i; - void* userDataA = m_tree.GetUserData(primaryPair->proxyIdA); - void* userDataB = m_tree.GetUserData(primaryPair->proxyIdB); - - callback->AddPair(userDataA, userDataB); - ++i; - - // Skip any duplicate pairs. - while (i < m_pairCount) - { - b2Pair* pair = m_pairBuffer + i; - if (pair->proxyIdA != primaryPair->proxyIdA || pair->proxyIdB != primaryPair->proxyIdB) - { - break; - } - ++i; - } - } - - // Try to keep the tree balanced. - m_tree.Rebalance(4); -} - -template -inline void b2BroadPhase::Query(T* callback, const b2AABB& aabb) const -{ - m_tree.Query(callback, aabb); -} - -template -inline void b2BroadPhase::RayCast(T* callback, const b2RayCastInput& input) const -{ - m_tree.RayCast(callback, input); -} - -#endif diff --git a/Littlest/libs/Box2D/Collision/b2CollideCircle.cpp b/Littlest/libs/Box2D/Collision/b2CollideCircle.cpp deleted file mode 100644 index 6edf89d..0000000 --- a/Littlest/libs/Box2D/Collision/b2CollideCircle.cpp +++ /dev/null @@ -1,154 +0,0 @@ -/* -* Copyright (c) 2007-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include - -void b2CollideCircles( - b2Manifold* manifold, - const b2CircleShape* circleA, const b2Transform& xfA, - const b2CircleShape* circleB, const b2Transform& xfB) -{ - manifold->pointCount = 0; - - b2Vec2 pA = b2Mul(xfA, circleA->m_p); - b2Vec2 pB = b2Mul(xfB, circleB->m_p); - - b2Vec2 d = pB - pA; - float32 distSqr = b2Dot(d, d); - float32 rA = circleA->m_radius, rB = circleB->m_radius; - float32 radius = rA + rB; - if (distSqr > radius * radius) - { - return; - } - - manifold->type = b2Manifold::e_circles; - manifold->localPoint = circleA->m_p; - manifold->localNormal.SetZero(); - manifold->pointCount = 1; - - manifold->points[0].localPoint = circleB->m_p; - manifold->points[0].id.key = 0; -} - -void b2CollidePolygonAndCircle( - b2Manifold* manifold, - const b2PolygonShape* polygonA, const b2Transform& xfA, - const b2CircleShape* circleB, const b2Transform& xfB) -{ - manifold->pointCount = 0; - - // Compute circle position in the frame of the polygon. - b2Vec2 c = b2Mul(xfB, circleB->m_p); - b2Vec2 cLocal = b2MulT(xfA, c); - - // Find the min separating edge. - int32 normalIndex = 0; - float32 separation = -b2_maxFloat; - float32 radius = polygonA->m_radius + circleB->m_radius; - int32 vertexCount = polygonA->m_vertexCount; - const b2Vec2* vertices = polygonA->m_vertices; - const b2Vec2* normals = polygonA->m_normals; - - for (int32 i = 0; i < vertexCount; ++i) - { - float32 s = b2Dot(normals[i], cLocal - vertices[i]); - - if (s > radius) - { - // Early out. - return; - } - - if (s > separation) - { - separation = s; - normalIndex = i; - } - } - - // Vertices that subtend the incident face. - int32 vertIndex1 = normalIndex; - int32 vertIndex2 = vertIndex1 + 1 < vertexCount ? vertIndex1 + 1 : 0; - b2Vec2 v1 = vertices[vertIndex1]; - b2Vec2 v2 = vertices[vertIndex2]; - - // If the center is inside the polygon ... - if (separation < b2_epsilon) - { - manifold->pointCount = 1; - manifold->type = b2Manifold::e_faceA; - manifold->localNormal = normals[normalIndex]; - manifold->localPoint = 0.5f * (v1 + v2); - manifold->points[0].localPoint = circleB->m_p; - manifold->points[0].id.key = 0; - return; - } - - // Compute barycentric coordinates - float32 u1 = b2Dot(cLocal - v1, v2 - v1); - float32 u2 = b2Dot(cLocal - v2, v1 - v2); - if (u1 <= 0.0f) - { - if (b2DistanceSquared(cLocal, v1) > radius * radius) - { - return; - } - - manifold->pointCount = 1; - manifold->type = b2Manifold::e_faceA; - manifold->localNormal = cLocal - v1; - manifold->localNormal.Normalize(); - manifold->localPoint = v1; - manifold->points[0].localPoint = circleB->m_p; - manifold->points[0].id.key = 0; - } - else if (u2 <= 0.0f) - { - if (b2DistanceSquared(cLocal, v2) > radius * radius) - { - return; - } - - manifold->pointCount = 1; - manifold->type = b2Manifold::e_faceA; - manifold->localNormal = cLocal - v2; - manifold->localNormal.Normalize(); - manifold->localPoint = v2; - manifold->points[0].localPoint = circleB->m_p; - manifold->points[0].id.key = 0; - } - else - { - b2Vec2 faceCenter = 0.5f * (v1 + v2); - float32 separation = b2Dot(cLocal - faceCenter, normals[vertIndex1]); - if (separation > radius) - { - return; - } - - manifold->pointCount = 1; - manifold->type = b2Manifold::e_faceA; - manifold->localNormal = normals[vertIndex1]; - manifold->localPoint = faceCenter; - manifold->points[0].localPoint = circleB->m_p; - manifold->points[0].id.key = 0; - } -} diff --git a/Littlest/libs/Box2D/Collision/b2CollidePolygon.cpp b/Littlest/libs/Box2D/Collision/b2CollidePolygon.cpp deleted file mode 100644 index b37b7ba..0000000 --- a/Littlest/libs/Box2D/Collision/b2CollidePolygon.cpp +++ /dev/null @@ -1,306 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include - -// Find the separation between poly1 and poly2 for a give edge normal on poly1. -static float32 b2EdgeSeparation(const b2PolygonShape* poly1, const b2Transform& xf1, int32 edge1, - const b2PolygonShape* poly2, const b2Transform& xf2) -{ - int32 count1 = poly1->m_vertexCount; - const b2Vec2* vertices1 = poly1->m_vertices; - const b2Vec2* normals1 = poly1->m_normals; - - int32 count2 = poly2->m_vertexCount; - const b2Vec2* vertices2 = poly2->m_vertices; - - b2Assert(0 <= edge1 && edge1 < count1); - - // Convert normal from poly1's frame into poly2's frame. - b2Vec2 normal1World = b2Mul(xf1.R, normals1[edge1]); - b2Vec2 normal1 = b2MulT(xf2.R, normal1World); - - // Find support vertex on poly2 for -normal. - int32 index = 0; - float32 minDot = b2_maxFloat; - - for (int32 i = 0; i < count2; ++i) - { - float32 dot = b2Dot(vertices2[i], normal1); - if (dot < minDot) - { - minDot = dot; - index = i; - } - } - - b2Vec2 v1 = b2Mul(xf1, vertices1[edge1]); - b2Vec2 v2 = b2Mul(xf2, vertices2[index]); - float32 separation = b2Dot(v2 - v1, normal1World); - return separation; -} - -// Find the max separation between poly1 and poly2 using edge normals from poly1. -static float32 b2FindMaxSeparation(int32* edgeIndex, - const b2PolygonShape* poly1, const b2Transform& xf1, - const b2PolygonShape* poly2, const b2Transform& xf2) -{ - int32 count1 = poly1->m_vertexCount; - const b2Vec2* normals1 = poly1->m_normals; - - // Vector pointing from the centroid of poly1 to the centroid of poly2. - b2Vec2 d = b2Mul(xf2, poly2->m_centroid) - b2Mul(xf1, poly1->m_centroid); - b2Vec2 dLocal1 = b2MulT(xf1.R, d); - - // Find edge normal on poly1 that has the largest projection onto d. - int32 edge = 0; - float32 maxDot = -b2_maxFloat; - for (int32 i = 0; i < count1; ++i) - { - float32 dot = b2Dot(normals1[i], dLocal1); - if (dot > maxDot) - { - maxDot = dot; - edge = i; - } - } - - // Get the separation for the edge normal. - float32 s = b2EdgeSeparation(poly1, xf1, edge, poly2, xf2); - - // Check the separation for the previous edge normal. - int32 prevEdge = edge - 1 >= 0 ? edge - 1 : count1 - 1; - float32 sPrev = b2EdgeSeparation(poly1, xf1, prevEdge, poly2, xf2); - - // Check the separation for the next edge normal. - int32 nextEdge = edge + 1 < count1 ? edge + 1 : 0; - float32 sNext = b2EdgeSeparation(poly1, xf1, nextEdge, poly2, xf2); - - // Find the best edge and the search direction. - int32 bestEdge; - float32 bestSeparation; - int32 increment; - if (sPrev > s && sPrev > sNext) - { - increment = -1; - bestEdge = prevEdge; - bestSeparation = sPrev; - } - else if (sNext > s) - { - increment = 1; - bestEdge = nextEdge; - bestSeparation = sNext; - } - else - { - *edgeIndex = edge; - return s; - } - - // Perform a local search for the best edge normal. - for ( ; ; ) - { - if (increment == -1) - edge = bestEdge - 1 >= 0 ? bestEdge - 1 : count1 - 1; - else - edge = bestEdge + 1 < count1 ? bestEdge + 1 : 0; - - s = b2EdgeSeparation(poly1, xf1, edge, poly2, xf2); - - if (s > bestSeparation) - { - bestEdge = edge; - bestSeparation = s; - } - else - { - break; - } - } - - *edgeIndex = bestEdge; - return bestSeparation; -} - -static void b2FindIncidentEdge(b2ClipVertex c[2], - const b2PolygonShape* poly1, const b2Transform& xf1, int32 edge1, - const b2PolygonShape* poly2, const b2Transform& xf2) -{ - int32 count1 = poly1->m_vertexCount; - const b2Vec2* normals1 = poly1->m_normals; - - int32 count2 = poly2->m_vertexCount; - const b2Vec2* vertices2 = poly2->m_vertices; - const b2Vec2* normals2 = poly2->m_normals; - - b2Assert(0 <= edge1 && edge1 < count1); - - // Get the normal of the reference edge in poly2's frame. - b2Vec2 normal1 = b2MulT(xf2.R, b2Mul(xf1.R, normals1[edge1])); - - // Find the incident edge on poly2. - int32 index = 0; - float32 minDot = b2_maxFloat; - for (int32 i = 0; i < count2; ++i) - { - float32 dot = b2Dot(normal1, normals2[i]); - if (dot < minDot) - { - minDot = dot; - index = i; - } - } - - // Build the clip vertices for the incident edge. - int32 i1 = index; - int32 i2 = i1 + 1 < count2 ? i1 + 1 : 0; - - c[0].v = b2Mul(xf2, vertices2[i1]); - c[0].id.features.referenceEdge = (uint8)edge1; - c[0].id.features.incidentEdge = (uint8)i1; - c[0].id.features.incidentVertex = 0; - - c[1].v = b2Mul(xf2, vertices2[i2]); - c[1].id.features.referenceEdge = (uint8)edge1; - c[1].id.features.incidentEdge = (uint8)i2; - c[1].id.features.incidentVertex = 1; -} - -// Find edge normal of max separation on A - return if separating axis is found -// Find edge normal of max separation on B - return if separation axis is found -// Choose reference edge as min(minA, minB) -// Find incident edge -// Clip - -// The normal points from 1 to 2 -void b2CollidePolygons(b2Manifold* manifold, - const b2PolygonShape* polyA, const b2Transform& xfA, - const b2PolygonShape* polyB, const b2Transform& xfB) -{ - manifold->pointCount = 0; - float32 totalRadius = polyA->m_radius + polyB->m_radius; - - int32 edgeA = 0; - float32 separationA = b2FindMaxSeparation(&edgeA, polyA, xfA, polyB, xfB); - if (separationA > totalRadius) - return; - - int32 edgeB = 0; - float32 separationB = b2FindMaxSeparation(&edgeB, polyB, xfB, polyA, xfA); - if (separationB > totalRadius) - return; - - const b2PolygonShape* poly1; // reference polygon - const b2PolygonShape* poly2; // incident polygon - b2Transform xf1, xf2; - int32 edge1; // reference edge - uint8 flip; - const float32 k_relativeTol = 0.98f; - const float32 k_absoluteTol = 0.001f; - - if (separationB > k_relativeTol * separationA + k_absoluteTol) - { - poly1 = polyB; - poly2 = polyA; - xf1 = xfB; - xf2 = xfA; - edge1 = edgeB; - manifold->type = b2Manifold::e_faceB; - flip = 1; - } - else - { - poly1 = polyA; - poly2 = polyB; - xf1 = xfA; - xf2 = xfB; - edge1 = edgeA; - manifold->type = b2Manifold::e_faceA; - flip = 0; - } - - b2ClipVertex incidentEdge[2]; - b2FindIncidentEdge(incidentEdge, poly1, xf1, edge1, poly2, xf2); - - int32 count1 = poly1->m_vertexCount; - const b2Vec2* vertices1 = poly1->m_vertices; - - b2Vec2 v11 = vertices1[edge1]; - b2Vec2 v12 = edge1 + 1 < count1 ? vertices1[edge1+1] : vertices1[0]; - - b2Vec2 localTangent = v12 - v11; - localTangent.Normalize(); - - b2Vec2 localNormal = b2Cross(localTangent, 1.0f); - b2Vec2 planePoint = 0.5f * (v11 + v12); - - b2Vec2 tangent = b2Mul(xf1.R, localTangent); - b2Vec2 normal = b2Cross(tangent, 1.0f); - - v11 = b2Mul(xf1, v11); - v12 = b2Mul(xf1, v12); - - // Face offset. - float32 frontOffset = b2Dot(normal, v11); - - // Side offsets, extended by polytope skin thickness. - float32 sideOffset1 = -b2Dot(tangent, v11) + totalRadius; - float32 sideOffset2 = b2Dot(tangent, v12) + totalRadius; - - // Clip incident edge against extruded edge1 side edges. - b2ClipVertex clipPoints1[2]; - b2ClipVertex clipPoints2[2]; - int np; - - // Clip to box side 1 - np = b2ClipSegmentToLine(clipPoints1, incidentEdge, -tangent, sideOffset1); - - if (np < 2) - return; - - // Clip to negative box side 1 - np = b2ClipSegmentToLine(clipPoints2, clipPoints1, tangent, sideOffset2); - - if (np < 2) - { - return; - } - - // Now clipPoints2 contains the clipped points. - manifold->localNormal = localNormal; - manifold->localPoint = planePoint; - - int32 pointCount = 0; - for (int32 i = 0; i < b2_maxManifoldPoints; ++i) - { - float32 separation = b2Dot(normal, clipPoints2[i].v) - frontOffset; - - if (separation <= totalRadius) - { - b2ManifoldPoint* cp = manifold->points + pointCount; - cp->localPoint = b2MulT(xf2, clipPoints2[i].v); - cp->id = clipPoints2[i].id; - cp->id.features.flip = flip; - ++pointCount; - } - } - - manifold->pointCount = pointCount; -} diff --git a/Littlest/libs/Box2D/Collision/b2Collision.cpp b/Littlest/libs/Box2D/Collision/b2Collision.cpp deleted file mode 100644 index a86c7c5..0000000 --- a/Littlest/libs/Box2D/Collision/b2Collision.cpp +++ /dev/null @@ -1,250 +0,0 @@ -/* -* Copyright (c) 2007-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include - -void b2WorldManifold::Initialize(const b2Manifold* manifold, - const b2Transform& xfA, float32 radiusA, - const b2Transform& xfB, float32 radiusB) -{ - if (manifold->pointCount == 0) - { - return; - } - - switch (manifold->type) - { - case b2Manifold::e_circles: - { - normal.Set(1.0f, 0.0f); - b2Vec2 pointA = b2Mul(xfA, manifold->localPoint); - b2Vec2 pointB = b2Mul(xfB, manifold->points[0].localPoint); - if (b2DistanceSquared(pointA, pointB) > b2_epsilon * b2_epsilon) - { - normal = pointB - pointA; - normal.Normalize(); - } - - b2Vec2 cA = pointA + radiusA * normal; - b2Vec2 cB = pointB - radiusB * normal; - points[0] = 0.5f * (cA + cB); - } - break; - - case b2Manifold::e_faceA: - { - normal = b2Mul(xfA.R, manifold->localNormal); - b2Vec2 planePoint = b2Mul(xfA, manifold->localPoint); - - for (int32 i = 0; i < manifold->pointCount; ++i) - { - b2Vec2 clipPoint = b2Mul(xfB, manifold->points[i].localPoint); - b2Vec2 cA = clipPoint + (radiusA - b2Dot(clipPoint - planePoint, normal)) * normal; - b2Vec2 cB = clipPoint - radiusB * normal; - points[i] = 0.5f * (cA + cB); - } - } - break; - - case b2Manifold::e_faceB: - { - normal = b2Mul(xfB.R, manifold->localNormal); - b2Vec2 planePoint = b2Mul(xfB, manifold->localPoint); - - for (int32 i = 0; i < manifold->pointCount; ++i) - { - b2Vec2 clipPoint = b2Mul(xfA, manifold->points[i].localPoint); - b2Vec2 cB = clipPoint + (radiusB - b2Dot(clipPoint - planePoint, normal)) * normal; - b2Vec2 cA = clipPoint - radiusA * normal; - points[i] = 0.5f * (cA + cB); - } - - // Ensure normal points from A to B. - normal = -normal; - } - break; - } -} - -void b2GetPointStates(b2PointState state1[b2_maxManifoldPoints], b2PointState state2[b2_maxManifoldPoints], - const b2Manifold* manifold1, const b2Manifold* manifold2) -{ - for (int32 i = 0; i < b2_maxManifoldPoints; ++i) - { - state1[i] = b2_nullState; - state2[i] = b2_nullState; - } - - // Detect persists and removes. - for (int32 i = 0; i < manifold1->pointCount; ++i) - { - b2ContactID id = manifold1->points[i].id; - - state1[i] = b2_removeState; - - for (int32 j = 0; j < manifold2->pointCount; ++j) - { - if (manifold2->points[j].id.key == id.key) - { - state1[i] = b2_persistState; - break; - } - } - } - - // Detect persists and adds. - for (int32 i = 0; i < manifold2->pointCount; ++i) - { - b2ContactID id = manifold2->points[i].id; - - state2[i] = b2_addState; - - for (int32 j = 0; j < manifold1->pointCount; ++j) - { - if (manifold1->points[j].id.key == id.key) - { - state2[i] = b2_persistState; - break; - } - } - } -} - -// From Real-time Collision Detection, p179. -bool b2AABB::RayCast(b2RayCastOutput* output, const b2RayCastInput& input) const -{ - float32 tmin = -b2_maxFloat; - float32 tmax = b2_maxFloat; - - b2Vec2 p = input.p1; - b2Vec2 d = input.p2 - input.p1; - b2Vec2 absD = b2Abs(d); - - b2Vec2 normal; - - for (int32 i = 0; i < 2; ++i) - { - if (absD(i) < b2_epsilon) - { - // Parallel. - if (p(i) < lowerBound(i) || upperBound(i) < p(i)) - { - return false; - } - } - else - { - float32 inv_d = 1.0f / d(i); - float32 t1 = (lowerBound(i) - p(i)) * inv_d; - float32 t2 = (upperBound(i) - p(i)) * inv_d; - - // Sign of the normal vector. - float32 s = -1.0f; - - if (t1 > t2) - { - b2Swap(t1, t2); - s = 1.0f; - } - - // Push the min up - if (t1 > tmin) - { - normal.SetZero(); - normal(i) = s; - tmin = t1; - } - - // Pull the max down - tmax = b2Min(tmax, t2); - - if (tmin > tmax) - { - return false; - } - } - } - - // Does the ray start inside the box? - // Does the ray intersect beyond the max fraction? - if (tmin < 0.0f || input.maxFraction < tmin) - { - return false; - } - - // Intersection. - output->fraction = tmin; - output->normal = normal; - return true; -} - -// Sutherland-Hodgman clipping. -int32 b2ClipSegmentToLine(b2ClipVertex vOut[2], const b2ClipVertex vIn[2], - const b2Vec2& normal, float32 offset) -{ - // Start with no output points - int32 numOut = 0; - - // Calculate the distance of end points to the line - float32 distance0 = b2Dot(normal, vIn[0].v) - offset; - float32 distance1 = b2Dot(normal, vIn[1].v) - offset; - - // If the points are behind the plane - if (distance0 <= 0.0f) vOut[numOut++] = vIn[0]; - if (distance1 <= 0.0f) vOut[numOut++] = vIn[1]; - - // If the points are on different sides of the plane - if (distance0 * distance1 < 0.0f) - { - // Find intersection point of edge and plane - float32 interp = distance0 / (distance0 - distance1); - vOut[numOut].v = vIn[0].v + interp * (vIn[1].v - vIn[0].v); - if (distance0 > 0.0f) - { - vOut[numOut].id = vIn[0].id; - } - else - { - vOut[numOut].id = vIn[1].id; - } - ++numOut; - } - - return numOut; -} - -bool b2TestOverlap(const b2Shape* shapeA, const b2Shape* shapeB, - const b2Transform& xfA, const b2Transform& xfB) -{ - b2DistanceInput input; - input.proxyA.Set(shapeA); - input.proxyB.Set(shapeB); - input.transformA = xfA; - input.transformB = xfB; - input.useRadii = true; - - b2SimplexCache cache; - cache.count = 0; - - b2DistanceOutput output; - - b2Distance(&output, &cache, &input); - - return output.distance < 10.0f * b2_epsilon; -} diff --git a/Littlest/libs/Box2D/Collision/b2Collision.h b/Littlest/libs/Box2D/Collision/b2Collision.h deleted file mode 100644 index baffdbd..0000000 --- a/Littlest/libs/Box2D/Collision/b2Collision.h +++ /dev/null @@ -1,240 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_COLLISION_H -#define B2_COLLISION_H - -#include -#include - -/// @file -/// Structures and functions used for computing contact points, distance -/// queries, and TOI queries. - -class b2Shape; -class b2CircleShape; -class b2PolygonShape; - -const uint8 b2_nullFeature = UCHAR_MAX; - -/// Contact ids to facilitate warm starting. -union b2ContactID -{ - /// The features that intersect to form the contact point - struct Features - { - uint8 referenceEdge; ///< The edge that defines the outward contact normal. - uint8 incidentEdge; ///< The edge most anti-parallel to the reference edge. - uint8 incidentVertex; ///< The vertex (0 or 1) on the incident edge that was clipped. - uint8 flip; ///< A value of 1 indicates that the reference edge is on shape2. - } features; - uint32 key; ///< Used to quickly compare contact ids. -}; - -/// A manifold point is a contact point belonging to a contact -/// manifold. It holds details related to the geometry and dynamics -/// of the contact points. -/// The local point usage depends on the manifold type: -/// -e_circles: the local center of circleB -/// -e_faceA: the local center of cirlceB or the clip point of polygonB -/// -e_faceB: the clip point of polygonA -/// This structure is stored across time steps, so we keep it small. -/// Note: the impulses are used for internal caching and may not -/// provide reliable contact forces, especially for high speed collisions. -struct b2ManifoldPoint -{ - b2Vec2 localPoint; ///< usage depends on manifold type - float32 normalImpulse; ///< the non-penetration impulse - float32 tangentImpulse; ///< the friction impulse - b2ContactID id; ///< uniquely identifies a contact point between two shapes -}; - -/// A manifold for two touching convex shapes. -/// Box2D supports multiple types of contact: -/// - clip point versus plane with radius -/// - point versus point with radius (circles) -/// The local point usage depends on the manifold type: -/// -e_circles: the local center of circleA -/// -e_faceA: the center of faceA -/// -e_faceB: the center of faceB -/// Similarly the local normal usage: -/// -e_circles: not used -/// -e_faceA: the normal on polygonA -/// -e_faceB: the normal on polygonB -/// We store contacts in this way so that position correction can -/// account for movement, which is critical for continuous physics. -/// All contact scenarios must be expressed in one of these types. -/// This structure is stored across time steps, so we keep it small. -struct b2Manifold -{ - enum Type - { - e_circles, - e_faceA, - e_faceB - }; - - b2ManifoldPoint points[b2_maxManifoldPoints]; ///< the points of contact - b2Vec2 localNormal; ///< not use for Type::e_points - b2Vec2 localPoint; ///< usage depends on manifold type - Type type; - int32 pointCount; ///< the number of manifold points -}; - -/// This is used to compute the current state of a contact manifold. -struct b2WorldManifold -{ - /// Evaluate the manifold with supplied transforms. This assumes - /// modest motion from the original state. This does not change the - /// point count, impulses, etc. The radii must come from the shapes - /// that generated the manifold. - void Initialize(const b2Manifold* manifold, - const b2Transform& xfA, float32 radiusA, - const b2Transform& xfB, float32 radiusB); - - b2Vec2 normal; ///< world vector pointing from A to B - b2Vec2 points[b2_maxManifoldPoints]; ///< world contact point (point of intersection) -}; - -/// This is used for determining the state of contact points. -enum b2PointState -{ - b2_nullState, ///< point does not exist - b2_addState, ///< point was added in the update - b2_persistState, ///< point persisted across the update - b2_removeState ///< point was removed in the update -}; - -/// Compute the point states given two manifolds. The states pertain to the transition from manifold1 -/// to manifold2. So state1 is either persist or remove while state2 is either add or persist. -void b2GetPointStates(b2PointState state1[b2_maxManifoldPoints], b2PointState state2[b2_maxManifoldPoints], - const b2Manifold* manifold1, const b2Manifold* manifold2); - -/// Used for computing contact manifolds. -struct b2ClipVertex -{ - b2Vec2 v; - b2ContactID id; -}; - -/// Ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). -struct b2RayCastInput -{ - b2Vec2 p1, p2; - float32 maxFraction; -}; - -/// Ray-cast output data. The ray hits at p1 + fraction * (p2 - p1), where p1 and p2 -/// come from b2RayCastInput. -struct b2RayCastOutput -{ - b2Vec2 normal; - float32 fraction; -}; - -/// An axis aligned bounding box. -struct b2AABB -{ - /// Verify that the bounds are sorted. - bool IsValid() const; - - /// Get the center of the AABB. - b2Vec2 GetCenter() const - { - return 0.5f * (lowerBound + upperBound); - } - - /// Get the extents of the AABB (half-widths). - b2Vec2 GetExtents() const - { - return 0.5f * (upperBound - lowerBound); - } - - /// Combine two AABBs into this one. - void Combine(const b2AABB& aabb1, const b2AABB& aabb2) - { - lowerBound = b2Min(aabb1.lowerBound, aabb2.lowerBound); - upperBound = b2Max(aabb1.upperBound, aabb2.upperBound); - } - - /// Does this aabb contain the provided AABB. - bool Contains(const b2AABB& aabb) const - { - bool result = true; - result = result && lowerBound.x <= aabb.lowerBound.x; - result = result && lowerBound.y <= aabb.lowerBound.y; - result = result && aabb.upperBound.x <= upperBound.x; - result = result && aabb.upperBound.y <= upperBound.y; - return result; - } - - bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input) const; - - b2Vec2 lowerBound; ///< the lower vertex - b2Vec2 upperBound; ///< the upper vertex -}; - -/// Compute the collision manifold between two circles. -void b2CollideCircles(b2Manifold* manifold, - const b2CircleShape* circle1, const b2Transform& xf1, - const b2CircleShape* circle2, const b2Transform& xf2); - -/// Compute the collision manifold between a polygon and a circle. -void b2CollidePolygonAndCircle(b2Manifold* manifold, - const b2PolygonShape* polygon, const b2Transform& xf1, - const b2CircleShape* circle, const b2Transform& xf2); - -/// Compute the collision manifold between two polygons. -void b2CollidePolygons(b2Manifold* manifold, - const b2PolygonShape* polygon1, const b2Transform& xf1, - const b2PolygonShape* polygon2, const b2Transform& xf2); - -/// Clipping for contact manifolds. -int32 b2ClipSegmentToLine(b2ClipVertex vOut[2], const b2ClipVertex vIn[2], - const b2Vec2& normal, float32 offset); - -/// Determine if two generic shapes overlap. -bool b2TestOverlap(const b2Shape* shapeA, const b2Shape* shapeB, - const b2Transform& xfA, const b2Transform& xfB); - -// ---------------- Inline Functions ------------------------------------------ - -inline bool b2AABB::IsValid() const -{ - b2Vec2 d = upperBound - lowerBound; - bool valid = d.x >= 0.0f && d.y >= 0.0f; - valid = valid && lowerBound.IsValid() && upperBound.IsValid(); - return valid; -} - -inline bool b2TestOverlap(const b2AABB& a, const b2AABB& b) -{ - b2Vec2 d1, d2; - d1 = b.lowerBound - a.upperBound; - d2 = a.lowerBound - b.upperBound; - - if (d1.x > 0.0f || d1.y > 0.0f) - return false; - - if (d2.x > 0.0f || d2.y > 0.0f) - return false; - - return true; -} - -#endif diff --git a/Littlest/libs/Box2D/Collision/b2Distance.cpp b/Littlest/libs/Box2D/Collision/b2Distance.cpp deleted file mode 100644 index 500e13f..0000000 --- a/Littlest/libs/Box2D/Collision/b2Distance.cpp +++ /dev/null @@ -1,571 +0,0 @@ -/* -* Copyright (c) 2007-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include - -// GJK using Voronoi regions (Christer Ericson) and Barycentric coordinates. -int32 b2_gjkCalls, b2_gjkIters, b2_gjkMaxIters; - -void b2DistanceProxy::Set(const b2Shape* shape) -{ - switch (shape->GetType()) - { - case b2Shape::e_circle: - { - const b2CircleShape* circle = (b2CircleShape*)shape; - m_vertices = &circle->m_p; - m_count = 1; - m_radius = circle->m_radius; - } - break; - - case b2Shape::e_polygon: - { - const b2PolygonShape* polygon = (b2PolygonShape*)shape; - m_vertices = polygon->m_vertices; - m_count = polygon->m_vertexCount; - m_radius = polygon->m_radius; - } - break; - - default: - b2Assert(false); - } -} - - -struct b2SimplexVertex -{ - b2Vec2 wA; // support point in proxyA - b2Vec2 wB; // support point in proxyB - b2Vec2 w; // wB - wA - float32 a; // barycentric coordinate for closest point - int32 indexA; // wA index - int32 indexB; // wB index -}; - -struct b2Simplex -{ - void ReadCache( const b2SimplexCache* cache, - const b2DistanceProxy* proxyA, const b2Transform& transformA, - const b2DistanceProxy* proxyB, const b2Transform& transformB) - { - b2Assert(cache->count <= 3); - - // Copy data from cache. - m_count = cache->count; - b2SimplexVertex* vertices = &m_v1; - for (int32 i = 0; i < m_count; ++i) - { - b2SimplexVertex* v = vertices + i; - v->indexA = cache->indexA[i]; - v->indexB = cache->indexB[i]; - b2Vec2 wALocal = proxyA->GetVertex(v->indexA); - b2Vec2 wBLocal = proxyB->GetVertex(v->indexB); - v->wA = b2Mul(transformA, wALocal); - v->wB = b2Mul(transformB, wBLocal); - v->w = v->wB - v->wA; - v->a = 0.0f; - } - - // Compute the new simplex metric, if it is substantially different than - // old metric then flush the simplex. - if (m_count > 1) - { - float32 metric1 = cache->metric; - float32 metric2 = GetMetric(); - if (metric2 < 0.5f * metric1 || 2.0f * metric1 < metric2 || metric2 < b2_epsilon) - { - // Reset the simplex. - m_count = 0; - } - } - - // If the cache is empty or invalid ... - if (m_count == 0) - { - b2SimplexVertex* v = vertices + 0; - v->indexA = 0; - v->indexB = 0; - b2Vec2 wALocal = proxyA->GetVertex(0); - b2Vec2 wBLocal = proxyB->GetVertex(0); - v->wA = b2Mul(transformA, wALocal); - v->wB = b2Mul(transformB, wBLocal); - v->w = v->wB - v->wA; - m_count = 1; - } - } - - void WriteCache(b2SimplexCache* cache) const - { - cache->metric = GetMetric(); - cache->count = uint16(m_count); - const b2SimplexVertex* vertices = &m_v1; - for (int32 i = 0; i < m_count; ++i) - { - cache->indexA[i] = uint8(vertices[i].indexA); - cache->indexB[i] = uint8(vertices[i].indexB); - } - } - - b2Vec2 GetSearchDirection() const - { - switch (m_count) - { - case 1: - return -m_v1.w; - - case 2: - { - b2Vec2 e12 = m_v2.w - m_v1.w; - float32 sgn = b2Cross(e12, -m_v1.w); - if (sgn > 0.0f) - { - // Origin is left of e12. - return b2Cross(1.0f, e12); - } - else - { - // Origin is right of e12. - return b2Cross(e12, 1.0f); - } - } - - default: - b2Assert(false); - return b2Vec2_zero; - } - } - - b2Vec2 GetClosestPoint() const - { - switch (m_count) - { - case 0: - b2Assert(false); - return b2Vec2_zero; - - case 1: - return m_v1.w; - - case 2: - return m_v1.a * m_v1.w + m_v2.a * m_v2.w; - - case 3: - return b2Vec2_zero; - - default: - b2Assert(false); - return b2Vec2_zero; - } - } - - void GetWitnessPoints(b2Vec2* pA, b2Vec2* pB) const - { - switch (m_count) - { - case 0: - b2Assert(false); - break; - - case 1: - *pA = m_v1.wA; - *pB = m_v1.wB; - break; - - case 2: - *pA = m_v1.a * m_v1.wA + m_v2.a * m_v2.wA; - *pB = m_v1.a * m_v1.wB + m_v2.a * m_v2.wB; - break; - - case 3: - *pA = m_v1.a * m_v1.wA + m_v2.a * m_v2.wA + m_v3.a * m_v3.wA; - *pB = *pA; - break; - - default: - b2Assert(false); - break; - } - } - - float32 GetMetric() const - { - switch (m_count) - { - case 0: - b2Assert(false); - return 0.0f; - - case 1: - return 0.0f; - - case 2: - return b2Distance(m_v1.w, m_v2.w); - - case 3: - return b2Cross(m_v2.w - m_v1.w, m_v3.w - m_v1.w); - - default: - b2Assert(false); - return 0.0f; - } - } - - void Solve2(); - void Solve3(); - - b2SimplexVertex m_v1, m_v2, m_v3; - int32 m_count; -}; - - -// Solve a line segment using barycentric coordinates. -// -// p = a1 * w1 + a2 * w2 -// a1 + a2 = 1 -// -// The vector from the origin to the closest point on the line is -// perpendicular to the line. -// e12 = w2 - w1 -// dot(p, e) = 0 -// a1 * dot(w1, e) + a2 * dot(w2, e) = 0 -// -// 2-by-2 linear system -// [1 1 ][a1] = [1] -// [w1.e12 w2.e12][a2] = [0] -// -// Define -// d12_1 = dot(w2, e12) -// d12_2 = -dot(w1, e12) -// d12 = d12_1 + d12_2 -// -// Solution -// a1 = d12_1 / d12 -// a2 = d12_2 / d12 -void b2Simplex::Solve2() -{ - b2Vec2 w1 = m_v1.w; - b2Vec2 w2 = m_v2.w; - b2Vec2 e12 = w2 - w1; - - // w1 region - float32 d12_2 = -b2Dot(w1, e12); - if (d12_2 <= 0.0f) - { - // a2 <= 0, so we clamp it to 0 - m_v1.a = 1.0f; - m_count = 1; - return; - } - - // w2 region - float32 d12_1 = b2Dot(w2, e12); - if (d12_1 <= 0.0f) - { - // a1 <= 0, so we clamp it to 0 - m_v2.a = 1.0f; - m_count = 1; - m_v1 = m_v2; - return; - } - - // Must be in e12 region. - float32 inv_d12 = 1.0f / (d12_1 + d12_2); - m_v1.a = d12_1 * inv_d12; - m_v2.a = d12_2 * inv_d12; - m_count = 2; -} - -// Possible regions: -// - points[2] -// - edge points[0]-points[2] -// - edge points[1]-points[2] -// - inside the triangle -void b2Simplex::Solve3() -{ - b2Vec2 w1 = m_v1.w; - b2Vec2 w2 = m_v2.w; - b2Vec2 w3 = m_v3.w; - - // Edge12 - // [1 1 ][a1] = [1] - // [w1.e12 w2.e12][a2] = [0] - // a3 = 0 - b2Vec2 e12 = w2 - w1; - float32 w1e12 = b2Dot(w1, e12); - float32 w2e12 = b2Dot(w2, e12); - float32 d12_1 = w2e12; - float32 d12_2 = -w1e12; - - // Edge13 - // [1 1 ][a1] = [1] - // [w1.e13 w3.e13][a3] = [0] - // a2 = 0 - b2Vec2 e13 = w3 - w1; - float32 w1e13 = b2Dot(w1, e13); - float32 w3e13 = b2Dot(w3, e13); - float32 d13_1 = w3e13; - float32 d13_2 = -w1e13; - - // Edge23 - // [1 1 ][a2] = [1] - // [w2.e23 w3.e23][a3] = [0] - // a1 = 0 - b2Vec2 e23 = w3 - w2; - float32 w2e23 = b2Dot(w2, e23); - float32 w3e23 = b2Dot(w3, e23); - float32 d23_1 = w3e23; - float32 d23_2 = -w2e23; - - // Triangle123 - float32 n123 = b2Cross(e12, e13); - - float32 d123_1 = n123 * b2Cross(w2, w3); - float32 d123_2 = n123 * b2Cross(w3, w1); - float32 d123_3 = n123 * b2Cross(w1, w2); - - // w1 region - if (d12_2 <= 0.0f && d13_2 <= 0.0f) - { - m_v1.a = 1.0f; - m_count = 1; - return; - } - - // e12 - if (d12_1 > 0.0f && d12_2 > 0.0f && d123_3 <= 0.0f) - { - float32 inv_d12 = 1.0f / (d12_1 + d12_2); - m_v1.a = d12_1 * inv_d12; - m_v2.a = d12_2 * inv_d12; - m_count = 2; - return; - } - - // e13 - if (d13_1 > 0.0f && d13_2 > 0.0f && d123_2 <= 0.0f) - { - float32 inv_d13 = 1.0f / (d13_1 + d13_2); - m_v1.a = d13_1 * inv_d13; - m_v3.a = d13_2 * inv_d13; - m_count = 2; - m_v2 = m_v3; - return; - } - - // w2 region - if (d12_1 <= 0.0f && d23_2 <= 0.0f) - { - m_v2.a = 1.0f; - m_count = 1; - m_v1 = m_v2; - return; - } - - // w3 region - if (d13_1 <= 0.0f && d23_1 <= 0.0f) - { - m_v3.a = 1.0f; - m_count = 1; - m_v1 = m_v3; - return; - } - - // e23 - if (d23_1 > 0.0f && d23_2 > 0.0f && d123_1 <= 0.0f) - { - float32 inv_d23 = 1.0f / (d23_1 + d23_2); - m_v2.a = d23_1 * inv_d23; - m_v3.a = d23_2 * inv_d23; - m_count = 2; - m_v1 = m_v3; - return; - } - - // Must be in triangle123 - float32 inv_d123 = 1.0f / (d123_1 + d123_2 + d123_3); - m_v1.a = d123_1 * inv_d123; - m_v2.a = d123_2 * inv_d123; - m_v3.a = d123_3 * inv_d123; - m_count = 3; -} - -void b2Distance(b2DistanceOutput* output, - b2SimplexCache* cache, - const b2DistanceInput* input) -{ - ++b2_gjkCalls; - - const b2DistanceProxy* proxyA = &input->proxyA; - const b2DistanceProxy* proxyB = &input->proxyB; - - b2Transform transformA = input->transformA; - b2Transform transformB = input->transformB; - - // Initialize the simplex. - b2Simplex simplex; - simplex.ReadCache(cache, proxyA, transformA, proxyB, transformB); - - // Get simplex vertices as an array. - b2SimplexVertex* vertices = &simplex.m_v1; - const int32 k_maxIters = 20; - - // These store the vertices of the last simplex so that we - // can check for duplicates and prevent cycling. - int32 saveA[3], saveB[3]; - int32 saveCount = 0; - - b2Vec2 closestPoint = simplex.GetClosestPoint(); - float32 distanceSqr1 = closestPoint.LengthSquared(); - float32 distanceSqr2 = distanceSqr1; - - // Main iteration loop. - int32 iter = 0; - while (iter < k_maxIters) - { - // Copy simplex so we can identify duplicates. - saveCount = simplex.m_count; - for (int32 i = 0; i < saveCount; ++i) - { - saveA[i] = vertices[i].indexA; - saveB[i] = vertices[i].indexB; - } - - switch (simplex.m_count) - { - case 1: - break; - - case 2: - simplex.Solve2(); - break; - - case 3: - simplex.Solve3(); - break; - - default: - b2Assert(false); - } - - // If we have 3 points, then the origin is in the corresponding triangle. - if (simplex.m_count == 3) - { - break; - } - - // Compute closest point. - b2Vec2 p = simplex.GetClosestPoint(); - distanceSqr2 = p.LengthSquared(); - - // Ensure progress - if (distanceSqr2 >= distanceSqr1) - { - //break; - } - distanceSqr1 = distanceSqr2; - - // Get search direction. - b2Vec2 d = simplex.GetSearchDirection(); - - // Ensure the search direction is numerically fit. - if (d.LengthSquared() < b2_epsilon * b2_epsilon) - { - // The origin is probably contained by a line segment - // or triangle. Thus the shapes are overlapped. - - // We can't return zero here even though there may be overlap. - // In case the simplex is a point, segment, or triangle it is difficult - // to determine if the origin is contained in the CSO or very close to it. - break; - } - - // Compute a tentative new simplex vertex using support points. - b2SimplexVertex* vertex = vertices + simplex.m_count; - vertex->indexA = proxyA->GetSupport(b2MulT(transformA.R, -d)); - vertex->wA = b2Mul(transformA, proxyA->GetVertex(vertex->indexA)); - b2Vec2 wBLocal; - vertex->indexB = proxyB->GetSupport(b2MulT(transformB.R, d)); - vertex->wB = b2Mul(transformB, proxyB->GetVertex(vertex->indexB)); - vertex->w = vertex->wB - vertex->wA; - - // Iteration count is equated to the number of support point calls. - ++iter; - ++b2_gjkIters; - - // Check for duplicate support points. This is the main termination criteria. - bool duplicate = false; - for (int32 i = 0; i < saveCount; ++i) - { - if (vertex->indexA == saveA[i] && vertex->indexB == saveB[i]) - { - duplicate = true; - break; - } - } - - // If we found a duplicate support point we must exit to avoid cycling. - if (duplicate) - { - break; - } - - // New vertex is ok and needed. - ++simplex.m_count; - } - - b2_gjkMaxIters = b2Max(b2_gjkMaxIters, iter); - - // Prepare output. - simplex.GetWitnessPoints(&output->pointA, &output->pointB); - output->distance = b2Distance(output->pointA, output->pointB); - output->iterations = iter; - - // Cache the simplex. - simplex.WriteCache(cache); - - // Apply radii if requested. - if (input->useRadii) - { - float32 rA = proxyA->m_radius; - float32 rB = proxyB->m_radius; - - if (output->distance > rA + rB && output->distance > b2_epsilon) - { - // Shapes are still no overlapped. - // Move the witness points to the outer surface. - output->distance -= rA + rB; - b2Vec2 normal = output->pointB - output->pointA; - normal.Normalize(); - output->pointA += rA * normal; - output->pointB -= rB * normal; - } - else - { - // Shapes are overlapped when radii are considered. - // Move the witness points to the middle. - b2Vec2 p = 0.5f * (output->pointA + output->pointB); - output->pointA = p; - output->pointB = p; - output->distance = 0.0f; - } - } -} diff --git a/Littlest/libs/Box2D/Collision/b2Distance.h b/Littlest/libs/Box2D/Collision/b2Distance.h deleted file mode 100644 index e56ea0a..0000000 --- a/Littlest/libs/Box2D/Collision/b2Distance.h +++ /dev/null @@ -1,141 +0,0 @@ - -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_DISTANCE_H -#define B2_DISTANCE_H - -#include -#include - -class b2Shape; - -/// A distance proxy is used by the GJK algorithm. -/// It encapsulates any shape. -struct b2DistanceProxy -{ - b2DistanceProxy() : m_vertices(NULL), m_count(0), m_radius(0.0f) {} - - /// Initialize the proxy using the given shape. The shape - /// must remain in scope while the proxy is in use. - void Set(const b2Shape* shape); - - /// Get the supporting vertex index in the given direction. - int32 GetSupport(const b2Vec2& d) const; - - /// Get the supporting vertex in the given direction. - const b2Vec2& GetSupportVertex(const b2Vec2& d) const; - - /// Get the vertex count. - int32 GetVertexCount() const; - - /// Get a vertex by index. Used by b2Distance. - const b2Vec2& GetVertex(int32 index) const; - - const b2Vec2* m_vertices; - int32 m_count; - float32 m_radius; -}; - -/// Used to warm start b2Distance. -/// Set count to zero on first call. -struct b2SimplexCache -{ - float32 metric; ///< length or area - uint16 count; - uint8 indexA[3]; ///< vertices on shape A - uint8 indexB[3]; ///< vertices on shape B -}; - -/// Input for b2Distance. -/// You have to option to use the shape radii -/// in the computation. Even -struct b2DistanceInput -{ - b2DistanceProxy proxyA; - b2DistanceProxy proxyB; - b2Transform transformA; - b2Transform transformB; - bool useRadii; -}; - -/// Output for b2Distance. -struct b2DistanceOutput -{ - b2Vec2 pointA; ///< closest point on shapeA - b2Vec2 pointB; ///< closest point on shapeB - float32 distance; - int32 iterations; ///< number of GJK iterations used -}; - -/// Compute the closest points between two shapes. Supports any combination of: -/// b2CircleShape, b2PolygonShape, b2EdgeShape. The simplex cache is input/output. -/// On the first call set b2SimplexCache.count to zero. -void b2Distance(b2DistanceOutput* output, - b2SimplexCache* cache, - const b2DistanceInput* input); - - -////////////////////////////////////////////////////////////////////////// - -inline int32 b2DistanceProxy::GetVertexCount() const -{ - return m_count; -} - -inline const b2Vec2& b2DistanceProxy::GetVertex(int32 index) const -{ - b2Assert(0 <= index && index < m_count); - return m_vertices[index]; -} - -inline int32 b2DistanceProxy::GetSupport(const b2Vec2& d) const -{ - int32 bestIndex = 0; - float32 bestValue = b2Dot(m_vertices[0], d); - for (int32 i = 1; i < m_count; ++i) - { - float32 value = b2Dot(m_vertices[i], d); - if (value > bestValue) - { - bestIndex = i; - bestValue = value; - } - } - - return bestIndex; -} - -inline const b2Vec2& b2DistanceProxy::GetSupportVertex(const b2Vec2& d) const -{ - int32 bestIndex = 0; - float32 bestValue = b2Dot(m_vertices[0], d); - for (int32 i = 1; i < m_count; ++i) - { - float32 value = b2Dot(m_vertices[i], d); - if (value > bestValue) - { - bestIndex = i; - bestValue = value; - } - } - - return m_vertices[bestIndex]; -} - -#endif diff --git a/Littlest/libs/Box2D/Collision/b2DynamicTree.cpp b/Littlest/libs/Box2D/Collision/b2DynamicTree.cpp deleted file mode 100644 index d8a05eb..0000000 --- a/Littlest/libs/Box2D/Collision/b2DynamicTree.cpp +++ /dev/null @@ -1,365 +0,0 @@ -/* -* Copyright (c) 2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include - -b2DynamicTree::b2DynamicTree() -{ - m_root = b2_nullNode; - - m_nodeCapacity = 16; - m_nodeCount = 0; - m_nodes = (b2DynamicTreeNode*)b2Alloc(m_nodeCapacity * sizeof(b2DynamicTreeNode)); - memset(m_nodes, 0, m_nodeCapacity * sizeof(b2DynamicTreeNode)); - - // Build a linked list for the free list. - for (int32 i = 0; i < m_nodeCapacity - 1; ++i) - { - m_nodes[i].next = i + 1; - } - m_nodes[m_nodeCapacity-1].next = b2_nullNode; - m_freeList = 0; - - m_path = 0; - - m_insertionCount = 0; -} - -b2DynamicTree::~b2DynamicTree() -{ - // This frees the entire tree in one shot. - b2Free(m_nodes); -} - -// Allocate a node from the pool. Grow the pool if necessary. -int32 b2DynamicTree::AllocateNode() -{ - // Expand the node pool as needed. - if (m_freeList == b2_nullNode) - { - b2Assert(m_nodeCount == m_nodeCapacity); - - // The free list is empty. Rebuild a bigger pool. - b2DynamicTreeNode* oldNodes = m_nodes; - m_nodeCapacity *= 2; - m_nodes = (b2DynamicTreeNode*)b2Alloc(m_nodeCapacity * sizeof(b2DynamicTreeNode)); - memcpy(m_nodes, oldNodes, m_nodeCount * sizeof(b2DynamicTreeNode)); - b2Free(oldNodes); - - // Build a linked list for the free list. The parent - // pointer becomes the "next" pointer. - for (int32 i = m_nodeCount; i < m_nodeCapacity - 1; ++i) - { - m_nodes[i].next = i + 1; - } - m_nodes[m_nodeCapacity-1].next = b2_nullNode; - m_freeList = m_nodeCount; - } - - // Peel a node off the free list. - int32 nodeId = m_freeList; - m_freeList = m_nodes[nodeId].next; - m_nodes[nodeId].parent = b2_nullNode; - m_nodes[nodeId].child1 = b2_nullNode; - m_nodes[nodeId].child2 = b2_nullNode; - ++m_nodeCount; - return nodeId; -} - -// Return a node to the pool. -void b2DynamicTree::FreeNode(int32 nodeId) -{ - b2Assert(0 <= nodeId && nodeId < m_nodeCapacity); - b2Assert(0 < m_nodeCount); - m_nodes[nodeId].next = m_freeList; - m_freeList = nodeId; - --m_nodeCount; -} - -// Create a proxy in the tree as a leaf node. We return the index -// of the node instead of a pointer so that we can grow -// the node pool. -int32 b2DynamicTree::CreateProxy(const b2AABB& aabb, void* userData) -{ - int32 proxyId = AllocateNode(); - - // Fatten the aabb. - b2Vec2 r(b2_aabbExtension, b2_aabbExtension); - m_nodes[proxyId].aabb.lowerBound = aabb.lowerBound - r; - m_nodes[proxyId].aabb.upperBound = aabb.upperBound + r; - m_nodes[proxyId].userData = userData; - - InsertLeaf(proxyId); - - // Rebalance if necessary. - int32 iterationCount = m_nodeCount >> 4; - int32 tryCount = 0; - int32 height = ComputeHeight(); - while (height > 64 && tryCount < 10) - { - Rebalance(iterationCount); - height = ComputeHeight(); - ++tryCount; - } - - return proxyId; -} - -void b2DynamicTree::DestroyProxy(int32 proxyId) -{ - b2Assert(0 <= proxyId && proxyId < m_nodeCapacity); - b2Assert(m_nodes[proxyId].IsLeaf()); - - RemoveLeaf(proxyId); - FreeNode(proxyId); -} - -bool b2DynamicTree::MoveProxy(int32 proxyId, const b2AABB& aabb, const b2Vec2& displacement) -{ - b2Assert(0 <= proxyId && proxyId < m_nodeCapacity); - - b2Assert(m_nodes[proxyId].IsLeaf()); - - if (m_nodes[proxyId].aabb.Contains(aabb)) - { - return false; - } - - RemoveLeaf(proxyId); - - // Extend AABB. - b2AABB b = aabb; - b2Vec2 r(b2_aabbExtension, b2_aabbExtension); - b.lowerBound = b.lowerBound - r; - b.upperBound = b.upperBound + r; - - // Predict AABB displacement. - b2Vec2 d = b2_aabbMultiplier * displacement; - - if (d.x < 0.0f) - { - b.lowerBound.x += d.x; - } - else - { - b.upperBound.x += d.x; - } - - if (d.y < 0.0f) - { - b.lowerBound.y += d.y; - } - else - { - b.upperBound.y += d.y; - } - - m_nodes[proxyId].aabb = b; - - InsertLeaf(proxyId); - return true; -} - -void b2DynamicTree::InsertLeaf(int32 leaf) -{ - ++m_insertionCount; - - if (m_root == b2_nullNode) - { - m_root = leaf; - m_nodes[m_root].parent = b2_nullNode; - return; - } - - // Find the best sibling for this node. - b2Vec2 center = m_nodes[leaf].aabb.GetCenter(); - int32 sibling = m_root; - if (m_nodes[sibling].IsLeaf() == false) - { - do - { - int32 child1 = m_nodes[sibling].child1; - int32 child2 = m_nodes[sibling].child2; - - b2Vec2 delta1 = b2Abs(m_nodes[child1].aabb.GetCenter() - center); - b2Vec2 delta2 = b2Abs(m_nodes[child2].aabb.GetCenter() - center); - - float32 norm1 = delta1.x + delta1.y; - float32 norm2 = delta2.x + delta2.y; - - if (norm1 < norm2) - { - sibling = child1; - } - else - { - sibling = child2; - } - - } - while(m_nodes[sibling].IsLeaf() == false); - } - - // Create a parent for the siblings. - int32 node1 = m_nodes[sibling].parent; - int32 node2 = AllocateNode(); - m_nodes[node2].parent = node1; - m_nodes[node2].userData = NULL; - m_nodes[node2].aabb.Combine(m_nodes[leaf].aabb, m_nodes[sibling].aabb); - - if (node1 != b2_nullNode) - { - if (m_nodes[m_nodes[sibling].parent].child1 == sibling) - { - m_nodes[node1].child1 = node2; - } - else - { - m_nodes[node1].child2 = node2; - } - - m_nodes[node2].child1 = sibling; - m_nodes[node2].child2 = leaf; - m_nodes[sibling].parent = node2; - m_nodes[leaf].parent = node2; - - do - { - if (m_nodes[node1].aabb.Contains(m_nodes[node2].aabb)) - { - break; - } - - m_nodes[node1].aabb.Combine(m_nodes[m_nodes[node1].child1].aabb, m_nodes[m_nodes[node1].child2].aabb); - node2 = node1; - node1 = m_nodes[node1].parent; - } - while(node1 != b2_nullNode); - } - else - { - m_nodes[node2].child1 = sibling; - m_nodes[node2].child2 = leaf; - m_nodes[sibling].parent = node2; - m_nodes[leaf].parent = node2; - m_root = node2; - } -} - -void b2DynamicTree::RemoveLeaf(int32 leaf) -{ - if (leaf == m_root) - { - m_root = b2_nullNode; - return; - } - - int32 node2 = m_nodes[leaf].parent; - int32 node1 = m_nodes[node2].parent; - int32 sibling; - if (m_nodes[node2].child1 == leaf) - { - sibling = m_nodes[node2].child2; - } - else - { - sibling = m_nodes[node2].child1; - } - - if (node1 != b2_nullNode) - { - // Destroy node2 and connect node1 to sibling. - if (m_nodes[node1].child1 == node2) - { - m_nodes[node1].child1 = sibling; - } - else - { - m_nodes[node1].child2 = sibling; - } - m_nodes[sibling].parent = node1; - FreeNode(node2); - - // Adjust ancestor bounds. - while (node1 != b2_nullNode) - { - b2AABB oldAABB = m_nodes[node1].aabb; - m_nodes[node1].aabb.Combine(m_nodes[m_nodes[node1].child1].aabb, m_nodes[m_nodes[node1].child2].aabb); - - if (oldAABB.Contains(m_nodes[node1].aabb)) - { - break; - } - - node1 = m_nodes[node1].parent; - } - } - else - { - m_root = sibling; - m_nodes[sibling].parent = b2_nullNode; - FreeNode(node2); - } -} - -void b2DynamicTree::Rebalance(int32 iterations) -{ - if (m_root == b2_nullNode) - { - return; - } - - for (int32 i = 0; i < iterations; ++i) - { - int32 node = m_root; - - uint32 bit = 0; - while (m_nodes[node].IsLeaf() == false) - { - int32* children = &m_nodes[node].child1; - node = children[(m_path >> bit) & 1]; - bit = (bit + 1) & (8* sizeof(uint32) - 1); - } - ++m_path; - - RemoveLeaf(node); - InsertLeaf(node); - } -} - -// Compute the height of a sub-tree. -int32 b2DynamicTree::ComputeHeight(int32 nodeId) const -{ - if (nodeId == b2_nullNode) - { - return 0; - } - - b2Assert(0 <= nodeId && nodeId < m_nodeCapacity); - b2DynamicTreeNode* node = m_nodes + nodeId; - int32 height1 = ComputeHeight(node->child1); - int32 height2 = ComputeHeight(node->child2); - return 1 + b2Max(height1, height2); -} - -int32 b2DynamicTree::ComputeHeight() const -{ - return ComputeHeight(m_root); -} diff --git a/Littlest/libs/Box2D/Collision/b2DynamicTree.h b/Littlest/libs/Box2D/Collision/b2DynamicTree.h deleted file mode 100644 index b67686b..0000000 --- a/Littlest/libs/Box2D/Collision/b2DynamicTree.h +++ /dev/null @@ -1,286 +0,0 @@ -/* -* Copyright (c) 2009 Erin Catto http://www.gphysics.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 B2_DYNAMIC_TREE_H -#define B2_DYNAMIC_TREE_H - -#include - -/// A dynamic AABB tree broad-phase, inspired by Nathanael Presson's btDbvt. - -#define b2_nullNode (-1) - -/// A node in the dynamic tree. The client does not interact with this directly. -struct b2DynamicTreeNode -{ - bool IsLeaf() const - { - return child1 == b2_nullNode; - } - - /// This is the fattened AABB. - b2AABB aabb; - - //int32 userData; - void* userData; - - union - { - int32 parent; - int32 next; - }; - - int32 child1; - int32 child2; -}; - -/// A dynamic tree arranges data in a binary tree to accelerate -/// queries such as volume queries and ray casts. Leafs are proxies -/// with an AABB. In the tree we expand the proxy AABB by b2_fatAABBFactor -/// so that the proxy AABB is bigger than the client object. This allows the client -/// object to move by small amounts without triggering a tree update. -/// -/// Nodes are pooled and relocatable, so we use node indices rather than pointers. -class b2DynamicTree -{ -public: - - /// Constructing the tree initializes the node pool. - b2DynamicTree(); - - /// Destroy the tree, freeing the node pool. - ~b2DynamicTree(); - - /// Create a proxy. Provide a tight fitting AABB and a userData pointer. - int32 CreateProxy(const b2AABB& aabb, void* userData); - - /// Destroy a proxy. This asserts if the id is invalid. - void DestroyProxy(int32 proxyId); - - /// Move a proxy with a swepted AABB. If the proxy has moved outside of its fattened AABB, - /// then the proxy is removed from the tree and re-inserted. Otherwise - /// the function returns immediately. - /// @return true if the proxy was re-inserted. - bool MoveProxy(int32 proxyId, const b2AABB& aabb1, const b2Vec2& displacement); - - /// Perform some iterations to re-balance the tree. - void Rebalance(int32 iterations); - - /// Get proxy user data. - /// @return the proxy user data or 0 if the id is invalid. - void* GetUserData(int32 proxyId) const; - - /// Get the fat AABB for a proxy. - const b2AABB& GetFatAABB(int32 proxyId) const; - - /// Compute the height of the tree. - int32 ComputeHeight() const; - - /// Query an AABB for overlapping proxies. The callback class - /// is called for each proxy that overlaps the supplied AABB. - template - void Query(T* callback, const b2AABB& aabb) const; - - /// Ray-cast against the proxies in the tree. This relies on the callback - /// to perform a exact ray-cast in the case were the proxy contains a shape. - /// The callback also performs the any collision filtering. This has performance - /// roughly equal to k * log(n), where k is the number of collisions and n is the - /// number of proxies in the tree. - /// @param input the ray-cast input data. The ray extends from p1 to p1 + maxFraction * (p2 - p1). - /// @param callback a callback class that is called for each proxy that is hit by the ray. - template - void RayCast(T* callback, const b2RayCastInput& input) const; - -private: - - int32 AllocateNode(); - void FreeNode(int32 node); - - void InsertLeaf(int32 node); - void RemoveLeaf(int32 node); - - int32 ComputeHeight(int32 nodeId) const; - - int32 m_root; - - b2DynamicTreeNode* m_nodes; - int32 m_nodeCount; - int32 m_nodeCapacity; - - int32 m_freeList; - - /// This is used incrementally traverse the tree for re-balancing. - uint32 m_path; - - int32 m_insertionCount; -}; - -inline void* b2DynamicTree::GetUserData(int32 proxyId) const -{ - b2Assert(0 <= proxyId && proxyId < m_nodeCapacity); - return m_nodes[proxyId].userData; -} - -inline const b2AABB& b2DynamicTree::GetFatAABB(int32 proxyId) const -{ - b2Assert(0 <= proxyId && proxyId < m_nodeCapacity); - return m_nodes[proxyId].aabb; -} - -template -inline void b2DynamicTree::Query(T* callback, const b2AABB& aabb) const -{ - const int32 k_stackSize = 128; - int32 stack[k_stackSize]; - - int32 count = 0; - stack[count++] = m_root; - - while (count > 0) - { - int32 nodeId = stack[--count]; - if (nodeId == b2_nullNode) - { - continue; - } - - const b2DynamicTreeNode* node = m_nodes + nodeId; - - if (b2TestOverlap(node->aabb, aabb)) - { - if (node->IsLeaf()) - { - bool proceed = callback->QueryCallback(nodeId); - if (proceed == false) - { - return; - } - } - else - { - if (count < k_stackSize) - { - stack[count++] = node->child1; - } - - if (count < k_stackSize) - { - stack[count++] = node->child2; - } - } - } - } -} - -template -inline void b2DynamicTree::RayCast(T* callback, const b2RayCastInput& input) const -{ - b2Vec2 p1 = input.p1; - b2Vec2 p2 = input.p2; - b2Vec2 r = p2 - p1; - b2Assert(r.LengthSquared() > 0.0f); - r.Normalize(); - - // v is perpendicular to the segment. - b2Vec2 v = b2Cross(1.0f, r); - b2Vec2 abs_v = b2Abs(v); - - // Separating axis for segment (Gino, p80). - // |dot(v, p1 - c)| > dot(|v|, h) - - float32 maxFraction = input.maxFraction; - - // Build a bounding box for the segment. - b2AABB segmentAABB; - { - b2Vec2 t = p1 + maxFraction * (p2 - p1); - segmentAABB.lowerBound = b2Min(p1, t); - segmentAABB.upperBound = b2Max(p1, t); - } - - const int32 k_stackSize = 128; - int32 stack[k_stackSize]; - - int32 count = 0; - stack[count++] = m_root; - - while (count > 0) - { - int32 nodeId = stack[--count]; - if (nodeId == b2_nullNode) - { - continue; - } - - const b2DynamicTreeNode* node = m_nodes + nodeId; - - if (b2TestOverlap(node->aabb, segmentAABB) == false) - { - continue; - } - - // Separating axis for segment (Gino, p80). - // |dot(v, p1 - c)| > dot(|v|, h) - b2Vec2 c = node->aabb.GetCenter(); - b2Vec2 h = node->aabb.GetExtents(); - float32 separation = b2Abs(b2Dot(v, p1 - c)) - b2Dot(abs_v, h); - if (separation > 0.0f) - { - continue; - } - - if (node->IsLeaf()) - { - b2RayCastInput subInput; - subInput.p1 = input.p1; - subInput.p2 = input.p2; - subInput.maxFraction = maxFraction; - - float32 value = callback->RayCastCallback(subInput, nodeId); - - if (value == 0.0f) - { - // The client has terminated the ray cast. - return; - } - - if (value > 0.0f) - { - // Update segment bounding box. - maxFraction = value; - b2Vec2 t = p1 + maxFraction * (p2 - p1); - segmentAABB.lowerBound = b2Min(p1, t); - segmentAABB.upperBound = b2Max(p1, t); - } - } - else - { - if (count < k_stackSize) - { - stack[count++] = node->child1; - } - - if (count < k_stackSize) - { - stack[count++] = node->child2; - } - } - } -} - -#endif diff --git a/Littlest/libs/Box2D/Collision/b2TimeOfImpact.cpp b/Littlest/libs/Box2D/Collision/b2TimeOfImpact.cpp deleted file mode 100644 index b1f2f4e..0000000 --- a/Littlest/libs/Box2D/Collision/b2TimeOfImpact.cpp +++ /dev/null @@ -1,483 +0,0 @@ -/* -* Copyright (c) 2007-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include -#include -#include - -#include - -int32 b2_toiCalls, b2_toiIters, b2_toiMaxIters; -int32 b2_toiRootIters, b2_toiMaxRootIters; - -int32 b2_toiMaxOptIters; - -struct b2SeparationFunction -{ - enum Type - { - e_points, - e_faceA, - e_faceB - }; - - // TODO_ERIN might not need to return the separation - - float32 Initialize(const b2SimplexCache* cache, - const b2DistanceProxy* proxyA, const b2Sweep& sweepA, - const b2DistanceProxy* proxyB, const b2Sweep& sweepB) - { - m_proxyA = proxyA; - m_proxyB = proxyB; - int32 count = cache->count; - b2Assert(0 < count && count < 3); - - m_sweepA = sweepA; - m_sweepB = sweepB; - - b2Transform xfA, xfB; - m_sweepA.GetTransform(&xfA, 0.0f); - m_sweepB.GetTransform(&xfB, 0.0f); - - if (count == 1) - { - m_type = e_points; - b2Vec2 localPointA = m_proxyA->GetVertex(cache->indexA[0]); - b2Vec2 localPointB = m_proxyB->GetVertex(cache->indexB[0]); - b2Vec2 pointA = b2Mul(xfA, localPointA); - b2Vec2 pointB = b2Mul(xfB, localPointB); - m_axis = pointB - pointA; - float32 s = m_axis.Normalize(); - return s; - } - else if (cache->indexA[0] == cache->indexA[1]) - { - // Two points on B and one on A. - m_type = e_faceB; - b2Vec2 localPointB1 = proxyB->GetVertex(cache->indexB[0]); - b2Vec2 localPointB2 = proxyB->GetVertex(cache->indexB[1]); - - m_axis = b2Cross(localPointB2 - localPointB1, 1.0f); - m_axis.Normalize(); - b2Vec2 normal = b2Mul(xfB.R, m_axis); - - m_localPoint = 0.5f * (localPointB1 + localPointB2); - b2Vec2 pointB = b2Mul(xfB, m_localPoint); - - b2Vec2 localPointA = proxyA->GetVertex(cache->indexA[0]); - b2Vec2 pointA = b2Mul(xfA, localPointA); - - float32 s = b2Dot(pointA - pointB, normal); - if (s < 0.0f) - { - m_axis = -m_axis; - s = -s; - } - return s; - } - else - { - // Two points on A and one or two points on B. - m_type = e_faceA; - b2Vec2 localPointA1 = m_proxyA->GetVertex(cache->indexA[0]); - b2Vec2 localPointA2 = m_proxyA->GetVertex(cache->indexA[1]); - - m_axis = b2Cross(localPointA2 - localPointA1, 1.0f); - m_axis.Normalize(); - b2Vec2 normal = b2Mul(xfA.R, m_axis); - - m_localPoint = 0.5f * (localPointA1 + localPointA2); - b2Vec2 pointA = b2Mul(xfA, m_localPoint); - - b2Vec2 localPointB = m_proxyB->GetVertex(cache->indexB[0]); - b2Vec2 pointB = b2Mul(xfB, localPointB); - - float32 s = b2Dot(pointB - pointA, normal); - if (s < 0.0f) - { - m_axis = -m_axis; - s = -s; - } - return s; - } - } - - float32 FindMinSeparation(int32* indexA, int32* indexB, float32 t) const - { - b2Transform xfA, xfB; - m_sweepA.GetTransform(&xfA, t); - m_sweepB.GetTransform(&xfB, t); - - switch (m_type) - { - case e_points: - { - b2Vec2 axisA = b2MulT(xfA.R, m_axis); - b2Vec2 axisB = b2MulT(xfB.R, -m_axis); - - *indexA = m_proxyA->GetSupport(axisA); - *indexB = m_proxyB->GetSupport(axisB); - - b2Vec2 localPointA = m_proxyA->GetVertex(*indexA); - b2Vec2 localPointB = m_proxyB->GetVertex(*indexB); - - b2Vec2 pointA = b2Mul(xfA, localPointA); - b2Vec2 pointB = b2Mul(xfB, localPointB); - - float32 separation = b2Dot(pointB - pointA, m_axis); - return separation; - } - - case e_faceA: - { - b2Vec2 normal = b2Mul(xfA.R, m_axis); - b2Vec2 pointA = b2Mul(xfA, m_localPoint); - - b2Vec2 axisB = b2MulT(xfB.R, -normal); - - *indexA = -1; - *indexB = m_proxyB->GetSupport(axisB); - - b2Vec2 localPointB = m_proxyB->GetVertex(*indexB); - b2Vec2 pointB = b2Mul(xfB, localPointB); - - float32 separation = b2Dot(pointB - pointA, normal); - return separation; - } - - case e_faceB: - { - b2Vec2 normal = b2Mul(xfB.R, m_axis); - b2Vec2 pointB = b2Mul(xfB, m_localPoint); - - b2Vec2 axisA = b2MulT(xfA.R, -normal); - - *indexB = -1; - *indexA = m_proxyA->GetSupport(axisA); - - b2Vec2 localPointA = m_proxyA->GetVertex(*indexA); - b2Vec2 pointA = b2Mul(xfA, localPointA); - - float32 separation = b2Dot(pointA - pointB, normal); - return separation; - } - - default: - b2Assert(false); - *indexA = -1; - *indexB = -1; - return 0.0f; - } - } - - float32 Evaluate(int32 indexA, int32 indexB, float32 t) const - { - b2Transform xfA, xfB; - m_sweepA.GetTransform(&xfA, t); - m_sweepB.GetTransform(&xfB, t); - - switch (m_type) - { - case e_points: - { - b2Vec2 axisA = b2MulT(xfA.R, m_axis); - b2Vec2 axisB = b2MulT(xfB.R, -m_axis); - - b2Vec2 localPointA = m_proxyA->GetVertex(indexA); - b2Vec2 localPointB = m_proxyB->GetVertex(indexB); - - b2Vec2 pointA = b2Mul(xfA, localPointA); - b2Vec2 pointB = b2Mul(xfB, localPointB); - float32 separation = b2Dot(pointB - pointA, m_axis); - - return separation; - } - - case e_faceA: - { - b2Vec2 normal = b2Mul(xfA.R, m_axis); - b2Vec2 pointA = b2Mul(xfA, m_localPoint); - - b2Vec2 axisB = b2MulT(xfB.R, -normal); - - b2Vec2 localPointB = m_proxyB->GetVertex(indexB); - b2Vec2 pointB = b2Mul(xfB, localPointB); - - float32 separation = b2Dot(pointB - pointA, normal); - return separation; - } - - case e_faceB: - { - b2Vec2 normal = b2Mul(xfB.R, m_axis); - b2Vec2 pointB = b2Mul(xfB, m_localPoint); - - b2Vec2 axisA = b2MulT(xfA.R, -normal); - - b2Vec2 localPointA = m_proxyA->GetVertex(indexA); - b2Vec2 pointA = b2Mul(xfA, localPointA); - - float32 separation = b2Dot(pointA - pointB, normal); - return separation; - } - - default: - b2Assert(false); - return 0.0f; - } - } - - const b2DistanceProxy* m_proxyA; - const b2DistanceProxy* m_proxyB; - b2Sweep m_sweepA, m_sweepB; - Type m_type; - b2Vec2 m_localPoint; - b2Vec2 m_axis; -}; - -// CCD via the local separating axis method. This seeks progression -// by computing the largest time at which separation is maintained. -void b2TimeOfImpact(b2TOIOutput* output, const b2TOIInput* input) -{ - ++b2_toiCalls; - - output->state = b2TOIOutput::e_unknown; - output->t = input->tMax; - - const b2DistanceProxy* proxyA = &input->proxyA; - const b2DistanceProxy* proxyB = &input->proxyB; - - b2Sweep sweepA = input->sweepA; - b2Sweep sweepB = input->sweepB; - - // Large rotations can make the root finder fail, so we normalize the - // sweep angles. - sweepA.Normalize(); - sweepB.Normalize(); - - float32 tMax = input->tMax; - - float32 totalRadius = proxyA->m_radius + proxyB->m_radius; - float32 target = b2Max(b2_linearSlop, totalRadius - 3.0f * b2_linearSlop); - float32 tolerance = 0.25f * b2_linearSlop; - b2Assert(target > tolerance); - - float32 t1 = 0.0f; - const int32 k_maxIterations = 20; // TODO_ERIN b2Settings - int32 iter = 0; - - // Prepare input for distance query. - b2SimplexCache cache; - cache.count = 0; - b2DistanceInput distanceInput; - distanceInput.proxyA = input->proxyA; - distanceInput.proxyB = input->proxyB; - distanceInput.useRadii = false; - - // The outer loop progressively attempts to compute new separating axes. - // This loop terminates when an axis is repeated (no progress is made). - for(;;) - { - b2Transform xfA, xfB; - sweepA.GetTransform(&xfA, t1); - sweepB.GetTransform(&xfB, t1); - - // Get the distance between shapes. We can also use the results - // to get a separating axis. - distanceInput.transformA = xfA; - distanceInput.transformB = xfB; - b2DistanceOutput distanceOutput; - b2Distance(&distanceOutput, &cache, &distanceInput); - - // If the shapes are overlapped, we give up on continuous collision. - if (distanceOutput.distance <= 0.0f) - { - // Failure! - output->state = b2TOIOutput::e_overlapped; - output->t = 0.0f; - break; - } - - if (distanceOutput.distance < target + tolerance) - { - // Victory! - output->state = b2TOIOutput::e_touching; - output->t = t1; - break; - } - - // Initialize the separating axis. - b2SeparationFunction fcn; - fcn.Initialize(&cache, proxyA, sweepA, proxyB, sweepB); -#if 0 - // Dump the curve seen by the root finder - { - const int32 N = 100; - float32 dx = 1.0f / N; - float32 xs[N+1]; - float32 fs[N+1]; - - float32 x = 0.0f; - - for (int32 i = 0; i <= N; ++i) - { - sweepA.GetTransform(&xfA, x); - sweepB.GetTransform(&xfB, x); - float32 f = fcn.Evaluate(xfA, xfB) - target; - - printf("%g %g\n", x, f); - - xs[i] = x; - fs[i] = f; - - x += dx; - } - } -#endif - - // Compute the TOI on the separating axis. We do this by successively - // resolving the deepest point. This loop is bounded by the number of vertices. - bool done = false; - float32 t2 = tMax; - int32 pushBackIter = 0; - for (;;) - { - // Find the deepest point at t2. Store the witness point indices. - int32 indexA, indexB; - float32 s2 = fcn.FindMinSeparation(&indexA, &indexB, t2); - - // Is the final configuration separated? - if (s2 > target + tolerance) - { - // Victory! - output->state = b2TOIOutput::e_separated; - output->t = tMax; - done = true; - break; - } - - // Has the separation reached tolerance? - if (s2 > target - tolerance) - { - // Advance the sweeps - t1 = t2; - break; - } - - // Compute the initial separation of the witness points. - float32 s1 = fcn.Evaluate(indexA, indexB, t1); - - // Check for initial overlap. This might happen if the root finder - // runs out of iterations. - if (s1 < target - tolerance) - { - output->state = b2TOIOutput::e_failed; - output->t = t1; - done = true; - break; - } - - // Check for touching - if (s1 <= target + tolerance) - { - // Victory! t1 should hold the TOI (could be 0.0). - output->state = b2TOIOutput::e_touching; - output->t = t1; - done = true; - break; - } - - // Compute 1D root of: f(x) - target = 0 - int32 rootIterCount = 0; - float32 a1 = t1, a2 = t2; - for (;;) - { - // Use a mix of the secant rule and bisection. - float32 t; - if (rootIterCount & 1) - { - // Secant rule to improve convergence. - t = a1 + (target - s1) * (a2 - a1) / (s2 - s1); - } - else - { - // Bisection to guarantee progress. - t = 0.5f * (a1 + a2); - } - - float32 s = fcn.Evaluate(indexA, indexB, t); - - if (b2Abs(s - target) < tolerance) - { - // t2 holds a tentative value for t1 - t2 = t; - break; - } - - // Ensure we continue to bracket the root. - if (s > target) - { - a1 = t; - s1 = s; - } - else - { - a2 = t; - s2 = s; - } - - ++rootIterCount; - ++b2_toiRootIters; - - if (rootIterCount == 50) - { - break; - } - } - - b2_toiMaxRootIters = b2Max(b2_toiMaxRootIters, rootIterCount); - - ++pushBackIter; - - if (pushBackIter == b2_maxPolygonVertices) - { - break; - } - } - - ++iter; - ++b2_toiIters; - - if (done) - { - break; - } - - if (iter == k_maxIterations) - { - // Root finder got stuck. Semi-victory. - output->state = b2TOIOutput::e_failed; - output->t = t1; - break; - } - } - - b2_toiMaxIters = b2Max(b2_toiMaxIters, iter); -} diff --git a/Littlest/libs/Box2D/Collision/b2TimeOfImpact.h b/Littlest/libs/Box2D/Collision/b2TimeOfImpact.h deleted file mode 100644 index b59fb83..0000000 --- a/Littlest/libs/Box2D/Collision/b2TimeOfImpact.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_TIME_OF_IMPACT_H -#define B2_TIME_OF_IMPACT_H - -#include -#include -#include - -/// Input parameters for b2TimeOfImpact -struct b2TOIInput -{ - b2DistanceProxy proxyA; - b2DistanceProxy proxyB; - b2Sweep sweepA; - b2Sweep sweepB; - float32 tMax; // defines sweep interval [0, tMax] -}; - -// Output parameters for b2TimeOfImpact. -struct b2TOIOutput -{ - enum State - { - e_unknown, - e_failed, - e_overlapped, - e_touching, - e_separated - }; - - State state; - float32 t; -}; - -/// Compute the upper bound on time before two shapes penetrate. Time is represented as -/// a fraction between [0,tMax]. This uses a swept separating axis and may miss some intermediate, -/// non-tunneling collision. If you change the time interval, you should call this function -/// again. -/// Note: use b2Distance to compute the contact point and normal at the time of impact. -void b2TimeOfImpact(b2TOIOutput* output, const b2TOIInput* input); - -#endif diff --git a/Littlest/libs/Box2D/Common/b2BlockAllocator.cpp b/Littlest/libs/Box2D/Common/b2BlockAllocator.cpp deleted file mode 100644 index ba06f04..0000000 --- a/Littlest/libs/Box2D/Common/b2BlockAllocator.cpp +++ /dev/null @@ -1,205 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include -#include -#include - -int32 b2BlockAllocator::s_blockSizes[b2_blockSizes] = -{ - 16, // 0 - 32, // 1 - 64, // 2 - 96, // 3 - 128, // 4 - 160, // 5 - 192, // 6 - 224, // 7 - 256, // 8 - 320, // 9 - 384, // 10 - 448, // 11 - 512, // 12 - 640, // 13 -}; -uint8 b2BlockAllocator::s_blockSizeLookup[b2_maxBlockSize + 1]; -bool b2BlockAllocator::s_blockSizeLookupInitialized; - -struct b2Chunk -{ - int32 blockSize; - b2Block* blocks; -}; - -struct b2Block -{ - b2Block* next; -}; - -b2BlockAllocator::b2BlockAllocator() -{ - b2Assert(b2_blockSizes < UCHAR_MAX); - - m_chunkSpace = b2_chunkArrayIncrement; - m_chunkCount = 0; - m_chunks = (b2Chunk*)b2Alloc(m_chunkSpace * sizeof(b2Chunk)); - - memset(m_chunks, 0, m_chunkSpace * sizeof(b2Chunk)); - memset(m_freeLists, 0, sizeof(m_freeLists)); - - if (s_blockSizeLookupInitialized == false) - { - int32 j = 0; - for (int32 i = 1; i <= b2_maxBlockSize; ++i) - { - b2Assert(j < b2_blockSizes); - if (i <= s_blockSizes[j]) - { - s_blockSizeLookup[i] = (uint8)j; - } - else - { - ++j; - s_blockSizeLookup[i] = (uint8)j; - } - } - - s_blockSizeLookupInitialized = true; - } -} - -b2BlockAllocator::~b2BlockAllocator() -{ - for (int32 i = 0; i < m_chunkCount; ++i) - { - b2Free(m_chunks[i].blocks); - } - - b2Free(m_chunks); -} - -void* b2BlockAllocator::Allocate(int32 size) -{ - if (size == 0) - return NULL; - - b2Assert(0 < size && size <= b2_maxBlockSize); - - int32 index = s_blockSizeLookup[size]; - b2Assert(0 <= index && index < b2_blockSizes); - - if (m_freeLists[index]) - { - b2Block* block = m_freeLists[index]; - m_freeLists[index] = block->next; - return block; - } - else - { - if (m_chunkCount == m_chunkSpace) - { - b2Chunk* oldChunks = m_chunks; - m_chunkSpace += b2_chunkArrayIncrement; - m_chunks = (b2Chunk*)b2Alloc(m_chunkSpace * sizeof(b2Chunk)); - memcpy(m_chunks, oldChunks, m_chunkCount * sizeof(b2Chunk)); - memset(m_chunks + m_chunkCount, 0, b2_chunkArrayIncrement * sizeof(b2Chunk)); - b2Free(oldChunks); - } - - b2Chunk* chunk = m_chunks + m_chunkCount; - chunk->blocks = (b2Block*)b2Alloc(b2_chunkSize); -#if defined(_DEBUG) - memset(chunk->blocks, 0xcd, b2_chunkSize); -#endif - int32 blockSize = s_blockSizes[index]; - chunk->blockSize = blockSize; - int32 blockCount = b2_chunkSize / blockSize; - b2Assert(blockCount * blockSize <= b2_chunkSize); - for (int32 i = 0; i < blockCount - 1; ++i) - { - b2Block* block = (b2Block*)((int8*)chunk->blocks + blockSize * i); - b2Block* next = (b2Block*)((int8*)chunk->blocks + blockSize * (i + 1)); - block->next = next; - } - b2Block* last = (b2Block*)((int8*)chunk->blocks + blockSize * (blockCount - 1)); - last->next = NULL; - - m_freeLists[index] = chunk->blocks->next; - ++m_chunkCount; - - return chunk->blocks; - } -} - -void b2BlockAllocator::Free(void* p, int32 size) -{ - if (size == 0) - { - return; - } - - b2Assert(0 < size && size <= b2_maxBlockSize); - - int32 index = s_blockSizeLookup[size]; - b2Assert(0 <= index && index < b2_blockSizes); - -#ifdef _DEBUG - // Verify the memory address and size is valid. - int32 blockSize = s_blockSizes[index]; - bool found = false; - for (int32 i = 0; i < m_chunkCount; ++i) - { - b2Chunk* chunk = m_chunks + i; - if (chunk->blockSize != blockSize) - { - b2Assert( (int8*)p + blockSize <= (int8*)chunk->blocks || - (int8*)chunk->blocks + b2_chunkSize <= (int8*)p); - } - else - { - if ((int8*)chunk->blocks <= (int8*)p && (int8*)p + blockSize <= (int8*)chunk->blocks + b2_chunkSize) - { - found = true; - } - } - } - - b2Assert(found); - - memset(p, 0xfd, blockSize); -#endif - - b2Block* block = (b2Block*)p; - block->next = m_freeLists[index]; - m_freeLists[index] = block; -} - -void b2BlockAllocator::Clear() -{ - for (int32 i = 0; i < m_chunkCount; ++i) - { - b2Free(m_chunks[i].blocks); - } - - m_chunkCount = 0; - memset(m_chunks, 0, m_chunkSpace * sizeof(b2Chunk)); - - memset(m_freeLists, 0, sizeof(m_freeLists)); -} diff --git a/Littlest/libs/Box2D/Common/b2BlockAllocator.h b/Littlest/libs/Box2D/Common/b2BlockAllocator.h deleted file mode 100644 index 93eb2e3..0000000 --- a/Littlest/libs/Box2D/Common/b2BlockAllocator.h +++ /dev/null @@ -1,59 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_BLOCK_ALLOCATOR_H -#define B2_BLOCK_ALLOCATOR_H - -#include - -const int32 b2_chunkSize = 4096; -const int32 b2_maxBlockSize = 640; -const int32 b2_blockSizes = 14; -const int32 b2_chunkArrayIncrement = 128; - -struct b2Block; -struct b2Chunk; - -// This is a small object allocator used for allocating small -// objects that persist for more than one time step. -// See: http://www.codeproject.com/useritems/Small_Block_Allocator.asp -class b2BlockAllocator -{ -public: - b2BlockAllocator(); - ~b2BlockAllocator(); - - void* Allocate(int32 size); - void Free(void* p, int32 size); - - void Clear(); - -private: - - b2Chunk* m_chunks; - int32 m_chunkCount; - int32 m_chunkSpace; - - b2Block* m_freeLists[b2_blockSizes]; - - static int32 s_blockSizes[b2_blockSizes]; - static uint8 s_blockSizeLookup[b2_maxBlockSize + 1]; - static bool s_blockSizeLookupInitialized; -}; - -#endif diff --git a/Littlest/libs/Box2D/Common/b2Math.cpp b/Littlest/libs/Box2D/Common/b2Math.cpp deleted file mode 100644 index f15a43b..0000000 --- a/Littlest/libs/Box2D/Common/b2Math.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* -* Copyright (c) 2007-2009 Erin Catto http://www.gphysics.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. -*/ - -#include - -const b2Vec2 b2Vec2_zero(0.0f, 0.0f); -const b2Mat22 b2Mat22_identity(1.0f, 0.0f, 0.0f, 1.0f); -const b2Transform b2Transform_identity(b2Vec2_zero, b2Mat22_identity); - -/// Solve A * x = b, where b is a column vector. This is more efficient -/// than computing the inverse in one-shot cases. -b2Vec3 b2Mat33::Solve33(const b2Vec3& b) const -{ - float32 det = b2Dot(col1, b2Cross(col2, col3)); - if (det != 0.0f) - { - det = 1.0f / det; - } - b2Vec3 x; - x.x = det * b2Dot(b, b2Cross(col2, col3)); - x.y = det * b2Dot(col1, b2Cross(b, col3)); - x.z = det * b2Dot(col1, b2Cross(col2, b)); - return x; -} - -/// Solve A * x = b, where b is a column vector. This is more efficient -/// than computing the inverse in one-shot cases. -b2Vec2 b2Mat33::Solve22(const b2Vec2& b) const -{ - float32 a11 = col1.x, a12 = col2.x, a21 = col1.y, a22 = col2.y; - float32 det = a11 * a22 - a12 * a21; - if (det != 0.0f) - { - det = 1.0f / det; - } - b2Vec2 x; - x.x = det * (a22 * b.x - a12 * b.y); - x.y = det * (a11 * b.y - a21 * b.x); - return x; -} diff --git a/Littlest/libs/Box2D/Common/b2Math.h b/Littlest/libs/Box2D/Common/b2Math.h deleted file mode 100644 index c29f594..0000000 --- a/Littlest/libs/Box2D/Common/b2Math.h +++ /dev/null @@ -1,624 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_MATH_H -#define B2_MATH_H - -#include - -#include -#include -#include -#include - -/// This function is used to ensure that a floating point number is -/// not a NaN or infinity. -inline bool b2IsValid(float32 x) -{ - if (x != x) - { - // NaN. - return false; - } - - float32 infinity = std::numeric_limits::infinity(); - return -infinity < x && x < infinity; -} - -/// This is a approximate yet fast inverse square-root. -inline float32 b2InvSqrt(float32 x) -{ - union - { - float32 x; - int32 i; - } convert; - - convert.x = x; - float32 xhalf = 0.5f * x; - convert.i = 0x5f3759df - (convert.i >> 1); - x = convert.x; - x = x * (1.5f - xhalf * x * x); - return x; -} - -#define b2Sqrt(x) sqrtf(x) -#define b2Atan2(y, x) atan2f(y, x) - -inline float32 b2Abs(float32 a) -{ - return a > 0.0f ? a : -a; -} - -/// A 2D column vector. -struct b2Vec2 -{ - /// Default constructor does nothing (for performance). - b2Vec2() {} - - /// Construct using coordinates. - b2Vec2(float32 x, float32 y) : x(x), y(y) {} - - /// Set this vector to all zeros. - void SetZero() { x = 0.0f; y = 0.0f; } - - /// Set this vector to some specified coordinates. - void Set(float32 x_, float32 y_) { x = x_; y = y_; } - - /// Negate this vector. - b2Vec2 operator -() const { b2Vec2 v; v.Set(-x, -y); return v; } - - /// Read from and indexed element. - float32 operator () (int32 i) const - { - return (&x)[i]; - } - - /// Write to an indexed element. - float32& operator () (int32 i) - { - return (&x)[i]; - } - - /// Add a vector to this vector. - void operator += (const b2Vec2& v) - { - x += v.x; y += v.y; - } - - /// Subtract a vector from this vector. - void operator -= (const b2Vec2& v) - { - x -= v.x; y -= v.y; - } - - /// Multiply this vector by a scalar. - void operator *= (float32 a) - { - x *= a; y *= a; - } - - /// Get the length of this vector (the norm). - float32 Length() const - { - return b2Sqrt(x * x + y * y); - } - - /// Get the length squared. For performance, use this instead of - /// b2Vec2::Length (if possible). - float32 LengthSquared() const - { - return x * x + y * y; - } - - /// Convert this vector into a unit vector. Returns the length. - float32 Normalize() - { - float32 length = Length(); - if (length < b2_epsilon) - { - return 0.0f; - } - float32 invLength = 1.0f / length; - x *= invLength; - y *= invLength; - - return length; - } - - /// Does this vector contain finite coordinates? - bool IsValid() const - { - return b2IsValid(x) && b2IsValid(y); - } - - float32 x, y; -}; - -/// A 2D column vector with 3 elements. -struct b2Vec3 -{ - /// Default constructor does nothing (for performance). - b2Vec3() {} - - /// Construct using coordinates. - b2Vec3(float32 x, float32 y, float32 z) : x(x), y(y), z(z) {} - - /// Set this vector to all zeros. - void SetZero() { x = 0.0f; y = 0.0f; z = 0.0f; } - - /// Set this vector to some specified coordinates. - void Set(float32 x_, float32 y_, float32 z_) { x = x_; y = y_; z = z_; } - - /// Negate this vector. - b2Vec3 operator -() const { b2Vec3 v; v.Set(-x, -y, -z); return v; } - - /// Add a vector to this vector. - void operator += (const b2Vec3& v) - { - x += v.x; y += v.y; z += v.z; - } - - /// Subtract a vector from this vector. - void operator -= (const b2Vec3& v) - { - x -= v.x; y -= v.y; z -= v.z; - } - - /// Multiply this vector by a scalar. - void operator *= (float32 s) - { - x *= s; y *= s; z *= s; - } - - float32 x, y, z; -}; - -/// A 2-by-2 matrix. Stored in column-major order. -struct b2Mat22 -{ - /// The default constructor does nothing (for performance). - b2Mat22() {} - - /// Construct this matrix using columns. - b2Mat22(const b2Vec2& c1, const b2Vec2& c2) - { - col1 = c1; - col2 = c2; - } - - /// Construct this matrix using scalars. - b2Mat22(float32 a11, float32 a12, float32 a21, float32 a22) - { - col1.x = a11; col1.y = a21; - col2.x = a12; col2.y = a22; - } - - /// Construct this matrix using an angle. This matrix becomes - /// an orthonormal rotation matrix. - explicit b2Mat22(float32 angle) - { - // TODO_ERIN compute sin+cos together. - float32 c = cosf(angle), s = sinf(angle); - col1.x = c; col2.x = -s; - col1.y = s; col2.y = c; - } - - /// Initialize this matrix using columns. - void Set(const b2Vec2& c1, const b2Vec2& c2) - { - col1 = c1; - col2 = c2; - } - - /// Initialize this matrix using an angle. This matrix becomes - /// an orthonormal rotation matrix. - void Set(float32 angle) - { - float32 c = cosf(angle), s = sinf(angle); - col1.x = c; col2.x = -s; - col1.y = s; col2.y = c; - } - - /// Set this to the identity matrix. - void SetIdentity() - { - col1.x = 1.0f; col2.x = 0.0f; - col1.y = 0.0f; col2.y = 1.0f; - } - - /// Set this matrix to all zeros. - void SetZero() - { - col1.x = 0.0f; col2.x = 0.0f; - col1.y = 0.0f; col2.y = 0.0f; - } - - /// Extract the angle from this matrix (assumed to be - /// a rotation matrix). - float32 GetAngle() const - { - return b2Atan2(col1.y, col1.x); - } - - b2Mat22 GetInverse() const - { - float32 a = col1.x, b = col2.x, c = col1.y, d = col2.y; - b2Mat22 B; - float32 det = a * d - b * c; - if (det != 0.0f) - { - det = 1.0f / det; - } - B.col1.x = det * d; B.col2.x = -det * b; - B.col1.y = -det * c; B.col2.y = det * a; - return B; - } - - /// Solve A * x = b, where b is a column vector. This is more efficient - /// than computing the inverse in one-shot cases. - b2Vec2 Solve(const b2Vec2& b) const - { - float32 a11 = col1.x, a12 = col2.x, a21 = col1.y, a22 = col2.y; - float32 det = a11 * a22 - a12 * a21; - if (det != 0.0f) - { - det = 1.0f / det; - } - b2Vec2 x; - x.x = det * (a22 * b.x - a12 * b.y); - x.y = det * (a11 * b.y - a21 * b.x); - return x; - } - - b2Vec2 col1, col2; -}; - -/// A 3-by-3 matrix. Stored in column-major order. -struct b2Mat33 -{ - /// The default constructor does nothing (for performance). - b2Mat33() {} - - /// Construct this matrix using columns. - b2Mat33(const b2Vec3& c1, const b2Vec3& c2, const b2Vec3& c3) - { - col1 = c1; - col2 = c2; - col3 = c3; - } - - /// Set this matrix to all zeros. - void SetZero() - { - col1.SetZero(); - col2.SetZero(); - col3.SetZero(); - } - - /// Solve A * x = b, where b is a column vector. This is more efficient - /// than computing the inverse in one-shot cases. - b2Vec3 Solve33(const b2Vec3& b) const; - - /// Solve A * x = b, where b is a column vector. This is more efficient - /// than computing the inverse in one-shot cases. Solve only the upper - /// 2-by-2 matrix equation. - b2Vec2 Solve22(const b2Vec2& b) const; - - b2Vec3 col1, col2, col3; -}; - -/// A transform contains translation and rotation. It is used to represent -/// the position and orientation of rigid frames. -struct b2Transform -{ - /// The default constructor does nothing (for performance). - b2Transform() {} - - /// Initialize using a position vector and a rotation matrix. - b2Transform(const b2Vec2& position, const b2Mat22& R) : position(position), R(R) {} - - /// Set this to the identity transform. - void SetIdentity() - { - position.SetZero(); - R.SetIdentity(); - } - - /// Set this based on the position and angle. - void Set(const b2Vec2& p, float32 angle) - { - position = p; - R.Set(angle); - } - - /// Calculate the angle that the rotation matrix represents. - float32 GetAngle() const - { - return b2Atan2(R.col1.y, R.col1.x); - } - - b2Vec2 position; - b2Mat22 R; -}; - -/// This describes the motion of a body/shape for TOI computation. -/// Shapes are defined with respect to the body origin, which may -/// no coincide with the center of mass. However, to support dynamics -/// we must interpolate the center of mass position. -struct b2Sweep -{ - /// Get the interpolated transform at a specific time. - /// @param alpha is a factor in [0,1], where 0 indicates t0. - void GetTransform(b2Transform* xf, float32 alpha) const; - - /// Advance the sweep forward, yielding a new initial state. - /// @param t the new initial time. - void Advance(float32 t); - - /// Normalize the angles. - void Normalize(); - - b2Vec2 localCenter; ///< local center of mass position - b2Vec2 c0, c; ///< center world positions - float32 a0, a; ///< world angles -}; - - -extern const b2Vec2 b2Vec2_zero; -extern const b2Mat22 b2Mat22_identity; -extern const b2Transform b2Transform_identity; - -/// Perform the dot product on two vectors. -inline float32 b2Dot(const b2Vec2& a, const b2Vec2& b) -{ - return a.x * b.x + a.y * b.y; -} - -/// Perform the cross product on two vectors. In 2D this produces a scalar. -inline float32 b2Cross(const b2Vec2& a, const b2Vec2& b) -{ - return a.x * b.y - a.y * b.x; -} - -/// Perform the cross product on a vector and a scalar. In 2D this produces -/// a vector. -inline b2Vec2 b2Cross(const b2Vec2& a, float32 s) -{ - return b2Vec2(s * a.y, -s * a.x); -} - -/// Perform the cross product on a scalar and a vector. In 2D this produces -/// a vector. -inline b2Vec2 b2Cross(float32 s, const b2Vec2& a) -{ - return b2Vec2(-s * a.y, s * a.x); -} - -/// Multiply a matrix times a vector. If a rotation matrix is provided, -/// then this transforms the vector from one frame to another. -inline b2Vec2 b2Mul(const b2Mat22& A, const b2Vec2& v) -{ - return b2Vec2(A.col1.x * v.x + A.col2.x * v.y, A.col1.y * v.x + A.col2.y * v.y); -} - -/// Multiply a matrix transpose times a vector. If a rotation matrix is provided, -/// then this transforms the vector from one frame to another (inverse transform). -inline b2Vec2 b2MulT(const b2Mat22& A, const b2Vec2& v) -{ - return b2Vec2(b2Dot(v, A.col1), b2Dot(v, A.col2)); -} - -/// Add two vectors component-wise. -inline b2Vec2 operator + (const b2Vec2& a, const b2Vec2& b) -{ - return b2Vec2(a.x + b.x, a.y + b.y); -} - -/// Subtract two vectors component-wise. -inline b2Vec2 operator - (const b2Vec2& a, const b2Vec2& b) -{ - return b2Vec2(a.x - b.x, a.y - b.y); -} - -inline b2Vec2 operator * (float32 s, const b2Vec2& a) -{ - return b2Vec2(s * a.x, s * a.y); -} - -inline bool operator == (const b2Vec2& a, const b2Vec2& b) -{ - return a.x == b.x && a.y == b.y; -} - -inline float32 b2Distance(const b2Vec2& a, const b2Vec2& b) -{ - b2Vec2 c = a - b; - return c.Length(); -} - -inline float32 b2DistanceSquared(const b2Vec2& a, const b2Vec2& b) -{ - b2Vec2 c = a - b; - return b2Dot(c, c); -} - -inline b2Vec3 operator * (float32 s, const b2Vec3& a) -{ - return b2Vec3(s * a.x, s * a.y, s * a.z); -} - -/// Add two vectors component-wise. -inline b2Vec3 operator + (const b2Vec3& a, const b2Vec3& b) -{ - return b2Vec3(a.x + b.x, a.y + b.y, a.z + b.z); -} - -/// Subtract two vectors component-wise. -inline b2Vec3 operator - (const b2Vec3& a, const b2Vec3& b) -{ - return b2Vec3(a.x - b.x, a.y - b.y, a.z - b.z); -} - -/// Perform the dot product on two vectors. -inline float32 b2Dot(const b2Vec3& a, const b2Vec3& b) -{ - return a.x * b.x + a.y * b.y + a.z * b.z; -} - -/// Perform the cross product on two vectors. -inline b2Vec3 b2Cross(const b2Vec3& a, const b2Vec3& b) -{ - return b2Vec3(a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x); -} - -inline b2Mat22 operator + (const b2Mat22& A, const b2Mat22& B) -{ - return b2Mat22(A.col1 + B.col1, A.col2 + B.col2); -} - -// A * B -inline b2Mat22 b2Mul(const b2Mat22& A, const b2Mat22& B) -{ - return b2Mat22(b2Mul(A, B.col1), b2Mul(A, B.col2)); -} - -// A^T * B -inline b2Mat22 b2MulT(const b2Mat22& A, const b2Mat22& B) -{ - b2Vec2 c1(b2Dot(A.col1, B.col1), b2Dot(A.col2, B.col1)); - b2Vec2 c2(b2Dot(A.col1, B.col2), b2Dot(A.col2, B.col2)); - return b2Mat22(c1, c2); -} - -/// Multiply a matrix times a vector. -inline b2Vec3 b2Mul(const b2Mat33& A, const b2Vec3& v) -{ - return v.x * A.col1 + v.y * A.col2 + v.z * A.col3; -} - -inline b2Vec2 b2Mul(const b2Transform& T, const b2Vec2& v) -{ - float32 x = T.position.x + T.R.col1.x * v.x + T.R.col2.x * v.y; - float32 y = T.position.y + T.R.col1.y * v.x + T.R.col2.y * v.y; - - return b2Vec2(x, y); -} - -inline b2Vec2 b2MulT(const b2Transform& T, const b2Vec2& v) -{ - return b2MulT(T.R, v - T.position); -} - -inline b2Vec2 b2Abs(const b2Vec2& a) -{ - return b2Vec2(b2Abs(a.x), b2Abs(a.y)); -} - -inline b2Mat22 b2Abs(const b2Mat22& A) -{ - return b2Mat22(b2Abs(A.col1), b2Abs(A.col2)); -} - -template -inline T b2Min(T a, T b) -{ - return a < b ? a : b; -} - -inline b2Vec2 b2Min(const b2Vec2& a, const b2Vec2& b) -{ - return b2Vec2(b2Min(a.x, b.x), b2Min(a.y, b.y)); -} - -template -inline T b2Max(T a, T b) -{ - return a > b ? a : b; -} - -inline b2Vec2 b2Max(const b2Vec2& a, const b2Vec2& b) -{ - return b2Vec2(b2Max(a.x, b.x), b2Max(a.y, b.y)); -} - -template -inline T b2Clamp(T a, T low, T high) -{ - return b2Max(low, b2Min(a, high)); -} - -inline b2Vec2 b2Clamp(const b2Vec2& a, const b2Vec2& low, const b2Vec2& high) -{ - return b2Max(low, b2Min(a, high)); -} - -template inline void b2Swap(T& a, T& b) -{ - T tmp = a; - a = b; - b = tmp; -} - -/// "Next Largest Power of 2 -/// Given a binary integer value x, the next largest power of 2 can be computed by a SWAR algorithm -/// that recursively "folds" the upper bits into the lower bits. This process yields a bit vector with -/// the same most significant 1 as x, but all 1's below it. Adding 1 to that value yields the next -/// largest power of 2. For a 32-bit value:" -inline uint32 b2NextPowerOfTwo(uint32 x) -{ - x |= (x >> 1); - x |= (x >> 2); - x |= (x >> 4); - x |= (x >> 8); - x |= (x >> 16); - return x + 1; -} - -inline bool b2IsPowerOfTwo(uint32 x) -{ - bool result = x > 0 && (x & (x - 1)) == 0; - return result; -} - -inline void b2Sweep::GetTransform(b2Transform* xf, float32 alpha) const -{ - xf->position = (1.0f - alpha) * c0 + alpha * c; - float32 angle = (1.0f - alpha) * a0 + alpha * a; - xf->R.Set(angle); - - // Shift to origin - xf->position -= b2Mul(xf->R, localCenter); -} - -inline void b2Sweep::Advance(float32 t) -{ - c0 = (1.0f - t) * c0 + t * c; - a0 = (1.0f - t) * a0 + t * a; -} - -/// Normalize an angle in radians to be between -pi and pi -inline void b2Sweep::Normalize() -{ - float32 twoPi = 2.0f * b2_pi; - float32 d = twoPi * floorf(a0 / twoPi); - a0 -= d; - a -= d; -} - -#endif diff --git a/Littlest/libs/Box2D/Common/b2Settings.cpp b/Littlest/libs/Box2D/Common/b2Settings.cpp deleted file mode 100644 index da30814..0000000 --- a/Littlest/libs/Box2D/Common/b2Settings.cpp +++ /dev/null @@ -1,33 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include - -b2Version b2_version = {2, 1, 2}; - -// Memory allocators. Modify these to use your own allocator. -void* b2Alloc(int32 size) -{ - return malloc(size); -} - -void b2Free(void* mem) -{ - free(mem); -} diff --git a/Littlest/libs/Box2D/Common/b2Settings.h b/Littlest/libs/Box2D/Common/b2Settings.h deleted file mode 100644 index 1aa8c26..0000000 --- a/Littlest/libs/Box2D/Common/b2Settings.h +++ /dev/null @@ -1,151 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_SETTINGS_H -#define B2_SETTINGS_H - -#include -#include - -#define B2_NOT_USED(x) ((void)(x)) -#define b2Assert(A) assert(A) - -typedef signed char int8; -typedef signed short int16; -typedef signed int int32; -typedef unsigned char uint8; -typedef unsigned short uint16; -typedef unsigned int uint32; -typedef float float32; - -#define b2_maxFloat FLT_MAX -#define b2_epsilon FLT_EPSILON -#define b2_pi 3.14159265359f - -/// @file -/// Global tuning constants based on meters-kilograms-seconds (MKS) units. -/// - -// Collision - -/// The maximum number of contact points between two convex shapes. -#define b2_maxManifoldPoints 2 - -/// The maximum number of vertices on a convex polygon. -#define b2_maxPolygonVertices 8 - -/// This is used to fatten AABBs in the dynamic tree. This allows proxies -/// to move by a small amount without triggering a tree adjustment. -/// This is in meters. -#define b2_aabbExtension 0.1f - -/// This is used to fatten AABBs in the dynamic tree. This is used to predict -/// the future position based on the current displacement. -/// This is a dimensionless multiplier. -#define b2_aabbMultiplier 2.0f - -/// A small length used as a collision and constraint tolerance. Usually it is -/// chosen to be numerically significant, but visually insignificant. -#define b2_linearSlop 0.005f - -/// A small angle used as a collision and constraint tolerance. Usually it is -/// chosen to be numerically significant, but visually insignificant. -#define b2_angularSlop (2.0f / 180.0f * b2_pi) - -/// The radius of the polygon/edge shape skin. This should not be modified. Making -/// this smaller means polygons will have an insufficient buffer for continuous collision. -/// Making it larger may create artifacts for vertex collision. -#define b2_polygonRadius (2.0f * b2_linearSlop) - - -// Dynamics - -/// Maximum number of contacts to be handled to solve a TOI impact. -#define b2_maxTOIContacts 32 - -/// A velocity threshold for elastic collisions. Any collision with a relative linear -/// velocity below this threshold will be treated as inelastic. -#define b2_velocityThreshold 1.0f - -/// The maximum linear position correction used when solving constraints. This helps to -/// prevent overshoot. -#define b2_maxLinearCorrection 0.2f - -/// The maximum angular position correction used when solving constraints. This helps to -/// prevent overshoot. -#define b2_maxAngularCorrection (8.0f / 180.0f * b2_pi) - -/// The maximum linear velocity of a body. This limit is very large and is used -/// to prevent numerical problems. You shouldn't need to adjust this. -#define b2_maxTranslation 2.0f -#define b2_maxTranslationSquared (b2_maxTranslation * b2_maxTranslation) - -/// The maximum angular velocity of a body. This limit is very large and is used -/// to prevent numerical problems. You shouldn't need to adjust this. -#define b2_maxRotation (0.5f * b2_pi) -#define b2_maxRotationSquared (b2_maxRotation * b2_maxRotation) - -/// This scale factor controls how fast overlap is resolved. Ideally this would be 1 so -/// that overlap is removed in one time step. However using values close to 1 often lead -/// to overshoot. -#define b2_contactBaumgarte 0.2f - -// Sleep - -/// The time that a body must be still before it will go to sleep. -#define b2_timeToSleep 0.5f - -/// A body cannot sleep if its linear velocity is above this tolerance. -#define b2_linearSleepTolerance 0.01f - -/// A body cannot sleep if its angular velocity is above this tolerance. -#define b2_angularSleepTolerance (2.0f / 180.0f * b2_pi) - -// Memory Allocation - -/// Implement this function to use your own memory allocator. -void* b2Alloc(int32 size); - -/// If you implement b2Alloc, you should also implement this function. -void b2Free(void* mem); - -/// Version numbering scheme. -/// See http://en.wikipedia.org/wiki/Software_versioning -struct b2Version -{ - int32 major; ///< significant changes - int32 minor; ///< incremental changes - int32 revision; ///< bug fixes -}; - -/// Current version. -extern b2Version b2_version; - -/// Friction mixing law. Feel free to customize this. -inline float32 b2MixFriction(float32 friction1, float32 friction2) -{ - return sqrtf(friction1 * friction2); -} - -/// Restitution mixing law. Feel free to customize this. -inline float32 b2MixRestitution(float32 restitution1, float32 restitution2) -{ - return restitution1 > restitution2 ? restitution1 : restitution2; -} - -#endif diff --git a/Littlest/libs/Box2D/Common/b2StackAllocator.cpp b/Littlest/libs/Box2D/Common/b2StackAllocator.cpp deleted file mode 100644 index cb2c42e..0000000 --- a/Littlest/libs/Box2D/Common/b2StackAllocator.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include - -b2StackAllocator::b2StackAllocator() -{ - m_index = 0; - m_allocation = 0; - m_maxAllocation = 0; - m_entryCount = 0; -} - -b2StackAllocator::~b2StackAllocator() -{ - b2Assert(m_index == 0); - b2Assert(m_entryCount == 0); -} - -void* b2StackAllocator::Allocate(int32 size) -{ - b2Assert(m_entryCount < b2_maxStackEntries); - - b2StackEntry* entry = m_entries + m_entryCount; - entry->size = size; - if (m_index + size > b2_stackSize) - { - entry->data = (char*)b2Alloc(size); - entry->usedMalloc = true; - } - else - { - entry->data = m_data + m_index; - entry->usedMalloc = false; - m_index += size; - } - - m_allocation += size; - m_maxAllocation = b2Max(m_maxAllocation, m_allocation); - ++m_entryCount; - - return entry->data; -} - -void b2StackAllocator::Free(void* p) -{ - b2Assert(m_entryCount > 0); - b2StackEntry* entry = m_entries + m_entryCount - 1; - b2Assert(p == entry->data); - if (entry->usedMalloc) - { - b2Free(p); - } - else - { - m_index -= entry->size; - } - m_allocation -= entry->size; - --m_entryCount; - - p = NULL; -} - -int32 b2StackAllocator::GetMaxAllocation() const -{ - return m_maxAllocation; -} diff --git a/Littlest/libs/Box2D/Common/b2StackAllocator.h b/Littlest/libs/Box2D/Common/b2StackAllocator.h deleted file mode 100644 index 315cc02..0000000 --- a/Littlest/libs/Box2D/Common/b2StackAllocator.h +++ /dev/null @@ -1,60 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_STACK_ALLOCATOR_H -#define B2_STACK_ALLOCATOR_H - -#include - -const int32 b2_stackSize = 100 * 1024; // 100k -const int32 b2_maxStackEntries = 32; - -struct b2StackEntry -{ - char* data; - int32 size; - bool usedMalloc; -}; - -// This is a stack allocator used for fast per step allocations. -// You must nest allocate/free pairs. The code will assert -// if you try to interleave multiple allocate/free pairs. -class b2StackAllocator -{ -public: - b2StackAllocator(); - ~b2StackAllocator(); - - void* Allocate(int32 size); - void Free(void* p); - - int32 GetMaxAllocation() const; - -private: - - char m_data[b2_stackSize]; - int32 m_index; - - int32 m_allocation; - int32 m_maxAllocation; - - b2StackEntry m_entries[b2_maxStackEntries]; - int32 m_entryCount; -}; - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/Contacts/b2CircleContact.cpp b/Littlest/libs/Box2D/Dynamics/Contacts/b2CircleContact.cpp deleted file mode 100644 index 6df0091..0000000 --- a/Littlest/libs/Box2D/Dynamics/Contacts/b2CircleContact.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include -#include -#include -#include - -#include - -b2Contact* b2CircleContact::Create(b2Fixture* fixtureA, b2Fixture* fixtureB, b2BlockAllocator* allocator) -{ - void* mem = allocator->Allocate(sizeof(b2CircleContact)); - return new (mem) b2CircleContact(fixtureA, fixtureB); -} - -void b2CircleContact::Destroy(b2Contact* contact, b2BlockAllocator* allocator) -{ - ((b2CircleContact*)contact)->~b2CircleContact(); - allocator->Free(contact, sizeof(b2CircleContact)); -} - -b2CircleContact::b2CircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB) - : b2Contact(fixtureA, fixtureB) -{ - b2Assert(m_fixtureA->GetType() == b2Shape::e_circle); - b2Assert(m_fixtureB->GetType() == b2Shape::e_circle); -} - -void b2CircleContact::Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) -{ - b2CollideCircles(manifold, - (b2CircleShape*)m_fixtureA->GetShape(), xfA, - (b2CircleShape*)m_fixtureB->GetShape(), xfB); -} diff --git a/Littlest/libs/Box2D/Dynamics/Contacts/b2CircleContact.h b/Littlest/libs/Box2D/Dynamics/Contacts/b2CircleContact.h deleted file mode 100644 index afc277a..0000000 --- a/Littlest/libs/Box2D/Dynamics/Contacts/b2CircleContact.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_CIRCLE_CONTACT_H -#define B2_CIRCLE_CONTACT_H - -#include - -class b2BlockAllocator; - -class b2CircleContact : public b2Contact -{ -public: - static b2Contact* Create(b2Fixture* fixtureA, b2Fixture* fixtureB, b2BlockAllocator* allocator); - static void Destroy(b2Contact* contact, b2BlockAllocator* allocator); - - b2CircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB); - ~b2CircleContact() {} - - void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB); -}; - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/Contacts/b2Contact.cpp b/Littlest/libs/Box2D/Dynamics/Contacts/b2Contact.cpp deleted file mode 100644 index e7ad1ca..0000000 --- a/Littlest/libs/Box2D/Dynamics/Contacts/b2Contact.cpp +++ /dev/null @@ -1,226 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -b2ContactRegister b2Contact::s_registers[b2Shape::e_typeCount][b2Shape::e_typeCount]; -bool b2Contact::s_initialized = false; - -void b2Contact::InitializeRegisters() -{ - AddType(b2CircleContact::Create, b2CircleContact::Destroy, b2Shape::e_circle, b2Shape::e_circle); - AddType(b2PolygonAndCircleContact::Create, b2PolygonAndCircleContact::Destroy, b2Shape::e_polygon, b2Shape::e_circle); - AddType(b2PolygonContact::Create, b2PolygonContact::Destroy, b2Shape::e_polygon, b2Shape::e_polygon); -} - -void b2Contact::AddType(b2ContactCreateFcn* createFcn, b2ContactDestroyFcn* destoryFcn, - b2Shape::Type type1, b2Shape::Type type2) -{ - b2Assert(b2Shape::e_unknown < type1 && type1 < b2Shape::e_typeCount); - b2Assert(b2Shape::e_unknown < type2 && type2 < b2Shape::e_typeCount); - - s_registers[type1][type2].createFcn = createFcn; - s_registers[type1][type2].destroyFcn = destoryFcn; - s_registers[type1][type2].primary = true; - - if (type1 != type2) - { - s_registers[type2][type1].createFcn = createFcn; - s_registers[type2][type1].destroyFcn = destoryFcn; - s_registers[type2][type1].primary = false; - } -} - -b2Contact* b2Contact::Create(b2Fixture* fixtureA, b2Fixture* fixtureB, b2BlockAllocator* allocator) -{ - if (s_initialized == false) - { - InitializeRegisters(); - s_initialized = true; - } - - b2Shape::Type type1 = fixtureA->GetType(); - b2Shape::Type type2 = fixtureB->GetType(); - - b2Assert(b2Shape::e_unknown < type1 && type1 < b2Shape::e_typeCount); - b2Assert(b2Shape::e_unknown < type2 && type2 < b2Shape::e_typeCount); - - b2ContactCreateFcn* createFcn = s_registers[type1][type2].createFcn; - if (createFcn) - { - if (s_registers[type1][type2].primary) - { - return createFcn(fixtureA, fixtureB, allocator); - } - else - { - return createFcn(fixtureB, fixtureA, allocator); - } - } - else - { - return NULL; - } -} - -void b2Contact::Destroy(b2Contact* contact, b2BlockAllocator* allocator) -{ - b2Assert(s_initialized == true); - - if (contact->m_manifold.pointCount > 0) - { - contact->GetFixtureA()->GetBody()->SetAwake(true); - contact->GetFixtureB()->GetBody()->SetAwake(true); - } - - b2Shape::Type typeA = contact->GetFixtureA()->GetType(); - b2Shape::Type typeB = contact->GetFixtureB()->GetType(); - - b2Assert(b2Shape::e_unknown < typeA && typeB < b2Shape::e_typeCount); - b2Assert(b2Shape::e_unknown < typeA && typeB < b2Shape::e_typeCount); - - b2ContactDestroyFcn* destroyFcn = s_registers[typeA][typeB].destroyFcn; - destroyFcn(contact, allocator); -} - -b2Contact::b2Contact(b2Fixture* fA, b2Fixture* fB) -{ - m_flags = e_enabledFlag; - - m_fixtureA = fA; - m_fixtureB = fB; - - m_manifold.pointCount = 0; - - m_prev = NULL; - m_next = NULL; - - m_nodeA.contact = NULL; - m_nodeA.prev = NULL; - m_nodeA.next = NULL; - m_nodeA.other = NULL; - - m_nodeB.contact = NULL; - m_nodeB.prev = NULL; - m_nodeB.next = NULL; - m_nodeB.other = NULL; - - m_toiCount = 0; -} - -// Update the contact manifold and touching status. -// Note: do not assume the fixture AABBs are overlapping or are valid. -void b2Contact::Update(b2ContactListener* listener) -{ - b2Manifold oldManifold = m_manifold; - - // Re-enable this contact. - m_flags |= e_enabledFlag; - - bool touching = false; - bool wasTouching = (m_flags & e_touchingFlag) == e_touchingFlag; - - bool sensorA = m_fixtureA->IsSensor(); - bool sensorB = m_fixtureB->IsSensor(); - bool sensor = sensorA || sensorB; - - b2Body* bodyA = m_fixtureA->GetBody(); - b2Body* bodyB = m_fixtureB->GetBody(); - const b2Transform& xfA = bodyA->GetTransform(); - const b2Transform& xfB = bodyB->GetTransform(); - - // Is this contact a sensor? - if (sensor) - { - const b2Shape* shapeA = m_fixtureA->GetShape(); - const b2Shape* shapeB = m_fixtureB->GetShape(); - touching = b2TestOverlap(shapeA, shapeB, xfA, xfB); - - // Sensors don't generate manifolds. - m_manifold.pointCount = 0; - } - else - { - Evaluate(&m_manifold, xfA, xfB); - touching = m_manifold.pointCount > 0; - - // Match old contact ids to new contact ids and copy the - // stored impulses to warm start the solver. - for (int32 i = 0; i < m_manifold.pointCount; ++i) - { - b2ManifoldPoint* mp2 = m_manifold.points + i; - mp2->normalImpulse = 0.0f; - mp2->tangentImpulse = 0.0f; - b2ContactID id2 = mp2->id; - - for (int32 j = 0; j < oldManifold.pointCount; ++j) - { - b2ManifoldPoint* mp1 = oldManifold.points + j; - - if (mp1->id.key == id2.key) - { - mp2->normalImpulse = mp1->normalImpulse; - mp2->tangentImpulse = mp1->tangentImpulse; - break; - } - } - } - - if (touching != wasTouching) - { - bodyA->SetAwake(true); - bodyB->SetAwake(true); - } - } - - if (touching) - { - m_flags |= e_touchingFlag; - } - else - { - m_flags &= ~e_touchingFlag; - } - - if (wasTouching == false && touching == true && listener) - { - listener->BeginContact(this); - } - - if (wasTouching == true && touching == false && listener) - { - listener->EndContact(this); - } - - if (sensor == false && touching && listener) - { - listener->PreSolve(this, &oldManifold); - } -} diff --git a/Littlest/libs/Box2D/Dynamics/Contacts/b2Contact.h b/Littlest/libs/Box2D/Dynamics/Contacts/b2Contact.h deleted file mode 100644 index a6add3d..0000000 --- a/Littlest/libs/Box2D/Dynamics/Contacts/b2Contact.h +++ /dev/null @@ -1,242 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_CONTACT_H -#define B2_CONTACT_H - -#include -#include -#include -#include -#include - -class b2Body; -class b2Contact; -class b2Fixture; -class b2World; -class b2BlockAllocator; -class b2StackAllocator; -class b2ContactListener; - -typedef b2Contact* b2ContactCreateFcn(b2Fixture* fixtureA, b2Fixture* fixtureB, b2BlockAllocator* allocator); -typedef void b2ContactDestroyFcn(b2Contact* contact, b2BlockAllocator* allocator); - -struct b2ContactRegister -{ - b2ContactCreateFcn* createFcn; - b2ContactDestroyFcn* destroyFcn; - bool primary; -}; - -/// A contact edge is used to connect bodies and contacts together -/// in a contact graph where each body is a node and each contact -/// is an edge. A contact edge belongs to a doubly linked list -/// maintained in each attached body. Each contact has two contact -/// nodes, one for each attached body. -struct b2ContactEdge -{ - b2Body* other; ///< provides quick access to the other body attached. - b2Contact* contact; ///< the contact - b2ContactEdge* prev; ///< the previous contact edge in the body's contact list - b2ContactEdge* next; ///< the next contact edge in the body's contact list -}; - -/// The class manages contact between two shapes. A contact exists for each overlapping -/// AABB in the broad-phase (except if filtered). Therefore a contact object may exist -/// that has no contact points. -class b2Contact -{ -public: - - /// Get the contact manifold. Do not modify the manifold unless you understand the - /// internals of Box2D. - b2Manifold* GetManifold(); - const b2Manifold* GetManifold() const; - - /// Get the world manifold. - void GetWorldManifold(b2WorldManifold* worldManifold) const; - - /// Is this contact touching? - bool IsTouching() const; - - /// Enable/disable this contact. This can be used inside the pre-solve - /// contact listener. The contact is only disabled for the current - /// time step (or sub-step in continuous collisions). - void SetEnabled(bool flag); - - /// Has this contact been disabled? - bool IsEnabled() const; - - /// Get the next contact in the world's contact list. - b2Contact* GetNext(); - const b2Contact* GetNext() const; - - /// Get the first fixture in this contact. - b2Fixture* GetFixtureA(); - const b2Fixture* GetFixtureA() const; - - /// Get the second fixture in this contact. - b2Fixture* GetFixtureB(); - const b2Fixture* GetFixtureB() const; - - /// Evaluate this contact with your own manifold and transforms. - virtual void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) = 0; - -protected: - friend class b2ContactManager; - friend class b2World; - friend class b2ContactSolver; - friend class b2Body; - friend class b2Fixture; - - // Flags stored in m_flags - enum - { - // Used when crawling contact graph when forming islands. - e_islandFlag = 0x0001, - - // Set when the shapes are touching. - e_touchingFlag = 0x0002, - - // This contact can be disabled (by user) - e_enabledFlag = 0x0004, - - // This contact needs filtering because a fixture filter was changed. - e_filterFlag = 0x0008, - - // This bullet contact had a TOI event - e_bulletHitFlag = 0x0010, - - }; - - /// Flag this contact for filtering. Filtering will occur the next time step. - void FlagForFiltering(); - - static void AddType(b2ContactCreateFcn* createFcn, b2ContactDestroyFcn* destroyFcn, - b2Shape::Type typeA, b2Shape::Type typeB); - static void InitializeRegisters(); - static b2Contact* Create(b2Fixture* fixtureA, b2Fixture* fixtureB, b2BlockAllocator* allocator); - static void Destroy(b2Contact* contact, b2Shape::Type typeA, b2Shape::Type typeB, b2BlockAllocator* allocator); - static void Destroy(b2Contact* contact, b2BlockAllocator* allocator); - - b2Contact() : m_fixtureA(NULL), m_fixtureB(NULL) {} - b2Contact(b2Fixture* fixtureA, b2Fixture* fixtureB); - virtual ~b2Contact() {} - - void Update(b2ContactListener* listener); - - static b2ContactRegister s_registers[b2Shape::e_typeCount][b2Shape::e_typeCount]; - static bool s_initialized; - - uint32 m_flags; - - // World pool and list pointers. - b2Contact* m_prev; - b2Contact* m_next; - - // Nodes for connecting bodies. - b2ContactEdge m_nodeA; - b2ContactEdge m_nodeB; - - b2Fixture* m_fixtureA; - b2Fixture* m_fixtureB; - - b2Manifold m_manifold; - - int32 m_toiCount; -// float32 m_toi; -}; - -inline b2Manifold* b2Contact::GetManifold() -{ - return &m_manifold; -} - -inline const b2Manifold* b2Contact::GetManifold() const -{ - return &m_manifold; -} - -inline void b2Contact::GetWorldManifold(b2WorldManifold* worldManifold) const -{ - const b2Body* bodyA = m_fixtureA->GetBody(); - const b2Body* bodyB = m_fixtureB->GetBody(); - const b2Shape* shapeA = m_fixtureA->GetShape(); - const b2Shape* shapeB = m_fixtureB->GetShape(); - - worldManifold->Initialize(&m_manifold, bodyA->GetTransform(), shapeA->m_radius, bodyB->GetTransform(), shapeB->m_radius); -} - -inline void b2Contact::SetEnabled(bool flag) -{ - if (flag) - { - m_flags |= e_enabledFlag; - } - else - { - m_flags &= ~e_enabledFlag; - } -} - -inline bool b2Contact::IsEnabled() const -{ - return (m_flags & e_enabledFlag) == e_enabledFlag; -} - -inline bool b2Contact::IsTouching() const -{ - return (m_flags & e_touchingFlag) == e_touchingFlag; -} - -inline b2Contact* b2Contact::GetNext() -{ - return m_next; -} - -inline const b2Contact* b2Contact::GetNext() const -{ - return m_next; -} - -inline b2Fixture* b2Contact::GetFixtureA() -{ - return m_fixtureA; -} - -inline const b2Fixture* b2Contact::GetFixtureA() const -{ - return m_fixtureA; -} - -inline b2Fixture* b2Contact::GetFixtureB() -{ - return m_fixtureB; -} - -inline const b2Fixture* b2Contact::GetFixtureB() const -{ - return m_fixtureB; -} - -inline void b2Contact::FlagForFiltering() -{ - m_flags |= e_filterFlag; -} - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/Contacts/b2ContactSolver.cpp b/Littlest/libs/Box2D/Dynamics/Contacts/b2ContactSolver.cpp deleted file mode 100644 index f65fb60..0000000 --- a/Littlest/libs/Box2D/Dynamics/Contacts/b2ContactSolver.cpp +++ /dev/null @@ -1,623 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include -#include -#include -#include - -#define B2_DEBUG_SOLVER 0 - -b2ContactSolver::b2ContactSolver(b2Contact** contacts, int32 contactCount, - b2StackAllocator* allocator, float32 impulseRatio) -{ - m_allocator = allocator; - - m_constraintCount = contactCount; - m_constraints = (b2ContactConstraint*)m_allocator->Allocate(m_constraintCount * sizeof(b2ContactConstraint)); - - for (int32 i = 0; i < m_constraintCount; ++i) - { - b2Contact* contact = contacts[i]; - - b2Fixture* fixtureA = contact->m_fixtureA; - b2Fixture* fixtureB = contact->m_fixtureB; - b2Shape* shapeA = fixtureA->GetShape(); - b2Shape* shapeB = fixtureB->GetShape(); - float32 radiusA = shapeA->m_radius; - float32 radiusB = shapeB->m_radius; - b2Body* bodyA = fixtureA->GetBody(); - b2Body* bodyB = fixtureB->GetBody(); - b2Manifold* manifold = contact->GetManifold(); - - float32 friction = b2MixFriction(fixtureA->GetFriction(), fixtureB->GetFriction()); - float32 restitution = b2MixRestitution(fixtureA->GetRestitution(), fixtureB->GetRestitution()); - - b2Vec2 vA = bodyA->m_linearVelocity; - b2Vec2 vB = bodyB->m_linearVelocity; - float32 wA = bodyA->m_angularVelocity; - float32 wB = bodyB->m_angularVelocity; - - b2Assert(manifold->pointCount > 0); - - b2WorldManifold worldManifold; - worldManifold.Initialize(manifold, bodyA->m_xf, radiusA, bodyB->m_xf, radiusB); - - b2ContactConstraint* cc = m_constraints + i; - cc->bodyA = bodyA; - cc->bodyB = bodyB; - cc->manifold = manifold; - cc->normal = worldManifold.normal; - cc->pointCount = manifold->pointCount; - cc->friction = friction; - - cc->localNormal = manifold->localNormal; - cc->localPoint = manifold->localPoint; - cc->radius = radiusA + radiusB; - cc->type = manifold->type; - - for (int32 j = 0; j < cc->pointCount; ++j) - { - b2ManifoldPoint* cp = manifold->points + j; - b2ContactConstraintPoint* ccp = cc->points + j; - - ccp->normalImpulse = impulseRatio * cp->normalImpulse; - ccp->tangentImpulse = impulseRatio * cp->tangentImpulse; - - ccp->localPoint = cp->localPoint; - - ccp->rA = worldManifold.points[j] - bodyA->m_sweep.c; - ccp->rB = worldManifold.points[j] - bodyB->m_sweep.c; - - float32 rnA = b2Cross(ccp->rA, cc->normal); - float32 rnB = b2Cross(ccp->rB, cc->normal); - rnA *= rnA; - rnB *= rnB; - - float32 kNormal = bodyA->m_invMass + bodyB->m_invMass + bodyA->m_invI * rnA + bodyB->m_invI * rnB; - - b2Assert(kNormal > b2_epsilon); - ccp->normalMass = 1.0f / kNormal; - - b2Vec2 tangent = b2Cross(cc->normal, 1.0f); - - float32 rtA = b2Cross(ccp->rA, tangent); - float32 rtB = b2Cross(ccp->rB, tangent); - rtA *= rtA; - rtB *= rtB; - - float32 kTangent = bodyA->m_invMass + bodyB->m_invMass + bodyA->m_invI * rtA + bodyB->m_invI * rtB; - - b2Assert(kTangent > b2_epsilon); - ccp->tangentMass = 1.0f / kTangent; - - // Setup a velocity bias for restitution. - ccp->velocityBias = 0.0f; - float32 vRel = b2Dot(cc->normal, vB + b2Cross(wB, ccp->rB) - vA - b2Cross(wA, ccp->rA)); - if (vRel < -b2_velocityThreshold) - { - ccp->velocityBias = -restitution * vRel; - } - } - - // If we have two points, then prepare the block solver. - if (cc->pointCount == 2) - { - b2ContactConstraintPoint* ccp1 = cc->points + 0; - b2ContactConstraintPoint* ccp2 = cc->points + 1; - - float32 invMassA = bodyA->m_invMass; - float32 invIA = bodyA->m_invI; - float32 invMassB = bodyB->m_invMass; - float32 invIB = bodyB->m_invI; - - float32 rn1A = b2Cross(ccp1->rA, cc->normal); - float32 rn1B = b2Cross(ccp1->rB, cc->normal); - float32 rn2A = b2Cross(ccp2->rA, cc->normal); - float32 rn2B = b2Cross(ccp2->rB, cc->normal); - - float32 k11 = invMassA + invMassB + invIA * rn1A * rn1A + invIB * rn1B * rn1B; - float32 k22 = invMassA + invMassB + invIA * rn2A * rn2A + invIB * rn2B * rn2B; - float32 k12 = invMassA + invMassB + invIA * rn1A * rn2A + invIB * rn1B * rn2B; - - // Ensure a reasonable condition number. - const float32 k_maxConditionNumber = 100.0f; - if (k11 * k11 < k_maxConditionNumber * (k11 * k22 - k12 * k12)) - { - // K is safe to invert. - cc->K.col1.Set(k11, k12); - cc->K.col2.Set(k12, k22); - cc->normalMass = cc->K.GetInverse(); - } - else - { - // The constraints are redundant, just use one. - // TODO_ERIN use deepest? - cc->pointCount = 1; - } - } - } -} - -b2ContactSolver::~b2ContactSolver() -{ - m_allocator->Free(m_constraints); -} - -void b2ContactSolver::WarmStart() -{ - // Warm start. - for (int32 i = 0; i < m_constraintCount; ++i) - { - b2ContactConstraint* c = m_constraints + i; - - b2Body* bodyA = c->bodyA; - b2Body* bodyB = c->bodyB; - float32 invMassA = bodyA->m_invMass; - float32 invIA = bodyA->m_invI; - float32 invMassB = bodyB->m_invMass; - float32 invIB = bodyB->m_invI; - b2Vec2 normal = c->normal; - b2Vec2 tangent = b2Cross(normal, 1.0f); - - for (int32 j = 0; j < c->pointCount; ++j) - { - b2ContactConstraintPoint* ccp = c->points + j; - b2Vec2 P = ccp->normalImpulse * normal + ccp->tangentImpulse * tangent; - bodyA->m_angularVelocity -= invIA * b2Cross(ccp->rA, P); - bodyA->m_linearVelocity -= invMassA * P; - bodyB->m_angularVelocity += invIB * b2Cross(ccp->rB, P); - bodyB->m_linearVelocity += invMassB * P; - } - } -} - -void b2ContactSolver::SolveVelocityConstraints() -{ - for (int32 i = 0; i < m_constraintCount; ++i) - { - b2ContactConstraint* c = m_constraints + i; - b2Body* bodyA = c->bodyA; - b2Body* bodyB = c->bodyB; - float32 wA = bodyA->m_angularVelocity; - float32 wB = bodyB->m_angularVelocity; - b2Vec2 vA = bodyA->m_linearVelocity; - b2Vec2 vB = bodyB->m_linearVelocity; - float32 invMassA = bodyA->m_invMass; - float32 invIA = bodyA->m_invI; - float32 invMassB = bodyB->m_invMass; - float32 invIB = bodyB->m_invI; - b2Vec2 normal = c->normal; - b2Vec2 tangent = b2Cross(normal, 1.0f); - float32 friction = c->friction; - - b2Assert(c->pointCount == 1 || c->pointCount == 2); - - // Solve tangent constraints - for (int32 j = 0; j < c->pointCount; ++j) - { - b2ContactConstraintPoint* ccp = c->points + j; - - // Relative velocity at contact - b2Vec2 dv = vB + b2Cross(wB, ccp->rB) - vA - b2Cross(wA, ccp->rA); - - // Compute tangent force - float32 vt = b2Dot(dv, tangent); - float32 lambda = ccp->tangentMass * (-vt); - - // b2Clamp the accumulated force - float32 maxFriction = friction * ccp->normalImpulse; - float32 newImpulse = b2Clamp(ccp->tangentImpulse + lambda, -maxFriction, maxFriction); - lambda = newImpulse - ccp->tangentImpulse; - - // Apply contact impulse - b2Vec2 P = lambda * tangent; - - vA -= invMassA * P; - wA -= invIA * b2Cross(ccp->rA, P); - - vB += invMassB * P; - wB += invIB * b2Cross(ccp->rB, P); - - ccp->tangentImpulse = newImpulse; - } - - // Solve normal constraints - if (c->pointCount == 1) - { - b2ContactConstraintPoint* ccp = c->points + 0; - - // Relative velocity at contact - b2Vec2 dv = vB + b2Cross(wB, ccp->rB) - vA - b2Cross(wA, ccp->rA); - - // Compute normal impulse - float32 vn = b2Dot(dv, normal); - float32 lambda = -ccp->normalMass * (vn - ccp->velocityBias); - - // b2Clamp the accumulated impulse - float32 newImpulse = b2Max(ccp->normalImpulse + lambda, 0.0f); - lambda = newImpulse - ccp->normalImpulse; - - // Apply contact impulse - b2Vec2 P = lambda * normal; - vA -= invMassA * P; - wA -= invIA * b2Cross(ccp->rA, P); - - vB += invMassB * P; - wB += invIB * b2Cross(ccp->rB, P); - ccp->normalImpulse = newImpulse; - } - else - { - // Block solver developed in collaboration with Dirk Gregorius (back in 01/07 on Box2D_Lite). - // Build the mini LCP for this contact patch - // - // vn = A * x + b, vn >= 0, , vn >= 0, x >= 0 and vn_i * x_i = 0 with i = 1..2 - // - // A = J * W * JT and J = ( -n, -r1 x n, n, r2 x n ) - // b = vn_0 - velocityBias - // - // The system is solved using the "Total enumeration method" (s. Murty). The complementary constraint vn_i * x_i - // implies that we must have in any solution either vn_i = 0 or x_i = 0. So for the 2D contact problem the cases - // vn1 = 0 and vn2 = 0, x1 = 0 and x2 = 0, x1 = 0 and vn2 = 0, x2 = 0 and vn1 = 0 need to be tested. The first valid - // solution that satisfies the problem is chosen. - // - // In order to account of the accumulated impulse 'a' (because of the iterative nature of the solver which only requires - // that the accumulated impulse is clamped and not the incremental impulse) we change the impulse variable (x_i). - // - // Substitute: - // - // x = x' - a - // - // Plug into above equation: - // - // vn = A * x + b - // = A * (x' - a) + b - // = A * x' + b - A * a - // = A * x' + b' - // b' = b - A * a; - - b2ContactConstraintPoint* cp1 = c->points + 0; - b2ContactConstraintPoint* cp2 = c->points + 1; - - b2Vec2 a(cp1->normalImpulse, cp2->normalImpulse); - b2Assert(a.x >= 0.0f && a.y >= 0.0f); - - // Relative velocity at contact - b2Vec2 dv1 = vB + b2Cross(wB, cp1->rB) - vA - b2Cross(wA, cp1->rA); - b2Vec2 dv2 = vB + b2Cross(wB, cp2->rB) - vA - b2Cross(wA, cp2->rA); - - // Compute normal velocity - float32 vn1 = b2Dot(dv1, normal); - float32 vn2 = b2Dot(dv2, normal); - - b2Vec2 b; - b.x = vn1 - cp1->velocityBias; - b.y = vn2 - cp2->velocityBias; - b -= b2Mul(c->K, a); - - const float32 k_errorTol = 1e-3f; - B2_NOT_USED(k_errorTol); - - for (;;) - { - // - // Case 1: vn = 0 - // - // 0 = A * x' + b' - // - // Solve for x': - // - // x' = - inv(A) * b' - // - b2Vec2 x = - b2Mul(c->normalMass, b); - - if (x.x >= 0.0f && x.y >= 0.0f) - { - // Resubstitute for the incremental impulse - b2Vec2 d = x - a; - - // Apply incremental impulse - b2Vec2 P1 = d.x * normal; - b2Vec2 P2 = d.y * normal; - vA -= invMassA * (P1 + P2); - wA -= invIA * (b2Cross(cp1->rA, P1) + b2Cross(cp2->rA, P2)); - - vB += invMassB * (P1 + P2); - wB += invIB * (b2Cross(cp1->rB, P1) + b2Cross(cp2->rB, P2)); - - // Accumulate - cp1->normalImpulse = x.x; - cp2->normalImpulse = x.y; - -#if B2_DEBUG_SOLVER == 1 - // Postconditions - dv1 = vB + b2Cross(wB, cp1->rB) - vA - b2Cross(wA, cp1->rA); - dv2 = vB + b2Cross(wB, cp2->rB) - vA - b2Cross(wA, cp2->rA); - - // Compute normal velocity - vn1 = b2Dot(dv1, normal); - vn2 = b2Dot(dv2, normal); - - b2Assert(b2Abs(vn1 - cp1->velocityBias) < k_errorTol); - b2Assert(b2Abs(vn2 - cp2->velocityBias) < k_errorTol); -#endif - break; - } - - // - // Case 2: vn1 = 0 and x2 = 0 - // - // 0 = a11 * x1' + a12 * 0 + b1' - // vn2 = a21 * x1' + a22 * 0 + b2' - // - x.x = - cp1->normalMass * b.x; - x.y = 0.0f; - vn1 = 0.0f; - vn2 = c->K.col1.y * x.x + b.y; - - if (x.x >= 0.0f && vn2 >= 0.0f) - { - // Resubstitute for the incremental impulse - b2Vec2 d = x - a; - - // Apply incremental impulse - b2Vec2 P1 = d.x * normal; - b2Vec2 P2 = d.y * normal; - vA -= invMassA * (P1 + P2); - wA -= invIA * (b2Cross(cp1->rA, P1) + b2Cross(cp2->rA, P2)); - - vB += invMassB * (P1 + P2); - wB += invIB * (b2Cross(cp1->rB, P1) + b2Cross(cp2->rB, P2)); - - // Accumulate - cp1->normalImpulse = x.x; - cp2->normalImpulse = x.y; - -#if B2_DEBUG_SOLVER == 1 - // Postconditions - dv1 = vB + b2Cross(wB, cp1->rB) - vA - b2Cross(wA, cp1->rA); - - // Compute normal velocity - vn1 = b2Dot(dv1, normal); - - b2Assert(b2Abs(vn1 - cp1->velocityBias) < k_errorTol); -#endif - break; - } - - - // - // Case 3: vn2 = 0 and x1 = 0 - // - // vn1 = a11 * 0 + a12 * x2' + b1' - // 0 = a21 * 0 + a22 * x2' + b2' - // - x.x = 0.0f; - x.y = - cp2->normalMass * b.y; - vn1 = c->K.col2.x * x.y + b.x; - vn2 = 0.0f; - - if (x.y >= 0.0f && vn1 >= 0.0f) - { - // Resubstitute for the incremental impulse - b2Vec2 d = x - a; - - // Apply incremental impulse - b2Vec2 P1 = d.x * normal; - b2Vec2 P2 = d.y * normal; - vA -= invMassA * (P1 + P2); - wA -= invIA * (b2Cross(cp1->rA, P1) + b2Cross(cp2->rA, P2)); - - vB += invMassB * (P1 + P2); - wB += invIB * (b2Cross(cp1->rB, P1) + b2Cross(cp2->rB, P2)); - - // Accumulate - cp1->normalImpulse = x.x; - cp2->normalImpulse = x.y; - -#if B2_DEBUG_SOLVER == 1 - // Postconditions - dv2 = vB + b2Cross(wB, cp2->rB) - vA - b2Cross(wA, cp2->rA); - - // Compute normal velocity - vn2 = b2Dot(dv2, normal); - - b2Assert(b2Abs(vn2 - cp2->velocityBias) < k_errorTol); -#endif - break; - } - - // - // Case 4: x1 = 0 and x2 = 0 - // - // vn1 = b1 - // vn2 = b2; - x.x = 0.0f; - x.y = 0.0f; - vn1 = b.x; - vn2 = b.y; - - if (vn1 >= 0.0f && vn2 >= 0.0f ) - { - // Resubstitute for the incremental impulse - b2Vec2 d = x - a; - - // Apply incremental impulse - b2Vec2 P1 = d.x * normal; - b2Vec2 P2 = d.y * normal; - vA -= invMassA * (P1 + P2); - wA -= invIA * (b2Cross(cp1->rA, P1) + b2Cross(cp2->rA, P2)); - - vB += invMassB * (P1 + P2); - wB += invIB * (b2Cross(cp1->rB, P1) + b2Cross(cp2->rB, P2)); - - // Accumulate - cp1->normalImpulse = x.x; - cp2->normalImpulse = x.y; - - break; - } - - // No solution, give up. This is hit sometimes, but it doesn't seem to matter. - break; - } - } - - bodyA->m_linearVelocity = vA; - bodyA->m_angularVelocity = wA; - bodyB->m_linearVelocity = vB; - bodyB->m_angularVelocity = wB; - } -} - -void b2ContactSolver::StoreImpulses() -{ - for (int32 i = 0; i < m_constraintCount; ++i) - { - b2ContactConstraint* c = m_constraints + i; - b2Manifold* m = c->manifold; - - for (int32 j = 0; j < c->pointCount; ++j) - { - m->points[j].normalImpulse = c->points[j].normalImpulse; - m->points[j].tangentImpulse = c->points[j].tangentImpulse; - } - } -} - -struct b2PositionSolverManifold -{ - void Initialize(b2ContactConstraint* cc, int32 index) - { - b2Assert(cc->pointCount > 0); - - switch (cc->type) - { - case b2Manifold::e_circles: - { - b2Vec2 pointA = cc->bodyA->GetWorldPoint(cc->localPoint); - b2Vec2 pointB = cc->bodyB->GetWorldPoint(cc->points[0].localPoint); - if (b2DistanceSquared(pointA, pointB) > b2_epsilon * b2_epsilon) - { - normal = pointB - pointA; - normal.Normalize(); - } - else - { - normal.Set(1.0f, 0.0f); - } - - point = 0.5f * (pointA + pointB); - separation = b2Dot(pointB - pointA, normal) - cc->radius; - } - break; - - case b2Manifold::e_faceA: - { - normal = cc->bodyA->GetWorldVector(cc->localNormal); - b2Vec2 planePoint = cc->bodyA->GetWorldPoint(cc->localPoint); - - b2Vec2 clipPoint = cc->bodyB->GetWorldPoint(cc->points[index].localPoint); - separation = b2Dot(clipPoint - planePoint, normal) - cc->radius; - point = clipPoint; - } - break; - - case b2Manifold::e_faceB: - { - normal = cc->bodyB->GetWorldVector(cc->localNormal); - b2Vec2 planePoint = cc->bodyB->GetWorldPoint(cc->localPoint); - - b2Vec2 clipPoint = cc->bodyA->GetWorldPoint(cc->points[index].localPoint); - separation = b2Dot(clipPoint - planePoint, normal) - cc->radius; - point = clipPoint; - - // Ensure normal points from A to B - normal = -normal; - } - break; - } - } - - b2Vec2 normal; - b2Vec2 point; - float32 separation; -}; - -// Sequential solver. -bool b2ContactSolver::SolvePositionConstraints(float32 baumgarte) -{ - float32 minSeparation = 0.0f; - - for (int32 i = 0; i < m_constraintCount; ++i) - { - b2ContactConstraint* c = m_constraints + i; - b2Body* bodyA = c->bodyA; - b2Body* bodyB = c->bodyB; - - float32 invMassA = bodyA->m_mass * bodyA->m_invMass; - float32 invIA = bodyA->m_mass * bodyA->m_invI; - float32 invMassB = bodyB->m_mass * bodyB->m_invMass; - float32 invIB = bodyB->m_mass * bodyB->m_invI; - - // Solve normal constraints - for (int32 j = 0; j < c->pointCount; ++j) - { - b2PositionSolverManifold psm; - psm.Initialize(c, j); - b2Vec2 normal = psm.normal; - - b2Vec2 point = psm.point; - float32 separation = psm.separation; - - b2Vec2 rA = point - bodyA->m_sweep.c; - b2Vec2 rB = point - bodyB->m_sweep.c; - - // Track max constraint error. - minSeparation = b2Min(minSeparation, separation); - - // Prevent large corrections and allow slop. - float32 C = b2Clamp(baumgarte * (separation + b2_linearSlop), -b2_maxLinearCorrection, 0.0f); - - // Compute the effective mass. - float32 rnA = b2Cross(rA, normal); - float32 rnB = b2Cross(rB, normal); - float32 K = invMassA + invMassB + invIA * rnA * rnA + invIB * rnB * rnB; - - // Compute normal impulse - float32 impulse = K > 0.0f ? - C / K : 0.0f; - - b2Vec2 P = impulse * normal; - - bodyA->m_sweep.c -= invMassA * P; - bodyA->m_sweep.a -= invIA * b2Cross(rA, P); - bodyA->SynchronizeTransform(); - - bodyB->m_sweep.c += invMassB * P; - bodyB->m_sweep.a += invIB * b2Cross(rB, P); - bodyB->SynchronizeTransform(); - } - } - - // We can't expect minSpeparation >= -b2_linearSlop because we don't - // push the separation above -b2_linearSlop. - return minSeparation >= -1.5f * b2_linearSlop; -} diff --git a/Littlest/libs/Box2D/Dynamics/Contacts/b2ContactSolver.h b/Littlest/libs/Box2D/Dynamics/Contacts/b2ContactSolver.h deleted file mode 100644 index b8555bb..0000000 --- a/Littlest/libs/Box2D/Dynamics/Contacts/b2ContactSolver.h +++ /dev/null @@ -1,78 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_CONTACT_SOLVER_H -#define B2_CONTACT_SOLVER_H - -#include -#include -#include - -class b2Contact; -class b2Body; -class b2StackAllocator; - -struct b2ContactConstraintPoint -{ - b2Vec2 localPoint; - b2Vec2 rA; - b2Vec2 rB; - float32 normalImpulse; - float32 tangentImpulse; - float32 normalMass; - float32 tangentMass; - float32 velocityBias; -}; - -struct b2ContactConstraint -{ - b2ContactConstraintPoint points[b2_maxManifoldPoints]; - b2Vec2 localNormal; - b2Vec2 localPoint; - b2Vec2 normal; - b2Mat22 normalMass; - b2Mat22 K; - b2Body* bodyA; - b2Body* bodyB; - b2Manifold::Type type; - float32 radius; - float32 friction; - int32 pointCount; - b2Manifold* manifold; -}; - -class b2ContactSolver -{ -public: - b2ContactSolver(b2Contact** contacts, int32 contactCount, - b2StackAllocator* allocator, float32 impulseRatio); - - ~b2ContactSolver(); - - void WarmStart(); - void SolveVelocityConstraints(); - void StoreImpulses(); - - bool SolvePositionConstraints(float32 baumgarte); - - b2StackAllocator* m_allocator; - b2ContactConstraint* m_constraints; - int m_constraintCount; -}; - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/Contacts/b2NullContact.h b/Littlest/libs/Box2D/Dynamics/Contacts/b2NullContact.h deleted file mode 100644 index f43c3d8..0000000 --- a/Littlest/libs/Box2D/Dynamics/Contacts/b2NullContact.h +++ /dev/null @@ -1,37 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_NULL_CONTACT_H -#define B2_NULL_CONTACT_H - -#include - -class b2NullContact : public b2Contact -{ -public: - b2NullContact() {} - void Evaluate() {} - float32 ComputeTOI(const b2Sweep& sweepA, const b2Sweep& sweepB) const - { - B2_NOT_USED(sweepA); - B2_NOT_USED(sweepB); - return 1.0f; - } -}; - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.cpp b/Littlest/libs/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.cpp deleted file mode 100644 index 837722d..0000000 --- a/Littlest/libs/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include -#include -#include -#include - -#include - -b2Contact* b2PolygonAndCircleContact::Create(b2Fixture* fixtureA, b2Fixture* fixtureB, b2BlockAllocator* allocator) -{ - void* mem = allocator->Allocate(sizeof(b2PolygonAndCircleContact)); - return new (mem) b2PolygonAndCircleContact(fixtureA, fixtureB); -} - -void b2PolygonAndCircleContact::Destroy(b2Contact* contact, b2BlockAllocator* allocator) -{ - ((b2PolygonAndCircleContact*)contact)->~b2PolygonAndCircleContact(); - allocator->Free(contact, sizeof(b2PolygonAndCircleContact)); -} - -b2PolygonAndCircleContact::b2PolygonAndCircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB) -: b2Contact(fixtureA, fixtureB) -{ - b2Assert(m_fixtureA->GetType() == b2Shape::e_polygon); - b2Assert(m_fixtureB->GetType() == b2Shape::e_circle); -} - -void b2PolygonAndCircleContact::Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) -{ - b2CollidePolygonAndCircle( manifold, - (b2PolygonShape*)m_fixtureA->GetShape(), xfA, - (b2CircleShape*)m_fixtureB->GetShape(), xfB); -} diff --git a/Littlest/libs/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.h b/Littlest/libs/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.h deleted file mode 100644 index 684b2ae..0000000 --- a/Littlest/libs/Box2D/Dynamics/Contacts/b2PolygonAndCircleContact.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_POLYGON_AND_CIRCLE_CONTACT_H -#define B2_POLYGON_AND_CIRCLE_CONTACT_H - -#include - -class b2BlockAllocator; - -class b2PolygonAndCircleContact : public b2Contact -{ -public: - static b2Contact* Create(b2Fixture* fixtureA, b2Fixture* fixtureB, b2BlockAllocator* allocator); - static void Destroy(b2Contact* contact, b2BlockAllocator* allocator); - - b2PolygonAndCircleContact(b2Fixture* fixtureA, b2Fixture* fixtureB); - ~b2PolygonAndCircleContact() {} - - void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB); -}; - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/Contacts/b2PolygonContact.cpp b/Littlest/libs/Box2D/Dynamics/Contacts/b2PolygonContact.cpp deleted file mode 100644 index eab2af5..0000000 --- a/Littlest/libs/Box2D/Dynamics/Contacts/b2PolygonContact.cpp +++ /dev/null @@ -1,52 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include -#include -#include -#include - -#include - -b2Contact* b2PolygonContact::Create(b2Fixture* fixtureA, b2Fixture* fixtureB, b2BlockAllocator* allocator) -{ - void* mem = allocator->Allocate(sizeof(b2PolygonContact)); - return new (mem) b2PolygonContact(fixtureA, fixtureB); -} - -void b2PolygonContact::Destroy(b2Contact* contact, b2BlockAllocator* allocator) -{ - ((b2PolygonContact*)contact)->~b2PolygonContact(); - allocator->Free(contact, sizeof(b2PolygonContact)); -} - -b2PolygonContact::b2PolygonContact(b2Fixture* fixtureA, b2Fixture* fixtureB) - : b2Contact(fixtureA, fixtureB) -{ - b2Assert(m_fixtureA->GetType() == b2Shape::e_polygon); - b2Assert(m_fixtureB->GetType() == b2Shape::e_polygon); -} - -void b2PolygonContact::Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB) -{ - b2CollidePolygons( manifold, - (b2PolygonShape*)m_fixtureA->GetShape(), xfA, - (b2PolygonShape*)m_fixtureB->GetShape(), xfB); -} diff --git a/Littlest/libs/Box2D/Dynamics/Contacts/b2PolygonContact.h b/Littlest/libs/Box2D/Dynamics/Contacts/b2PolygonContact.h deleted file mode 100644 index af544c2..0000000 --- a/Littlest/libs/Box2D/Dynamics/Contacts/b2PolygonContact.h +++ /dev/null @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_POLYGON_CONTACT_H -#define B2_POLYGON_CONTACT_H - -#include - -class b2BlockAllocator; - -class b2PolygonContact : public b2Contact -{ -public: - static b2Contact* Create(b2Fixture* fixtureA, b2Fixture* fixtureB, b2BlockAllocator* allocator); - static void Destroy(b2Contact* contact, b2BlockAllocator* allocator); - - b2PolygonContact(b2Fixture* fixtureA, b2Fixture* fixtureB); - ~b2PolygonContact() {} - - void Evaluate(b2Manifold* manifold, const b2Transform& xfA, const b2Transform& xfB); -}; - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/Contacts/b2TOISolver.cpp b/Littlest/libs/Box2D/Dynamics/Contacts/b2TOISolver.cpp deleted file mode 100644 index 567cd71..0000000 --- a/Littlest/libs/Box2D/Dynamics/Contacts/b2TOISolver.cpp +++ /dev/null @@ -1,231 +0,0 @@ -/* -* Copyright (c) 2006-2010 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include -#include -#include - -struct b2TOIConstraint -{ - b2Vec2 localPoints[b2_maxManifoldPoints]; - b2Vec2 localNormal; - b2Vec2 localPoint; - b2Manifold::Type type; - float32 radius; - int32 pointCount; - b2Body* bodyA; - b2Body* bodyB; -}; - -b2TOISolver::b2TOISolver(b2StackAllocator* allocator) -{ - m_allocator = allocator; - m_constraints = NULL; - m_count = NULL; - m_toiBody = NULL; -} - -b2TOISolver::~b2TOISolver() -{ - Clear(); -} - -void b2TOISolver::Clear() -{ - if (m_allocator && m_constraints) - { - m_allocator->Free(m_constraints); - m_constraints = NULL; - } -} - -void b2TOISolver::Initialize(b2Contact** contacts, int32 count, b2Body* toiBody) -{ - Clear(); - - m_count = count; - m_toiBody = toiBody; - - m_constraints = (b2TOIConstraint*) m_allocator->Allocate(m_count * sizeof(b2TOIConstraint)); - - for (int32 i = 0; i < m_count; ++i) - { - b2Contact* contact = contacts[i]; - - b2Fixture* fixtureA = contact->GetFixtureA(); - b2Fixture* fixtureB = contact->GetFixtureB(); - b2Shape* shapeA = fixtureA->GetShape(); - b2Shape* shapeB = fixtureB->GetShape(); - float32 radiusA = shapeA->m_radius; - float32 radiusB = shapeB->m_radius; - b2Body* bodyA = fixtureA->GetBody(); - b2Body* bodyB = fixtureB->GetBody(); - b2Manifold* manifold = contact->GetManifold(); - - b2Assert(manifold->pointCount > 0); - - b2TOIConstraint* constraint = m_constraints + i; - constraint->bodyA = bodyA; - constraint->bodyB = bodyB; - constraint->localNormal = manifold->localNormal; - constraint->localPoint = manifold->localPoint; - constraint->type = manifold->type; - constraint->pointCount = manifold->pointCount; - constraint->radius = radiusA + radiusB; - - for (int32 j = 0; j < constraint->pointCount; ++j) - { - b2ManifoldPoint* cp = manifold->points + j; - constraint->localPoints[j] = cp->localPoint; - } - } -} - -struct b2TOISolverManifold -{ - void Initialize(b2TOIConstraint* cc, int32 index) - { - b2Assert(cc->pointCount > 0); - - switch (cc->type) - { - case b2Manifold::e_circles: - { - b2Vec2 pointA = cc->bodyA->GetWorldPoint(cc->localPoint); - b2Vec2 pointB = cc->bodyB->GetWorldPoint(cc->localPoints[0]); - if (b2DistanceSquared(pointA, pointB) > b2_epsilon * b2_epsilon) - { - normal = pointB - pointA; - normal.Normalize(); - } - else - { - normal.Set(1.0f, 0.0f); - } - - point = 0.5f * (pointA + pointB); - separation = b2Dot(pointB - pointA, normal) - cc->radius; - } - break; - - case b2Manifold::e_faceA: - { - normal = cc->bodyA->GetWorldVector(cc->localNormal); - b2Vec2 planePoint = cc->bodyA->GetWorldPoint(cc->localPoint); - - b2Vec2 clipPoint = cc->bodyB->GetWorldPoint(cc->localPoints[index]); - separation = b2Dot(clipPoint - planePoint, normal) - cc->radius; - point = clipPoint; - } - break; - - case b2Manifold::e_faceB: - { - normal = cc->bodyB->GetWorldVector(cc->localNormal); - b2Vec2 planePoint = cc->bodyB->GetWorldPoint(cc->localPoint); - - b2Vec2 clipPoint = cc->bodyA->GetWorldPoint(cc->localPoints[index]); - separation = b2Dot(clipPoint - planePoint, normal) - cc->radius; - point = clipPoint; - - // Ensure normal points from A to B - normal = -normal; - } - break; - } - } - - b2Vec2 normal; - b2Vec2 point; - float32 separation; -}; - -// Push out the toi body to provide clearance for further simulation. -bool b2TOISolver::Solve(float32 baumgarte) -{ - float32 minSeparation = 0.0f; - - for (int32 i = 0; i < m_count; ++i) - { - b2TOIConstraint* c = m_constraints + i; - b2Body* bodyA = c->bodyA; - b2Body* bodyB = c->bodyB; - - float32 massA = bodyA->m_mass; - float32 massB = bodyB->m_mass; - - // Only the TOI body should move. - if (bodyA == m_toiBody) - { - massB = 0.0f; - } - else - { - massA = 0.0f; - } - - float32 invMassA = massA * bodyA->m_invMass; - float32 invIA = massA * bodyA->m_invI; - float32 invMassB = massB * bodyB->m_invMass; - float32 invIB = massB * bodyB->m_invI; - - // Solve normal constraints - for (int32 j = 0; j < c->pointCount; ++j) - { - b2TOISolverManifold psm; - psm.Initialize(c, j); - b2Vec2 normal = psm.normal; - - b2Vec2 point = psm.point; - float32 separation = psm.separation; - - b2Vec2 rA = point - bodyA->m_sweep.c; - b2Vec2 rB = point - bodyB->m_sweep.c; - - // Track max constraint error. - minSeparation = b2Min(minSeparation, separation); - - // Prevent large corrections and allow slop. - float32 C = b2Clamp(baumgarte * (separation + b2_linearSlop), -b2_maxLinearCorrection, 0.0f); - - // Compute the effective mass. - float32 rnA = b2Cross(rA, normal); - float32 rnB = b2Cross(rB, normal); - float32 K = invMassA + invMassB + invIA * rnA * rnA + invIB * rnB * rnB; - - // Compute normal impulse - float32 impulse = K > 0.0f ? - C / K : 0.0f; - - b2Vec2 P = impulse * normal; - - bodyA->m_sweep.c -= invMassA * P; - bodyA->m_sweep.a -= invIA * b2Cross(rA, P); - bodyA->SynchronizeTransform(); - - bodyB->m_sweep.c += invMassB * P; - bodyB->m_sweep.a += invIB * b2Cross(rB, P); - bodyB->SynchronizeTransform(); - } - } - - // We can't expect minSpeparation >= -b2_linearSlop because we don't - // push the separation above -b2_linearSlop. - return minSeparation >= -1.5f * b2_linearSlop; -} diff --git a/Littlest/libs/Box2D/Dynamics/Contacts/b2TOISolver.h b/Littlest/libs/Box2D/Dynamics/Contacts/b2TOISolver.h deleted file mode 100644 index c092e2a..0000000 --- a/Littlest/libs/Box2D/Dynamics/Contacts/b2TOISolver.h +++ /dev/null @@ -1,51 +0,0 @@ -/* -* Copyright (c) 2006-2010 Erin Catto http://www.gphysics.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 B2_TOI_SOLVER_H -#define B2_TOI_SOLVER_H - -#include - -class b2Contact; -class b2Body; -struct b2TOIConstraint; -class b2StackAllocator; - -/// This is a pure position solver for a single movable body in contact with -/// multiple non-moving bodies. -class b2TOISolver -{ -public: - b2TOISolver(b2StackAllocator* allocator); - ~b2TOISolver(); - - void Initialize(b2Contact** contacts, int32 contactCount, b2Body* toiBody); - void Clear(); - - // Perform one solver iteration. Returns true if converged. - bool Solve(float32 baumgarte); - -private: - - b2TOIConstraint* m_constraints; - int32 m_count; - b2Body* m_toiBody; - b2StackAllocator* m_allocator; -}; - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2DistanceJoint.cpp b/Littlest/libs/Box2D/Dynamics/Joints/b2DistanceJoint.cpp deleted file mode 100644 index 3469bd9..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2DistanceJoint.cpp +++ /dev/null @@ -1,211 +0,0 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include - -// 1-D constrained system -// m (v2 - v1) = lambda -// v2 + (beta/h) * x1 + gamma * lambda = 0, gamma has units of inverse mass. -// x2 = x1 + h * v2 - -// 1-D mass-damper-spring system -// m (v2 - v1) + h * d * v2 + h * k * - -// C = norm(p2 - p1) - L -// u = (p2 - p1) / norm(p2 - p1) -// Cdot = dot(u, v2 + cross(w2, r2) - v1 - cross(w1, r1)) -// J = [-u -cross(r1, u) u cross(r2, u)] -// K = J * invM * JT -// = invMass1 + invI1 * cross(r1, u)^2 + invMass2 + invI2 * cross(r2, u)^2 - -void b2DistanceJointDef::Initialize(b2Body* b1, b2Body* b2, - const b2Vec2& anchor1, const b2Vec2& anchor2) -{ - bodyA = b1; - bodyB = b2; - localAnchorA = bodyA->GetLocalPoint(anchor1); - localAnchorB = bodyB->GetLocalPoint(anchor2); - b2Vec2 d = anchor2 - anchor1; - length = d.Length(); -} - - -b2DistanceJoint::b2DistanceJoint(const b2DistanceJointDef* def) -: b2Joint(def) -{ - m_localAnchor1 = def->localAnchorA; - m_localAnchor2 = def->localAnchorB; - m_length = def->length; - m_frequencyHz = def->frequencyHz; - m_dampingRatio = def->dampingRatio; - m_impulse = 0.0f; - m_gamma = 0.0f; - m_bias = 0.0f; -} - -void b2DistanceJoint::InitVelocityConstraints(const b2TimeStep& step) -{ - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - // Compute the effective mass matrix. - b2Vec2 r1 = b2Mul(b1->GetTransform().R, m_localAnchor1 - b1->GetLocalCenter()); - b2Vec2 r2 = b2Mul(b2->GetTransform().R, m_localAnchor2 - b2->GetLocalCenter()); - m_u = b2->m_sweep.c + r2 - b1->m_sweep.c - r1; - - // Handle singularity. - float32 length = m_u.Length(); - if (length > b2_linearSlop) - { - m_u *= 1.0f / length; - } - else - { - m_u.Set(0.0f, 0.0f); - } - - float32 cr1u = b2Cross(r1, m_u); - float32 cr2u = b2Cross(r2, m_u); - float32 invMass = b1->m_invMass + b1->m_invI * cr1u * cr1u + b2->m_invMass + b2->m_invI * cr2u * cr2u; - - m_mass = invMass != 0.0f ? 1.0f / invMass : 0.0f; - - if (m_frequencyHz > 0.0f) - { - float32 C = length - m_length; - - // Frequency - float32 omega = 2.0f * b2_pi * m_frequencyHz; - - // Damping coefficient - float32 d = 2.0f * m_mass * m_dampingRatio * omega; - - // Spring stiffness - float32 k = m_mass * omega * omega; - - // magic formulas - m_gamma = step.dt * (d + step.dt * k); - m_gamma = m_gamma != 0.0f ? 1.0f / m_gamma : 0.0f; - m_bias = C * step.dt * k * m_gamma; - - m_mass = invMass + m_gamma; - m_mass = m_mass != 0.0f ? 1.0f / m_mass : 0.0f; - } - - if (step.warmStarting) - { - // Scale the impulse to support a variable time step. - m_impulse *= step.dtRatio; - - b2Vec2 P = m_impulse * m_u; - b1->m_linearVelocity -= b1->m_invMass * P; - b1->m_angularVelocity -= b1->m_invI * b2Cross(r1, P); - b2->m_linearVelocity += b2->m_invMass * P; - b2->m_angularVelocity += b2->m_invI * b2Cross(r2, P); - } - else - { - m_impulse = 0.0f; - } -} - -void b2DistanceJoint::SolveVelocityConstraints(const b2TimeStep& step) -{ - B2_NOT_USED(step); - - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - b2Vec2 r1 = b2Mul(b1->GetTransform().R, m_localAnchor1 - b1->GetLocalCenter()); - b2Vec2 r2 = b2Mul(b2->GetTransform().R, m_localAnchor2 - b2->GetLocalCenter()); - - // Cdot = dot(u, v + cross(w, r)) - b2Vec2 v1 = b1->m_linearVelocity + b2Cross(b1->m_angularVelocity, r1); - b2Vec2 v2 = b2->m_linearVelocity + b2Cross(b2->m_angularVelocity, r2); - float32 Cdot = b2Dot(m_u, v2 - v1); - - float32 impulse = -m_mass * (Cdot + m_bias + m_gamma * m_impulse); - m_impulse += impulse; - - b2Vec2 P = impulse * m_u; - b1->m_linearVelocity -= b1->m_invMass * P; - b1->m_angularVelocity -= b1->m_invI * b2Cross(r1, P); - b2->m_linearVelocity += b2->m_invMass * P; - b2->m_angularVelocity += b2->m_invI * b2Cross(r2, P); -} - -bool b2DistanceJoint::SolvePositionConstraints(float32 baumgarte) -{ - B2_NOT_USED(baumgarte); - - if (m_frequencyHz > 0.0f) - { - // There is no position correction for soft distance constraints. - return true; - } - - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - b2Vec2 r1 = b2Mul(b1->GetTransform().R, m_localAnchor1 - b1->GetLocalCenter()); - b2Vec2 r2 = b2Mul(b2->GetTransform().R, m_localAnchor2 - b2->GetLocalCenter()); - - b2Vec2 d = b2->m_sweep.c + r2 - b1->m_sweep.c - r1; - - float32 length = d.Normalize(); - float32 C = length - m_length; - C = b2Clamp(C, -b2_maxLinearCorrection, b2_maxLinearCorrection); - - float32 impulse = -m_mass * C; - m_u = d; - b2Vec2 P = impulse * m_u; - - b1->m_sweep.c -= b1->m_invMass * P; - b1->m_sweep.a -= b1->m_invI * b2Cross(r1, P); - b2->m_sweep.c += b2->m_invMass * P; - b2->m_sweep.a += b2->m_invI * b2Cross(r2, P); - - b1->SynchronizeTransform(); - b2->SynchronizeTransform(); - - return b2Abs(C) < b2_linearSlop; -} - -b2Vec2 b2DistanceJoint::GetAnchorA() const -{ - return m_bodyA->GetWorldPoint(m_localAnchor1); -} - -b2Vec2 b2DistanceJoint::GetAnchorB() const -{ - return m_bodyB->GetWorldPoint(m_localAnchor2); -} - -b2Vec2 b2DistanceJoint::GetReactionForce(float32 inv_dt) const -{ - b2Vec2 F = (inv_dt * m_impulse) * m_u; - return F; -} - -float32 b2DistanceJoint::GetReactionTorque(float32 inv_dt) const -{ - B2_NOT_USED(inv_dt); - return 0.0f; -} diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2DistanceJoint.h b/Littlest/libs/Box2D/Dynamics/Joints/b2DistanceJoint.h deleted file mode 100644 index 448faa6..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2DistanceJoint.h +++ /dev/null @@ -1,140 +0,0 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.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 B2_DISTANCE_JOINT_H -#define B2_DISTANCE_JOINT_H - -#include - -/// Distance joint definition. This requires defining an -/// anchor point on both bodies and the non-zero length of the -/// distance joint. The definition uses local anchor points -/// so that the initial configuration can violate the constraint -/// slightly. This helps when saving and loading a game. -/// @warning Do not use a zero or short length. -struct b2DistanceJointDef : public b2JointDef -{ - b2DistanceJointDef() - { - type = e_distanceJoint; - localAnchorA.Set(0.0f, 0.0f); - localAnchorB.Set(0.0f, 0.0f); - length = 1.0f; - frequencyHz = 0.0f; - dampingRatio = 0.0f; - } - - /// Initialize the bodies, anchors, and length using the world - /// anchors. - void Initialize(b2Body* bodyA, b2Body* bodyB, - const b2Vec2& anchorA, const b2Vec2& anchorB); - - /// The local anchor point relative to body1's origin. - b2Vec2 localAnchorA; - - /// The local anchor point relative to body2's origin. - b2Vec2 localAnchorB; - - /// The natural length between the anchor points. - float32 length; - - /// The mass-spring-damper frequency in Hertz. - float32 frequencyHz; - - /// The damping ratio. 0 = no damping, 1 = critical damping. - float32 dampingRatio; -}; - -/// A distance joint constrains two points on two bodies -/// to remain at a fixed distance from each other. You can view -/// this as a massless, rigid rod. -class b2DistanceJoint : public b2Joint -{ -public: - - b2Vec2 GetAnchorA() const; - b2Vec2 GetAnchorB() const; - - b2Vec2 GetReactionForce(float32 inv_dt) const; - float32 GetReactionTorque(float32 inv_dt) const; - - /// Set/get the natural length. - /// Manipulating the length can lead to non-physical behavior when the frequency is zero. - void SetLength(float32 length); - float32 GetLength() const; - - // Set/get frequency in Hz. - void SetFrequency(float32 hz); - float32 GetFrequency() const; - - // Set/get damping ratio. - void SetDampingRatio(float32 ratio); - float32 GetDampingRatio() const; - -protected: - - friend class b2Joint; - b2DistanceJoint(const b2DistanceJointDef* data); - - void InitVelocityConstraints(const b2TimeStep& step); - void SolveVelocityConstraints(const b2TimeStep& step); - bool SolvePositionConstraints(float32 baumgarte); - - b2Vec2 m_localAnchor1; - b2Vec2 m_localAnchor2; - b2Vec2 m_u; - float32 m_frequencyHz; - float32 m_dampingRatio; - float32 m_gamma; - float32 m_bias; - float32 m_impulse; - float32 m_mass; - float32 m_length; -}; - -inline void b2DistanceJoint::SetLength(float32 length) -{ - m_length = length; -} - -inline float32 b2DistanceJoint::GetLength() const -{ - return m_length; -} - -inline void b2DistanceJoint::SetFrequency(float32 hz) -{ - m_frequencyHz = hz; -} - -inline float32 b2DistanceJoint::GetFrequency() const -{ - return m_frequencyHz; -} - -inline void b2DistanceJoint::SetDampingRatio(float32 ratio) -{ - m_dampingRatio = ratio; -} - -inline float32 b2DistanceJoint::GetDampingRatio() const -{ - return m_dampingRatio; -} - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2FrictionJoint.cpp b/Littlest/libs/Box2D/Dynamics/Joints/b2FrictionJoint.cpp deleted file mode 100644 index 9097dee..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2FrictionJoint.cpp +++ /dev/null @@ -1,229 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include - -// Point-to-point constraint -// Cdot = v2 - v1 -// = v2 + cross(w2, r2) - v1 - cross(w1, r1) -// J = [-I -r1_skew I r2_skew ] -// Identity used: -// w k % (rx i + ry j) = w * (-ry i + rx j) - -// Angle constraint -// Cdot = w2 - w1 -// J = [0 0 -1 0 0 1] -// K = invI1 + invI2 - -void b2FrictionJointDef::Initialize(b2Body* bA, b2Body* bB, const b2Vec2& anchor) -{ - bodyA = bA; - bodyB = bB; - localAnchorA = bodyA->GetLocalPoint(anchor); - localAnchorB = bodyB->GetLocalPoint(anchor); -} - -b2FrictionJoint::b2FrictionJoint(const b2FrictionJointDef* def) -: b2Joint(def) -{ - m_localAnchorA = def->localAnchorA; - m_localAnchorB = def->localAnchorB; - - m_linearImpulse.SetZero(); - m_angularImpulse = 0.0f; - - m_maxForce = def->maxForce; - m_maxTorque = def->maxTorque; -} - -void b2FrictionJoint::InitVelocityConstraints(const b2TimeStep& step) -{ - b2Body* bA = m_bodyA; - b2Body* bB = m_bodyB; - - // Compute the effective mass matrix. - b2Vec2 rA = b2Mul(bA->GetTransform().R, m_localAnchorA - bA->GetLocalCenter()); - b2Vec2 rB = b2Mul(bB->GetTransform().R, m_localAnchorB - bB->GetLocalCenter()); - - // J = [-I -r1_skew I r2_skew] - // [ 0 -1 0 1] - // r_skew = [-ry; rx] - - // Matlab - // K = [ mA+r1y^2*iA+mB+r2y^2*iB, -r1y*iA*r1x-r2y*iB*r2x, -r1y*iA-r2y*iB] - // [ -r1y*iA*r1x-r2y*iB*r2x, mA+r1x^2*iA+mB+r2x^2*iB, r1x*iA+r2x*iB] - // [ -r1y*iA-r2y*iB, r1x*iA+r2x*iB, iA+iB] - - float32 mA = bA->m_invMass, mB = bB->m_invMass; - float32 iA = bA->m_invI, iB = bB->m_invI; - - b2Mat22 K1; - K1.col1.x = mA + mB; K1.col2.x = 0.0f; - K1.col1.y = 0.0f; K1.col2.y = mA + mB; - - b2Mat22 K2; - K2.col1.x = iA * rA.y * rA.y; K2.col2.x = -iA * rA.x * rA.y; - K2.col1.y = -iA * rA.x * rA.y; K2.col2.y = iA * rA.x * rA.x; - - b2Mat22 K3; - K3.col1.x = iB * rB.y * rB.y; K3.col2.x = -iB * rB.x * rB.y; - K3.col1.y = -iB * rB.x * rB.y; K3.col2.y = iB * rB.x * rB.x; - - b2Mat22 K = K1 + K2 + K3; - m_linearMass = K.GetInverse(); - - m_angularMass = iA + iB; - if (m_angularMass > 0.0f) - { - m_angularMass = 1.0f / m_angularMass; - } - - if (step.warmStarting) - { - // Scale impulses to support a variable time step. - m_linearImpulse *= step.dtRatio; - m_angularImpulse *= step.dtRatio; - - b2Vec2 P(m_linearImpulse.x, m_linearImpulse.y); - - bA->m_linearVelocity -= mA * P; - bA->m_angularVelocity -= iA * (b2Cross(rA, P) + m_angularImpulse); - - bB->m_linearVelocity += mB * P; - bB->m_angularVelocity += iB * (b2Cross(rB, P) + m_angularImpulse); - } - else - { - m_linearImpulse.SetZero(); - m_angularImpulse = 0.0f; - } -} - -void b2FrictionJoint::SolveVelocityConstraints(const b2TimeStep& step) -{ - B2_NOT_USED(step); - - b2Body* bA = m_bodyA; - b2Body* bB = m_bodyB; - - b2Vec2 vA = bA->m_linearVelocity; - float32 wA = bA->m_angularVelocity; - b2Vec2 vB = bB->m_linearVelocity; - float32 wB = bB->m_angularVelocity; - - float32 mA = bA->m_invMass, mB = bB->m_invMass; - float32 iA = bA->m_invI, iB = bB->m_invI; - - b2Vec2 rA = b2Mul(bA->GetTransform().R, m_localAnchorA - bA->GetLocalCenter()); - b2Vec2 rB = b2Mul(bB->GetTransform().R, m_localAnchorB - bB->GetLocalCenter()); - - // Solve angular friction - { - float32 Cdot = wB - wA; - float32 impulse = -m_angularMass * Cdot; - - float32 oldImpulse = m_angularImpulse; - float32 maxImpulse = step.dt * m_maxTorque; - m_angularImpulse = b2Clamp(m_angularImpulse + impulse, -maxImpulse, maxImpulse); - impulse = m_angularImpulse - oldImpulse; - - wA -= iA * impulse; - wB += iB * impulse; - } - - // Solve linear friction - { - b2Vec2 Cdot = vB + b2Cross(wB, rB) - vA - b2Cross(wA, rA); - - b2Vec2 impulse = -b2Mul(m_linearMass, Cdot); - b2Vec2 oldImpulse = m_linearImpulse; - m_linearImpulse += impulse; - - float32 maxImpulse = step.dt * m_maxForce; - - if (m_linearImpulse.LengthSquared() > maxImpulse * maxImpulse) - { - m_linearImpulse.Normalize(); - m_linearImpulse *= maxImpulse; - } - - impulse = m_linearImpulse - oldImpulse; - - vA -= mA * impulse; - wA -= iA * b2Cross(rA, impulse); - - vB += mB * impulse; - wB += iB * b2Cross(rB, impulse); - } - - bA->m_linearVelocity = vA; - bA->m_angularVelocity = wA; - bB->m_linearVelocity = vB; - bB->m_angularVelocity = wB; -} - -bool b2FrictionJoint::SolvePositionConstraints(float32 baumgarte) -{ - B2_NOT_USED(baumgarte); - - return true; -} - -b2Vec2 b2FrictionJoint::GetAnchorA() const -{ - return m_bodyA->GetWorldPoint(m_localAnchorA); -} - -b2Vec2 b2FrictionJoint::GetAnchorB() const -{ - return m_bodyB->GetWorldPoint(m_localAnchorB); -} - -b2Vec2 b2FrictionJoint::GetReactionForce(float32 inv_dt) const -{ - return inv_dt * m_linearImpulse; -} - -float32 b2FrictionJoint::GetReactionTorque(float32 inv_dt) const -{ - return inv_dt * m_angularImpulse; -} - -void b2FrictionJoint::SetMaxForce(float32 force) -{ - b2Assert(b2IsValid(force) && force >= 0.0f); - m_maxForce = force; -} - -float32 b2FrictionJoint::GetMaxForce() const -{ - return m_maxForce; -} - -void b2FrictionJoint::SetMaxTorque(float32 torque) -{ - b2Assert(b2IsValid(torque) && torque >= 0.0f); - m_maxTorque = torque; -} - -float32 b2FrictionJoint::GetMaxTorque() const -{ - return m_maxTorque; -} diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2FrictionJoint.h b/Littlest/libs/Box2D/Dynamics/Joints/b2FrictionJoint.h deleted file mode 100644 index b4c4af2..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2FrictionJoint.h +++ /dev/null @@ -1,99 +0,0 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.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 B2_FRICTION_JOINT_H -#define B2_FRICTION_JOINT_H - -#include - -/// Friction joint definition. -struct b2FrictionJointDef : public b2JointDef -{ - b2FrictionJointDef() - { - type = e_frictionJoint; - localAnchorA.SetZero(); - localAnchorB.SetZero(); - maxForce = 0.0f; - maxTorque = 0.0f; - } - - /// Initialize the bodies, anchors, axis, and reference angle using the world - /// anchor and world axis. - void Initialize(b2Body* bodyA, b2Body* bodyB, const b2Vec2& anchor); - - /// The local anchor point relative to bodyA's origin. - b2Vec2 localAnchorA; - - /// The local anchor point relative to bodyB's origin. - b2Vec2 localAnchorB; - - /// The maximum friction force in N. - float32 maxForce; - - /// The maximum friction torque in N-m. - float32 maxTorque; -}; - -/// Friction joint. This is used for top-down friction. -/// It provides 2D translational friction and angular friction. -class b2FrictionJoint : public b2Joint -{ -public: - b2Vec2 GetAnchorA() const; - b2Vec2 GetAnchorB() const; - - b2Vec2 GetReactionForce(float32 inv_dt) const; - float32 GetReactionTorque(float32 inv_dt) const; - - /// Set the maximum friction force in N. - void SetMaxForce(float32 force); - - /// Get the maximum friction force in N. - float32 GetMaxForce() const; - - /// Set the maximum friction torque in N*m. - void SetMaxTorque(float32 torque); - - /// Get the maximum friction torque in N*m. - float32 GetMaxTorque() const; - -protected: - - friend class b2Joint; - - b2FrictionJoint(const b2FrictionJointDef* def); - - void InitVelocityConstraints(const b2TimeStep& step); - void SolveVelocityConstraints(const b2TimeStep& step); - bool SolvePositionConstraints(float32 baumgarte); - - b2Vec2 m_localAnchorA; - b2Vec2 m_localAnchorB; - - b2Mat22 m_linearMass; - float32 m_angularMass; - - b2Vec2 m_linearImpulse; - float32 m_angularImpulse; - - float32 m_maxForce; - float32 m_maxTorque; -}; - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2GearJoint.cpp b/Littlest/libs/Box2D/Dynamics/Joints/b2GearJoint.cpp deleted file mode 100644 index 89b17ee..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2GearJoint.cpp +++ /dev/null @@ -1,259 +0,0 @@ -/* -* Copyright (c) 2007 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include -#include -#include - -// Gear Joint: -// C0 = (coordinate1 + ratio * coordinate2)_initial -// C = C0 - (cordinate1 + ratio * coordinate2) = 0 -// Cdot = -(Cdot1 + ratio * Cdot2) -// J = -[J1 ratio * J2] -// K = J * invM * JT -// = J1 * invM1 * J1T + ratio * ratio * J2 * invM2 * J2T -// -// Revolute: -// coordinate = rotation -// Cdot = angularVelocity -// J = [0 0 1] -// K = J * invM * JT = invI -// -// Prismatic: -// coordinate = dot(p - pg, ug) -// Cdot = dot(v + cross(w, r), ug) -// J = [ug cross(r, ug)] -// K = J * invM * JT = invMass + invI * cross(r, ug)^2 - -b2GearJoint::b2GearJoint(const b2GearJointDef* def) -: b2Joint(def) -{ - b2JointType type1 = def->joint1->GetType(); - b2JointType type2 = def->joint2->GetType(); - - b2Assert(type1 == e_revoluteJoint || type1 == e_prismaticJoint); - b2Assert(type2 == e_revoluteJoint || type2 == e_prismaticJoint); - b2Assert(def->joint1->GetBodyA()->GetType() == b2_staticBody); - b2Assert(def->joint2->GetBodyA()->GetType() == b2_staticBody); - - m_revolute1 = NULL; - m_prismatic1 = NULL; - m_revolute2 = NULL; - m_prismatic2 = NULL; - - float32 coordinate1, coordinate2; - - m_ground1 = def->joint1->GetBodyA(); - m_bodyA = def->joint1->GetBodyB(); - if (type1 == e_revoluteJoint) - { - m_revolute1 = (b2RevoluteJoint*)def->joint1; - m_groundAnchor1 = m_revolute1->m_localAnchor1; - m_localAnchor1 = m_revolute1->m_localAnchor2; - coordinate1 = m_revolute1->GetJointAngle(); - } - else - { - m_prismatic1 = (b2PrismaticJoint*)def->joint1; - m_groundAnchor1 = m_prismatic1->m_localAnchor1; - m_localAnchor1 = m_prismatic1->m_localAnchor2; - coordinate1 = m_prismatic1->GetJointTranslation(); - } - - m_ground2 = def->joint2->GetBodyA(); - m_bodyB = def->joint2->GetBodyB(); - if (type2 == e_revoluteJoint) - { - m_revolute2 = (b2RevoluteJoint*)def->joint2; - m_groundAnchor2 = m_revolute2->m_localAnchor1; - m_localAnchor2 = m_revolute2->m_localAnchor2; - coordinate2 = m_revolute2->GetJointAngle(); - } - else - { - m_prismatic2 = (b2PrismaticJoint*)def->joint2; - m_groundAnchor2 = m_prismatic2->m_localAnchor1; - m_localAnchor2 = m_prismatic2->m_localAnchor2; - coordinate2 = m_prismatic2->GetJointTranslation(); - } - - m_ratio = def->ratio; - - m_constant = coordinate1 + m_ratio * coordinate2; - - m_impulse = 0.0f; -} - -void b2GearJoint::InitVelocityConstraints(const b2TimeStep& step) -{ - b2Body* g1 = m_ground1; - b2Body* g2 = m_ground2; - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - float32 K = 0.0f; - m_J.SetZero(); - - if (m_revolute1) - { - m_J.angularA = -1.0f; - K += b1->m_invI; - } - else - { - b2Vec2 ug = b2Mul(g1->GetTransform().R, m_prismatic1->m_localXAxis1); - b2Vec2 r = b2Mul(b1->GetTransform().R, m_localAnchor1 - b1->GetLocalCenter()); - float32 crug = b2Cross(r, ug); - m_J.linearA = -ug; - m_J.angularA = -crug; - K += b1->m_invMass + b1->m_invI * crug * crug; - } - - if (m_revolute2) - { - m_J.angularB = -m_ratio; - K += m_ratio * m_ratio * b2->m_invI; - } - else - { - b2Vec2 ug = b2Mul(g2->GetTransform().R, m_prismatic2->m_localXAxis1); - b2Vec2 r = b2Mul(b2->GetTransform().R, m_localAnchor2 - b2->GetLocalCenter()); - float32 crug = b2Cross(r, ug); - m_J.linearB = -m_ratio * ug; - m_J.angularB = -m_ratio * crug; - K += m_ratio * m_ratio * (b2->m_invMass + b2->m_invI * crug * crug); - } - - // Compute effective mass. - m_mass = K > 0.0f ? 1.0f / K : 0.0f; - - if (step.warmStarting) - { - // Warm starting. - b1->m_linearVelocity += b1->m_invMass * m_impulse * m_J.linearA; - b1->m_angularVelocity += b1->m_invI * m_impulse * m_J.angularA; - b2->m_linearVelocity += b2->m_invMass * m_impulse * m_J.linearB; - b2->m_angularVelocity += b2->m_invI * m_impulse * m_J.angularB; - } - else - { - m_impulse = 0.0f; - } -} - -void b2GearJoint::SolveVelocityConstraints(const b2TimeStep& step) -{ - B2_NOT_USED(step); - - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - float32 Cdot = m_J.Compute( b1->m_linearVelocity, b1->m_angularVelocity, - b2->m_linearVelocity, b2->m_angularVelocity); - - float32 impulse = m_mass * (-Cdot); - m_impulse += impulse; - - b1->m_linearVelocity += b1->m_invMass * impulse * m_J.linearA; - b1->m_angularVelocity += b1->m_invI * impulse * m_J.angularA; - b2->m_linearVelocity += b2->m_invMass * impulse * m_J.linearB; - b2->m_angularVelocity += b2->m_invI * impulse * m_J.angularB; -} - -bool b2GearJoint::SolvePositionConstraints(float32 baumgarte) -{ - B2_NOT_USED(baumgarte); - - float32 linearError = 0.0f; - - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - float32 coordinate1, coordinate2; - if (m_revolute1) - { - coordinate1 = m_revolute1->GetJointAngle(); - } - else - { - coordinate1 = m_prismatic1->GetJointTranslation(); - } - - if (m_revolute2) - { - coordinate2 = m_revolute2->GetJointAngle(); - } - else - { - coordinate2 = m_prismatic2->GetJointTranslation(); - } - - float32 C = m_constant - (coordinate1 + m_ratio * coordinate2); - - float32 impulse = m_mass * (-C); - - b1->m_sweep.c += b1->m_invMass * impulse * m_J.linearA; - b1->m_sweep.a += b1->m_invI * impulse * m_J.angularA; - b2->m_sweep.c += b2->m_invMass * impulse * m_J.linearB; - b2->m_sweep.a += b2->m_invI * impulse * m_J.angularB; - - b1->SynchronizeTransform(); - b2->SynchronizeTransform(); - - // TODO_ERIN not implemented - return linearError < b2_linearSlop; -} - -b2Vec2 b2GearJoint::GetAnchorA() const -{ - return m_bodyA->GetWorldPoint(m_localAnchor1); -} - -b2Vec2 b2GearJoint::GetAnchorB() const -{ - return m_bodyB->GetWorldPoint(m_localAnchor2); -} - -b2Vec2 b2GearJoint::GetReactionForce(float32 inv_dt) const -{ - // TODO_ERIN not tested - b2Vec2 P = m_impulse * m_J.linearB; - return inv_dt * P; -} - -float32 b2GearJoint::GetReactionTorque(float32 inv_dt) const -{ - // TODO_ERIN not tested - b2Vec2 r = b2Mul(m_bodyB->GetTransform().R, m_localAnchor2 - m_bodyB->GetLocalCenter()); - b2Vec2 P = m_impulse * m_J.linearB; - float32 L = m_impulse * m_J.angularB - b2Cross(r, P); - return inv_dt * L; -} - -void b2GearJoint::SetRatio(float32 ratio) -{ - b2Assert(b2IsValid(ratio)); - m_ratio = ratio; -} - -float32 b2GearJoint::GetRatio() const -{ - return m_ratio; -} diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2GearJoint.h b/Littlest/libs/Box2D/Dynamics/Joints/b2GearJoint.h deleted file mode 100644 index eccca0d..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2GearJoint.h +++ /dev/null @@ -1,111 +0,0 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.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 B2_GEAR_JOINT_H -#define B2_GEAR_JOINT_H - -#include - -class b2RevoluteJoint; -class b2PrismaticJoint; - -/// Gear joint definition. This definition requires two existing -/// revolute or prismatic joints (any combination will work). -/// The provided joints must attach a dynamic body to a static body. -struct b2GearJointDef : public b2JointDef -{ - b2GearJointDef() - { - type = e_gearJoint; - joint1 = NULL; - joint2 = NULL; - ratio = 1.0f; - } - - /// The first revolute/prismatic joint attached to the gear joint. - b2Joint* joint1; - - /// The second revolute/prismatic joint attached to the gear joint. - b2Joint* joint2; - - /// The gear ratio. - /// @see b2GearJoint for explanation. - float32 ratio; -}; - -/// A gear joint is used to connect two joints together. Either joint -/// can be a revolute or prismatic joint. You specify a gear ratio -/// to bind the motions together: -/// coordinate1 + ratio * coordinate2 = constant -/// The ratio can be negative or positive. If one joint is a revolute joint -/// and the other joint is a prismatic joint, then the ratio will have units -/// of length or units of 1/length. -/// @warning The revolute and prismatic joints must be attached to -/// fixed bodies (which must be body1 on those joints). -class b2GearJoint : public b2Joint -{ -public: - b2Vec2 GetAnchorA() const; - b2Vec2 GetAnchorB() const; - - b2Vec2 GetReactionForce(float32 inv_dt) const; - float32 GetReactionTorque(float32 inv_dt) const; - - /// Set/Get the gear ratio. - void SetRatio(float32 ratio); - float32 GetRatio() const; - -protected: - - friend class b2Joint; - b2GearJoint(const b2GearJointDef* data); - - void InitVelocityConstraints(const b2TimeStep& step); - void SolveVelocityConstraints(const b2TimeStep& step); - bool SolvePositionConstraints(float32 baumgarte); - - b2Body* m_ground1; - b2Body* m_ground2; - - // One of these is NULL. - b2RevoluteJoint* m_revolute1; - b2PrismaticJoint* m_prismatic1; - - // One of these is NULL. - b2RevoluteJoint* m_revolute2; - b2PrismaticJoint* m_prismatic2; - - b2Vec2 m_groundAnchor1; - b2Vec2 m_groundAnchor2; - - b2Vec2 m_localAnchor1; - b2Vec2 m_localAnchor2; - - b2Jacobian m_J; - - float32 m_constant; - float32 m_ratio; - - // Effective mass - float32 m_mass; - - // Impulse for accumulation/warm starting. - float32 m_impulse; -}; - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2Joint.cpp b/Littlest/libs/Box2D/Dynamics/Joints/b2Joint.cpp deleted file mode 100644 index a7e19d3..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2Joint.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -b2Joint* b2Joint::Create(const b2JointDef* def, b2BlockAllocator* allocator) -{ - b2Joint* joint = NULL; - - switch (def->type) - { - case e_distanceJoint: - { - void* mem = allocator->Allocate(sizeof(b2DistanceJoint)); - joint = new (mem) b2DistanceJoint((b2DistanceJointDef*)def); - } - break; - - case e_mouseJoint: - { - void* mem = allocator->Allocate(sizeof(b2MouseJoint)); - joint = new (mem) b2MouseJoint((b2MouseJointDef*)def); - } - break; - - case e_prismaticJoint: - { - void* mem = allocator->Allocate(sizeof(b2PrismaticJoint)); - joint = new (mem) b2PrismaticJoint((b2PrismaticJointDef*)def); - } - break; - - case e_revoluteJoint: - { - void* mem = allocator->Allocate(sizeof(b2RevoluteJoint)); - joint = new (mem) b2RevoluteJoint((b2RevoluteJointDef*)def); - } - break; - - case e_pulleyJoint: - { - void* mem = allocator->Allocate(sizeof(b2PulleyJoint)); - joint = new (mem) b2PulleyJoint((b2PulleyJointDef*)def); - } - break; - - case e_gearJoint: - { - void* mem = allocator->Allocate(sizeof(b2GearJoint)); - joint = new (mem) b2GearJoint((b2GearJointDef*)def); - } - break; - - case e_lineJoint: - { - void* mem = allocator->Allocate(sizeof(b2LineJoint)); - joint = new (mem) b2LineJoint((b2LineJointDef*)def); - } - break; - - case e_weldJoint: - { - void* mem = allocator->Allocate(sizeof(b2WeldJoint)); - joint = new (mem) b2WeldJoint((b2WeldJointDef*)def); - } - break; - - case e_frictionJoint: - { - void* mem = allocator->Allocate(sizeof(b2FrictionJoint)); - joint = new (mem) b2FrictionJoint((b2FrictionJointDef*)def); - } - break; - - default: - b2Assert(false); - break; - } - - return joint; -} - -void b2Joint::Destroy(b2Joint* joint, b2BlockAllocator* allocator) -{ - joint->~b2Joint(); - switch (joint->m_type) - { - case e_distanceJoint: - allocator->Free(joint, sizeof(b2DistanceJoint)); - break; - - case e_mouseJoint: - allocator->Free(joint, sizeof(b2MouseJoint)); - break; - - case e_prismaticJoint: - allocator->Free(joint, sizeof(b2PrismaticJoint)); - break; - - case e_revoluteJoint: - allocator->Free(joint, sizeof(b2RevoluteJoint)); - break; - - case e_pulleyJoint: - allocator->Free(joint, sizeof(b2PulleyJoint)); - break; - - case e_gearJoint: - allocator->Free(joint, sizeof(b2GearJoint)); - break; - - case e_lineJoint: - allocator->Free(joint, sizeof(b2LineJoint)); - break; - - case e_weldJoint: - allocator->Free(joint, sizeof(b2WeldJoint)); - break; - - case e_frictionJoint: - allocator->Free(joint, sizeof(b2FrictionJoint)); - break; - - default: - b2Assert(false); - break; - } -} - -b2Joint::b2Joint(const b2JointDef* def) -{ - b2Assert(def->bodyA != def->bodyB); - - m_type = def->type; - m_prev = NULL; - m_next = NULL; - m_bodyA = def->bodyA; - m_bodyB = def->bodyB; - m_collideConnected = def->collideConnected; - m_islandFlag = false; - m_userData = def->userData; - - m_edgeA.joint = NULL; - m_edgeA.other = NULL; - m_edgeA.prev = NULL; - m_edgeA.next = NULL; - - m_edgeB.joint = NULL; - m_edgeB.other = NULL; - m_edgeB.prev = NULL; - m_edgeB.next = NULL; -} - -bool b2Joint::IsActive() const -{ - return m_bodyA->IsActive() && m_bodyB->IsActive(); -} diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2Joint.h b/Littlest/libs/Box2D/Dynamics/Joints/b2Joint.h deleted file mode 100644 index 213ad7d..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2Joint.h +++ /dev/null @@ -1,226 +0,0 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.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 B2_JOINT_H -#define B2_JOINT_H - -#include - -class b2Body; -class b2Joint; -struct b2TimeStep; -class b2BlockAllocator; - -enum b2JointType -{ - e_unknownJoint, - e_revoluteJoint, - e_prismaticJoint, - e_distanceJoint, - e_pulleyJoint, - e_mouseJoint, - e_gearJoint, - e_lineJoint, - e_weldJoint, - e_frictionJoint, -}; - -enum b2LimitState -{ - e_inactiveLimit, - e_atLowerLimit, - e_atUpperLimit, - e_equalLimits -}; - -struct b2Jacobian -{ - b2Vec2 linearA; - float32 angularA; - b2Vec2 linearB; - float32 angularB; - - void SetZero(); - void Set(const b2Vec2& x1, float32 a1, const b2Vec2& x2, float32 a2); - float32 Compute(const b2Vec2& x1, float32 a1, const b2Vec2& x2, float32 a2); -}; - -/// A joint edge is used to connect bodies and joints together -/// in a joint graph where each body is a node and each joint -/// is an edge. A joint edge belongs to a doubly linked list -/// maintained in each attached body. Each joint has two joint -/// nodes, one for each attached body. -struct b2JointEdge -{ - b2Body* other; ///< provides quick access to the other body attached. - b2Joint* joint; ///< the joint - b2JointEdge* prev; ///< the previous joint edge in the body's joint list - b2JointEdge* next; ///< the next joint edge in the body's joint list -}; - -/// Joint definitions are used to construct joints. -struct b2JointDef -{ - b2JointDef() - { - type = e_unknownJoint; - userData = NULL; - bodyA = NULL; - bodyB = NULL; - collideConnected = false; - } - - /// The joint type is set automatically for concrete joint types. - b2JointType type; - - /// Use this to attach application specific data to your joints. - void* userData; - - /// The first attached body. - b2Body* bodyA; - - /// The second attached body. - b2Body* bodyB; - - /// Set this flag to true if the attached bodies should collide. - bool collideConnected; -}; - -/// The base joint class. Joints are used to constraint two bodies together in -/// various fashions. Some joints also feature limits and motors. -class b2Joint -{ -public: - - /// Get the type of the concrete joint. - b2JointType GetType() const; - - /// Get the first body attached to this joint. - b2Body* GetBodyA(); - - /// Get the second body attached to this joint. - b2Body* GetBodyB(); - - /// Get the anchor point on bodyA in world coordinates. - virtual b2Vec2 GetAnchorA() const = 0; - - /// Get the anchor point on bodyB in world coordinates. - virtual b2Vec2 GetAnchorB() const = 0; - - /// Get the reaction force on body2 at the joint anchor in Newtons. - virtual b2Vec2 GetReactionForce(float32 inv_dt) const = 0; - - /// Get the reaction torque on body2 in N*m. - virtual float32 GetReactionTorque(float32 inv_dt) const = 0; - - /// Get the next joint the world joint list. - b2Joint* GetNext(); - - /// Get the user data pointer. - void* GetUserData() const; - - /// Set the user data pointer. - void SetUserData(void* data); - - /// Short-cut function to determine if either body is inactive. - bool IsActive() const; - -protected: - friend class b2World; - friend class b2Body; - friend class b2Island; - - static b2Joint* Create(const b2JointDef* def, b2BlockAllocator* allocator); - static void Destroy(b2Joint* joint, b2BlockAllocator* allocator); - - b2Joint(const b2JointDef* def); - virtual ~b2Joint() {} - - virtual void InitVelocityConstraints(const b2TimeStep& step) = 0; - virtual void SolveVelocityConstraints(const b2TimeStep& step) = 0; - - // This returns true if the position errors are within tolerance. - virtual bool SolvePositionConstraints(float32 baumgarte) = 0; - - b2JointType m_type; - b2Joint* m_prev; - b2Joint* m_next; - b2JointEdge m_edgeA; - b2JointEdge m_edgeB; - b2Body* m_bodyA; - b2Body* m_bodyB; - - bool m_islandFlag; - bool m_collideConnected; - - void* m_userData; - - // Cache here per time step to reduce cache misses. - b2Vec2 m_localCenterA, m_localCenterB; - float32 m_invMassA, m_invIA; - float32 m_invMassB, m_invIB; -}; - -inline void b2Jacobian::SetZero() -{ - linearA.SetZero(); angularA = 0.0f; - linearB.SetZero(); angularB = 0.0f; -} - -inline void b2Jacobian::Set(const b2Vec2& x1, float32 a1, const b2Vec2& x2, float32 a2) -{ - linearA = x1; angularA = a1; - linearB = x2; angularB = a2; -} - -inline float32 b2Jacobian::Compute(const b2Vec2& x1, float32 a1, const b2Vec2& x2, float32 a2) -{ - return b2Dot(linearA, x1) + angularA * a1 + b2Dot(linearB, x2) + angularB * a2; -} - -inline b2JointType b2Joint::GetType() const -{ - return m_type; -} - -inline b2Body* b2Joint::GetBodyA() -{ - return m_bodyA; -} - -inline b2Body* b2Joint::GetBodyB() -{ - return m_bodyB; -} - -inline b2Joint* b2Joint::GetNext() -{ - return m_next; -} - -inline void* b2Joint::GetUserData() const -{ - return m_userData; -} - -inline void b2Joint::SetUserData(void* data) -{ - m_userData = data; -} - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2LineJoint.cpp b/Littlest/libs/Box2D/Dynamics/Joints/b2LineJoint.cpp deleted file mode 100644 index f2123d2..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2LineJoint.cpp +++ /dev/null @@ -1,591 +0,0 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include - -// Linear constraint (point-to-line) -// d = p2 - p1 = x2 + r2 - x1 - r1 -// C = dot(perp, d) -// Cdot = dot(d, cross(w1, perp)) + dot(perp, v2 + cross(w2, r2) - v1 - cross(w1, r1)) -// = -dot(perp, v1) - dot(cross(d + r1, perp), w1) + dot(perp, v2) + dot(cross(r2, perp), v2) -// J = [-perp, -cross(d + r1, perp), perp, cross(r2,perp)] -// -// K = J * invM * JT -// -// J = [-a -s1 a s2] -// a = perp -// s1 = cross(d + r1, a) = cross(p2 - x1, a) -// s2 = cross(r2, a) = cross(p2 - x2, a) - - -// Motor/Limit linear constraint -// C = dot(ax1, d) -// Cdot = = -dot(ax1, v1) - dot(cross(d + r1, ax1), w1) + dot(ax1, v2) + dot(cross(r2, ax1), v2) -// J = [-ax1 -cross(d+r1,ax1) ax1 cross(r2,ax1)] - -// Block Solver -// We develop a block solver that includes the joint limit. This makes the limit stiff (inelastic) even -// when the mass has poor distribution (leading to large torques about the joint anchor points). -// -// The Jacobian has 3 rows: -// J = [-uT -s1 uT s2] // linear -// [-vT -a1 vT a2] // limit -// -// u = perp -// v = axis -// s1 = cross(d + r1, u), s2 = cross(r2, u) -// a1 = cross(d + r1, v), a2 = cross(r2, v) - -// M * (v2 - v1) = JT * df -// J * v2 = bias -// -// v2 = v1 + invM * JT * df -// J * (v1 + invM * JT * df) = bias -// K * df = bias - J * v1 = -Cdot -// K = J * invM * JT -// Cdot = J * v1 - bias -// -// Now solve for f2. -// df = f2 - f1 -// K * (f2 - f1) = -Cdot -// f2 = invK * (-Cdot) + f1 -// -// Clamp accumulated limit impulse. -// lower: f2(2) = max(f2(2), 0) -// upper: f2(2) = min(f2(2), 0) -// -// Solve for correct f2(1) -// K(1,1) * f2(1) = -Cdot(1) - K(1,2) * f2(2) + K(1,1:2) * f1 -// = -Cdot(1) - K(1,2) * f2(2) + K(1,1) * f1(1) + K(1,2) * f1(2) -// K(1,1) * f2(1) = -Cdot(1) - K(1,2) * (f2(2) - f1(2)) + K(1,1) * f1(1) -// f2(1) = invK(1,1) * (-Cdot(1) - K(1,2) * (f2(2) - f1(2))) + f1(1) -// -// Now compute impulse to be applied: -// df = f2 - f1 - -void b2LineJointDef::Initialize(b2Body* b1, b2Body* b2, const b2Vec2& anchor, const b2Vec2& axis) -{ - bodyA = b1; - bodyB = b2; - localAnchorA = bodyA->GetLocalPoint(anchor); - localAnchorB = bodyB->GetLocalPoint(anchor); - localAxisA = bodyA->GetLocalVector(axis); -} - -b2LineJoint::b2LineJoint(const b2LineJointDef* def) -: b2Joint(def) -{ - m_localAnchor1 = def->localAnchorA; - m_localAnchor2 = def->localAnchorB; - m_localXAxis1 = def->localAxisA; - m_localYAxis1 = b2Cross(1.0f, m_localXAxis1); - - m_impulse.SetZero(); - m_motorMass = 0.0f; - m_motorImpulse = 0.0f; - - m_lowerTranslation = def->lowerTranslation; - m_upperTranslation = def->upperTranslation; - m_maxMotorForce = def->maxMotorForce; - m_motorSpeed = def->motorSpeed; - m_enableLimit = def->enableLimit; - m_enableMotor = def->enableMotor; - m_limitState = e_inactiveLimit; - - m_axis.SetZero(); - m_perp.SetZero(); -} - -void b2LineJoint::InitVelocityConstraints(const b2TimeStep& step) -{ - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - m_localCenterA = b1->GetLocalCenter(); - m_localCenterB = b2->GetLocalCenter(); - - b2Transform xf1 = b1->GetTransform(); - b2Transform xf2 = b2->GetTransform(); - - // Compute the effective masses. - b2Vec2 r1 = b2Mul(xf1.R, m_localAnchor1 - m_localCenterA); - b2Vec2 r2 = b2Mul(xf2.R, m_localAnchor2 - m_localCenterB); - b2Vec2 d = b2->m_sweep.c + r2 - b1->m_sweep.c - r1; - - m_invMassA = b1->m_invMass; - m_invIA = b1->m_invI; - m_invMassB = b2->m_invMass; - m_invIB = b2->m_invI; - - // Compute motor Jacobian and effective mass. - { - m_axis = b2Mul(xf1.R, m_localXAxis1); - m_a1 = b2Cross(d + r1, m_axis); - m_a2 = b2Cross(r2, m_axis); - - m_motorMass = m_invMassA + m_invMassB + m_invIA * m_a1 * m_a1 + m_invIB * m_a2 * m_a2; - if (m_motorMass > b2_epsilon) - { - m_motorMass = 1.0f / m_motorMass; - } - else - { - m_motorMass = 0.0f; - } - } - - // Prismatic constraint. - { - m_perp = b2Mul(xf1.R, m_localYAxis1); - - m_s1 = b2Cross(d + r1, m_perp); - m_s2 = b2Cross(r2, m_perp); - - float32 m1 = m_invMassA, m2 = m_invMassB; - float32 i1 = m_invIA, i2 = m_invIB; - - float32 k11 = m1 + m2 + i1 * m_s1 * m_s1 + i2 * m_s2 * m_s2; - float32 k12 = i1 * m_s1 * m_a1 + i2 * m_s2 * m_a2; - float32 k22 = m1 + m2 + i1 * m_a1 * m_a1 + i2 * m_a2 * m_a2; - - m_K.col1.Set(k11, k12); - m_K.col2.Set(k12, k22); - } - - // Compute motor and limit terms. - if (m_enableLimit) - { - float32 jointTranslation = b2Dot(m_axis, d); - if (b2Abs(m_upperTranslation - m_lowerTranslation) < 2.0f * b2_linearSlop) - { - m_limitState = e_equalLimits; - } - else if (jointTranslation <= m_lowerTranslation) - { - if (m_limitState != e_atLowerLimit) - { - m_limitState = e_atLowerLimit; - m_impulse.y = 0.0f; - } - } - else if (jointTranslation >= m_upperTranslation) - { - if (m_limitState != e_atUpperLimit) - { - m_limitState = e_atUpperLimit; - m_impulse.y = 0.0f; - } - } - else - { - m_limitState = e_inactiveLimit; - m_impulse.y = 0.0f; - } - } - else - { - m_limitState = e_inactiveLimit; - } - - if (m_enableMotor == false) - { - m_motorImpulse = 0.0f; - } - - if (step.warmStarting) - { - // Account for variable time step. - m_impulse *= step.dtRatio; - m_motorImpulse *= step.dtRatio; - - b2Vec2 P = m_impulse.x * m_perp + (m_motorImpulse + m_impulse.y) * m_axis; - float32 L1 = m_impulse.x * m_s1 + (m_motorImpulse + m_impulse.y) * m_a1; - float32 L2 = m_impulse.x * m_s2 + (m_motorImpulse + m_impulse.y) * m_a2; - - b1->m_linearVelocity -= m_invMassA * P; - b1->m_angularVelocity -= m_invIA * L1; - - b2->m_linearVelocity += m_invMassB * P; - b2->m_angularVelocity += m_invIB * L2; - } - else - { - m_impulse.SetZero(); - m_motorImpulse = 0.0f; - } -} - -void b2LineJoint::SolveVelocityConstraints(const b2TimeStep& step) -{ - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - b2Vec2 v1 = b1->m_linearVelocity; - float32 w1 = b1->m_angularVelocity; - b2Vec2 v2 = b2->m_linearVelocity; - float32 w2 = b2->m_angularVelocity; - - // Solve linear motor constraint. - if (m_enableMotor && m_limitState != e_equalLimits) - { - float32 Cdot = b2Dot(m_axis, v2 - v1) + m_a2 * w2 - m_a1 * w1; - float32 impulse = m_motorMass * (m_motorSpeed - Cdot); - float32 oldImpulse = m_motorImpulse; - float32 maxImpulse = step.dt * m_maxMotorForce; - m_motorImpulse = b2Clamp(m_motorImpulse + impulse, -maxImpulse, maxImpulse); - impulse = m_motorImpulse - oldImpulse; - - b2Vec2 P = impulse * m_axis; - float32 L1 = impulse * m_a1; - float32 L2 = impulse * m_a2; - - v1 -= m_invMassA * P; - w1 -= m_invIA * L1; - - v2 += m_invMassB * P; - w2 += m_invIB * L2; - } - - float32 Cdot1 = b2Dot(m_perp, v2 - v1) + m_s2 * w2 - m_s1 * w1; - - if (m_enableLimit && m_limitState != e_inactiveLimit) - { - // Solve prismatic and limit constraint in block form. - float32 Cdot2 = b2Dot(m_axis, v2 - v1) + m_a2 * w2 - m_a1 * w1; - b2Vec2 Cdot(Cdot1, Cdot2); - - b2Vec2 f1 = m_impulse; - b2Vec2 df = m_K.Solve(-Cdot); - m_impulse += df; - - if (m_limitState == e_atLowerLimit) - { - m_impulse.y = b2Max(m_impulse.y, 0.0f); - } - else if (m_limitState == e_atUpperLimit) - { - m_impulse.y = b2Min(m_impulse.y, 0.0f); - } - - // f2(1) = invK(1,1) * (-Cdot(1) - K(1,2) * (f2(2) - f1(2))) + f1(1) - float32 b = -Cdot1 - (m_impulse.y - f1.y) * m_K.col2.x; - float32 f2r; - if (m_K.col1.x != 0.0f) - { - f2r = b / m_K.col1.x + f1.x; - } - else - { - f2r = f1.x; - } - - m_impulse.x = f2r; - - df = m_impulse - f1; - - b2Vec2 P = df.x * m_perp + df.y * m_axis; - float32 L1 = df.x * m_s1 + df.y * m_a1; - float32 L2 = df.x * m_s2 + df.y * m_a2; - - v1 -= m_invMassA * P; - w1 -= m_invIA * L1; - - v2 += m_invMassB * P; - w2 += m_invIB * L2; - } - else - { - // Limit is inactive, just solve the prismatic constraint in block form. - float32 df; - if (m_K.col1.x != 0.0f) - { - df = - Cdot1 / m_K.col1.x; - } - else - { - df = 0.0f; - } - m_impulse.x += df; - - b2Vec2 P = df * m_perp; - float32 L1 = df * m_s1; - float32 L2 = df * m_s2; - - v1 -= m_invMassA * P; - w1 -= m_invIA * L1; - - v2 += m_invMassB * P; - w2 += m_invIB * L2; - } - - b1->m_linearVelocity = v1; - b1->m_angularVelocity = w1; - b2->m_linearVelocity = v2; - b2->m_angularVelocity = w2; -} - -bool b2LineJoint::SolvePositionConstraints(float32 baumgarte) -{ - B2_NOT_USED(baumgarte); - - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - b2Vec2 c1 = b1->m_sweep.c; - float32 a1 = b1->m_sweep.a; - - b2Vec2 c2 = b2->m_sweep.c; - float32 a2 = b2->m_sweep.a; - - // Solve linear limit constraint. - float32 linearError = 0.0f, angularError = 0.0f; - bool active = false; - float32 C2 = 0.0f; - - b2Mat22 R1(a1), R2(a2); - - b2Vec2 r1 = b2Mul(R1, m_localAnchor1 - m_localCenterA); - b2Vec2 r2 = b2Mul(R2, m_localAnchor2 - m_localCenterB); - b2Vec2 d = c2 + r2 - c1 - r1; - - if (m_enableLimit) - { - m_axis = b2Mul(R1, m_localXAxis1); - - m_a1 = b2Cross(d + r1, m_axis); - m_a2 = b2Cross(r2, m_axis); - - float32 translation = b2Dot(m_axis, d); - if (b2Abs(m_upperTranslation - m_lowerTranslation) < 2.0f * b2_linearSlop) - { - // Prevent large angular corrections - C2 = b2Clamp(translation, -b2_maxLinearCorrection, b2_maxLinearCorrection); - linearError = b2Abs(translation); - active = true; - } - else if (translation <= m_lowerTranslation) - { - // Prevent large linear corrections and allow some slop. - C2 = b2Clamp(translation - m_lowerTranslation + b2_linearSlop, -b2_maxLinearCorrection, 0.0f); - linearError = m_lowerTranslation - translation; - active = true; - } - else if (translation >= m_upperTranslation) - { - // Prevent large linear corrections and allow some slop. - C2 = b2Clamp(translation - m_upperTranslation - b2_linearSlop, 0.0f, b2_maxLinearCorrection); - linearError = translation - m_upperTranslation; - active = true; - } - } - - m_perp = b2Mul(R1, m_localYAxis1); - - m_s1 = b2Cross(d + r1, m_perp); - m_s2 = b2Cross(r2, m_perp); - - b2Vec2 impulse; - float32 C1; - C1 = b2Dot(m_perp, d); - - linearError = b2Max(linearError, b2Abs(C1)); - angularError = 0.0f; - - if (active) - { - float32 m1 = m_invMassA, m2 = m_invMassB; - float32 i1 = m_invIA, i2 = m_invIB; - - float32 k11 = m1 + m2 + i1 * m_s1 * m_s1 + i2 * m_s2 * m_s2; - float32 k12 = i1 * m_s1 * m_a1 + i2 * m_s2 * m_a2; - float32 k22 = m1 + m2 + i1 * m_a1 * m_a1 + i2 * m_a2 * m_a2; - - m_K.col1.Set(k11, k12); - m_K.col2.Set(k12, k22); - - b2Vec2 C; - C.x = C1; - C.y = C2; - - impulse = m_K.Solve(-C); - } - else - { - float32 m1 = m_invMassA, m2 = m_invMassB; - float32 i1 = m_invIA, i2 = m_invIB; - - float32 k11 = m1 + m2 + i1 * m_s1 * m_s1 + i2 * m_s2 * m_s2; - - float32 impulse1; - if (k11 != 0.0f) - { - impulse1 = - C1 / k11; - } - else - { - impulse1 = 0.0f; - } - - impulse.x = impulse1; - impulse.y = 0.0f; - } - - b2Vec2 P = impulse.x * m_perp + impulse.y * m_axis; - float32 L1 = impulse.x * m_s1 + impulse.y * m_a1; - float32 L2 = impulse.x * m_s2 + impulse.y * m_a2; - - c1 -= m_invMassA * P; - a1 -= m_invIA * L1; - c2 += m_invMassB * P; - a2 += m_invIB * L2; - - // TODO_ERIN remove need for this. - b1->m_sweep.c = c1; - b1->m_sweep.a = a1; - b2->m_sweep.c = c2; - b2->m_sweep.a = a2; - b1->SynchronizeTransform(); - b2->SynchronizeTransform(); - - return linearError <= b2_linearSlop && angularError <= b2_angularSlop; -} - -b2Vec2 b2LineJoint::GetAnchorA() const -{ - return m_bodyA->GetWorldPoint(m_localAnchor1); -} - -b2Vec2 b2LineJoint::GetAnchorB() const -{ - return m_bodyB->GetWorldPoint(m_localAnchor2); -} - -b2Vec2 b2LineJoint::GetReactionForce(float32 inv_dt) const -{ - return inv_dt * (m_impulse.x * m_perp + (m_motorImpulse + m_impulse.y) * m_axis); -} - -float32 b2LineJoint::GetReactionTorque(float32 inv_dt) const -{ - B2_NOT_USED(inv_dt); - return 0.0f; -} - -float32 b2LineJoint::GetJointTranslation() const -{ - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - b2Vec2 p1 = b1->GetWorldPoint(m_localAnchor1); - b2Vec2 p2 = b2->GetWorldPoint(m_localAnchor2); - b2Vec2 d = p2 - p1; - b2Vec2 axis = b1->GetWorldVector(m_localXAxis1); - - float32 translation = b2Dot(d, axis); - return translation; -} - -float32 b2LineJoint::GetJointSpeed() const -{ - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - b2Vec2 r1 = b2Mul(b1->GetTransform().R, m_localAnchor1 - b1->GetLocalCenter()); - b2Vec2 r2 = b2Mul(b2->GetTransform().R, m_localAnchor2 - b2->GetLocalCenter()); - b2Vec2 p1 = b1->m_sweep.c + r1; - b2Vec2 p2 = b2->m_sweep.c + r2; - b2Vec2 d = p2 - p1; - b2Vec2 axis = b1->GetWorldVector(m_localXAxis1); - - b2Vec2 v1 = b1->m_linearVelocity; - b2Vec2 v2 = b2->m_linearVelocity; - float32 w1 = b1->m_angularVelocity; - float32 w2 = b2->m_angularVelocity; - - float32 speed = b2Dot(d, b2Cross(w1, axis)) + b2Dot(axis, v2 + b2Cross(w2, r2) - v1 - b2Cross(w1, r1)); - return speed; -} - -bool b2LineJoint::IsLimitEnabled() const -{ - return m_enableLimit; -} - -void b2LineJoint::EnableLimit(bool flag) -{ - m_bodyA->SetAwake(true); - m_bodyB->SetAwake(true); - m_enableLimit = flag; -} - -float32 b2LineJoint::GetLowerLimit() const -{ - return m_lowerTranslation; -} - -float32 b2LineJoint::GetUpperLimit() const -{ - return m_upperTranslation; -} - -void b2LineJoint::SetLimits(float32 lower, float32 upper) -{ - b2Assert(lower <= upper); - m_bodyA->SetAwake(true); - m_bodyB->SetAwake(true); - m_lowerTranslation = lower; - m_upperTranslation = upper; -} - -bool b2LineJoint::IsMotorEnabled() const -{ - return m_enableMotor; -} - -void b2LineJoint::EnableMotor(bool flag) -{ - m_bodyA->SetAwake(true); - m_bodyB->SetAwake(true); - m_enableMotor = flag; -} - -void b2LineJoint::SetMotorSpeed(float32 speed) -{ - m_bodyA->SetAwake(true); - m_bodyB->SetAwake(true); - m_motorSpeed = speed; -} - -void b2LineJoint::SetMaxMotorForce(float32 force) -{ - m_bodyA->SetAwake(true); - m_bodyB->SetAwake(true); - m_maxMotorForce = force; -} - -float32 b2LineJoint::GetMotorForce() const -{ - return m_motorImpulse; -} - - - - - diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2LineJoint.h b/Littlest/libs/Box2D/Dynamics/Joints/b2LineJoint.h deleted file mode 100644 index 803e4c1..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2LineJoint.h +++ /dev/null @@ -1,170 +0,0 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.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 B2_LINE_JOINT_H -#define B2_LINE_JOINT_H - -#include - -/// Line joint definition. This requires defining a line of -/// motion using an axis and an anchor point. The definition uses local -/// anchor points and a local axis so that the initial configuration -/// can violate the constraint slightly. The joint translation is zero -/// when the local anchor points coincide in world space. Using local -/// anchors and a local axis helps when saving and loading a game. -struct b2LineJointDef : public b2JointDef -{ - b2LineJointDef() - { - type = e_lineJoint; - localAnchorA.SetZero(); - localAnchorB.SetZero(); - localAxisA.Set(1.0f, 0.0f); - enableLimit = false; - lowerTranslation = 0.0f; - upperTranslation = 0.0f; - enableMotor = false; - maxMotorForce = 0.0f; - motorSpeed = 0.0f; - } - - /// Initialize the bodies, anchors, axis, and reference angle using the world - /// anchor and world axis. - void Initialize(b2Body* bodyA, b2Body* bodyB, const b2Vec2& anchor, const b2Vec2& axis); - - /// The local anchor point relative to body1's origin. - b2Vec2 localAnchorA; - - /// The local anchor point relative to body2's origin. - b2Vec2 localAnchorB; - - /// The local translation axis in body1. - b2Vec2 localAxisA; - - /// Enable/disable the joint limit. - bool enableLimit; - - /// The lower translation limit, usually in meters. - float32 lowerTranslation; - - /// The upper translation limit, usually in meters. - float32 upperTranslation; - - /// Enable/disable the joint motor. - bool enableMotor; - - /// The maximum motor torque, usually in N-m. - float32 maxMotorForce; - - /// The desired motor speed in radians per second. - float32 motorSpeed; -}; - -/// A line joint. This joint provides two degrees of freedom: translation -/// along an axis fixed in body1 and rotation in the plane. You can use a -/// joint limit to restrict the range of motion and a joint motor to drive -/// the motion or to model joint friction. -class b2LineJoint : public b2Joint -{ -public: - b2Vec2 GetAnchorA() const; - b2Vec2 GetAnchorB() const; - - b2Vec2 GetReactionForce(float32 inv_dt) const; - float32 GetReactionTorque(float32 inv_dt) const; - - /// Get the current joint translation, usually in meters. - float32 GetJointTranslation() const; - - /// Get the current joint translation speed, usually in meters per second. - float32 GetJointSpeed() const; - - /// Is the joint limit enabled? - bool IsLimitEnabled() const; - - /// Enable/disable the joint limit. - void EnableLimit(bool flag); - - /// Get the lower joint limit, usually in meters. - float32 GetLowerLimit() const; - - /// Get the upper joint limit, usually in meters. - float32 GetUpperLimit() const; - - /// Set the joint limits, usually in meters. - void SetLimits(float32 lower, float32 upper); - - /// Is the joint motor enabled? - bool IsMotorEnabled() const; - - /// Enable/disable the joint motor. - void EnableMotor(bool flag); - - /// Set the motor speed, usually in meters per second. - void SetMotorSpeed(float32 speed); - - /// Get the motor speed, usually in meters per second. - float32 GetMotorSpeed() const; - - /// Set/Get the maximum motor force, usually in N. - void SetMaxMotorForce(float32 force); - float32 GetMaxMotorForce() const; - - /// Get the current motor force, usually in N. - float32 GetMotorForce() const; - -protected: - - friend class b2Joint; - b2LineJoint(const b2LineJointDef* def); - - void InitVelocityConstraints(const b2TimeStep& step); - void SolveVelocityConstraints(const b2TimeStep& step); - bool SolvePositionConstraints(float32 baumgarte); - - b2Vec2 m_localAnchor1; - b2Vec2 m_localAnchor2; - b2Vec2 m_localXAxis1; - b2Vec2 m_localYAxis1; - - b2Vec2 m_axis, m_perp; - float32 m_s1, m_s2; - float32 m_a1, m_a2; - - b2Mat22 m_K; - b2Vec2 m_impulse; - - float32 m_motorMass; // effective mass for motor/limit translational constraint. - float32 m_motorImpulse; - - float32 m_lowerTranslation; - float32 m_upperTranslation; - float32 m_maxMotorForce; - float32 m_motorSpeed; - - bool m_enableLimit; - bool m_enableMotor; - b2LimitState m_limitState; -}; - -inline float32 b2LineJoint::GetMotorSpeed() const -{ - return m_motorSpeed; -} - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2MouseJoint.cpp b/Littlest/libs/Box2D/Dynamics/Joints/b2MouseJoint.cpp deleted file mode 100644 index b72ac5f..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2MouseJoint.cpp +++ /dev/null @@ -1,197 +0,0 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include - -// p = attached point, m = mouse point -// C = p - m -// Cdot = v -// = v + cross(w, r) -// J = [I r_skew] -// Identity used: -// w k % (rx i + ry j) = w * (-ry i + rx j) - -b2MouseJoint::b2MouseJoint(const b2MouseJointDef* def) -: b2Joint(def) -{ - b2Assert(def->target.IsValid()); - b2Assert(b2IsValid(def->maxForce) && def->maxForce >= 0.0f); - b2Assert(b2IsValid(def->frequencyHz) && def->frequencyHz >= 0.0f); - b2Assert(b2IsValid(def->dampingRatio) && def->dampingRatio >= 0.0f); - - m_target = def->target; - m_localAnchor = b2MulT(m_bodyB->GetTransform(), m_target); - - m_maxForce = def->maxForce; - m_impulse.SetZero(); - - m_frequencyHz = def->frequencyHz; - m_dampingRatio = def->dampingRatio; - - m_beta = 0.0f; - m_gamma = 0.0f; -} - -void b2MouseJoint::SetTarget(const b2Vec2& target) -{ - if (m_bodyB->IsAwake() == false) - { - m_bodyB->SetAwake(true); - } - m_target = target; -} - -const b2Vec2& b2MouseJoint::GetTarget() const -{ - return m_target; -} - -void b2MouseJoint::SetMaxForce(float32 force) -{ - m_maxForce = force; -} - -float32 b2MouseJoint::GetMaxForce() const -{ - return m_maxForce; -} - -void b2MouseJoint::SetFrequency(float32 hz) -{ - m_frequencyHz = hz; -} - -float32 b2MouseJoint::GetFrequency() const -{ - return m_frequencyHz; -} - -void b2MouseJoint::SetDampingRatio(float32 ratio) -{ - m_dampingRatio = ratio; -} - -float32 b2MouseJoint::GetDampingRatio() const -{ - return m_dampingRatio; -} - -void b2MouseJoint::InitVelocityConstraints(const b2TimeStep& step) -{ - b2Body* b = m_bodyB; - - float32 mass = b->GetMass(); - - // Frequency - float32 omega = 2.0f * b2_pi * m_frequencyHz; - - // Damping coefficient - float32 d = 2.0f * mass * m_dampingRatio * omega; - - // Spring stiffness - float32 k = mass * (omega * omega); - - // magic formulas - // gamma has units of inverse mass. - // beta has units of inverse time. - b2Assert(d + step.dt * k > b2_epsilon); - m_gamma = step.dt * (d + step.dt * k); - if (m_gamma != 0.0f) - { - m_gamma = 1.0f / m_gamma; - } - m_beta = step.dt * k * m_gamma; - - // Compute the effective mass matrix. - b2Vec2 r = b2Mul(b->GetTransform().R, m_localAnchor - b->GetLocalCenter()); - - // K = [(1/m1 + 1/m2) * eye(2) - skew(r1) * invI1 * skew(r1) - skew(r2) * invI2 * skew(r2)] - // = [1/m1+1/m2 0 ] + invI1 * [r1.y*r1.y -r1.x*r1.y] + invI2 * [r1.y*r1.y -r1.x*r1.y] - // [ 0 1/m1+1/m2] [-r1.x*r1.y r1.x*r1.x] [-r1.x*r1.y r1.x*r1.x] - float32 invMass = b->m_invMass; - float32 invI = b->m_invI; - - b2Mat22 K1; - K1.col1.x = invMass; K1.col2.x = 0.0f; - K1.col1.y = 0.0f; K1.col2.y = invMass; - - b2Mat22 K2; - K2.col1.x = invI * r.y * r.y; K2.col2.x = -invI * r.x * r.y; - K2.col1.y = -invI * r.x * r.y; K2.col2.y = invI * r.x * r.x; - - b2Mat22 K = K1 + K2; - K.col1.x += m_gamma; - K.col2.y += m_gamma; - - m_mass = K.GetInverse(); - - m_C = b->m_sweep.c + r - m_target; - - // Cheat with some damping - b->m_angularVelocity *= 0.98f; - - // Warm starting. - m_impulse *= step.dtRatio; - b->m_linearVelocity += invMass * m_impulse; - b->m_angularVelocity += invI * b2Cross(r, m_impulse); -} - -void b2MouseJoint::SolveVelocityConstraints(const b2TimeStep& step) -{ - b2Body* b = m_bodyB; - - b2Vec2 r = b2Mul(b->GetTransform().R, m_localAnchor - b->GetLocalCenter()); - - // Cdot = v + cross(w, r) - b2Vec2 Cdot = b->m_linearVelocity + b2Cross(b->m_angularVelocity, r); - b2Vec2 impulse = b2Mul(m_mass, -(Cdot + m_beta * m_C + m_gamma * m_impulse)); - - b2Vec2 oldImpulse = m_impulse; - m_impulse += impulse; - float32 maxImpulse = step.dt * m_maxForce; - if (m_impulse.LengthSquared() > maxImpulse * maxImpulse) - { - m_impulse *= maxImpulse / m_impulse.Length(); - } - impulse = m_impulse - oldImpulse; - - b->m_linearVelocity += b->m_invMass * impulse; - b->m_angularVelocity += b->m_invI * b2Cross(r, impulse); -} - -b2Vec2 b2MouseJoint::GetAnchorA() const -{ - return m_target; -} - -b2Vec2 b2MouseJoint::GetAnchorB() const -{ - return m_bodyB->GetWorldPoint(m_localAnchor); -} - -b2Vec2 b2MouseJoint::GetReactionForce(float32 inv_dt) const -{ - return inv_dt * m_impulse; -} - -float32 b2MouseJoint::GetReactionTorque(float32 inv_dt) const -{ - return inv_dt * 0.0f; -} diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2MouseJoint.h b/Littlest/libs/Box2D/Dynamics/Joints/b2MouseJoint.h deleted file mode 100644 index cd1959a..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2MouseJoint.h +++ /dev/null @@ -1,114 +0,0 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.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 B2_MOUSE_JOINT_H -#define B2_MOUSE_JOINT_H - -#include - -/// Mouse joint definition. This requires a world target point, -/// tuning parameters, and the time step. -struct b2MouseJointDef : public b2JointDef -{ - b2MouseJointDef() - { - type = e_mouseJoint; - target.Set(0.0f, 0.0f); - maxForce = 0.0f; - frequencyHz = 5.0f; - dampingRatio = 0.7f; - } - - /// The initial world target point. This is assumed - /// to coincide with the body anchor initially. - b2Vec2 target; - - /// The maximum constraint force that can be exerted - /// to move the candidate body. Usually you will express - /// as some multiple of the weight (multiplier * mass * gravity). - float32 maxForce; - - /// The response speed. - float32 frequencyHz; - - /// The damping ratio. 0 = no damping, 1 = critical damping. - float32 dampingRatio; -}; - -/// A mouse joint is used to make a point on a body track a -/// specified world point. This a soft constraint with a maximum -/// force. This allows the constraint to stretch and without -/// applying huge forces. -/// NOTE: this joint is not documented in the manual because it was -/// developed to be used in the testbed. If you want to learn how to -/// use the mouse joint, look at the testbed. -class b2MouseJoint : public b2Joint -{ -public: - - /// Implements b2Joint. - b2Vec2 GetAnchorA() const; - - /// Implements b2Joint. - b2Vec2 GetAnchorB() const; - - /// Implements b2Joint. - b2Vec2 GetReactionForce(float32 inv_dt) const; - - /// Implements b2Joint. - float32 GetReactionTorque(float32 inv_dt) const; - - /// Use this to update the target point. - void SetTarget(const b2Vec2& target); - const b2Vec2& GetTarget() const; - - /// Set/get the maximum force in Newtons. - void SetMaxForce(float32 force); - float32 GetMaxForce() const; - - /// Set/get the frequency in Hertz. - void SetFrequency(float32 hz); - float32 GetFrequency() const; - - /// Set/get the damping ratio (dimensionless). - void SetDampingRatio(float32 ratio); - float32 GetDampingRatio() const; - -protected: - friend class b2Joint; - - b2MouseJoint(const b2MouseJointDef* def); - - void InitVelocityConstraints(const b2TimeStep& step); - void SolveVelocityConstraints(const b2TimeStep& step); - bool SolvePositionConstraints(float32 baumgarte) { B2_NOT_USED(baumgarte); return true; } - - b2Vec2 m_localAnchor; - b2Vec2 m_target; - b2Vec2 m_impulse; - - b2Mat22 m_mass; // effective mass for point-to-point constraint. - b2Vec2 m_C; // position error - float32 m_maxForce; - float32 m_frequencyHz; - float32 m_dampingRatio; - float32 m_beta; - float32 m_gamma; -}; - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp b/Littlest/libs/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp deleted file mode 100644 index 20a7a5a..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2PrismaticJoint.cpp +++ /dev/null @@ -1,586 +0,0 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include - -// Linear constraint (point-to-line) -// d = p2 - p1 = x2 + r2 - x1 - r1 -// C = dot(perp, d) -// Cdot = dot(d, cross(w1, perp)) + dot(perp, v2 + cross(w2, r2) - v1 - cross(w1, r1)) -// = -dot(perp, v1) - dot(cross(d + r1, perp), w1) + dot(perp, v2) + dot(cross(r2, perp), v2) -// J = [-perp, -cross(d + r1, perp), perp, cross(r2,perp)] -// -// Angular constraint -// C = a2 - a1 + a_initial -// Cdot = w2 - w1 -// J = [0 0 -1 0 0 1] -// -// K = J * invM * JT -// -// J = [-a -s1 a s2] -// [0 -1 0 1] -// a = perp -// s1 = cross(d + r1, a) = cross(p2 - x1, a) -// s2 = cross(r2, a) = cross(p2 - x2, a) - - -// Motor/Limit linear constraint -// C = dot(ax1, d) -// Cdot = = -dot(ax1, v1) - dot(cross(d + r1, ax1), w1) + dot(ax1, v2) + dot(cross(r2, ax1), v2) -// J = [-ax1 -cross(d+r1,ax1) ax1 cross(r2,ax1)] - -// Block Solver -// We develop a block solver that includes the joint limit. This makes the limit stiff (inelastic) even -// when the mass has poor distribution (leading to large torques about the joint anchor points). -// -// The Jacobian has 3 rows: -// J = [-uT -s1 uT s2] // linear -// [0 -1 0 1] // angular -// [-vT -a1 vT a2] // limit -// -// u = perp -// v = axis -// s1 = cross(d + r1, u), s2 = cross(r2, u) -// a1 = cross(d + r1, v), a2 = cross(r2, v) - -// M * (v2 - v1) = JT * df -// J * v2 = bias -// -// v2 = v1 + invM * JT * df -// J * (v1 + invM * JT * df) = bias -// K * df = bias - J * v1 = -Cdot -// K = J * invM * JT -// Cdot = J * v1 - bias -// -// Now solve for f2. -// df = f2 - f1 -// K * (f2 - f1) = -Cdot -// f2 = invK * (-Cdot) + f1 -// -// Clamp accumulated limit impulse. -// lower: f2(3) = max(f2(3), 0) -// upper: f2(3) = min(f2(3), 0) -// -// Solve for correct f2(1:2) -// K(1:2, 1:2) * f2(1:2) = -Cdot(1:2) - K(1:2,3) * f2(3) + K(1:2,1:3) * f1 -// = -Cdot(1:2) - K(1:2,3) * f2(3) + K(1:2,1:2) * f1(1:2) + K(1:2,3) * f1(3) -// K(1:2, 1:2) * f2(1:2) = -Cdot(1:2) - K(1:2,3) * (f2(3) - f1(3)) + K(1:2,1:2) * f1(1:2) -// f2(1:2) = invK(1:2,1:2) * (-Cdot(1:2) - K(1:2,3) * (f2(3) - f1(3))) + f1(1:2) -// -// Now compute impulse to be applied: -// df = f2 - f1 - -void b2PrismaticJointDef::Initialize(b2Body* b1, b2Body* b2, const b2Vec2& anchor, const b2Vec2& axis) -{ - bodyA = b1; - bodyB = b2; - localAnchorA = bodyA->GetLocalPoint(anchor); - localAnchorB = bodyB->GetLocalPoint(anchor); - localAxis1 = bodyA->GetLocalVector(axis); - referenceAngle = bodyB->GetAngle() - bodyA->GetAngle(); -} - -b2PrismaticJoint::b2PrismaticJoint(const b2PrismaticJointDef* def) -: b2Joint(def) -{ - m_localAnchor1 = def->localAnchorA; - m_localAnchor2 = def->localAnchorB; - m_localXAxis1 = def->localAxis1; - m_localYAxis1 = b2Cross(1.0f, m_localXAxis1); - m_refAngle = def->referenceAngle; - - m_impulse.SetZero(); - m_motorMass = 0.0f; - m_motorImpulse = 0.0f; - - m_lowerTranslation = def->lowerTranslation; - m_upperTranslation = def->upperTranslation; - m_maxMotorForce = def->maxMotorForce; - m_motorSpeed = def->motorSpeed; - m_enableLimit = def->enableLimit; - m_enableMotor = def->enableMotor; - m_limitState = e_inactiveLimit; - - m_axis.SetZero(); - m_perp.SetZero(); -} - -void b2PrismaticJoint::InitVelocityConstraints(const b2TimeStep& step) -{ - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - m_localCenterA = b1->GetLocalCenter(); - m_localCenterB = b2->GetLocalCenter(); - - b2Transform xf1 = b1->GetTransform(); - b2Transform xf2 = b2->GetTransform(); - - // Compute the effective masses. - b2Vec2 r1 = b2Mul(xf1.R, m_localAnchor1 - m_localCenterA); - b2Vec2 r2 = b2Mul(xf2.R, m_localAnchor2 - m_localCenterB); - b2Vec2 d = b2->m_sweep.c + r2 - b1->m_sweep.c - r1; - - m_invMassA = b1->m_invMass; - m_invIA = b1->m_invI; - m_invMassB = b2->m_invMass; - m_invIB = b2->m_invI; - - // Compute motor Jacobian and effective mass. - { - m_axis = b2Mul(xf1.R, m_localXAxis1); - m_a1 = b2Cross(d + r1, m_axis); - m_a2 = b2Cross(r2, m_axis); - - m_motorMass = m_invMassA + m_invMassB + m_invIA * m_a1 * m_a1 + m_invIB * m_a2 * m_a2; - if (m_motorMass > b2_epsilon) - { - m_motorMass = 1.0f / m_motorMass; - } - } - - // Prismatic constraint. - { - m_perp = b2Mul(xf1.R, m_localYAxis1); - - m_s1 = b2Cross(d + r1, m_perp); - m_s2 = b2Cross(r2, m_perp); - - float32 m1 = m_invMassA, m2 = m_invMassB; - float32 i1 = m_invIA, i2 = m_invIB; - - float32 k11 = m1 + m2 + i1 * m_s1 * m_s1 + i2 * m_s2 * m_s2; - float32 k12 = i1 * m_s1 + i2 * m_s2; - float32 k13 = i1 * m_s1 * m_a1 + i2 * m_s2 * m_a2; - float32 k22 = i1 + i2; - float32 k23 = i1 * m_a1 + i2 * m_a2; - float32 k33 = m1 + m2 + i1 * m_a1 * m_a1 + i2 * m_a2 * m_a2; - - m_K.col1.Set(k11, k12, k13); - m_K.col2.Set(k12, k22, k23); - m_K.col3.Set(k13, k23, k33); - } - - // Compute motor and limit terms. - if (m_enableLimit) - { - float32 jointTranslation = b2Dot(m_axis, d); - if (b2Abs(m_upperTranslation - m_lowerTranslation) < 2.0f * b2_linearSlop) - { - m_limitState = e_equalLimits; - } - else if (jointTranslation <= m_lowerTranslation) - { - if (m_limitState != e_atLowerLimit) - { - m_limitState = e_atLowerLimit; - m_impulse.z = 0.0f; - } - } - else if (jointTranslation >= m_upperTranslation) - { - if (m_limitState != e_atUpperLimit) - { - m_limitState = e_atUpperLimit; - m_impulse.z = 0.0f; - } - } - else - { - m_limitState = e_inactiveLimit; - m_impulse.z = 0.0f; - } - } - else - { - m_limitState = e_inactiveLimit; - m_impulse.z = 0.0f; - } - - if (m_enableMotor == false) - { - m_motorImpulse = 0.0f; - } - - if (step.warmStarting) - { - // Account for variable time step. - m_impulse *= step.dtRatio; - m_motorImpulse *= step.dtRatio; - - b2Vec2 P = m_impulse.x * m_perp + (m_motorImpulse + m_impulse.z) * m_axis; - float32 L1 = m_impulse.x * m_s1 + m_impulse.y + (m_motorImpulse + m_impulse.z) * m_a1; - float32 L2 = m_impulse.x * m_s2 + m_impulse.y + (m_motorImpulse + m_impulse.z) * m_a2; - - b1->m_linearVelocity -= m_invMassA * P; - b1->m_angularVelocity -= m_invIA * L1; - - b2->m_linearVelocity += m_invMassB * P; - b2->m_angularVelocity += m_invIB * L2; - } - else - { - m_impulse.SetZero(); - m_motorImpulse = 0.0f; - } -} - -void b2PrismaticJoint::SolveVelocityConstraints(const b2TimeStep& step) -{ - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - b2Vec2 v1 = b1->m_linearVelocity; - float32 w1 = b1->m_angularVelocity; - b2Vec2 v2 = b2->m_linearVelocity; - float32 w2 = b2->m_angularVelocity; - - // Solve linear motor constraint. - if (m_enableMotor && m_limitState != e_equalLimits) - { - float32 Cdot = b2Dot(m_axis, v2 - v1) + m_a2 * w2 - m_a1 * w1; - float32 impulse = m_motorMass * (m_motorSpeed - Cdot); - float32 oldImpulse = m_motorImpulse; - float32 maxImpulse = step.dt * m_maxMotorForce; - m_motorImpulse = b2Clamp(m_motorImpulse + impulse, -maxImpulse, maxImpulse); - impulse = m_motorImpulse - oldImpulse; - - b2Vec2 P = impulse * m_axis; - float32 L1 = impulse * m_a1; - float32 L2 = impulse * m_a2; - - v1 -= m_invMassA * P; - w1 -= m_invIA * L1; - - v2 += m_invMassB * P; - w2 += m_invIB * L2; - } - - b2Vec2 Cdot1; - Cdot1.x = b2Dot(m_perp, v2 - v1) + m_s2 * w2 - m_s1 * w1; - Cdot1.y = w2 - w1; - - if (m_enableLimit && m_limitState != e_inactiveLimit) - { - // Solve prismatic and limit constraint in block form. - float32 Cdot2; - Cdot2 = b2Dot(m_axis, v2 - v1) + m_a2 * w2 - m_a1 * w1; - b2Vec3 Cdot(Cdot1.x, Cdot1.y, Cdot2); - - b2Vec3 f1 = m_impulse; - b2Vec3 df = m_K.Solve33(-Cdot); - m_impulse += df; - - if (m_limitState == e_atLowerLimit) - { - m_impulse.z = b2Max(m_impulse.z, 0.0f); - } - else if (m_limitState == e_atUpperLimit) - { - m_impulse.z = b2Min(m_impulse.z, 0.0f); - } - - // f2(1:2) = invK(1:2,1:2) * (-Cdot(1:2) - K(1:2,3) * (f2(3) - f1(3))) + f1(1:2) - b2Vec2 b = -Cdot1 - (m_impulse.z - f1.z) * b2Vec2(m_K.col3.x, m_K.col3.y); - b2Vec2 f2r = m_K.Solve22(b) + b2Vec2(f1.x, f1.y); - m_impulse.x = f2r.x; - m_impulse.y = f2r.y; - - df = m_impulse - f1; - - b2Vec2 P = df.x * m_perp + df.z * m_axis; - float32 L1 = df.x * m_s1 + df.y + df.z * m_a1; - float32 L2 = df.x * m_s2 + df.y + df.z * m_a2; - - v1 -= m_invMassA * P; - w1 -= m_invIA * L1; - - v2 += m_invMassB * P; - w2 += m_invIB * L2; - } - else - { - // Limit is inactive, just solve the prismatic constraint in block form. - b2Vec2 df = m_K.Solve22(-Cdot1); - m_impulse.x += df.x; - m_impulse.y += df.y; - - b2Vec2 P = df.x * m_perp; - float32 L1 = df.x * m_s1 + df.y; - float32 L2 = df.x * m_s2 + df.y; - - v1 -= m_invMassA * P; - w1 -= m_invIA * L1; - - v2 += m_invMassB * P; - w2 += m_invIB * L2; - } - - b1->m_linearVelocity = v1; - b1->m_angularVelocity = w1; - b2->m_linearVelocity = v2; - b2->m_angularVelocity = w2; -} - -bool b2PrismaticJoint::SolvePositionConstraints(float32 baumgarte) -{ - B2_NOT_USED(baumgarte); - - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - b2Vec2 c1 = b1->m_sweep.c; - float32 a1 = b1->m_sweep.a; - - b2Vec2 c2 = b2->m_sweep.c; - float32 a2 = b2->m_sweep.a; - - // Solve linear limit constraint. - float32 linearError = 0.0f, angularError = 0.0f; - bool active = false; - float32 C2 = 0.0f; - - b2Mat22 R1(a1), R2(a2); - - b2Vec2 r1 = b2Mul(R1, m_localAnchor1 - m_localCenterA); - b2Vec2 r2 = b2Mul(R2, m_localAnchor2 - m_localCenterB); - b2Vec2 d = c2 + r2 - c1 - r1; - - if (m_enableLimit) - { - m_axis = b2Mul(R1, m_localXAxis1); - - m_a1 = b2Cross(d + r1, m_axis); - m_a2 = b2Cross(r2, m_axis); - - float32 translation = b2Dot(m_axis, d); - if (b2Abs(m_upperTranslation - m_lowerTranslation) < 2.0f * b2_linearSlop) - { - // Prevent large angular corrections - C2 = b2Clamp(translation, -b2_maxLinearCorrection, b2_maxLinearCorrection); - linearError = b2Abs(translation); - active = true; - } - else if (translation <= m_lowerTranslation) - { - // Prevent large linear corrections and allow some slop. - C2 = b2Clamp(translation - m_lowerTranslation + b2_linearSlop, -b2_maxLinearCorrection, 0.0f); - linearError = m_lowerTranslation - translation; - active = true; - } - else if (translation >= m_upperTranslation) - { - // Prevent large linear corrections and allow some slop. - C2 = b2Clamp(translation - m_upperTranslation - b2_linearSlop, 0.0f, b2_maxLinearCorrection); - linearError = translation - m_upperTranslation; - active = true; - } - } - - m_perp = b2Mul(R1, m_localYAxis1); - - m_s1 = b2Cross(d + r1, m_perp); - m_s2 = b2Cross(r2, m_perp); - - b2Vec3 impulse; - b2Vec2 C1; - C1.x = b2Dot(m_perp, d); - C1.y = a2 - a1 - m_refAngle; - - linearError = b2Max(linearError, b2Abs(C1.x)); - angularError = b2Abs(C1.y); - - if (active) - { - float32 m1 = m_invMassA, m2 = m_invMassB; - float32 i1 = m_invIA, i2 = m_invIB; - - float32 k11 = m1 + m2 + i1 * m_s1 * m_s1 + i2 * m_s2 * m_s2; - float32 k12 = i1 * m_s1 + i2 * m_s2; - float32 k13 = i1 * m_s1 * m_a1 + i2 * m_s2 * m_a2; - float32 k22 = i1 + i2; - float32 k23 = i1 * m_a1 + i2 * m_a2; - float32 k33 = m1 + m2 + i1 * m_a1 * m_a1 + i2 * m_a2 * m_a2; - - m_K.col1.Set(k11, k12, k13); - m_K.col2.Set(k12, k22, k23); - m_K.col3.Set(k13, k23, k33); - - b2Vec3 C; - C.x = C1.x; - C.y = C1.y; - C.z = C2; - - impulse = m_K.Solve33(-C); - } - else - { - float32 m1 = m_invMassA, m2 = m_invMassB; - float32 i1 = m_invIA, i2 = m_invIB; - - float32 k11 = m1 + m2 + i1 * m_s1 * m_s1 + i2 * m_s2 * m_s2; - float32 k12 = i1 * m_s1 + i2 * m_s2; - float32 k22 = i1 + i2; - - m_K.col1.Set(k11, k12, 0.0f); - m_K.col2.Set(k12, k22, 0.0f); - - b2Vec2 impulse1 = m_K.Solve22(-C1); - impulse.x = impulse1.x; - impulse.y = impulse1.y; - impulse.z = 0.0f; - } - - b2Vec2 P = impulse.x * m_perp + impulse.z * m_axis; - float32 L1 = impulse.x * m_s1 + impulse.y + impulse.z * m_a1; - float32 L2 = impulse.x * m_s2 + impulse.y + impulse.z * m_a2; - - c1 -= m_invMassA * P; - a1 -= m_invIA * L1; - c2 += m_invMassB * P; - a2 += m_invIB * L2; - - // TODO_ERIN remove need for this. - b1->m_sweep.c = c1; - b1->m_sweep.a = a1; - b2->m_sweep.c = c2; - b2->m_sweep.a = a2; - b1->SynchronizeTransform(); - b2->SynchronizeTransform(); - - return linearError <= b2_linearSlop && angularError <= b2_angularSlop; -} - -b2Vec2 b2PrismaticJoint::GetAnchorA() const -{ - return m_bodyA->GetWorldPoint(m_localAnchor1); -} - -b2Vec2 b2PrismaticJoint::GetAnchorB() const -{ - return m_bodyB->GetWorldPoint(m_localAnchor2); -} - -b2Vec2 b2PrismaticJoint::GetReactionForce(float32 inv_dt) const -{ - return inv_dt * (m_impulse.x * m_perp + (m_motorImpulse + m_impulse.z) * m_axis); -} - -float32 b2PrismaticJoint::GetReactionTorque(float32 inv_dt) const -{ - return inv_dt * m_impulse.y; -} - -float32 b2PrismaticJoint::GetJointTranslation() const -{ - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - b2Vec2 p1 = b1->GetWorldPoint(m_localAnchor1); - b2Vec2 p2 = b2->GetWorldPoint(m_localAnchor2); - b2Vec2 d = p2 - p1; - b2Vec2 axis = b1->GetWorldVector(m_localXAxis1); - - float32 translation = b2Dot(d, axis); - return translation; -} - -float32 b2PrismaticJoint::GetJointSpeed() const -{ - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - b2Vec2 r1 = b2Mul(b1->GetTransform().R, m_localAnchor1 - b1->GetLocalCenter()); - b2Vec2 r2 = b2Mul(b2->GetTransform().R, m_localAnchor2 - b2->GetLocalCenter()); - b2Vec2 p1 = b1->m_sweep.c + r1; - b2Vec2 p2 = b2->m_sweep.c + r2; - b2Vec2 d = p2 - p1; - b2Vec2 axis = b1->GetWorldVector(m_localXAxis1); - - b2Vec2 v1 = b1->m_linearVelocity; - b2Vec2 v2 = b2->m_linearVelocity; - float32 w1 = b1->m_angularVelocity; - float32 w2 = b2->m_angularVelocity; - - float32 speed = b2Dot(d, b2Cross(w1, axis)) + b2Dot(axis, v2 + b2Cross(w2, r2) - v1 - b2Cross(w1, r1)); - return speed; -} - -bool b2PrismaticJoint::IsLimitEnabled() const -{ - return m_enableLimit; -} - -void b2PrismaticJoint::EnableLimit(bool flag) -{ - m_bodyA->SetAwake(true); - m_bodyB->SetAwake(true); - m_enableLimit = flag; -} - -float32 b2PrismaticJoint::GetLowerLimit() const -{ - return m_lowerTranslation; -} - -float32 b2PrismaticJoint::GetUpperLimit() const -{ - return m_upperTranslation; -} - -void b2PrismaticJoint::SetLimits(float32 lower, float32 upper) -{ - b2Assert(lower <= upper); - m_bodyA->SetAwake(true); - m_bodyB->SetAwake(true); - m_lowerTranslation = lower; - m_upperTranslation = upper; -} - -bool b2PrismaticJoint::IsMotorEnabled() const -{ - return m_enableMotor; -} - -void b2PrismaticJoint::EnableMotor(bool flag) -{ - m_bodyA->SetAwake(true); - m_bodyB->SetAwake(true); - m_enableMotor = flag; -} - -void b2PrismaticJoint::SetMotorSpeed(float32 speed) -{ - m_bodyA->SetAwake(true); - m_bodyB->SetAwake(true); - m_motorSpeed = speed; -} - -void b2PrismaticJoint::SetMaxMotorForce(float32 force) -{ - m_bodyA->SetAwake(true); - m_bodyB->SetAwake(true); - m_maxMotorForce = force; -} - -float32 b2PrismaticJoint::GetMotorForce() const -{ - return m_motorImpulse; -} diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2PrismaticJoint.h b/Littlest/libs/Box2D/Dynamics/Joints/b2PrismaticJoint.h deleted file mode 100644 index 7a12c5d..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2PrismaticJoint.h +++ /dev/null @@ -1,175 +0,0 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.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 B2_PRISMATIC_JOINT_H -#define B2_PRISMATIC_JOINT_H - -#include - -/// Prismatic joint definition. This requires defining a line of -/// motion using an axis and an anchor point. The definition uses local -/// anchor points and a local axis so that the initial configuration -/// can violate the constraint slightly. The joint translation is zero -/// when the local anchor points coincide in world space. Using local -/// anchors and a local axis helps when saving and loading a game. -/// @warning at least one body should by dynamic with a non-fixed rotation. -struct b2PrismaticJointDef : public b2JointDef -{ - b2PrismaticJointDef() - { - type = e_prismaticJoint; - localAnchorA.SetZero(); - localAnchorB.SetZero(); - localAxis1.Set(1.0f, 0.0f); - referenceAngle = 0.0f; - enableLimit = false; - lowerTranslation = 0.0f; - upperTranslation = 0.0f; - enableMotor = false; - maxMotorForce = 0.0f; - motorSpeed = 0.0f; - } - - /// Initialize the bodies, anchors, axis, and reference angle using the world - /// anchor and world axis. - void Initialize(b2Body* bodyA, b2Body* bodyB, const b2Vec2& anchor, const b2Vec2& axis); - - /// The local anchor point relative to body1's origin. - b2Vec2 localAnchorA; - - /// The local anchor point relative to body2's origin. - b2Vec2 localAnchorB; - - /// The local translation axis in body1. - b2Vec2 localAxis1; - - /// The constrained angle between the bodies: body2_angle - body1_angle. - float32 referenceAngle; - - /// Enable/disable the joint limit. - bool enableLimit; - - /// The lower translation limit, usually in meters. - float32 lowerTranslation; - - /// The upper translation limit, usually in meters. - float32 upperTranslation; - - /// Enable/disable the joint motor. - bool enableMotor; - - /// The maximum motor torque, usually in N-m. - float32 maxMotorForce; - - /// The desired motor speed in radians per second. - float32 motorSpeed; -}; - -/// A prismatic joint. This joint provides one degree of freedom: translation -/// along an axis fixed in body1. Relative rotation is prevented. You can -/// use a joint limit to restrict the range of motion and a joint motor to -/// drive the motion or to model joint friction. -class b2PrismaticJoint : public b2Joint -{ -public: - b2Vec2 GetAnchorA() const; - b2Vec2 GetAnchorB() const; - - b2Vec2 GetReactionForce(float32 inv_dt) const; - float32 GetReactionTorque(float32 inv_dt) const; - - /// Get the current joint translation, usually in meters. - float32 GetJointTranslation() const; - - /// Get the current joint translation speed, usually in meters per second. - float32 GetJointSpeed() const; - - /// Is the joint limit enabled? - bool IsLimitEnabled() const; - - /// Enable/disable the joint limit. - void EnableLimit(bool flag); - - /// Get the lower joint limit, usually in meters. - float32 GetLowerLimit() const; - - /// Get the upper joint limit, usually in meters. - float32 GetUpperLimit() const; - - /// Set the joint limits, usually in meters. - void SetLimits(float32 lower, float32 upper); - - /// Is the joint motor enabled? - bool IsMotorEnabled() const; - - /// Enable/disable the joint motor. - void EnableMotor(bool flag); - - /// Set the motor speed, usually in meters per second. - void SetMotorSpeed(float32 speed); - - /// Get the motor speed, usually in meters per second. - float32 GetMotorSpeed() const; - - /// Set the maximum motor force, usually in N. - void SetMaxMotorForce(float32 force); - - /// Get the current motor force, usually in N. - float32 GetMotorForce() const; - -protected: - friend class b2Joint; - friend class b2GearJoint; - b2PrismaticJoint(const b2PrismaticJointDef* def); - - void InitVelocityConstraints(const b2TimeStep& step); - void SolveVelocityConstraints(const b2TimeStep& step); - bool SolvePositionConstraints(float32 baumgarte); - - b2Vec2 m_localAnchor1; - b2Vec2 m_localAnchor2; - b2Vec2 m_localXAxis1; - b2Vec2 m_localYAxis1; - float32 m_refAngle; - - b2Vec2 m_axis, m_perp; - float32 m_s1, m_s2; - float32 m_a1, m_a2; - - b2Mat33 m_K; - b2Vec3 m_impulse; - - float32 m_motorMass; // effective mass for motor/limit translational constraint. - float32 m_motorImpulse; - - float32 m_lowerTranslation; - float32 m_upperTranslation; - float32 m_maxMotorForce; - float32 m_motorSpeed; - - bool m_enableLimit; - bool m_enableMotor; - b2LimitState m_limitState; -}; - -inline float32 b2PrismaticJoint::GetMotorSpeed() const -{ - return m_motorSpeed; -} - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2PulleyJoint.cpp b/Littlest/libs/Box2D/Dynamics/Joints/b2PulleyJoint.cpp deleted file mode 100644 index beb7db8..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2PulleyJoint.cpp +++ /dev/null @@ -1,427 +0,0 @@ -/* -* Copyright (c) 2007 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include - -// Pulley: -// length1 = norm(p1 - s1) -// length2 = norm(p2 - s2) -// C0 = (length1 + ratio * length2)_initial -// C = C0 - (length1 + ratio * length2) >= 0 -// u1 = (p1 - s1) / norm(p1 - s1) -// u2 = (p2 - s2) / norm(p2 - s2) -// Cdot = -dot(u1, v1 + cross(w1, r1)) - ratio * dot(u2, v2 + cross(w2, r2)) -// J = -[u1 cross(r1, u1) ratio * u2 ratio * cross(r2, u2)] -// K = J * invM * JT -// = invMass1 + invI1 * cross(r1, u1)^2 + ratio^2 * (invMass2 + invI2 * cross(r2, u2)^2) -// -// Limit: -// C = maxLength - length -// u = (p - s) / norm(p - s) -// Cdot = -dot(u, v + cross(w, r)) -// K = invMass + invI * cross(r, u)^2 -// 0 <= impulse - -void b2PulleyJointDef::Initialize(b2Body* b1, b2Body* b2, - const b2Vec2& ga1, const b2Vec2& ga2, - const b2Vec2& anchor1, const b2Vec2& anchor2, - float32 r) -{ - bodyA = b1; - bodyB = b2; - groundAnchorA = ga1; - groundAnchorB = ga2; - localAnchorA = bodyA->GetLocalPoint(anchor1); - localAnchorB = bodyB->GetLocalPoint(anchor2); - b2Vec2 d1 = anchor1 - ga1; - lengthA = d1.Length(); - b2Vec2 d2 = anchor2 - ga2; - lengthB = d2.Length(); - ratio = r; - b2Assert(ratio > b2_epsilon); - float32 C = lengthA + ratio * lengthB; - maxLengthA = C - ratio * b2_minPulleyLength; - maxLengthB = (C - b2_minPulleyLength) / ratio; -} - -b2PulleyJoint::b2PulleyJoint(const b2PulleyJointDef* def) -: b2Joint(def) -{ - m_groundAnchor1 = def->groundAnchorA; - m_groundAnchor2 = def->groundAnchorB; - m_localAnchor1 = def->localAnchorA; - m_localAnchor2 = def->localAnchorB; - - b2Assert(def->ratio != 0.0f); - m_ratio = def->ratio; - - m_constant = def->lengthA + m_ratio * def->lengthB; - - m_maxLength1 = b2Min(def->maxLengthA, m_constant - m_ratio * b2_minPulleyLength); - m_maxLength2 = b2Min(def->maxLengthB, (m_constant - b2_minPulleyLength) / m_ratio); - - m_impulse = 0.0f; - m_limitImpulse1 = 0.0f; - m_limitImpulse2 = 0.0f; -} - -void b2PulleyJoint::InitVelocityConstraints(const b2TimeStep& step) -{ - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - b2Vec2 r1 = b2Mul(b1->GetTransform().R, m_localAnchor1 - b1->GetLocalCenter()); - b2Vec2 r2 = b2Mul(b2->GetTransform().R, m_localAnchor2 - b2->GetLocalCenter()); - - b2Vec2 p1 = b1->m_sweep.c + r1; - b2Vec2 p2 = b2->m_sweep.c + r2; - - b2Vec2 s1 = m_groundAnchor1; - b2Vec2 s2 = m_groundAnchor2; - - // Get the pulley axes. - m_u1 = p1 - s1; - m_u2 = p2 - s2; - - float32 length1 = m_u1.Length(); - float32 length2 = m_u2.Length(); - - if (length1 > b2_linearSlop) - { - m_u1 *= 1.0f / length1; - } - else - { - m_u1.SetZero(); - } - - if (length2 > b2_linearSlop) - { - m_u2 *= 1.0f / length2; - } - else - { - m_u2.SetZero(); - } - - float32 C = m_constant - length1 - m_ratio * length2; - if (C > 0.0f) - { - m_state = e_inactiveLimit; - m_impulse = 0.0f; - } - else - { - m_state = e_atUpperLimit; - } - - if (length1 < m_maxLength1) - { - m_limitState1 = e_inactiveLimit; - m_limitImpulse1 = 0.0f; - } - else - { - m_limitState1 = e_atUpperLimit; - } - - if (length2 < m_maxLength2) - { - m_limitState2 = e_inactiveLimit; - m_limitImpulse2 = 0.0f; - } - else - { - m_limitState2 = e_atUpperLimit; - } - - // Compute effective mass. - float32 cr1u1 = b2Cross(r1, m_u1); - float32 cr2u2 = b2Cross(r2, m_u2); - - m_limitMass1 = b1->m_invMass + b1->m_invI * cr1u1 * cr1u1; - m_limitMass2 = b2->m_invMass + b2->m_invI * cr2u2 * cr2u2; - m_pulleyMass = m_limitMass1 + m_ratio * m_ratio * m_limitMass2; - b2Assert(m_limitMass1 > b2_epsilon); - b2Assert(m_limitMass2 > b2_epsilon); - b2Assert(m_pulleyMass > b2_epsilon); - m_limitMass1 = 1.0f / m_limitMass1; - m_limitMass2 = 1.0f / m_limitMass2; - m_pulleyMass = 1.0f / m_pulleyMass; - - if (step.warmStarting) - { - // Scale impulses to support variable time steps. - m_impulse *= step.dtRatio; - m_limitImpulse1 *= step.dtRatio; - m_limitImpulse2 *= step.dtRatio; - - // Warm starting. - b2Vec2 P1 = -(m_impulse + m_limitImpulse1) * m_u1; - b2Vec2 P2 = (-m_ratio * m_impulse - m_limitImpulse2) * m_u2; - b1->m_linearVelocity += b1->m_invMass * P1; - b1->m_angularVelocity += b1->m_invI * b2Cross(r1, P1); - b2->m_linearVelocity += b2->m_invMass * P2; - b2->m_angularVelocity += b2->m_invI * b2Cross(r2, P2); - } - else - { - m_impulse = 0.0f; - m_limitImpulse1 = 0.0f; - m_limitImpulse2 = 0.0f; - } -} - -void b2PulleyJoint::SolveVelocityConstraints(const b2TimeStep& step) -{ - B2_NOT_USED(step); - - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - b2Vec2 r1 = b2Mul(b1->GetTransform().R, m_localAnchor1 - b1->GetLocalCenter()); - b2Vec2 r2 = b2Mul(b2->GetTransform().R, m_localAnchor2 - b2->GetLocalCenter()); - - if (m_state == e_atUpperLimit) - { - b2Vec2 v1 = b1->m_linearVelocity + b2Cross(b1->m_angularVelocity, r1); - b2Vec2 v2 = b2->m_linearVelocity + b2Cross(b2->m_angularVelocity, r2); - - float32 Cdot = -b2Dot(m_u1, v1) - m_ratio * b2Dot(m_u2, v2); - float32 impulse = m_pulleyMass * (-Cdot); - float32 oldImpulse = m_impulse; - m_impulse = b2Max(0.0f, m_impulse + impulse); - impulse = m_impulse - oldImpulse; - - b2Vec2 P1 = -impulse * m_u1; - b2Vec2 P2 = -m_ratio * impulse * m_u2; - b1->m_linearVelocity += b1->m_invMass * P1; - b1->m_angularVelocity += b1->m_invI * b2Cross(r1, P1); - b2->m_linearVelocity += b2->m_invMass * P2; - b2->m_angularVelocity += b2->m_invI * b2Cross(r2, P2); - } - - if (m_limitState1 == e_atUpperLimit) - { - b2Vec2 v1 = b1->m_linearVelocity + b2Cross(b1->m_angularVelocity, r1); - - float32 Cdot = -b2Dot(m_u1, v1); - float32 impulse = -m_limitMass1 * Cdot; - float32 oldImpulse = m_limitImpulse1; - m_limitImpulse1 = b2Max(0.0f, m_limitImpulse1 + impulse); - impulse = m_limitImpulse1 - oldImpulse; - - b2Vec2 P1 = -impulse * m_u1; - b1->m_linearVelocity += b1->m_invMass * P1; - b1->m_angularVelocity += b1->m_invI * b2Cross(r1, P1); - } - - if (m_limitState2 == e_atUpperLimit) - { - b2Vec2 v2 = b2->m_linearVelocity + b2Cross(b2->m_angularVelocity, r2); - - float32 Cdot = -b2Dot(m_u2, v2); - float32 impulse = -m_limitMass2 * Cdot; - float32 oldImpulse = m_limitImpulse2; - m_limitImpulse2 = b2Max(0.0f, m_limitImpulse2 + impulse); - impulse = m_limitImpulse2 - oldImpulse; - - b2Vec2 P2 = -impulse * m_u2; - b2->m_linearVelocity += b2->m_invMass * P2; - b2->m_angularVelocity += b2->m_invI * b2Cross(r2, P2); - } -} - -bool b2PulleyJoint::SolvePositionConstraints(float32 baumgarte) -{ - B2_NOT_USED(baumgarte); - - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - b2Vec2 s1 = m_groundAnchor1; - b2Vec2 s2 = m_groundAnchor2; - - float32 linearError = 0.0f; - - if (m_state == e_atUpperLimit) - { - b2Vec2 r1 = b2Mul(b1->GetTransform().R, m_localAnchor1 - b1->GetLocalCenter()); - b2Vec2 r2 = b2Mul(b2->GetTransform().R, m_localAnchor2 - b2->GetLocalCenter()); - - b2Vec2 p1 = b1->m_sweep.c + r1; - b2Vec2 p2 = b2->m_sweep.c + r2; - - // Get the pulley axes. - m_u1 = p1 - s1; - m_u2 = p2 - s2; - - float32 length1 = m_u1.Length(); - float32 length2 = m_u2.Length(); - - if (length1 > b2_linearSlop) - { - m_u1 *= 1.0f / length1; - } - else - { - m_u1.SetZero(); - } - - if (length2 > b2_linearSlop) - { - m_u2 *= 1.0f / length2; - } - else - { - m_u2.SetZero(); - } - - float32 C = m_constant - length1 - m_ratio * length2; - linearError = b2Max(linearError, -C); - - C = b2Clamp(C + b2_linearSlop, -b2_maxLinearCorrection, 0.0f); - float32 impulse = -m_pulleyMass * C; - - b2Vec2 P1 = -impulse * m_u1; - b2Vec2 P2 = -m_ratio * impulse * m_u2; - - b1->m_sweep.c += b1->m_invMass * P1; - b1->m_sweep.a += b1->m_invI * b2Cross(r1, P1); - b2->m_sweep.c += b2->m_invMass * P2; - b2->m_sweep.a += b2->m_invI * b2Cross(r2, P2); - - b1->SynchronizeTransform(); - b2->SynchronizeTransform(); - } - - if (m_limitState1 == e_atUpperLimit) - { - b2Vec2 r1 = b2Mul(b1->GetTransform().R, m_localAnchor1 - b1->GetLocalCenter()); - b2Vec2 p1 = b1->m_sweep.c + r1; - - m_u1 = p1 - s1; - float32 length1 = m_u1.Length(); - - if (length1 > b2_linearSlop) - { - m_u1 *= 1.0f / length1; - } - else - { - m_u1.SetZero(); - } - - float32 C = m_maxLength1 - length1; - linearError = b2Max(linearError, -C); - C = b2Clamp(C + b2_linearSlop, -b2_maxLinearCorrection, 0.0f); - float32 impulse = -m_limitMass1 * C; - - b2Vec2 P1 = -impulse * m_u1; - b1->m_sweep.c += b1->m_invMass * P1; - b1->m_sweep.a += b1->m_invI * b2Cross(r1, P1); - - b1->SynchronizeTransform(); - } - - if (m_limitState2 == e_atUpperLimit) - { - b2Vec2 r2 = b2Mul(b2->GetTransform().R, m_localAnchor2 - b2->GetLocalCenter()); - b2Vec2 p2 = b2->m_sweep.c + r2; - - m_u2 = p2 - s2; - float32 length2 = m_u2.Length(); - - if (length2 > b2_linearSlop) - { - m_u2 *= 1.0f / length2; - } - else - { - m_u2.SetZero(); - } - - float32 C = m_maxLength2 - length2; - linearError = b2Max(linearError, -C); - C = b2Clamp(C + b2_linearSlop, -b2_maxLinearCorrection, 0.0f); - float32 impulse = -m_limitMass2 * C; - - b2Vec2 P2 = -impulse * m_u2; - b2->m_sweep.c += b2->m_invMass * P2; - b2->m_sweep.a += b2->m_invI * b2Cross(r2, P2); - - b2->SynchronizeTransform(); - } - - return linearError < b2_linearSlop; -} - -b2Vec2 b2PulleyJoint::GetAnchorA() const -{ - return m_bodyA->GetWorldPoint(m_localAnchor1); -} - -b2Vec2 b2PulleyJoint::GetAnchorB() const -{ - return m_bodyB->GetWorldPoint(m_localAnchor2); -} - -b2Vec2 b2PulleyJoint::GetReactionForce(float32 inv_dt) const -{ - b2Vec2 P = m_impulse * m_u2; - return inv_dt * P; -} - -float32 b2PulleyJoint::GetReactionTorque(float32 inv_dt) const -{ - B2_NOT_USED(inv_dt); - return 0.0f; -} - -b2Vec2 b2PulleyJoint::GetGroundAnchorA() const -{ - return m_groundAnchor1; -} - -b2Vec2 b2PulleyJoint::GetGroundAnchorB() const -{ - return m_groundAnchor2; -} - -float32 b2PulleyJoint::GetLength1() const -{ - b2Vec2 p = m_bodyA->GetWorldPoint(m_localAnchor1); - b2Vec2 s = m_groundAnchor1; - b2Vec2 d = p - s; - return d.Length(); -} - -float32 b2PulleyJoint::GetLength2() const -{ - b2Vec2 p = m_bodyB->GetWorldPoint(m_localAnchor2); - b2Vec2 s = m_groundAnchor2; - b2Vec2 d = p - s; - return d.Length(); -} - -float32 b2PulleyJoint::GetRatio() const -{ - return m_ratio; -} diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2PulleyJoint.h b/Littlest/libs/Box2D/Dynamics/Joints/b2PulleyJoint.h deleted file mode 100644 index 189decb..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2PulleyJoint.h +++ /dev/null @@ -1,148 +0,0 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.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 B2_PULLEY_JOINT_H -#define B2_PULLEY_JOINT_H - -#include - -const float32 b2_minPulleyLength = 2.0f; - -/// Pulley joint definition. This requires two ground anchors, -/// two dynamic body anchor points, max lengths for each side, -/// and a pulley ratio. -struct b2PulleyJointDef : public b2JointDef -{ - b2PulleyJointDef() - { - type = e_pulleyJoint; - groundAnchorA.Set(-1.0f, 1.0f); - groundAnchorB.Set(1.0f, 1.0f); - localAnchorA.Set(-1.0f, 0.0f); - localAnchorB.Set(1.0f, 0.0f); - lengthA = 0.0f; - maxLengthA = 0.0f; - lengthB = 0.0f; - maxLengthB = 0.0f; - ratio = 1.0f; - collideConnected = true; - } - - /// Initialize the bodies, anchors, lengths, max lengths, and ratio using the world anchors. - void Initialize(b2Body* bodyA, b2Body* bodyB, - const b2Vec2& groundAnchorA, const b2Vec2& groundAnchorB, - const b2Vec2& anchorA, const b2Vec2& anchorB, - float32 ratio); - - /// The first ground anchor in world coordinates. This point never moves. - b2Vec2 groundAnchorA; - - /// The second ground anchor in world coordinates. This point never moves. - b2Vec2 groundAnchorB; - - /// The local anchor point relative to bodyA's origin. - b2Vec2 localAnchorA; - - /// The local anchor point relative to bodyB's origin. - b2Vec2 localAnchorB; - - /// The a reference length for the segment attached to bodyA. - float32 lengthA; - - /// The maximum length of the segment attached to bodyA. - float32 maxLengthA; - - /// The a reference length for the segment attached to bodyB. - float32 lengthB; - - /// The maximum length of the segment attached to bodyB. - float32 maxLengthB; - - /// The pulley ratio, used to simulate a block-and-tackle. - float32 ratio; -}; - -/// The pulley joint is connected to two bodies and two fixed ground points. -/// The pulley supports a ratio such that: -/// length1 + ratio * length2 <= constant -/// Yes, the force transmitted is scaled by the ratio. -/// The pulley also enforces a maximum length limit on both sides. This is -/// useful to prevent one side of the pulley hitting the top. -class b2PulleyJoint : public b2Joint -{ -public: - b2Vec2 GetAnchorA() const; - b2Vec2 GetAnchorB() const; - - b2Vec2 GetReactionForce(float32 inv_dt) const; - float32 GetReactionTorque(float32 inv_dt) const; - - /// Get the first ground anchor. - b2Vec2 GetGroundAnchorA() const; - - /// Get the second ground anchor. - b2Vec2 GetGroundAnchorB() const; - - /// Get the current length of the segment attached to body1. - float32 GetLength1() const; - - /// Get the current length of the segment attached to body2. - float32 GetLength2() const; - - /// Get the pulley ratio. - float32 GetRatio() const; - -protected: - - friend class b2Joint; - b2PulleyJoint(const b2PulleyJointDef* data); - - void InitVelocityConstraints(const b2TimeStep& step); - void SolveVelocityConstraints(const b2TimeStep& step); - bool SolvePositionConstraints(float32 baumgarte); - - b2Vec2 m_groundAnchor1; - b2Vec2 m_groundAnchor2; - b2Vec2 m_localAnchor1; - b2Vec2 m_localAnchor2; - - b2Vec2 m_u1; - b2Vec2 m_u2; - - float32 m_constant; - float32 m_ratio; - - float32 m_maxLength1; - float32 m_maxLength2; - - // Effective masses - float32 m_pulleyMass; - float32 m_limitMass1; - float32 m_limitMass2; - - // Impulses for accumulation/warm starting. - float32 m_impulse; - float32 m_limitImpulse1; - float32 m_limitImpulse2; - - b2LimitState m_state; - b2LimitState m_limitState1; - b2LimitState m_limitState2; -}; - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2RevoluteJoint.cpp b/Littlest/libs/Box2D/Dynamics/Joints/b2RevoluteJoint.cpp deleted file mode 100644 index f984526..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2RevoluteJoint.cpp +++ /dev/null @@ -1,478 +0,0 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include - -// Point-to-point constraint -// C = p2 - p1 -// Cdot = v2 - v1 -// = v2 + cross(w2, r2) - v1 - cross(w1, r1) -// J = [-I -r1_skew I r2_skew ] -// Identity used: -// w k % (rx i + ry j) = w * (-ry i + rx j) - -// Motor constraint -// Cdot = w2 - w1 -// J = [0 0 -1 0 0 1] -// K = invI1 + invI2 - -void b2RevoluteJointDef::Initialize(b2Body* b1, b2Body* b2, const b2Vec2& anchor) -{ - bodyA = b1; - bodyB = b2; - localAnchorA = bodyA->GetLocalPoint(anchor); - localAnchorB = bodyB->GetLocalPoint(anchor); - referenceAngle = bodyB->GetAngle() - bodyA->GetAngle(); -} - -b2RevoluteJoint::b2RevoluteJoint(const b2RevoluteJointDef* def) -: b2Joint(def) -{ - m_localAnchor1 = def->localAnchorA; - m_localAnchor2 = def->localAnchorB; - m_referenceAngle = def->referenceAngle; - - m_impulse.SetZero(); - m_motorImpulse = 0.0f; - - m_lowerAngle = def->lowerAngle; - m_upperAngle = def->upperAngle; - m_maxMotorTorque = def->maxMotorTorque; - m_motorSpeed = def->motorSpeed; - m_enableLimit = def->enableLimit; - m_enableMotor = def->enableMotor; - m_limitState = e_inactiveLimit; -} - -void b2RevoluteJoint::InitVelocityConstraints(const b2TimeStep& step) -{ - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - if (m_enableMotor || m_enableLimit) - { - // You cannot create a rotation limit between bodies that - // both have fixed rotation. - b2Assert(b1->m_invI > 0.0f || b2->m_invI > 0.0f); - } - - // Compute the effective mass matrix. - b2Vec2 r1 = b2Mul(b1->GetTransform().R, m_localAnchor1 - b1->GetLocalCenter()); - b2Vec2 r2 = b2Mul(b2->GetTransform().R, m_localAnchor2 - b2->GetLocalCenter()); - - // J = [-I -r1_skew I r2_skew] - // [ 0 -1 0 1] - // r_skew = [-ry; rx] - - // Matlab - // K = [ m1+r1y^2*i1+m2+r2y^2*i2, -r1y*i1*r1x-r2y*i2*r2x, -r1y*i1-r2y*i2] - // [ -r1y*i1*r1x-r2y*i2*r2x, m1+r1x^2*i1+m2+r2x^2*i2, r1x*i1+r2x*i2] - // [ -r1y*i1-r2y*i2, r1x*i1+r2x*i2, i1+i2] - - float32 m1 = b1->m_invMass, m2 = b2->m_invMass; - float32 i1 = b1->m_invI, i2 = b2->m_invI; - - m_mass.col1.x = m1 + m2 + r1.y * r1.y * i1 + r2.y * r2.y * i2; - m_mass.col2.x = -r1.y * r1.x * i1 - r2.y * r2.x * i2; - m_mass.col3.x = -r1.y * i1 - r2.y * i2; - m_mass.col1.y = m_mass.col2.x; - m_mass.col2.y = m1 + m2 + r1.x * r1.x * i1 + r2.x * r2.x * i2; - m_mass.col3.y = r1.x * i1 + r2.x * i2; - m_mass.col1.z = m_mass.col3.x; - m_mass.col2.z = m_mass.col3.y; - m_mass.col3.z = i1 + i2; - - m_motorMass = i1 + i2; - if (m_motorMass > 0.0f) - { - m_motorMass = 1.0f / m_motorMass; - } - - if (m_enableMotor == false) - { - m_motorImpulse = 0.0f; - } - - if (m_enableLimit) - { - float32 jointAngle = b2->m_sweep.a - b1->m_sweep.a - m_referenceAngle; - if (b2Abs(m_upperAngle - m_lowerAngle) < 2.0f * b2_angularSlop) - { - m_limitState = e_equalLimits; - } - else if (jointAngle <= m_lowerAngle) - { - if (m_limitState != e_atLowerLimit) - { - m_impulse.z = 0.0f; - } - m_limitState = e_atLowerLimit; - } - else if (jointAngle >= m_upperAngle) - { - if (m_limitState != e_atUpperLimit) - { - m_impulse.z = 0.0f; - } - m_limitState = e_atUpperLimit; - } - else - { - m_limitState = e_inactiveLimit; - m_impulse.z = 0.0f; - } - } - else - { - m_limitState = e_inactiveLimit; - } - - if (step.warmStarting) - { - // Scale impulses to support a variable time step. - m_impulse *= step.dtRatio; - m_motorImpulse *= step.dtRatio; - - b2Vec2 P(m_impulse.x, m_impulse.y); - - b1->m_linearVelocity -= m1 * P; - b1->m_angularVelocity -= i1 * (b2Cross(r1, P) + m_motorImpulse + m_impulse.z); - - b2->m_linearVelocity += m2 * P; - b2->m_angularVelocity += i2 * (b2Cross(r2, P) + m_motorImpulse + m_impulse.z); - } - else - { - m_impulse.SetZero(); - m_motorImpulse = 0.0f; - } -} - -void b2RevoluteJoint::SolveVelocityConstraints(const b2TimeStep& step) -{ - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - b2Vec2 v1 = b1->m_linearVelocity; - float32 w1 = b1->m_angularVelocity; - b2Vec2 v2 = b2->m_linearVelocity; - float32 w2 = b2->m_angularVelocity; - - float32 m1 = b1->m_invMass, m2 = b2->m_invMass; - float32 i1 = b1->m_invI, i2 = b2->m_invI; - - // Solve motor constraint. - if (m_enableMotor && m_limitState != e_equalLimits) - { - float32 Cdot = w2 - w1 - m_motorSpeed; - float32 impulse = m_motorMass * (-Cdot); - float32 oldImpulse = m_motorImpulse; - float32 maxImpulse = step.dt * m_maxMotorTorque; - m_motorImpulse = b2Clamp(m_motorImpulse + impulse, -maxImpulse, maxImpulse); - impulse = m_motorImpulse - oldImpulse; - - w1 -= i1 * impulse; - w2 += i2 * impulse; - } - - // Solve limit constraint. - if (m_enableLimit && m_limitState != e_inactiveLimit) - { - b2Vec2 r1 = b2Mul(b1->GetTransform().R, m_localAnchor1 - b1->GetLocalCenter()); - b2Vec2 r2 = b2Mul(b2->GetTransform().R, m_localAnchor2 - b2->GetLocalCenter()); - - // Solve point-to-point constraint - b2Vec2 Cdot1 = v2 + b2Cross(w2, r2) - v1 - b2Cross(w1, r1); - float32 Cdot2 = w2 - w1; - b2Vec3 Cdot(Cdot1.x, Cdot1.y, Cdot2); - - b2Vec3 impulse = m_mass.Solve33(-Cdot); - - if (m_limitState == e_equalLimits) - { - m_impulse += impulse; - } - else if (m_limitState == e_atLowerLimit) - { - float32 newImpulse = m_impulse.z + impulse.z; - if (newImpulse < 0.0f) - { - b2Vec2 reduced = m_mass.Solve22(-Cdot1); - impulse.x = reduced.x; - impulse.y = reduced.y; - impulse.z = -m_impulse.z; - m_impulse.x += reduced.x; - m_impulse.y += reduced.y; - m_impulse.z = 0.0f; - } - } - else if (m_limitState == e_atUpperLimit) - { - float32 newImpulse = m_impulse.z + impulse.z; - if (newImpulse > 0.0f) - { - b2Vec2 reduced = m_mass.Solve22(-Cdot1); - impulse.x = reduced.x; - impulse.y = reduced.y; - impulse.z = -m_impulse.z; - m_impulse.x += reduced.x; - m_impulse.y += reduced.y; - m_impulse.z = 0.0f; - } - } - - b2Vec2 P(impulse.x, impulse.y); - - v1 -= m1 * P; - w1 -= i1 * (b2Cross(r1, P) + impulse.z); - - v2 += m2 * P; - w2 += i2 * (b2Cross(r2, P) + impulse.z); - } - else - { - b2Vec2 r1 = b2Mul(b1->GetTransform().R, m_localAnchor1 - b1->GetLocalCenter()); - b2Vec2 r2 = b2Mul(b2->GetTransform().R, m_localAnchor2 - b2->GetLocalCenter()); - - // Solve point-to-point constraint - b2Vec2 Cdot = v2 + b2Cross(w2, r2) - v1 - b2Cross(w1, r1); - b2Vec2 impulse = m_mass.Solve22(-Cdot); - - m_impulse.x += impulse.x; - m_impulse.y += impulse.y; - - v1 -= m1 * impulse; - w1 -= i1 * b2Cross(r1, impulse); - - v2 += m2 * impulse; - w2 += i2 * b2Cross(r2, impulse); - } - - b1->m_linearVelocity = v1; - b1->m_angularVelocity = w1; - b2->m_linearVelocity = v2; - b2->m_angularVelocity = w2; -} - -bool b2RevoluteJoint::SolvePositionConstraints(float32 baumgarte) -{ - // TODO_ERIN block solve with limit. - - B2_NOT_USED(baumgarte); - - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - - float32 angularError = 0.0f; - float32 positionError = 0.0f; - - // Solve angular limit constraint. - if (m_enableLimit && m_limitState != e_inactiveLimit) - { - float32 angle = b2->m_sweep.a - b1->m_sweep.a - m_referenceAngle; - float32 limitImpulse = 0.0f; - - if (m_limitState == e_equalLimits) - { - // Prevent large angular corrections - float32 C = b2Clamp(angle - m_lowerAngle, -b2_maxAngularCorrection, b2_maxAngularCorrection); - limitImpulse = -m_motorMass * C; - angularError = b2Abs(C); - } - else if (m_limitState == e_atLowerLimit) - { - float32 C = angle - m_lowerAngle; - angularError = -C; - - // Prevent large angular corrections and allow some slop. - C = b2Clamp(C + b2_angularSlop, -b2_maxAngularCorrection, 0.0f); - limitImpulse = -m_motorMass * C; - } - else if (m_limitState == e_atUpperLimit) - { - float32 C = angle - m_upperAngle; - angularError = C; - - // Prevent large angular corrections and allow some slop. - C = b2Clamp(C - b2_angularSlop, 0.0f, b2_maxAngularCorrection); - limitImpulse = -m_motorMass * C; - } - - b1->m_sweep.a -= b1->m_invI * limitImpulse; - b2->m_sweep.a += b2->m_invI * limitImpulse; - - b1->SynchronizeTransform(); - b2->SynchronizeTransform(); - } - - // Solve point-to-point constraint. - { - b2Vec2 r1 = b2Mul(b1->GetTransform().R, m_localAnchor1 - b1->GetLocalCenter()); - b2Vec2 r2 = b2Mul(b2->GetTransform().R, m_localAnchor2 - b2->GetLocalCenter()); - - b2Vec2 C = b2->m_sweep.c + r2 - b1->m_sweep.c - r1; - positionError = C.Length(); - - float32 invMass1 = b1->m_invMass, invMass2 = b2->m_invMass; - float32 invI1 = b1->m_invI, invI2 = b2->m_invI; - - // Handle large detachment. - const float32 k_allowedStretch = 10.0f * b2_linearSlop; - if (C.LengthSquared() > k_allowedStretch * k_allowedStretch) - { - // Use a particle solution (no rotation). - b2Vec2 u = C; u.Normalize(); - float32 m = invMass1 + invMass2; - if (m > 0.0f) - { - m = 1.0f / m; - } - b2Vec2 impulse = m * (-C); - const float32 k_beta = 0.5f; - b1->m_sweep.c -= k_beta * invMass1 * impulse; - b2->m_sweep.c += k_beta * invMass2 * impulse; - - C = b2->m_sweep.c + r2 - b1->m_sweep.c - r1; - } - - b2Mat22 K1; - K1.col1.x = invMass1 + invMass2; K1.col2.x = 0.0f; - K1.col1.y = 0.0f; K1.col2.y = invMass1 + invMass2; - - b2Mat22 K2; - K2.col1.x = invI1 * r1.y * r1.y; K2.col2.x = -invI1 * r1.x * r1.y; - K2.col1.y = -invI1 * r1.x * r1.y; K2.col2.y = invI1 * r1.x * r1.x; - - b2Mat22 K3; - K3.col1.x = invI2 * r2.y * r2.y; K3.col2.x = -invI2 * r2.x * r2.y; - K3.col1.y = -invI2 * r2.x * r2.y; K3.col2.y = invI2 * r2.x * r2.x; - - b2Mat22 K = K1 + K2 + K3; - b2Vec2 impulse = K.Solve(-C); - - b1->m_sweep.c -= b1->m_invMass * impulse; - b1->m_sweep.a -= b1->m_invI * b2Cross(r1, impulse); - - b2->m_sweep.c += b2->m_invMass * impulse; - b2->m_sweep.a += b2->m_invI * b2Cross(r2, impulse); - - b1->SynchronizeTransform(); - b2->SynchronizeTransform(); - } - - return positionError <= b2_linearSlop && angularError <= b2_angularSlop; -} - -b2Vec2 b2RevoluteJoint::GetAnchorA() const -{ - return m_bodyA->GetWorldPoint(m_localAnchor1); -} - -b2Vec2 b2RevoluteJoint::GetAnchorB() const -{ - return m_bodyB->GetWorldPoint(m_localAnchor2); -} - -b2Vec2 b2RevoluteJoint::GetReactionForce(float32 inv_dt) const -{ - b2Vec2 P(m_impulse.x, m_impulse.y); - return inv_dt * P; -} - -float32 b2RevoluteJoint::GetReactionTorque(float32 inv_dt) const -{ - return inv_dt * m_impulse.z; -} - -float32 b2RevoluteJoint::GetJointAngle() const -{ - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - return b2->m_sweep.a - b1->m_sweep.a - m_referenceAngle; -} - -float32 b2RevoluteJoint::GetJointSpeed() const -{ - b2Body* b1 = m_bodyA; - b2Body* b2 = m_bodyB; - return b2->m_angularVelocity - b1->m_angularVelocity; -} - -bool b2RevoluteJoint::IsMotorEnabled() const -{ - return m_enableMotor; -} - -void b2RevoluteJoint::EnableMotor(bool flag) -{ - m_bodyA->SetAwake(true); - m_bodyB->SetAwake(true); - m_enableMotor = flag; -} - -float32 b2RevoluteJoint::GetMotorTorque() const -{ - return m_motorImpulse; -} - -void b2RevoluteJoint::SetMotorSpeed(float32 speed) -{ - m_bodyA->SetAwake(true); - m_bodyB->SetAwake(true); - m_motorSpeed = speed; -} - -void b2RevoluteJoint::SetMaxMotorTorque(float32 torque) -{ - m_bodyA->SetAwake(true); - m_bodyB->SetAwake(true); - m_maxMotorTorque = torque; -} - -bool b2RevoluteJoint::IsLimitEnabled() const -{ - return m_enableLimit; -} - -void b2RevoluteJoint::EnableLimit(bool flag) -{ - m_bodyA->SetAwake(true); - m_bodyB->SetAwake(true); - m_enableLimit = flag; -} - -float32 b2RevoluteJoint::GetLowerLimit() const -{ - return m_lowerAngle; -} - -float32 b2RevoluteJoint::GetUpperLimit() const -{ - return m_upperAngle; -} - -void b2RevoluteJoint::SetLimits(float32 lower, float32 upper) -{ - b2Assert(lower <= upper); - m_bodyA->SetAwake(true); - m_bodyB->SetAwake(true); - m_lowerAngle = lower; - m_upperAngle = upper; -} diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2RevoluteJoint.h b/Littlest/libs/Box2D/Dynamics/Joints/b2RevoluteJoint.h deleted file mode 100644 index c0180be..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2RevoluteJoint.h +++ /dev/null @@ -1,174 +0,0 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.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 B2_REVOLUTE_JOINT_H -#define B2_REVOLUTE_JOINT_H - -#include - -/// Revolute joint definition. This requires defining an -/// anchor point where the bodies are joined. The definition -/// uses local anchor points so that the initial configuration -/// can violate the constraint slightly. You also need to -/// specify the initial relative angle for joint limits. This -/// helps when saving and loading a game. -/// The local anchor points are measured from the body's origin -/// rather than the center of mass because: -/// 1. you might not know where the center of mass will be. -/// 2. if you add/remove shapes from a body and recompute the mass, -/// the joints will be broken. -struct b2RevoluteJointDef : public b2JointDef -{ - b2RevoluteJointDef() - { - type = e_revoluteJoint; - localAnchorA.Set(0.0f, 0.0f); - localAnchorB.Set(0.0f, 0.0f); - referenceAngle = 0.0f; - lowerAngle = 0.0f; - upperAngle = 0.0f; - maxMotorTorque = 0.0f; - motorSpeed = 0.0f; - enableLimit = false; - enableMotor = false; - } - - /// Initialize the bodies, anchors, and reference angle using a world - /// anchor point. - void Initialize(b2Body* bodyA, b2Body* bodyB, const b2Vec2& anchor); - - /// The local anchor point relative to body1's origin. - b2Vec2 localAnchorA; - - /// The local anchor point relative to body2's origin. - b2Vec2 localAnchorB; - - /// The body2 angle minus body1 angle in the reference state (radians). - float32 referenceAngle; - - /// A flag to enable joint limits. - bool enableLimit; - - /// The lower angle for the joint limit (radians). - float32 lowerAngle; - - /// The upper angle for the joint limit (radians). - float32 upperAngle; - - /// A flag to enable the joint motor. - bool enableMotor; - - /// The desired motor speed. Usually in radians per second. - float32 motorSpeed; - - /// The maximum motor torque used to achieve the desired motor speed. - /// Usually in N-m. - float32 maxMotorTorque; -}; - -/// A revolute joint constrains two bodies to share a common point while they -/// are free to rotate about the point. The relative rotation about the shared -/// point is the joint angle. You can limit the relative rotation with -/// a joint limit that specifies a lower and upper angle. You can use a motor -/// to drive the relative rotation about the shared point. A maximum motor torque -/// is provided so that infinite forces are not generated. -class b2RevoluteJoint : public b2Joint -{ -public: - b2Vec2 GetAnchorA() const; - b2Vec2 GetAnchorB() const; - - b2Vec2 GetReactionForce(float32 inv_dt) const; - float32 GetReactionTorque(float32 inv_dt) const; - - /// Get the current joint angle in radians. - float32 GetJointAngle() const; - - /// Get the current joint angle speed in radians per second. - float32 GetJointSpeed() const; - - /// Is the joint limit enabled? - bool IsLimitEnabled() const; - - /// Enable/disable the joint limit. - void EnableLimit(bool flag); - - /// Get the lower joint limit in radians. - float32 GetLowerLimit() const; - - /// Get the upper joint limit in radians. - float32 GetUpperLimit() const; - - /// Set the joint limits in radians. - void SetLimits(float32 lower, float32 upper); - - /// Is the joint motor enabled? - bool IsMotorEnabled() const; - - /// Enable/disable the joint motor. - void EnableMotor(bool flag); - - /// Set the motor speed in radians per second. - void SetMotorSpeed(float32 speed); - - /// Get the motor speed in radians per second. - float32 GetMotorSpeed() const; - - /// Set the maximum motor torque, usually in N-m. - void SetMaxMotorTorque(float32 torque); - - /// Get the current motor torque, usually in N-m. - float32 GetMotorTorque() const; - -protected: - - friend class b2Joint; - friend class b2GearJoint; - - b2RevoluteJoint(const b2RevoluteJointDef* def); - - void InitVelocityConstraints(const b2TimeStep& step); - void SolveVelocityConstraints(const b2TimeStep& step); - - bool SolvePositionConstraints(float32 baumgarte); - - b2Vec2 m_localAnchor1; // relative - b2Vec2 m_localAnchor2; - b2Vec3 m_impulse; - float32 m_motorImpulse; - - b2Mat33 m_mass; // effective mass for point-to-point constraint. - float32 m_motorMass; // effective mass for motor/limit angular constraint. - - bool m_enableMotor; - float32 m_maxMotorTorque; - float32 m_motorSpeed; - - bool m_enableLimit; - float32 m_referenceAngle; - float32 m_lowerAngle; - float32 m_upperAngle; - b2LimitState m_limitState; -}; - -inline float32 b2RevoluteJoint::GetMotorSpeed() const -{ - return m_motorSpeed; -} - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2WeldJoint.cpp b/Littlest/libs/Box2D/Dynamics/Joints/b2WeldJoint.cpp deleted file mode 100644 index 49b5513..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2WeldJoint.cpp +++ /dev/null @@ -1,219 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include - -// Point-to-point constraint -// C = p2 - p1 -// Cdot = v2 - v1 -// = v2 + cross(w2, r2) - v1 - cross(w1, r1) -// J = [-I -r1_skew I r2_skew ] -// Identity used: -// w k % (rx i + ry j) = w * (-ry i + rx j) - -// Angle constraint -// C = angle2 - angle1 - referenceAngle -// Cdot = w2 - w1 -// J = [0 0 -1 0 0 1] -// K = invI1 + invI2 - -void b2WeldJointDef::Initialize(b2Body* bA, b2Body* bB, const b2Vec2& anchor) -{ - bodyA = bA; - bodyB = bB; - localAnchorA = bodyA->GetLocalPoint(anchor); - localAnchorB = bodyB->GetLocalPoint(anchor); - referenceAngle = bodyB->GetAngle() - bodyA->GetAngle(); -} - -b2WeldJoint::b2WeldJoint(const b2WeldJointDef* def) -: b2Joint(def) -{ - m_localAnchorA = def->localAnchorA; - m_localAnchorB = def->localAnchorB; - m_referenceAngle = def->referenceAngle; - - m_impulse.SetZero(); -} - -void b2WeldJoint::InitVelocityConstraints(const b2TimeStep& step) -{ - b2Body* bA = m_bodyA; - b2Body* bB = m_bodyB; - - // Compute the effective mass matrix. - b2Vec2 rA = b2Mul(bA->GetTransform().R, m_localAnchorA - bA->GetLocalCenter()); - b2Vec2 rB = b2Mul(bB->GetTransform().R, m_localAnchorB - bB->GetLocalCenter()); - - // J = [-I -r1_skew I r2_skew] - // [ 0 -1 0 1] - // r_skew = [-ry; rx] - - // Matlab - // K = [ mA+r1y^2*iA+mB+r2y^2*iB, -r1y*iA*r1x-r2y*iB*r2x, -r1y*iA-r2y*iB] - // [ -r1y*iA*r1x-r2y*iB*r2x, mA+r1x^2*iA+mB+r2x^2*iB, r1x*iA+r2x*iB] - // [ -r1y*iA-r2y*iB, r1x*iA+r2x*iB, iA+iB] - - float32 mA = bA->m_invMass, mB = bB->m_invMass; - float32 iA = bA->m_invI, iB = bB->m_invI; - - m_mass.col1.x = mA + mB + rA.y * rA.y * iA + rB.y * rB.y * iB; - m_mass.col2.x = -rA.y * rA.x * iA - rB.y * rB.x * iB; - m_mass.col3.x = -rA.y * iA - rB.y * iB; - m_mass.col1.y = m_mass.col2.x; - m_mass.col2.y = mA + mB + rA.x * rA.x * iA + rB.x * rB.x * iB; - m_mass.col3.y = rA.x * iA + rB.x * iB; - m_mass.col1.z = m_mass.col3.x; - m_mass.col2.z = m_mass.col3.y; - m_mass.col3.z = iA + iB; - - if (step.warmStarting) - { - // Scale impulses to support a variable time step. - m_impulse *= step.dtRatio; - - b2Vec2 P(m_impulse.x, m_impulse.y); - - bA->m_linearVelocity -= mA * P; - bA->m_angularVelocity -= iA * (b2Cross(rA, P) + m_impulse.z); - - bB->m_linearVelocity += mB * P; - bB->m_angularVelocity += iB * (b2Cross(rB, P) + m_impulse.z); - } - else - { - m_impulse.SetZero(); - } -} - -void b2WeldJoint::SolveVelocityConstraints(const b2TimeStep& step) -{ - B2_NOT_USED(step); - - b2Body* bA = m_bodyA; - b2Body* bB = m_bodyB; - - b2Vec2 vA = bA->m_linearVelocity; - float32 wA = bA->m_angularVelocity; - b2Vec2 vB = bB->m_linearVelocity; - float32 wB = bB->m_angularVelocity; - - float32 mA = bA->m_invMass, mB = bB->m_invMass; - float32 iA = bA->m_invI, iB = bB->m_invI; - - b2Vec2 rA = b2Mul(bA->GetTransform().R, m_localAnchorA - bA->GetLocalCenter()); - b2Vec2 rB = b2Mul(bB->GetTransform().R, m_localAnchorB - bB->GetLocalCenter()); - - // Solve point-to-point constraint - b2Vec2 Cdot1 = vB + b2Cross(wB, rB) - vA - b2Cross(wA, rA); - float32 Cdot2 = wB - wA; - b2Vec3 Cdot(Cdot1.x, Cdot1.y, Cdot2); - - b2Vec3 impulse = m_mass.Solve33(-Cdot); - m_impulse += impulse; - - b2Vec2 P(impulse.x, impulse.y); - - vA -= mA * P; - wA -= iA * (b2Cross(rA, P) + impulse.z); - - vB += mB * P; - wB += iB * (b2Cross(rB, P) + impulse.z); - - bA->m_linearVelocity = vA; - bA->m_angularVelocity = wA; - bB->m_linearVelocity = vB; - bB->m_angularVelocity = wB; -} - -bool b2WeldJoint::SolvePositionConstraints(float32 baumgarte) -{ - B2_NOT_USED(baumgarte); - - b2Body* bA = m_bodyA; - b2Body* bB = m_bodyB; - - float32 mA = bA->m_invMass, mB = bB->m_invMass; - float32 iA = bA->m_invI, iB = bB->m_invI; - - b2Vec2 rA = b2Mul(bA->GetTransform().R, m_localAnchorA - bA->GetLocalCenter()); - b2Vec2 rB = b2Mul(bB->GetTransform().R, m_localAnchorB - bB->GetLocalCenter()); - - b2Vec2 C1 = bB->m_sweep.c + rB - bA->m_sweep.c - rA; - float32 C2 = bB->m_sweep.a - bA->m_sweep.a - m_referenceAngle; - - // Handle large detachment. - const float32 k_allowedStretch = 10.0f * b2_linearSlop; - float32 positionError = C1.Length(); - float32 angularError = b2Abs(C2); - if (positionError > k_allowedStretch) - { - iA *= 1.0f; - iB *= 1.0f; - } - - m_mass.col1.x = mA + mB + rA.y * rA.y * iA + rB.y * rB.y * iB; - m_mass.col2.x = -rA.y * rA.x * iA - rB.y * rB.x * iB; - m_mass.col3.x = -rA.y * iA - rB.y * iB; - m_mass.col1.y = m_mass.col2.x; - m_mass.col2.y = mA + mB + rA.x * rA.x * iA + rB.x * rB.x * iB; - m_mass.col3.y = rA.x * iA + rB.x * iB; - m_mass.col1.z = m_mass.col3.x; - m_mass.col2.z = m_mass.col3.y; - m_mass.col3.z = iA + iB; - - b2Vec3 C(C1.x, C1.y, C2); - - b2Vec3 impulse = m_mass.Solve33(-C); - - b2Vec2 P(impulse.x, impulse.y); - - bA->m_sweep.c -= mA * P; - bA->m_sweep.a -= iA * (b2Cross(rA, P) + impulse.z); - - bB->m_sweep.c += mB * P; - bB->m_sweep.a += iB * (b2Cross(rB, P) + impulse.z); - - bA->SynchronizeTransform(); - bB->SynchronizeTransform(); - - return positionError <= b2_linearSlop && angularError <= b2_angularSlop; -} - -b2Vec2 b2WeldJoint::GetAnchorA() const -{ - return m_bodyA->GetWorldPoint(m_localAnchorA); -} - -b2Vec2 b2WeldJoint::GetAnchorB() const -{ - return m_bodyB->GetWorldPoint(m_localAnchorB); -} - -b2Vec2 b2WeldJoint::GetReactionForce(float32 inv_dt) const -{ - b2Vec2 P(m_impulse.x, m_impulse.y); - return inv_dt * P; -} - -float32 b2WeldJoint::GetReactionTorque(float32 inv_dt) const -{ - return inv_dt * m_impulse.z; -} diff --git a/Littlest/libs/Box2D/Dynamics/Joints/b2WeldJoint.h b/Littlest/libs/Box2D/Dynamics/Joints/b2WeldJoint.h deleted file mode 100644 index 4e63b6a..0000000 --- a/Littlest/libs/Box2D/Dynamics/Joints/b2WeldJoint.h +++ /dev/null @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_WELD_JOINT_H -#define B2_WELD_JOINT_H - -#include - -/// Weld joint definition. You need to specify local anchor points -/// where they are attached and the relative body angle. The position -/// of the anchor points is important for computing the reaction torque. -struct b2WeldJointDef : public b2JointDef -{ - b2WeldJointDef() - { - type = e_weldJoint; - localAnchorA.Set(0.0f, 0.0f); - localAnchorB.Set(0.0f, 0.0f); - referenceAngle = 0.0f; - } - - /// Initialize the bodies, anchors, and reference angle using a world - /// anchor point. - void Initialize(b2Body* body1, b2Body* body2, const b2Vec2& anchor); - - /// The local anchor point relative to body1's origin. - b2Vec2 localAnchorA; - - /// The local anchor point relative to body2's origin. - b2Vec2 localAnchorB; - - /// The body2 angle minus body1 angle in the reference state (radians). - float32 referenceAngle; -}; - -/// A weld joint essentially glues two bodies together. A weld joint may -/// distort somewhat because the island constraint solver is approximate. -class b2WeldJoint : public b2Joint -{ -public: - b2Vec2 GetAnchorA() const; - b2Vec2 GetAnchorB() const; - - b2Vec2 GetReactionForce(float32 inv_dt) const; - float32 GetReactionTorque(float32 inv_dt) const; - -protected: - - friend class b2Joint; - - b2WeldJoint(const b2WeldJointDef* def); - - void InitVelocityConstraints(const b2TimeStep& step); - void SolveVelocityConstraints(const b2TimeStep& step); - - bool SolvePositionConstraints(float32 baumgarte); - - b2Vec2 m_localAnchorA; - b2Vec2 m_localAnchorB; - float32 m_referenceAngle; - - b2Vec3 m_impulse; - - b2Mat33 m_mass; -}; - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/b2Body.cpp b/Littlest/libs/Box2D/Dynamics/b2Body.cpp deleted file mode 100644 index 4b88651..0000000 --- a/Littlest/libs/Box2D/Dynamics/b2Body.cpp +++ /dev/null @@ -1,470 +0,0 @@ -/* -* Copyright (c) 2006-2007 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include -#include -#include - -b2Body::b2Body(const b2BodyDef* bd, b2World* world) -{ - b2Assert(bd->position.IsValid()); - b2Assert(bd->linearVelocity.IsValid()); - b2Assert(b2IsValid(bd->angle)); - b2Assert(b2IsValid(bd->angularVelocity)); - b2Assert(b2IsValid(bd->inertiaScale) && bd->inertiaScale >= 0.0f); - b2Assert(b2IsValid(bd->angularDamping) && bd->angularDamping >= 0.0f); - b2Assert(b2IsValid(bd->linearDamping) && bd->linearDamping >= 0.0f); - - m_flags = 0; - - if (bd->bullet) - { - m_flags |= e_bulletFlag; - } - if (bd->fixedRotation) - { - m_flags |= e_fixedRotationFlag; - } - if (bd->allowSleep) - { - m_flags |= e_autoSleepFlag; - } - if (bd->awake) - { - m_flags |= e_awakeFlag; - } - if (bd->active) - { - m_flags |= e_activeFlag; - } - - m_world = world; - - m_xf.position = bd->position; - m_xf.R.Set(bd->angle); - - m_sweep.localCenter.SetZero(); - m_sweep.a0 = m_sweep.a = bd->angle; - m_sweep.c0 = m_sweep.c = b2Mul(m_xf, m_sweep.localCenter); - - m_jointList = NULL; - m_contactList = NULL; - m_prev = NULL; - m_next = NULL; - - m_linearVelocity = bd->linearVelocity; - m_angularVelocity = bd->angularVelocity; - - m_linearDamping = bd->linearDamping; - m_angularDamping = bd->angularDamping; - - m_force.SetZero(); - m_torque = 0.0f; - - m_sleepTime = 0.0f; - - m_type = bd->type; - - if (m_type == b2_dynamicBody) - { - m_mass = 1.0f; - m_invMass = 1.0f; - } - else - { - m_mass = 0.0f; - m_invMass = 0.0f; - } - - m_I = 0.0f; - m_invI = 0.0f; - - m_userData = bd->userData; - - m_fixtureList = NULL; - m_fixtureCount = 0; -} - -b2Body::~b2Body() -{ - // shapes and joints are destroyed in b2World::Destroy -} - -void b2Body::SetType(b2BodyType type) -{ - if (m_type == type) - { - return; - } - - m_type = type; - - ResetMassData(); - - if (m_type == b2_staticBody) - { - m_linearVelocity.SetZero(); - m_angularVelocity = 0.0f; - } - - SetAwake(true); - - m_force.SetZero(); - m_torque = 0.0f; - - // Since the body type changed, we need to flag contacts for filtering. - for (b2ContactEdge* ce = m_contactList; ce; ce = ce->next) - { - ce->contact->FlagForFiltering(); - } -} - -b2Fixture* b2Body::CreateFixture(const b2FixtureDef* def) -{ - b2Assert(m_world->IsLocked() == false); - if (m_world->IsLocked() == true) - { - return NULL; - } - - b2BlockAllocator* allocator = &m_world->m_blockAllocator; - - void* memory = allocator->Allocate(sizeof(b2Fixture)); - b2Fixture* fixture = new (memory) b2Fixture; - fixture->Create(allocator, this, def); - - if (m_flags & e_activeFlag) - { - b2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase; - fixture->CreateProxy(broadPhase, m_xf); - } - - fixture->m_next = m_fixtureList; - m_fixtureList = fixture; - ++m_fixtureCount; - - fixture->m_body = this; - - // Adjust mass properties if needed. - if (fixture->m_density > 0.0f) - { - ResetMassData(); - } - - // Let the world know we have a new fixture. This will cause new contacts - // to be created at the beginning of the next time step. - m_world->m_flags |= b2World::e_newFixture; - - return fixture; -} - -b2Fixture* b2Body::CreateFixture(const b2Shape* shape, float32 density) -{ - b2FixtureDef def; - def.shape = shape; - def.density = density; - - return CreateFixture(&def); -} - -void b2Body::DestroyFixture(b2Fixture* fixture) -{ - b2Assert(m_world->IsLocked() == false); - if (m_world->IsLocked() == true) - { - return; - } - - b2Assert(fixture->m_body == this); - - // Remove the fixture from this body's singly linked list. - b2Assert(m_fixtureCount > 0); - b2Fixture** node = &m_fixtureList; - bool found = false; - while (*node != NULL) - { - if (*node == fixture) - { - *node = fixture->m_next; - found = true; - break; - } - - node = &(*node)->m_next; - } - - // You tried to remove a shape that is not attached to this body. - b2Assert(found); - - // Destroy any contacts associated with the fixture. - b2ContactEdge* edge = m_contactList; - while (edge) - { - b2Contact* c = edge->contact; - edge = edge->next; - - b2Fixture* fixtureA = c->GetFixtureA(); - b2Fixture* fixtureB = c->GetFixtureB(); - - if (fixture == fixtureA || fixture == fixtureB) - { - // This destroys the contact and removes it from - // this body's contact list. - m_world->m_contactManager.Destroy(c); - } - } - - b2BlockAllocator* allocator = &m_world->m_blockAllocator; - - if (m_flags & e_activeFlag) - { - b2Assert(fixture->m_proxyId != b2BroadPhase::e_nullProxy); - b2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase; - fixture->DestroyProxy(broadPhase); - } - else - { - b2Assert(fixture->m_proxyId == b2BroadPhase::e_nullProxy); - } - - fixture->Destroy(allocator); - fixture->m_body = NULL; - fixture->m_next = NULL; - fixture->~b2Fixture(); - allocator->Free(fixture, sizeof(b2Fixture)); - - --m_fixtureCount; - - // Reset the mass data. - ResetMassData(); -} - -void b2Body::ResetMassData() -{ - // Compute mass data from shapes. Each shape has its own density. - m_mass = 0.0f; - m_invMass = 0.0f; - m_I = 0.0f; - m_invI = 0.0f; - m_sweep.localCenter.SetZero(); - - // Static and kinematic bodies have zero mass. - if (m_type == b2_staticBody || m_type == b2_kinematicBody) - { - m_sweep.c0 = m_sweep.c = m_xf.position; - return; - } - - b2Assert(m_type == b2_dynamicBody); - - // Accumulate mass over all fixtures. - b2Vec2 center = b2Vec2_zero; - for (b2Fixture* f = m_fixtureList; f; f = f->m_next) - { - if (f->m_density == 0.0f) - { - continue; - } - - b2MassData massData; - f->GetMassData(&massData); - m_mass += massData.mass; - center += massData.mass * massData.center; - m_I += massData.I; - } - - // Compute center of mass. - if (m_mass > 0.0f) - { - m_invMass = 1.0f / m_mass; - center *= m_invMass; - } - else - { - // Force all dynamic bodies to have a positive mass. - m_mass = 1.0f; - m_invMass = 1.0f; - } - - if (m_I > 0.0f && (m_flags & e_fixedRotationFlag) == 0) - { - // Center the inertia about the center of mass. - m_I -= m_mass * b2Dot(center, center); - b2Assert(m_I > 0.0f); - m_invI = 1.0f / m_I; - - } - else - { - m_I = 0.0f; - m_invI = 0.0f; - } - - // Move center of mass. - b2Vec2 oldCenter = m_sweep.c; - m_sweep.localCenter = center; - m_sweep.c0 = m_sweep.c = b2Mul(m_xf, m_sweep.localCenter); - - // Update center of mass velocity. - m_linearVelocity += b2Cross(m_angularVelocity, m_sweep.c - oldCenter); -} - -void b2Body::SetMassData(const b2MassData* massData) -{ - b2Assert(m_world->IsLocked() == false); - if (m_world->IsLocked() == true) - { - return; - } - - if (m_type != b2_dynamicBody) - { - return; - } - - m_invMass = 0.0f; - m_I = 0.0f; - m_invI = 0.0f; - - m_mass = massData->mass; - if (m_mass <= 0.0f) - { - m_mass = 1.0f; - } - - m_invMass = 1.0f / m_mass; - - if (massData->I > 0.0f && (m_flags & b2Body::e_fixedRotationFlag) == 0) - { - m_I = massData->I - m_mass * b2Dot(massData->center, massData->center); - b2Assert(m_I > 0.0f); - m_invI = 1.0f / m_I; - } - - // Move center of mass. - b2Vec2 oldCenter = m_sweep.c; - m_sweep.localCenter = massData->center; - m_sweep.c0 = m_sweep.c = b2Mul(m_xf, m_sweep.localCenter); - - // Update center of mass velocity. - m_linearVelocity += b2Cross(m_angularVelocity, m_sweep.c - oldCenter); -} - -bool b2Body::ShouldCollide(const b2Body* other) const -{ - // At least one body should be dynamic. - if (m_type != b2_dynamicBody && other->m_type != b2_dynamicBody) - { - return false; - } - - // Does a joint prevent collision? - for (b2JointEdge* jn = m_jointList; jn; jn = jn->next) - { - if (jn->other == other) - { - if (jn->joint->m_collideConnected == false) - { - return false; - } - } - } - - return true; -} - -void b2Body::SetTransform(const b2Vec2& position, float32 angle) -{ - b2Assert(m_world->IsLocked() == false); - if (m_world->IsLocked() == true) - { - return; - } - - m_xf.R.Set(angle); - m_xf.position = position; - - m_sweep.c0 = m_sweep.c = b2Mul(m_xf, m_sweep.localCenter); - m_sweep.a0 = m_sweep.a = angle; - - b2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase; - for (b2Fixture* f = m_fixtureList; f; f = f->m_next) - { - f->Synchronize(broadPhase, m_xf, m_xf); - } - - m_world->m_contactManager.FindNewContacts(); -} - -void b2Body::SynchronizeFixtures() -{ - b2Transform xf1; - xf1.R.Set(m_sweep.a0); - xf1.position = m_sweep.c0 - b2Mul(xf1.R, m_sweep.localCenter); - - b2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase; - for (b2Fixture* f = m_fixtureList; f; f = f->m_next) - { - f->Synchronize(broadPhase, xf1, m_xf); - } -} - -void b2Body::SetActive(bool flag) -{ - if (flag == IsActive()) - { - return; - } - - if (flag) - { - m_flags |= e_activeFlag; - - // Create all proxies. - b2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase; - for (b2Fixture* f = m_fixtureList; f; f = f->m_next) - { - f->CreateProxy(broadPhase, m_xf); - } - - // Contacts are created the next time step. - } - else - { - m_flags &= ~e_activeFlag; - - // Destroy all proxies. - b2BroadPhase* broadPhase = &m_world->m_contactManager.m_broadPhase; - for (b2Fixture* f = m_fixtureList; f; f = f->m_next) - { - f->DestroyProxy(broadPhase); - } - - // Destroy the attached contacts. - b2ContactEdge* ce = m_contactList; - while (ce) - { - b2ContactEdge* ce0 = ce; - ce = ce->next; - m_world->m_contactManager.Destroy(ce0->contact); - } - m_contactList = NULL; - } -} \ No newline at end of file diff --git a/Littlest/libs/Box2D/Dynamics/b2Body.h b/Littlest/libs/Box2D/Dynamics/b2Body.h deleted file mode 100644 index f2f915f..0000000 --- a/Littlest/libs/Box2D/Dynamics/b2Body.h +++ /dev/null @@ -1,802 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_BODY_H -#define B2_BODY_H - -#include -#include -#include - -class b2Fixture; -class b2Joint; -class b2Contact; -class b2Controller; -class b2World; -struct b2FixtureDef; -struct b2JointEdge; -struct b2ContactEdge; - -/// The body type. -/// static: zero mass, zero velocity, may be manually moved -/// kinematic: zero mass, non-zero velocity set by user, moved by solver -/// dynamic: positive mass, non-zero velocity determined by forces, moved by solver -enum b2BodyType -{ - b2_staticBody = 0, - b2_kinematicBody, - b2_dynamicBody, -}; - -/// A body definition holds all the data needed to construct a rigid body. -/// You can safely re-use body definitions. Shapes are added to a body after construction. -struct b2BodyDef -{ - /// This constructor sets the body definition default values. - b2BodyDef() - { - userData = NULL; - position.Set(0.0f, 0.0f); - angle = 0.0f; - linearVelocity.Set(0.0f, 0.0f); - angularVelocity = 0.0f; - linearDamping = 0.0f; - angularDamping = 0.0f; - allowSleep = true; - awake = true; - fixedRotation = false; - bullet = false; - type = b2_staticBody; - active = true; - inertiaScale = 1.0f; - } - - /// The body type: static, kinematic, or dynamic. - /// Note: if a dynamic body would have zero mass, the mass is set to one. - b2BodyType type; - - /// The world position of the body. Avoid creating bodies at the origin - /// since this can lead to many overlapping shapes. - b2Vec2 position; - - /// The world angle of the body in radians. - float32 angle; - - /// The linear velocity of the body's origin in world co-ordinates. - b2Vec2 linearVelocity; - - /// The angular velocity of the body. - float32 angularVelocity; - - /// Linear damping is use to reduce the linear velocity. The damping parameter - /// can be larger than 1.0f but the damping effect becomes sensitive to the - /// time step when the damping parameter is large. - float32 linearDamping; - - /// Angular damping is use to reduce the angular velocity. The damping parameter - /// can be larger than 1.0f but the damping effect becomes sensitive to the - /// time step when the damping parameter is large. - float32 angularDamping; - - /// Set this flag to false if this body should never fall asleep. Note that - /// this increases CPU usage. - bool allowSleep; - - /// Is this body initially awake or sleeping? - bool awake; - - /// Should this body be prevented from rotating? Useful for characters. - bool fixedRotation; - - /// Is this a fast moving body that should be prevented from tunneling through - /// other moving bodies? Note that all bodies are prevented from tunneling through - /// kinematic and static bodies. This setting is only considered on dynamic bodies. - /// @warning You should use this flag sparingly since it increases processing time. - bool bullet; - - /// Does this body start out active? - bool active; - - /// Use this to store application specific body data. - void* userData; - - /// Experimental: scales the inertia tensor. - float32 inertiaScale; -}; - -/// A rigid body. These are created via b2World::CreateBody. -class b2Body -{ -public: - /// Creates a fixture and attach it to this body. Use this function if you need - /// to set some fixture parameters, like friction. Otherwise you can create the - /// fixture directly from a shape. - /// If the density is non-zero, this function automatically updates the mass of the body. - /// Contacts are not created until the next time step. - /// @param def the fixture definition. - /// @warning This function is locked during callbacks. - b2Fixture* CreateFixture(const b2FixtureDef* def); - - /// Creates a fixture from a shape and attach it to this body. - /// This is a convenience function. Use b2FixtureDef if you need to set parameters - /// like friction, restitution, user data, or filtering. - /// If the density is non-zero, this function automatically updates the mass of the body. - /// @param shape the shape to be cloned. - /// @param density the shape density (set to zero for static bodies). - /// @warning This function is locked during callbacks. - b2Fixture* CreateFixture(const b2Shape* shape, float32 density); - - /// Destroy a fixture. This removes the fixture from the broad-phase and - /// destroys all contacts associated with this fixture. This will - /// automatically adjust the mass of the body if the body is dynamic and the - /// fixture has positive density. - /// All fixtures attached to a body are implicitly destroyed when the body is destroyed. - /// @param fixture the fixture to be removed. - /// @warning This function is locked during callbacks. - void DestroyFixture(b2Fixture* fixture); - - /// Set the position of the body's origin and rotation. - /// This breaks any contacts and wakes the other bodies. - /// Manipulating a body's transform may cause non-physical behavior. - /// @param position the world position of the body's local origin. - /// @param angle the world rotation in radians. - void SetTransform(const b2Vec2& position, float32 angle); - - /// Get the body transform for the body's origin. - /// @return the world transform of the body's origin. - const b2Transform& GetTransform() const; - - /// Get the world body origin position. - /// @return the world position of the body's origin. - const b2Vec2& GetPosition() const; - - /// Get the angle in radians. - /// @return the current world rotation angle in radians. - float32 GetAngle() const; - - /// Get the world position of the center of mass. - const b2Vec2& GetWorldCenter() const; - - /// Get the local position of the center of mass. - const b2Vec2& GetLocalCenter() const; - - /// Set the linear velocity of the center of mass. - /// @param v the new linear velocity of the center of mass. - void SetLinearVelocity(const b2Vec2& v); - - /// Get the linear velocity of the center of mass. - /// @return the linear velocity of the center of mass. - b2Vec2 GetLinearVelocity() const; - - /// Set the angular velocity. - /// @param omega the new angular velocity in radians/second. - void SetAngularVelocity(float32 omega); - - /// Get the angular velocity. - /// @return the angular velocity in radians/second. - float32 GetAngularVelocity() const; - - /// Apply a force at a world point. If the force is not - /// applied at the center of mass, it will generate a torque and - /// affect the angular velocity. This wakes up the body. - /// @param force the world force vector, usually in Newtons (N). - /// @param point the world position of the point of application. - void ApplyForce(const b2Vec2& force, const b2Vec2& point); - - /// Apply a torque. This affects the angular velocity - /// without affecting the linear velocity of the center of mass. - /// This wakes up the body. - /// @param torque about the z-axis (out of the screen), usually in N-m. - void ApplyTorque(float32 torque); - - /// Apply an impulse at a point. This immediately modifies the velocity. - /// It also modifies the angular velocity if the point of application - /// is not at the center of mass. This wakes up the body. - /// @param impulse the world impulse vector, usually in N-seconds or kg-m/s. - /// @param point the world position of the point of application. - void ApplyLinearImpulse(const b2Vec2& impulse, const b2Vec2& point); - - /// Apply an angular impulse. - /// @param impulse the angular impulse in units of kg*m*m/s - void ApplyAngularImpulse(float32 impulse); - - /// Get the total mass of the body. - /// @return the mass, usually in kilograms (kg). - float32 GetMass() const; - - /// Get the rotational inertia of the body about the local origin. - /// @return the rotational inertia, usually in kg-m^2. - float32 GetInertia() const; - - /// Get the mass data of the body. - /// @return a struct containing the mass, inertia and center of the body. - void GetMassData(b2MassData* data) const; - - /// Set the mass properties to override the mass properties of the fixtures. - /// Note that this changes the center of mass position. - /// Note that creating or destroying fixtures can also alter the mass. - /// This function has no effect if the body isn't dynamic. - /// @param massData the mass properties. - void SetMassData(const b2MassData* data); - - /// This resets the mass properties to the sum of the mass properties of the fixtures. - /// This normally does not need to be called unless you called SetMassData to override - /// the mass and you later want to reset the mass. - void ResetMassData(); - - /// Get the world coordinates of a point given the local coordinates. - /// @param localPoint a point on the body measured relative the the body's origin. - /// @return the same point expressed in world coordinates. - b2Vec2 GetWorldPoint(const b2Vec2& localPoint) const; - - /// Get the world coordinates of a vector given the local coordinates. - /// @param localVector a vector fixed in the body. - /// @return the same vector expressed in world coordinates. - b2Vec2 GetWorldVector(const b2Vec2& localVector) const; - - /// Gets a local point relative to the body's origin given a world point. - /// @param a point in world coordinates. - /// @return the corresponding local point relative to the body's origin. - b2Vec2 GetLocalPoint(const b2Vec2& worldPoint) const; - - /// Gets a local vector given a world vector. - /// @param a vector in world coordinates. - /// @return the corresponding local vector. - b2Vec2 GetLocalVector(const b2Vec2& worldVector) const; - - /// Get the world linear velocity of a world point attached to this body. - /// @param a point in world coordinates. - /// @return the world velocity of a point. - b2Vec2 GetLinearVelocityFromWorldPoint(const b2Vec2& worldPoint) const; - - /// Get the world velocity of a local point. - /// @param a point in local coordinates. - /// @return the world velocity of a point. - b2Vec2 GetLinearVelocityFromLocalPoint(const b2Vec2& localPoint) const; - - /// Get the linear damping of the body. - float32 GetLinearDamping() const; - - /// Set the linear damping of the body. - void SetLinearDamping(float32 linearDamping); - - /// Get the angular damping of the body. - float32 GetAngularDamping() const; - - /// Set the angular damping of the body. - void SetAngularDamping(float32 angularDamping); - - /// Set the type of this body. This may alter the mass and velocity. - void SetType(b2BodyType type); - - /// Get the type of this body. - b2BodyType GetType() const; - - /// Should this body be treated like a bullet for continuous collision detection? - void SetBullet(bool flag); - - /// Is this body treated like a bullet for continuous collision detection? - bool IsBullet() const; - - /// You can disable sleeping on this body. If you disable sleeping, the - /// body will be woken. - void SetSleepingAllowed(bool flag); - - /// Is this body allowed to sleep - bool IsSleepingAllowed() const; - - /// Set the sleep state of the body. A sleeping body has very - /// low CPU cost. - /// @param flag set to true to put body to sleep, false to wake it. - void SetAwake(bool flag); - - /// Get the sleeping state of this body. - /// @return true if the body is sleeping. - bool IsAwake() const; - - /// Set the active state of the body. An inactive body is not - /// simulated and cannot be collided with or woken up. - /// If you pass a flag of true, all fixtures will be added to the - /// broad-phase. - /// If you pass a flag of false, all fixtures will be removed from - /// the broad-phase and all contacts will be destroyed. - /// Fixtures and joints are otherwise unaffected. You may continue - /// to create/destroy fixtures and joints on inactive bodies. - /// Fixtures on an inactive body are implicitly inactive and will - /// not participate in collisions, ray-casts, or queries. - /// Joints connected to an inactive body are implicitly inactive. - /// An inactive body is still owned by a b2World object and remains - /// in the body list. - void SetActive(bool flag); - - /// Get the active state of the body. - bool IsActive() const; - - /// Set this body to have fixed rotation. This causes the mass - /// to be reset. - void SetFixedRotation(bool flag); - - /// Does this body have fixed rotation? - bool IsFixedRotation() const; - - /// Get the list of all fixtures attached to this body. - b2Fixture* GetFixtureList(); - const b2Fixture* GetFixtureList() const; - - /// Get the list of all joints attached to this body. - b2JointEdge* GetJointList(); - const b2JointEdge* GetJointList() const; - - /// Get the list of all contacts attached to this body. - /// @warning this list changes during the time step and you may - /// miss some collisions if you don't use b2ContactListener. - b2ContactEdge* GetContactList(); - const b2ContactEdge* GetContactList() const; - - /// Get the next body in the world's body list. - b2Body* GetNext(); - const b2Body* GetNext() const; - - /// Get the user data pointer that was provided in the body definition. - void* GetUserData() const; - - /// Set the user data. Use this to store your application specific data. - void SetUserData(void* data); - - /// Get the parent world of this body. - b2World* GetWorld(); - const b2World* GetWorld() const; - -private: - - friend class b2World; - friend class b2Island; - friend class b2ContactManager; - friend class b2ContactSolver; - friend class b2TOISolver; - - friend class b2DistanceJoint; - friend class b2GearJoint; - friend class b2LineJoint; - friend class b2MouseJoint; - friend class b2PrismaticJoint; - friend class b2PulleyJoint; - friend class b2RevoluteJoint; - friend class b2WeldJoint; - friend class b2FrictionJoint; - - // m_flags - enum - { - e_islandFlag = 0x0001, - e_awakeFlag = 0x0002, - e_autoSleepFlag = 0x0004, - e_bulletFlag = 0x0008, - e_fixedRotationFlag = 0x0010, - e_activeFlag = 0x0020, - e_toiFlag = 0x0040, - }; - - b2Body(const b2BodyDef* bd, b2World* world); - ~b2Body(); - - void SynchronizeFixtures(); - void SynchronizeTransform(); - - // This is used to prevent connected bodies from colliding. - // It may lie, depending on the collideConnected flag. - bool ShouldCollide(const b2Body* other) const; - - void Advance(float32 t); - - b2BodyType m_type; - - uint16 m_flags; - - int32 m_islandIndex; - - b2Transform m_xf; // the body origin transform - b2Sweep m_sweep; // the swept motion for CCD - - b2Vec2 m_linearVelocity; - float32 m_angularVelocity; - - b2Vec2 m_force; - float32 m_torque; - - b2World* m_world; - b2Body* m_prev; - b2Body* m_next; - - b2Fixture* m_fixtureList; - int32 m_fixtureCount; - - b2JointEdge* m_jointList; - b2ContactEdge* m_contactList; - - float32 m_mass, m_invMass; - - // Rotational inertia about the center of mass. - float32 m_I, m_invI; - - float32 m_linearDamping; - float32 m_angularDamping; - - float32 m_sleepTime; - - void* m_userData; -}; - -inline b2BodyType b2Body::GetType() const -{ - return m_type; -} - -inline const b2Transform& b2Body::GetTransform() const -{ - return m_xf; -} - -inline const b2Vec2& b2Body::GetPosition() const -{ - return m_xf.position; -} - -inline float32 b2Body::GetAngle() const -{ - return m_sweep.a; -} - -inline const b2Vec2& b2Body::GetWorldCenter() const -{ - return m_sweep.c; -} - -inline const b2Vec2& b2Body::GetLocalCenter() const -{ - return m_sweep.localCenter; -} - -inline void b2Body::SetLinearVelocity(const b2Vec2& v) -{ - if (m_type == b2_staticBody) - { - return; - } - - if (b2Dot(v,v) > 0.0f) - { - SetAwake(true); - } - - m_linearVelocity = v; -} - -inline b2Vec2 b2Body::GetLinearVelocity() const -{ - return m_linearVelocity; -} - -inline void b2Body::SetAngularVelocity(float32 w) -{ - if (m_type == b2_staticBody) - { - return; - } - - if (w * w > 0.0f) - { - SetAwake(true); - } - - m_angularVelocity = w; -} - -inline float32 b2Body::GetAngularVelocity() const -{ - return m_angularVelocity; -} - -inline float32 b2Body::GetMass() const -{ - return m_mass; -} - -inline float32 b2Body::GetInertia() const -{ - return m_I + m_mass * b2Dot(m_sweep.localCenter, m_sweep.localCenter); -} - -inline void b2Body::GetMassData(b2MassData* data) const -{ - data->mass = m_mass; - data->I = m_I + m_mass * b2Dot(m_sweep.localCenter, m_sweep.localCenter); - data->center = m_sweep.localCenter; -} - -inline b2Vec2 b2Body::GetWorldPoint(const b2Vec2& localPoint) const -{ - return b2Mul(m_xf, localPoint); -} - -inline b2Vec2 b2Body::GetWorldVector(const b2Vec2& localVector) const -{ - return b2Mul(m_xf.R, localVector); -} - -inline b2Vec2 b2Body::GetLocalPoint(const b2Vec2& worldPoint) const -{ - return b2MulT(m_xf, worldPoint); -} - -inline b2Vec2 b2Body::GetLocalVector(const b2Vec2& worldVector) const -{ - return b2MulT(m_xf.R, worldVector); -} - -inline b2Vec2 b2Body::GetLinearVelocityFromWorldPoint(const b2Vec2& worldPoint) const -{ - return m_linearVelocity + b2Cross(m_angularVelocity, worldPoint - m_sweep.c); -} - -inline b2Vec2 b2Body::GetLinearVelocityFromLocalPoint(const b2Vec2& localPoint) const -{ - return GetLinearVelocityFromWorldPoint(GetWorldPoint(localPoint)); -} - -inline float32 b2Body::GetLinearDamping() const -{ - return m_linearDamping; -} - -inline void b2Body::SetLinearDamping(float32 linearDamping) -{ - m_linearDamping = linearDamping; -} - -inline float32 b2Body::GetAngularDamping() const -{ - return m_angularDamping; -} - -inline void b2Body::SetAngularDamping(float32 angularDamping) -{ - m_angularDamping = angularDamping; -} - -inline void b2Body::SetBullet(bool flag) -{ - if (flag) - { - m_flags |= e_bulletFlag; - } - else - { - m_flags &= ~e_bulletFlag; - } -} - -inline bool b2Body::IsBullet() const -{ - return (m_flags & e_bulletFlag) == e_bulletFlag; -} - -inline void b2Body::SetAwake(bool flag) -{ - if (flag) - { - if ((m_flags & e_awakeFlag) == 0) - { - m_flags |= e_awakeFlag; - m_sleepTime = 0.0f; - } - } - else - { - m_flags &= ~e_awakeFlag; - m_sleepTime = 0.0f; - m_linearVelocity.SetZero(); - m_angularVelocity = 0.0f; - m_force.SetZero(); - m_torque = 0.0f; - } -} - -inline bool b2Body::IsAwake() const -{ - return (m_flags & e_awakeFlag) == e_awakeFlag; -} - -inline bool b2Body::IsActive() const -{ - return (m_flags & e_activeFlag) == e_activeFlag; -} - -inline void b2Body::SetFixedRotation(bool flag) -{ - if (flag) - { - m_flags |= e_fixedRotationFlag; - } - else - { - m_flags &= ~e_fixedRotationFlag; - } - - ResetMassData(); -} - -inline bool b2Body::IsFixedRotation() const -{ - return (m_flags & e_fixedRotationFlag) == e_fixedRotationFlag; -} - -inline void b2Body::SetSleepingAllowed(bool flag) -{ - if (flag) - { - m_flags |= e_autoSleepFlag; - } - else - { - m_flags &= ~e_autoSleepFlag; - SetAwake(true); - } -} - -inline bool b2Body::IsSleepingAllowed() const -{ - return (m_flags & e_autoSleepFlag) == e_autoSleepFlag; -} - -inline b2Fixture* b2Body::GetFixtureList() -{ - return m_fixtureList; -} - -inline const b2Fixture* b2Body::GetFixtureList() const -{ - return m_fixtureList; -} - -inline b2JointEdge* b2Body::GetJointList() -{ - return m_jointList; -} - -inline const b2JointEdge* b2Body::GetJointList() const -{ - return m_jointList; -} - -inline b2ContactEdge* b2Body::GetContactList() -{ - return m_contactList; -} - -inline const b2ContactEdge* b2Body::GetContactList() const -{ - return m_contactList; -} - -inline b2Body* b2Body::GetNext() -{ - return m_next; -} - -inline const b2Body* b2Body::GetNext() const -{ - return m_next; -} - -inline void b2Body::SetUserData(void* data) -{ - m_userData = data; -} - -inline void* b2Body::GetUserData() const -{ - return m_userData; -} - -inline void b2Body::ApplyForce(const b2Vec2& force, const b2Vec2& point) -{ - if (m_type != b2_dynamicBody) - { - return; - } - - if (IsAwake() == false) - { - SetAwake(true); - } - - m_force += force; - m_torque += b2Cross(point - m_sweep.c, force); -} - -inline void b2Body::ApplyTorque(float32 torque) -{ - if (m_type != b2_dynamicBody) - { - return; - } - - if (IsAwake() == false) - { - SetAwake(true); - } - - m_torque += torque; -} - -inline void b2Body::ApplyLinearImpulse(const b2Vec2& impulse, const b2Vec2& point) -{ - if (m_type != b2_dynamicBody) - { - return; - } - - if (IsAwake() == false) - { - SetAwake(true); - } - m_linearVelocity += m_invMass * impulse; - m_angularVelocity += m_invI * b2Cross(point - m_sweep.c, impulse); -} - -inline void b2Body::ApplyAngularImpulse(float32 impulse) -{ - if (m_type != b2_dynamicBody) - { - return; - } - - if (IsAwake() == false) - { - SetAwake(true); - } - m_angularVelocity += m_invI * impulse; -} - -inline void b2Body::SynchronizeTransform() -{ - m_xf.R.Set(m_sweep.a); - m_xf.position = m_sweep.c - b2Mul(m_xf.R, m_sweep.localCenter); -} - -inline void b2Body::Advance(float32 t) -{ - // Advance to the new safe time. - m_sweep.Advance(t); - m_sweep.c = m_sweep.c0; - m_sweep.a = m_sweep.a0; - SynchronizeTransform(); -} - -inline b2World* b2Body::GetWorld() -{ - return m_world; -} - -inline const b2World* b2Body::GetWorld() const -{ - return m_world; -} - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/b2ContactManager.cpp b/Littlest/libs/Box2D/Dynamics/b2ContactManager.cpp deleted file mode 100644 index d8d96dd..0000000 --- a/Littlest/libs/Box2D/Dynamics/b2ContactManager.cpp +++ /dev/null @@ -1,266 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include -#include -#include - -b2ContactFilter b2_defaultFilter; -b2ContactListener b2_defaultListener; - -b2ContactManager::b2ContactManager() -{ - m_contactList = NULL; - m_contactCount = 0; - m_contactFilter = &b2_defaultFilter; - m_contactListener = &b2_defaultListener; - m_allocator = NULL; -} - -void b2ContactManager::Destroy(b2Contact* c) -{ - b2Fixture* fixtureA = c->GetFixtureA(); - b2Fixture* fixtureB = c->GetFixtureB(); - b2Body* bodyA = fixtureA->GetBody(); - b2Body* bodyB = fixtureB->GetBody(); - - if (m_contactListener && c->IsTouching()) - { - m_contactListener->EndContact(c); - } - - // Remove from the world. - if (c->m_prev) - { - c->m_prev->m_next = c->m_next; - } - - if (c->m_next) - { - c->m_next->m_prev = c->m_prev; - } - - if (c == m_contactList) - { - m_contactList = c->m_next; - } - - // Remove from body 1 - if (c->m_nodeA.prev) - { - c->m_nodeA.prev->next = c->m_nodeA.next; - } - - if (c->m_nodeA.next) - { - c->m_nodeA.next->prev = c->m_nodeA.prev; - } - - if (&c->m_nodeA == bodyA->m_contactList) - { - bodyA->m_contactList = c->m_nodeA.next; - } - - // Remove from body 2 - if (c->m_nodeB.prev) - { - c->m_nodeB.prev->next = c->m_nodeB.next; - } - - if (c->m_nodeB.next) - { - c->m_nodeB.next->prev = c->m_nodeB.prev; - } - - if (&c->m_nodeB == bodyB->m_contactList) - { - bodyB->m_contactList = c->m_nodeB.next; - } - - // Call the factory. - b2Contact::Destroy(c, m_allocator); - --m_contactCount; -} - -// This is the top level collision call for the time step. Here -// all the narrow phase collision is processed for the world -// contact list. -void b2ContactManager::Collide() -{ - // Update awake contacts. - b2Contact* c = m_contactList; - while (c) - { - b2Fixture* fixtureA = c->GetFixtureA(); - b2Fixture* fixtureB = c->GetFixtureB(); - b2Body* bodyA = fixtureA->GetBody(); - b2Body* bodyB = fixtureB->GetBody(); - - if (bodyA->IsAwake() == false && bodyB->IsAwake() == false) - { - c = c->GetNext(); - continue; - } - - // Is this contact flagged for filtering? - if (c->m_flags & b2Contact::e_filterFlag) - { - // Should these bodies collide? - if (bodyB->ShouldCollide(bodyA) == false) - { - b2Contact* cNuke = c; - c = cNuke->GetNext(); - Destroy(cNuke); - continue; - } - - // Check user filtering. - if (m_contactFilter && m_contactFilter->ShouldCollide(fixtureA, fixtureB) == false) - { - b2Contact* cNuke = c; - c = cNuke->GetNext(); - Destroy(cNuke); - continue; - } - - // Clear the filtering flag. - c->m_flags &= ~b2Contact::e_filterFlag; - } - - int32 proxyIdA = fixtureA->m_proxyId; - int32 proxyIdB = fixtureB->m_proxyId; - bool overlap = m_broadPhase.TestOverlap(proxyIdA, proxyIdB); - - // Here we destroy contacts that cease to overlap in the broad-phase. - if (overlap == false) - { - b2Contact* cNuke = c; - c = cNuke->GetNext(); - Destroy(cNuke); - continue; - } - - // The contact persists. - c->Update(m_contactListener); - c = c->GetNext(); - } -} - -void b2ContactManager::FindNewContacts() -{ - m_broadPhase.UpdatePairs(this); -} - -void b2ContactManager::AddPair(void* proxyUserDataA, void* proxyUserDataB) -{ - b2Fixture* fixtureA = (b2Fixture*)proxyUserDataA; - b2Fixture* fixtureB = (b2Fixture*)proxyUserDataB; - - b2Body* bodyA = fixtureA->GetBody(); - b2Body* bodyB = fixtureB->GetBody(); - - // Are the fixtures on the same body? - if (bodyA == bodyB) - { - return; - } - - // Does a contact already exist? - b2ContactEdge* edge = bodyB->GetContactList(); - while (edge) - { - if (edge->other == bodyA) - { - b2Fixture* fA = edge->contact->GetFixtureA(); - b2Fixture* fB = edge->contact->GetFixtureB(); - if (fA == fixtureA && fB == fixtureB) - { - // A contact already exists. - return; - } - - if (fA == fixtureB && fB == fixtureA) - { - // A contact already exists. - return; - } - } - - edge = edge->next; - } - - // Does a joint override collision? Is at least one body dynamic? - if (bodyB->ShouldCollide(bodyA) == false) - { - return; - } - - // Check user filtering. - if (m_contactFilter && m_contactFilter->ShouldCollide(fixtureA, fixtureB) == false) - { - return; - } - - // Call the factory. - b2Contact* c = b2Contact::Create(fixtureA, fixtureB, m_allocator); - - // Contact creation may swap fixtures. - fixtureA = c->GetFixtureA(); - fixtureB = c->GetFixtureB(); - bodyA = fixtureA->GetBody(); - bodyB = fixtureB->GetBody(); - - // Insert into the world. - c->m_prev = NULL; - c->m_next = m_contactList; - if (m_contactList != NULL) - { - m_contactList->m_prev = c; - } - m_contactList = c; - - // Connect to island graph. - - // Connect to body A - c->m_nodeA.contact = c; - c->m_nodeA.other = bodyB; - - c->m_nodeA.prev = NULL; - c->m_nodeA.next = bodyA->m_contactList; - if (bodyA->m_contactList != NULL) - { - bodyA->m_contactList->prev = &c->m_nodeA; - } - bodyA->m_contactList = &c->m_nodeA; - - // Connect to body B - c->m_nodeB.contact = c; - c->m_nodeB.other = bodyA; - - c->m_nodeB.prev = NULL; - c->m_nodeB.next = bodyB->m_contactList; - if (bodyB->m_contactList != NULL) - { - bodyB->m_contactList->prev = &c->m_nodeB; - } - bodyB->m_contactList = &c->m_nodeB; - - ++m_contactCount; -} diff --git a/Littlest/libs/Box2D/Dynamics/b2ContactManager.h b/Littlest/libs/Box2D/Dynamics/b2ContactManager.h deleted file mode 100644 index fcba54a..0000000 --- a/Littlest/libs/Box2D/Dynamics/b2ContactManager.h +++ /dev/null @@ -1,52 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_CONTACT_MANAGER_H -#define B2_CONTACT_MANAGER_H - -#include - -class b2Contact; -class b2ContactFilter; -class b2ContactListener; -class b2BlockAllocator; - -// Delegate of b2World. -class b2ContactManager -{ -public: - b2ContactManager(); - - // Broad-phase callback. - void AddPair(void* proxyUserDataA, void* proxyUserDataB); - - void FindNewContacts(); - - void Destroy(b2Contact* c); - - void Collide(); - - b2BroadPhase m_broadPhase; - b2Contact* m_contactList; - int32 m_contactCount; - b2ContactFilter* m_contactFilter; - b2ContactListener* m_contactListener; - b2BlockAllocator* m_allocator; -}; - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/b2Fixture.cpp b/Littlest/libs/Box2D/Dynamics/b2Fixture.cpp deleted file mode 100644 index 31355b5..0000000 --- a/Littlest/libs/Box2D/Dynamics/b2Fixture.cpp +++ /dev/null @@ -1,163 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include -#include -#include -#include -#include - - -b2Fixture::b2Fixture() -{ - m_userData = NULL; - m_body = NULL; - m_next = NULL; - m_proxyId = b2BroadPhase::e_nullProxy; - m_shape = NULL; - m_density = 0.0f; -} - -b2Fixture::~b2Fixture() -{ - b2Assert(m_shape == NULL); - b2Assert(m_proxyId == b2BroadPhase::e_nullProxy); -} - -void b2Fixture::Create(b2BlockAllocator* allocator, b2Body* body, const b2FixtureDef* def) -{ - m_userData = def->userData; - m_friction = def->friction; - m_restitution = def->restitution; - - m_body = body; - m_next = NULL; - - m_filter = def->filter; - - m_isSensor = def->isSensor; - - m_shape = def->shape->Clone(allocator); - - m_density = def->density; -} - -void b2Fixture::Destroy(b2BlockAllocator* allocator) -{ - // The proxy must be destroyed before calling this. - b2Assert(m_proxyId == b2BroadPhase::e_nullProxy); - - // Free the child shape. - switch (m_shape->m_type) - { - case b2Shape::e_circle: - { - b2CircleShape* s = (b2CircleShape*)m_shape; - s->~b2CircleShape(); - allocator->Free(s, sizeof(b2CircleShape)); - } - break; - - case b2Shape::e_polygon: - { - b2PolygonShape* s = (b2PolygonShape*)m_shape; - s->~b2PolygonShape(); - allocator->Free(s, sizeof(b2PolygonShape)); - } - break; - - default: - b2Assert(false); - break; - } - - m_shape = NULL; -} - -void b2Fixture::CreateProxy(b2BroadPhase* broadPhase, const b2Transform& xf) -{ - b2Assert(m_proxyId == b2BroadPhase::e_nullProxy); - - // Create proxy in the broad-phase. - m_shape->ComputeAABB(&m_aabb, xf); - m_proxyId = broadPhase->CreateProxy(m_aabb, this); -} - -void b2Fixture::DestroyProxy(b2BroadPhase* broadPhase) -{ - if (m_proxyId == b2BroadPhase::e_nullProxy) - { - return; - } - - // Destroy proxy in the broad-phase. - broadPhase->DestroyProxy(m_proxyId); - m_proxyId = b2BroadPhase::e_nullProxy; -} - -void b2Fixture::Synchronize(b2BroadPhase* broadPhase, const b2Transform& transform1, const b2Transform& transform2) -{ - if (m_proxyId == b2BroadPhase::e_nullProxy) - { - return; - } - - // Compute an AABB that covers the swept shape (may miss some rotation effect). - b2AABB aabb1, aabb2; - m_shape->ComputeAABB(&aabb1, transform1); - m_shape->ComputeAABB(&aabb2, transform2); - - m_aabb.Combine(aabb1, aabb2); - - b2Vec2 displacement = transform2.position - transform1.position; - - broadPhase->MoveProxy(m_proxyId, m_aabb, displacement); -} - -void b2Fixture::SetFilterData(const b2Filter& filter) -{ - m_filter = filter; - - if (m_body == NULL) - { - return; - } - - // Flag associated contacts for filtering. - b2ContactEdge* edge = m_body->GetContactList(); - while (edge) - { - b2Contact* contact = edge->contact; - b2Fixture* fixtureA = contact->GetFixtureA(); - b2Fixture* fixtureB = contact->GetFixtureB(); - if (fixtureA == this || fixtureB == this) - { - contact->FlagForFiltering(); - } - - edge = edge->next; - } -} - -void b2Fixture::SetSensor(bool sensor) -{ - m_isSensor = sensor; -} - diff --git a/Littlest/libs/Box2D/Dynamics/b2Fixture.h b/Littlest/libs/Box2D/Dynamics/b2Fixture.h deleted file mode 100644 index d9d3255..0000000 --- a/Littlest/libs/Box2D/Dynamics/b2Fixture.h +++ /dev/null @@ -1,326 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_FIXTURE_H -#define B2_FIXTURE_H - -#include -#include -#include - -class b2BlockAllocator; -class b2Body; -class b2BroadPhase; - -/// This holds contact filtering data. -struct b2Filter -{ - /// The collision category bits. Normally you would just set one bit. - uint16 categoryBits; - - /// The collision mask bits. This states the categories that this - /// shape would accept for collision. - uint16 maskBits; - - /// Collision groups allow a certain group of objects to never collide (negative) - /// or always collide (positive). Zero means no collision group. Non-zero group - /// filtering always wins against the mask bits. - int16 groupIndex; -}; - -/// A fixture definition is used to create a fixture. This class defines an -/// abstract fixture definition. You can reuse fixture definitions safely. -struct b2FixtureDef -{ - /// The constructor sets the default fixture definition values. - b2FixtureDef() - { - shape = NULL; - userData = NULL; - friction = 0.2f; - restitution = 0.0f; - density = 0.0f; - filter.categoryBits = 0x0001; - filter.maskBits = 0xFFFF; - filter.groupIndex = 0; - isSensor = false; - } - - virtual ~b2FixtureDef() {} - - /// The shape, this must be set. The shape will be cloned, so you - /// can create the shape on the stack. - const b2Shape* shape; - - /// Use this to store application specific fixture data. - void* userData; - - /// The friction coefficient, usually in the range [0,1]. - float32 friction; - - /// The restitution (elasticity) usually in the range [0,1]. - float32 restitution; - - /// The density, usually in kg/m^2. - float32 density; - - /// A sensor shape collects contact information but never generates a collision - /// response. - bool isSensor; - - /// Contact filtering data. - b2Filter filter; -}; - - -/// A fixture is used to attach a shape to a body for collision detection. A fixture -/// inherits its transform from its parent. Fixtures hold additional non-geometric data -/// such as friction, collision filters, etc. -/// Fixtures are created via b2Body::CreateFixture. -/// @warning you cannot reuse fixtures. -class b2Fixture -{ -public: - /// Get the type of the child shape. You can use this to down cast to the concrete shape. - /// @return the shape type. - b2Shape::Type GetType() const; - - /// Get the child shape. You can modify the child shape, however you should not change the - /// number of vertices because this will crash some collision caching mechanisms. - /// Manipulating the shape may lead to non-physical behavior. - b2Shape* GetShape(); - const b2Shape* GetShape() const; - - /// Set if this fixture is a sensor. - void SetSensor(bool sensor); - - /// Is this fixture a sensor (non-solid)? - /// @return the true if the shape is a sensor. - bool IsSensor() const; - - /// Set the contact filtering data. This will not update contacts until the next time - /// step when either parent body is active and awake. - void SetFilterData(const b2Filter& filter); - - /// Get the contact filtering data. - const b2Filter& GetFilterData() const; - - /// Get the parent body of this fixture. This is NULL if the fixture is not attached. - /// @return the parent body. - b2Body* GetBody(); - const b2Body* GetBody() const; - - /// Get the next fixture in the parent body's fixture list. - /// @return the next shape. - b2Fixture* GetNext(); - const b2Fixture* GetNext() const; - - /// Get the user data that was assigned in the fixture definition. Use this to - /// store your application specific data. - void* GetUserData() const; - - /// Set the user data. Use this to store your application specific data. - void SetUserData(void* data); - - /// Test a point for containment in this fixture. - /// @param xf the shape world transform. - /// @param p a point in world coordinates. - bool TestPoint(const b2Vec2& p) const; - - /// Cast a ray against this shape. - /// @param output the ray-cast results. - /// @param input the ray-cast input parameters. - bool RayCast(b2RayCastOutput* output, const b2RayCastInput& input) const; - - /// Get the mass data for this fixture. The mass data is based on the density and - /// the shape. The rotational inertia is about the shape's origin. This operation - /// may be expensive. - void GetMassData(b2MassData* massData) const; - - /// Set the density of this fixture. This will _not_ automatically adjust the mass - /// of the body. You must call b2Body::ResetMassData to update the body's mass. - void SetDensity(float32 density); - - /// Get the density of this fixture. - float32 GetDensity() const; - - /// Get the coefficient of friction. - float32 GetFriction() const; - - /// Set the coefficient of friction. - void SetFriction(float32 friction); - - /// Get the coefficient of restitution. - float32 GetRestitution() const; - - /// Set the coefficient of restitution. - void SetRestitution(float32 restitution); - - /// Get the fixture's AABB. This AABB may be enlarge and/or stale. - /// If you need a more accurate AABB, compute it using the shape and - /// the body transform. - const b2AABB& GetAABB() const; - -protected: - - friend class b2Body; - friend class b2World; - friend class b2Contact; - friend class b2ContactManager; - - b2Fixture(); - ~b2Fixture(); - - // We need separation create/destroy functions from the constructor/destructor because - // the destructor cannot access the allocator (no destructor arguments allowed by C++). - void Create(b2BlockAllocator* allocator, b2Body* body, const b2FixtureDef* def); - void Destroy(b2BlockAllocator* allocator); - - // These support body activation/deactivation. - void CreateProxy(b2BroadPhase* broadPhase, const b2Transform& xf); - void DestroyProxy(b2BroadPhase* broadPhase); - - void Synchronize(b2BroadPhase* broadPhase, const b2Transform& xf1, const b2Transform& xf2); - - b2AABB m_aabb; - - float32 m_density; - - b2Fixture* m_next; - b2Body* m_body; - - b2Shape* m_shape; - - float32 m_friction; - float32 m_restitution; - - int32 m_proxyId; - b2Filter m_filter; - - bool m_isSensor; - - void* m_userData; -}; - -inline b2Shape::Type b2Fixture::GetType() const -{ - return m_shape->GetType(); -} - -inline b2Shape* b2Fixture::GetShape() -{ - return m_shape; -} - -inline const b2Shape* b2Fixture::GetShape() const -{ - return m_shape; -} - -inline bool b2Fixture::IsSensor() const -{ - return m_isSensor; -} - -inline const b2Filter& b2Fixture::GetFilterData() const -{ - return m_filter; -} - -inline void* b2Fixture::GetUserData() const -{ - return m_userData; -} - -inline void b2Fixture::SetUserData(void* data) -{ - m_userData = data; -} - -inline b2Body* b2Fixture::GetBody() -{ - return m_body; -} - -inline const b2Body* b2Fixture::GetBody() const -{ - return m_body; -} - -inline b2Fixture* b2Fixture::GetNext() -{ - return m_next; -} - -inline const b2Fixture* b2Fixture::GetNext() const -{ - return m_next; -} - -inline void b2Fixture::SetDensity(float32 density) -{ - b2Assert(b2IsValid(density) && density >= 0.0f); - m_density = density; -} - -inline float32 b2Fixture::GetDensity() const -{ - return m_density; -} - -inline float32 b2Fixture::GetFriction() const -{ - return m_friction; -} - -inline void b2Fixture::SetFriction(float32 friction) -{ - m_friction = friction; -} - -inline float32 b2Fixture::GetRestitution() const -{ - return m_restitution; -} - -inline void b2Fixture::SetRestitution(float32 restitution) -{ - m_restitution = restitution; -} - -inline bool b2Fixture::TestPoint(const b2Vec2& p) const -{ - return m_shape->TestPoint(m_body->GetTransform(), p); -} - -inline bool b2Fixture::RayCast(b2RayCastOutput* output, const b2RayCastInput& input) const -{ - return m_shape->RayCast(output, input, m_body->GetTransform()); -} - -inline void b2Fixture::GetMassData(b2MassData* massData) const -{ - m_shape->ComputeMass(massData, m_density); -} - -inline const b2AABB& b2Fixture::GetAABB() const -{ - return m_aabb; -} - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/b2Island.cpp b/Littlest/libs/Box2D/Dynamics/b2Island.cpp deleted file mode 100644 index 0092499..0000000 --- a/Littlest/libs/Box2D/Dynamics/b2Island.cpp +++ /dev/null @@ -1,374 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include - -/* -Position Correction Notes -========================= -I tried the several algorithms for position correction of the 2D revolute joint. -I looked at these systems: -- simple pendulum (1m diameter sphere on massless 5m stick) with initial angular velocity of 100 rad/s. -- suspension bridge with 30 1m long planks of length 1m. -- multi-link chain with 30 1m long links. - -Here are the algorithms: - -Baumgarte - A fraction of the position error is added to the velocity error. There is no -separate position solver. - -Pseudo Velocities - After the velocity solver and position integration, -the position error, Jacobian, and effective mass are recomputed. Then -the velocity constraints are solved with pseudo velocities and a fraction -of the position error is added to the pseudo velocity error. The pseudo -velocities are initialized to zero and there is no warm-starting. After -the position solver, the pseudo velocities are added to the positions. -This is also called the First Order World method or the Position LCP method. - -Modified Nonlinear Gauss-Seidel (NGS) - Like Pseudo Velocities except the -position error is re-computed for each constraint and the positions are updated -after the constraint is solved. The radius vectors (aka Jacobians) are -re-computed too (otherwise the algorithm has horrible instability). The pseudo -velocity states are not needed because they are effectively zero at the beginning -of each iteration. Since we have the current position error, we allow the -iterations to terminate early if the error becomes smaller than b2_linearSlop. - -Full NGS or just NGS - Like Modified NGS except the effective mass are re-computed -each time a constraint is solved. - -Here are the results: -Baumgarte - this is the cheapest algorithm but it has some stability problems, -especially with the bridge. The chain links separate easily close to the root -and they jitter as they struggle to pull together. This is one of the most common -methods in the field. The big drawback is that the position correction artificially -affects the momentum, thus leading to instabilities and false bounce. I used a -bias factor of 0.2. A larger bias factor makes the bridge less stable, a smaller -factor makes joints and contacts more spongy. - -Pseudo Velocities - the is more stable than the Baumgarte method. The bridge is -stable. However, joints still separate with large angular velocities. Drag the -simple pendulum in a circle quickly and the joint will separate. The chain separates -easily and does not recover. I used a bias factor of 0.2. A larger value lead to -the bridge collapsing when a heavy cube drops on it. - -Modified NGS - this algorithm is better in some ways than Baumgarte and Pseudo -Velocities, but in other ways it is worse. The bridge and chain are much more -stable, but the simple pendulum goes unstable at high angular velocities. - -Full NGS - stable in all tests. The joints display good stiffness. The bridge -still sags, but this is better than infinite forces. - -Recommendations -Pseudo Velocities are not really worthwhile because the bridge and chain cannot -recover from joint separation. In other cases the benefit over Baumgarte is small. - -Modified NGS is not a robust method for the revolute joint due to the violent -instability seen in the simple pendulum. Perhaps it is viable with other constraint -types, especially scalar constraints where the effective mass is a scalar. - -This leaves Baumgarte and Full NGS. Baumgarte has small, but manageable instabilities -and is very fast. I don't think we can escape Baumgarte, especially in highly -demanding cases where high constraint fidelity is not needed. - -Full NGS is robust and easy on the eyes. I recommend this as an option for -higher fidelity simulation and certainly for suspension bridges and long chains. -Full NGS might be a good choice for ragdolls, especially motorized ragdolls where -joint separation can be problematic. The number of NGS iterations can be reduced -for better performance without harming robustness much. - -Each joint in a can be handled differently in the position solver. So I recommend -a system where the user can select the algorithm on a per joint basis. I would -probably default to the slower Full NGS and let the user select the faster -Baumgarte method in performance critical scenarios. -*/ - -/* -Cache Performance - -The Box2D solvers are dominated by cache misses. Data structures are designed -to increase the number of cache hits. Much of misses are due to random access -to body data. The constraint structures are iterated over linearly, which leads -to few cache misses. - -The bodies are not accessed during iteration. Instead read only data, such as -the mass values are stored with the constraints. The mutable data are the constraint -impulses and the bodies velocities/positions. The impulses are held inside the -constraint structures. The body velocities/positions are held in compact, temporary -arrays to increase the number of cache hits. Linear and angular velocity are -stored in a single array since multiple arrays lead to multiple misses. -*/ - -/* -2D Rotation - -R = [cos(theta) -sin(theta)] - [sin(theta) cos(theta) ] - -thetaDot = omega - -Let q1 = cos(theta), q2 = sin(theta). -R = [q1 -q2] - [q2 q1] - -q1Dot = -thetaDot * q2 -q2Dot = thetaDot * q1 - -q1_new = q1_old - dt * w * q2 -q2_new = q2_old + dt * w * q1 -then normalize. - -This might be faster than computing sin+cos. -However, we can compute sin+cos of the same angle fast. -*/ - -b2Island::b2Island( - int32 bodyCapacity, - int32 contactCapacity, - int32 jointCapacity, - b2StackAllocator* allocator, - b2ContactListener* listener) -{ - m_bodyCapacity = bodyCapacity; - m_contactCapacity = contactCapacity; - m_jointCapacity = jointCapacity; - m_bodyCount = 0; - m_contactCount = 0; - m_jointCount = 0; - - m_allocator = allocator; - m_listener = listener; - - m_bodies = (b2Body**)m_allocator->Allocate(bodyCapacity * sizeof(b2Body*)); - m_contacts = (b2Contact**)m_allocator->Allocate(contactCapacity * sizeof(b2Contact*)); - m_joints = (b2Joint**)m_allocator->Allocate(jointCapacity * sizeof(b2Joint*)); - - m_velocities = (b2Velocity*)m_allocator->Allocate(m_bodyCapacity * sizeof(b2Velocity)); - m_positions = (b2Position*)m_allocator->Allocate(m_bodyCapacity * sizeof(b2Position)); -} - -b2Island::~b2Island() -{ - // Warning: the order should reverse the constructor order. - m_allocator->Free(m_positions); - m_allocator->Free(m_velocities); - m_allocator->Free(m_joints); - m_allocator->Free(m_contacts); - m_allocator->Free(m_bodies); -} - -void b2Island::Solve(const b2TimeStep& step, const b2Vec2& gravity, bool allowSleep) -{ - // Integrate velocities and apply damping. - for (int32 i = 0; i < m_bodyCount; ++i) - { - b2Body* b = m_bodies[i]; - - if (b->GetType() != b2_dynamicBody) - { - continue; - } - - // Integrate velocities. - b->m_linearVelocity += step.dt * (gravity + b->m_invMass * b->m_force); - b->m_angularVelocity += step.dt * b->m_invI * b->m_torque; - - // Apply damping. - // ODE: dv/dt + c * v = 0 - // Solution: v(t) = v0 * exp(-c * t) - // Time step: v(t + dt) = v0 * exp(-c * (t + dt)) = v0 * exp(-c * t) * exp(-c * dt) = v * exp(-c * dt) - // v2 = exp(-c * dt) * v1 - // Taylor expansion: - // v2 = (1.0f - c * dt) * v1 - b->m_linearVelocity *= b2Clamp(1.0f - step.dt * b->m_linearDamping, 0.0f, 1.0f); - b->m_angularVelocity *= b2Clamp(1.0f - step.dt * b->m_angularDamping, 0.0f, 1.0f); - } - - // Partition contacts so that contacts with static bodies are solved last. - int32 i1 = -1; - for (int32 i2 = 0; i2 < m_contactCount; ++i2) - { - b2Fixture* fixtureA = m_contacts[i2]->GetFixtureA(); - b2Fixture* fixtureB = m_contacts[i2]->GetFixtureB(); - b2Body* bodyA = fixtureA->GetBody(); - b2Body* bodyB = fixtureB->GetBody(); - bool nonStatic = bodyA->GetType() != b2_staticBody && bodyB->GetType() != b2_staticBody; - if (nonStatic) - { - ++i1; - b2Swap(m_contacts[i1], m_contacts[i2]); - } - } - - // Initialize velocity constraints. - b2ContactSolver contactSolver(m_contacts, m_contactCount, m_allocator, step.dtRatio); - contactSolver.WarmStart(); - for (int32 i = 0; i < m_jointCount; ++i) - { - m_joints[i]->InitVelocityConstraints(step); - } - - // Solve velocity constraints. - for (int32 i = 0; i < step.velocityIterations; ++i) - { - for (int32 j = 0; j < m_jointCount; ++j) - { - m_joints[j]->SolveVelocityConstraints(step); - } - - contactSolver.SolveVelocityConstraints(); - } - - // Post-solve (store impulses for warm starting). - contactSolver.StoreImpulses(); - - // Integrate positions. - for (int32 i = 0; i < m_bodyCount; ++i) - { - b2Body* b = m_bodies[i]; - - if (b->GetType() == b2_staticBody) - { - continue; - } - - // Check for large velocities. - b2Vec2 translation = step.dt * b->m_linearVelocity; - if (b2Dot(translation, translation) > b2_maxTranslationSquared) - { - float32 ratio = b2_maxTranslation / translation.Length(); - b->m_linearVelocity *= ratio; - } - - float32 rotation = step.dt * b->m_angularVelocity; - if (rotation * rotation > b2_maxRotationSquared) - { - float32 ratio = b2_maxRotation / b2Abs(rotation); - b->m_angularVelocity *= ratio; - } - - // Store positions for continuous collision. - b->m_sweep.c0 = b->m_sweep.c; - b->m_sweep.a0 = b->m_sweep.a; - - // Integrate - b->m_sweep.c += step.dt * b->m_linearVelocity; - b->m_sweep.a += step.dt * b->m_angularVelocity; - - // Compute new transform - b->SynchronizeTransform(); - - // Note: shapes are synchronized later. - } - - // Iterate over constraints. - for (int32 i = 0; i < step.positionIterations; ++i) - { - bool contactsOkay = contactSolver.SolvePositionConstraints(b2_contactBaumgarte); - - bool jointsOkay = true; - for (int32 i = 0; i < m_jointCount; ++i) - { - bool jointOkay = m_joints[i]->SolvePositionConstraints(b2_contactBaumgarte); - jointsOkay = jointsOkay && jointOkay; - } - - if (contactsOkay && jointsOkay) - { - // Exit early if the position errors are small. - break; - } - } - - Report(contactSolver.m_constraints); - - if (allowSleep) - { - float32 minSleepTime = b2_maxFloat; - - const float32 linTolSqr = b2_linearSleepTolerance * b2_linearSleepTolerance; - const float32 angTolSqr = b2_angularSleepTolerance * b2_angularSleepTolerance; - - for (int32 i = 0; i < m_bodyCount; ++i) - { - b2Body* b = m_bodies[i]; - if (b->GetType() == b2_staticBody) - { - continue; - } - - if ((b->m_flags & b2Body::e_autoSleepFlag) == 0) - { - b->m_sleepTime = 0.0f; - minSleepTime = 0.0f; - } - - if ((b->m_flags & b2Body::e_autoSleepFlag) == 0 || - b->m_angularVelocity * b->m_angularVelocity > angTolSqr || - b2Dot(b->m_linearVelocity, b->m_linearVelocity) > linTolSqr) - { - b->m_sleepTime = 0.0f; - minSleepTime = 0.0f; - } - else - { - b->m_sleepTime += step.dt; - minSleepTime = b2Min(minSleepTime, b->m_sleepTime); - } - } - - if (minSleepTime >= b2_timeToSleep) - { - for (int32 i = 0; i < m_bodyCount; ++i) - { - b2Body* b = m_bodies[i]; - b->SetAwake(false); - } - } - } -} - -void b2Island::Report(const b2ContactConstraint* constraints) -{ - if (m_listener == NULL) - { - return; - } - - for (int32 i = 0; i < m_contactCount; ++i) - { - b2Contact* c = m_contacts[i]; - - const b2ContactConstraint* cc = constraints + i; - - b2ContactImpulse impulse; - for (int32 j = 0; j < cc->pointCount; ++j) - { - impulse.normalImpulses[j] = cc->points[j].normalImpulse; - impulse.tangentImpulses[j] = cc->points[j].tangentImpulse; - } - - m_listener->PostSolve(c, &impulse); - } -} diff --git a/Littlest/libs/Box2D/Dynamics/b2Island.h b/Littlest/libs/Box2D/Dynamics/b2Island.h deleted file mode 100644 index 3a5fd11..0000000 --- a/Littlest/libs/Box2D/Dynamics/b2Island.h +++ /dev/null @@ -1,105 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_ISLAND_H -#define B2_ISLAND_H - -#include -#include -#include - -class b2Contact; -class b2Joint; -class b2StackAllocator; -class b2ContactListener; -struct b2ContactConstraint; - -/// This is an internal structure. -struct b2Position -{ - b2Vec2 x; - float32 a; -}; - -/// This is an internal structure. -struct b2Velocity -{ - b2Vec2 v; - float32 w; -}; - -/// This is an internal class. -class b2Island -{ -public: - b2Island(int32 bodyCapacity, int32 contactCapacity, int32 jointCapacity, - b2StackAllocator* allocator, b2ContactListener* listener); - ~b2Island(); - - void Clear() - { - m_bodyCount = 0; - m_contactCount = 0; - m_jointCount = 0; - } - - void Solve(const b2TimeStep& step, const b2Vec2& gravity, bool allowSleep); - - void Add(b2Body* body) - { - b2Assert(m_bodyCount < m_bodyCapacity); - body->m_islandIndex = m_bodyCount; - m_bodies[m_bodyCount++] = body; - } - - void Add(b2Contact* contact) - { - b2Assert(m_contactCount < m_contactCapacity); - m_contacts[m_contactCount++] = contact; - } - - void Add(b2Joint* joint) - { - b2Assert(m_jointCount < m_jointCapacity); - m_joints[m_jointCount++] = joint; - } - - void Report(const b2ContactConstraint* constraints); - - b2StackAllocator* m_allocator; - b2ContactListener* m_listener; - - b2Body** m_bodies; - b2Contact** m_contacts; - b2Joint** m_joints; - - b2Position* m_positions; - b2Velocity* m_velocities; - - int32 m_bodyCount; - int32 m_jointCount; - int32 m_contactCount; - - int32 m_bodyCapacity; - int32 m_contactCapacity; - int32 m_jointCapacity; - - int32 m_positionIterationCount; -}; - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/b2TimeStep.h b/Littlest/libs/Box2D/Dynamics/b2TimeStep.h deleted file mode 100644 index f59245d..0000000 --- a/Littlest/libs/Box2D/Dynamics/b2TimeStep.h +++ /dev/null @@ -1,35 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_TIME_STEP_H -#define B2_TIME_STEP_H - -#include - -/// This is an internal structure. -struct b2TimeStep -{ - float32 dt; // time step - float32 inv_dt; // inverse time step (0 if dt == 0). - float32 dtRatio; // dt * inv_dt0 - int32 velocityIterations; - int32 positionIterations; - bool warmStarting; -}; - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/b2World.cpp b/Littlest/libs/Box2D/Dynamics/b2World.cpp deleted file mode 100644 index d3b9e00..0000000 --- a/Littlest/libs/Box2D/Dynamics/b2World.cpp +++ /dev/null @@ -1,1076 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -b2World::b2World(const b2Vec2& gravity, bool doSleep) -{ - m_destructionListener = NULL; - m_debugDraw = NULL; - - m_bodyList = NULL; - m_jointList = NULL; - - m_bodyCount = 0; - m_jointCount = 0; - - m_warmStarting = true; - m_continuousPhysics = true; - - m_allowSleep = doSleep; - m_gravity = gravity; - - m_flags = e_clearForces; - - m_inv_dt0 = 0.0f; - - m_contactManager.m_allocator = &m_blockAllocator; -} - -b2World::~b2World() -{ -} - -void b2World::SetDestructionListener(b2DestructionListener* listener) -{ - m_destructionListener = listener; -} - -void b2World::SetContactFilter(b2ContactFilter* filter) -{ - m_contactManager.m_contactFilter = filter; -} - -void b2World::SetContactListener(b2ContactListener* listener) -{ - m_contactManager.m_contactListener = listener; -} - -void b2World::SetDebugDraw(b2DebugDraw* debugDraw) -{ - m_debugDraw = debugDraw; -} - -b2Body* b2World::CreateBody(const b2BodyDef* def) -{ - b2Assert(IsLocked() == false); - if (IsLocked()) - { - return NULL; - } - - void* mem = m_blockAllocator.Allocate(sizeof(b2Body)); - b2Body* b = new (mem) b2Body(def, this); - - // Add to world doubly linked list. - b->m_prev = NULL; - b->m_next = m_bodyList; - if (m_bodyList) - { - m_bodyList->m_prev = b; - } - m_bodyList = b; - ++m_bodyCount; - - return b; -} - -void b2World::DestroyBody(b2Body* b) -{ - b2Assert(m_bodyCount > 0); - b2Assert(IsLocked() == false); - if (IsLocked()) - { - return; - } - - // Delete the attached joints. - b2JointEdge* je = b->m_jointList; - while (je) - { - b2JointEdge* je0 = je; - je = je->next; - - if (m_destructionListener) - { - m_destructionListener->SayGoodbye(je0->joint); - } - - DestroyJoint(je0->joint); - } - b->m_jointList = NULL; - - // Delete the attached contacts. - b2ContactEdge* ce = b->m_contactList; - while (ce) - { - b2ContactEdge* ce0 = ce; - ce = ce->next; - m_contactManager.Destroy(ce0->contact); - } - b->m_contactList = NULL; - - // Delete the attached fixtures. This destroys broad-phase proxies. - b2Fixture* f = b->m_fixtureList; - while (f) - { - b2Fixture* f0 = f; - f = f->m_next; - - if (m_destructionListener) - { - m_destructionListener->SayGoodbye(f0); - } - - f0->DestroyProxy(&m_contactManager.m_broadPhase); - f0->Destroy(&m_blockAllocator); - f0->~b2Fixture(); - m_blockAllocator.Free(f0, sizeof(b2Fixture)); - } - b->m_fixtureList = NULL; - b->m_fixtureCount = 0; - - // Remove world body list. - if (b->m_prev) - { - b->m_prev->m_next = b->m_next; - } - - if (b->m_next) - { - b->m_next->m_prev = b->m_prev; - } - - if (b == m_bodyList) - { - m_bodyList = b->m_next; - } - - --m_bodyCount; - b->~b2Body(); - m_blockAllocator.Free(b, sizeof(b2Body)); -} - -b2Joint* b2World::CreateJoint(const b2JointDef* def) -{ - b2Assert(IsLocked() == false); - if (IsLocked()) - { - return NULL; - } - - b2Joint* j = b2Joint::Create(def, &m_blockAllocator); - - // Connect to the world list. - j->m_prev = NULL; - j->m_next = m_jointList; - if (m_jointList) - { - m_jointList->m_prev = j; - } - m_jointList = j; - ++m_jointCount; - - // Connect to the bodies' doubly linked lists. - j->m_edgeA.joint = j; - j->m_edgeA.other = j->m_bodyB; - j->m_edgeA.prev = NULL; - j->m_edgeA.next = j->m_bodyA->m_jointList; - if (j->m_bodyA->m_jointList) j->m_bodyA->m_jointList->prev = &j->m_edgeA; - j->m_bodyA->m_jointList = &j->m_edgeA; - - j->m_edgeB.joint = j; - j->m_edgeB.other = j->m_bodyA; - j->m_edgeB.prev = NULL; - j->m_edgeB.next = j->m_bodyB->m_jointList; - if (j->m_bodyB->m_jointList) j->m_bodyB->m_jointList->prev = &j->m_edgeB; - j->m_bodyB->m_jointList = &j->m_edgeB; - - b2Body* bodyA = def->bodyA; - b2Body* bodyB = def->bodyB; - - // If the joint prevents collisions, then flag any contacts for filtering. - if (def->collideConnected == false) - { - b2ContactEdge* edge = bodyB->GetContactList(); - while (edge) - { - if (edge->other == bodyA) - { - // Flag the contact for filtering at the next time step (where either - // body is awake). - edge->contact->FlagForFiltering(); - } - - edge = edge->next; - } - } - - // Note: creating a joint doesn't wake the bodies. - - return j; -} - -void b2World::DestroyJoint(b2Joint* j) -{ - b2Assert(IsLocked() == false); - if (IsLocked()) - { - return; - } - - bool collideConnected = j->m_collideConnected; - - // Remove from the doubly linked list. - if (j->m_prev) - { - j->m_prev->m_next = j->m_next; - } - - if (j->m_next) - { - j->m_next->m_prev = j->m_prev; - } - - if (j == m_jointList) - { - m_jointList = j->m_next; - } - - // Disconnect from island graph. - b2Body* bodyA = j->m_bodyA; - b2Body* bodyB = j->m_bodyB; - - // Wake up connected bodies. - bodyA->SetAwake(true); - bodyB->SetAwake(true); - - // Remove from body 1. - if (j->m_edgeA.prev) - { - j->m_edgeA.prev->next = j->m_edgeA.next; - } - - if (j->m_edgeA.next) - { - j->m_edgeA.next->prev = j->m_edgeA.prev; - } - - if (&j->m_edgeA == bodyA->m_jointList) - { - bodyA->m_jointList = j->m_edgeA.next; - } - - j->m_edgeA.prev = NULL; - j->m_edgeA.next = NULL; - - // Remove from body 2 - if (j->m_edgeB.prev) - { - j->m_edgeB.prev->next = j->m_edgeB.next; - } - - if (j->m_edgeB.next) - { - j->m_edgeB.next->prev = j->m_edgeB.prev; - } - - if (&j->m_edgeB == bodyB->m_jointList) - { - bodyB->m_jointList = j->m_edgeB.next; - } - - j->m_edgeB.prev = NULL; - j->m_edgeB.next = NULL; - - b2Joint::Destroy(j, &m_blockAllocator); - - b2Assert(m_jointCount > 0); - --m_jointCount; - - // If the joint prevents collisions, then flag any contacts for filtering. - if (collideConnected == false) - { - b2ContactEdge* edge = bodyB->GetContactList(); - while (edge) - { - if (edge->other == bodyA) - { - // Flag the contact for filtering at the next time step (where either - // body is awake). - edge->contact->FlagForFiltering(); - } - - edge = edge->next; - } - } -} - -// Find islands, integrate and solve constraints, solve position constraints -void b2World::Solve(const b2TimeStep& step) -{ - // Size the island for the worst case. - b2Island island(m_bodyCount, - m_contactManager.m_contactCount, - m_jointCount, - &m_stackAllocator, - m_contactManager.m_contactListener); - - // Clear all the island flags. - for (b2Body* b = m_bodyList; b; b = b->m_next) - { - b->m_flags &= ~b2Body::e_islandFlag; - } - for (b2Contact* c = m_contactManager.m_contactList; c; c = c->m_next) - { - c->m_flags &= ~b2Contact::e_islandFlag; - } - for (b2Joint* j = m_jointList; j; j = j->m_next) - { - j->m_islandFlag = false; - } - - // Build and simulate all awake islands. - int32 stackSize = m_bodyCount; - b2Body** stack = (b2Body**)m_stackAllocator.Allocate(stackSize * sizeof(b2Body*)); - for (b2Body* seed = m_bodyList; seed; seed = seed->m_next) - { - if (seed->m_flags & b2Body::e_islandFlag) - { - continue; - } - - if (seed->IsAwake() == false || seed->IsActive() == false) - { - continue; - } - - // The seed can be dynamic or kinematic. - if (seed->GetType() == b2_staticBody) - { - continue; - } - - // Reset island and stack. - island.Clear(); - int32 stackCount = 0; - stack[stackCount++] = seed; - seed->m_flags |= b2Body::e_islandFlag; - - // Perform a depth first search (DFS) on the constraint graph. - while (stackCount > 0) - { - // Grab the next body off the stack and add it to the island. - b2Body* b = stack[--stackCount]; - b2Assert(b->IsActive() == true); - island.Add(b); - - // Make sure the body is awake. - b->SetAwake(true); - - // To keep islands as small as possible, we don't - // propagate islands across static bodies. - if (b->GetType() == b2_staticBody) - { - continue; - } - - // Search all contacts connected to this body. - for (b2ContactEdge* ce = b->m_contactList; ce; ce = ce->next) - { - b2Contact* contact = ce->contact; - - // Has this contact already been added to an island? - if (contact->m_flags & b2Contact::e_islandFlag) - { - continue; - } - - // Is this contact solid and touching? - if (contact->IsEnabled() == false || - contact->IsTouching() == false) - { - continue; - } - - // Skip sensors. - bool sensorA = contact->m_fixtureA->m_isSensor; - bool sensorB = contact->m_fixtureB->m_isSensor; - if (sensorA || sensorB) - { - continue; - } - - island.Add(contact); - contact->m_flags |= b2Contact::e_islandFlag; - - b2Body* other = ce->other; - - // Was the other body already added to this island? - if (other->m_flags & b2Body::e_islandFlag) - { - continue; - } - - b2Assert(stackCount < stackSize); - stack[stackCount++] = other; - other->m_flags |= b2Body::e_islandFlag; - } - - // Search all joints connect to this body. - for (b2JointEdge* je = b->m_jointList; je; je = je->next) - { - if (je->joint->m_islandFlag == true) - { - continue; - } - - b2Body* other = je->other; - - // Don't simulate joints connected to inactive bodies. - if (other->IsActive() == false) - { - continue; - } - - island.Add(je->joint); - je->joint->m_islandFlag = true; - - if (other->m_flags & b2Body::e_islandFlag) - { - continue; - } - - b2Assert(stackCount < stackSize); - stack[stackCount++] = other; - other->m_flags |= b2Body::e_islandFlag; - } - } - - island.Solve(step, m_gravity, m_allowSleep); - - // Post solve cleanup. - for (int32 i = 0; i < island.m_bodyCount; ++i) - { - // Allow static bodies to participate in other islands. - b2Body* b = island.m_bodies[i]; - if (b->GetType() == b2_staticBody) - { - b->m_flags &= ~b2Body::e_islandFlag; - } - } - } - - m_stackAllocator.Free(stack); - - // Synchronize fixtures, check for out of range bodies. - for (b2Body* b = m_bodyList; b; b = b->GetNext()) - { - // If a body was not in an island then it did not move. - if ((b->m_flags & b2Body::e_islandFlag) == 0) - { - continue; - } - - if (b->GetType() == b2_staticBody) - { - continue; - } - - // Update fixtures (for broad-phase). - b->SynchronizeFixtures(); - } - - // Look for new contacts. - m_contactManager.FindNewContacts(); -} - -// Advance a dynamic body to its first time of contact -// and adjust the position to ensure clearance. -void b2World::SolveTOI(b2Body* body) -{ - // Find the minimum contact. - b2Contact* toiContact = NULL; - float32 toi = 1.0f; - b2Body* toiOther = NULL; - bool found; - int32 count; - int32 iter = 0; - - bool bullet = body->IsBullet(); - - // Iterate until all contacts agree on the minimum TOI. We have - // to iterate because the TOI algorithm may skip some intermediate - // collisions when objects rotate through each other. - do - { - count = 0; - found = false; - for (b2ContactEdge* ce = body->m_contactList; ce; ce = ce->next) - { - if (ce->contact == toiContact) - { - continue; - } - - b2Body* other = ce->other; - b2BodyType type = other->GetType(); - - // Only bullets perform TOI with dynamic bodies. - if (bullet == true) - { - // Bullets only perform TOI with bodies that have their TOI resolved. - if ((other->m_flags & b2Body::e_toiFlag) == 0) - { - continue; - } - - // No repeated hits on non-static bodies - if (type != b2_staticBody && (ce->contact->m_flags & b2Contact::e_bulletHitFlag) != 0) - { - continue; - } - } - else if (type == b2_dynamicBody) - { - continue; - } - - // Check for a disabled contact. - b2Contact* contact = ce->contact; - if (contact->IsEnabled() == false) - { - continue; - } - - // Prevent infinite looping. - if (contact->m_toiCount > 10) - { - continue; - } - - b2Fixture* fixtureA = contact->m_fixtureA; - b2Fixture* fixtureB = contact->m_fixtureB; - - // Cull sensors. - if (fixtureA->IsSensor() || fixtureB->IsSensor()) - { - continue; - } - - b2Body* bodyA = fixtureA->m_body; - b2Body* bodyB = fixtureB->m_body; - - // Compute the time of impact in interval [0, minTOI] - b2TOIInput input; - input.proxyA.Set(fixtureA->GetShape()); - input.proxyB.Set(fixtureB->GetShape()); - input.sweepA = bodyA->m_sweep; - input.sweepB = bodyB->m_sweep; - input.tMax = toi; - - b2TOIOutput output; - b2TimeOfImpact(&output, &input); - - if (output.state == b2TOIOutput::e_touching && output.t < toi) - { - toiContact = contact; - toi = output.t; - toiOther = other; - found = true; - } - - ++count; - } - - ++iter; - } while (found && count > 1 && iter < 50); - - if (toiContact == NULL) - { - body->Advance(1.0f); - return; - } - - b2Sweep backup = body->m_sweep; - body->Advance(toi); - toiContact->Update(m_contactManager.m_contactListener); - if (toiContact->IsEnabled() == false) - { - // Contact disabled. Backup and recurse. - body->m_sweep = backup; - SolveTOI(body); - } - - ++toiContact->m_toiCount; - - // Update all the valid contacts on this body and build a contact island. - b2Contact* contacts[b2_maxTOIContacts]; - count = 0; - for (b2ContactEdge* ce = body->m_contactList; ce && count < b2_maxTOIContacts; ce = ce->next) - { - b2Body* other = ce->other; - b2BodyType type = other->GetType(); - - // Only perform correction with static bodies, so the - // body won't get pushed out of the world. - if (type == b2_dynamicBody) - { - continue; - } - - // Check for a disabled contact. - b2Contact* contact = ce->contact; - if (contact->IsEnabled() == false) - { - continue; - } - - b2Fixture* fixtureA = contact->m_fixtureA; - b2Fixture* fixtureB = contact->m_fixtureB; - - // Cull sensors. - if (fixtureA->IsSensor() || fixtureB->IsSensor()) - { - continue; - } - - // The contact likely has some new contact points. The listener - // gives the user a chance to disable the contact. - if (contact != toiContact) - { - contact->Update(m_contactManager.m_contactListener); - } - - // Did the user disable the contact? - if (contact->IsEnabled() == false) - { - // Skip this contact. - continue; - } - - if (contact->IsTouching() == false) - { - continue; - } - - contacts[count] = contact; - ++count; - } - - // Reduce the TOI body's overlap with the contact island. - b2TOISolver solver(&m_stackAllocator); - solver.Initialize(contacts, count, body); - - const float32 k_toiBaumgarte = 0.75f; - bool solved = false; - for (int32 i = 0; i < 20; ++i) - { - bool contactsOkay = solver.Solve(k_toiBaumgarte); - if (contactsOkay) - { - solved = true; - break; - } - } - - if (toiOther->GetType() != b2_staticBody) - { - toiContact->m_flags |= b2Contact::e_bulletHitFlag; - } -} - -// Sequentially solve TOIs for each body. We bring each -// body to the time of contact and perform some position correction. -// Time is not conserved. -void b2World::SolveTOI() -{ - // Prepare all contacts. - for (b2Contact* c = m_contactManager.m_contactList; c; c = c->m_next) - { - // Enable the contact - c->m_flags |= b2Contact::e_enabledFlag; - - // Set the number of TOI events for this contact to zero. - c->m_toiCount = 0; - } - - // Initialize the TOI flag. - for (b2Body* body = m_bodyList; body; body = body->m_next) - { - // Kinematic, and static bodies will not be affected by the TOI event. - // If a body was not in an island then it did not move. - if ((body->m_flags & b2Body::e_islandFlag) == 0 || body->GetType() == b2_kinematicBody || body->GetType() == b2_staticBody) - { - body->m_flags |= b2Body::e_toiFlag; - } - else - { - body->m_flags &= ~b2Body::e_toiFlag; - } - } - - // Collide non-bullets. - for (b2Body* body = m_bodyList; body; body = body->m_next) - { - if (body->m_flags & b2Body::e_toiFlag) - { - continue; - } - - if (body->IsBullet() == true) - { - continue; - } - - SolveTOI(body); - - body->m_flags |= b2Body::e_toiFlag; - } - - // Collide bullets. - for (b2Body* body = m_bodyList; body; body = body->m_next) - { - if (body->m_flags & b2Body::e_toiFlag) - { - continue; - } - - if (body->IsBullet() == false) - { - continue; - } - - SolveTOI(body); - - body->m_flags |= b2Body::e_toiFlag; - } -} - -void b2World::Step(float32 dt, int32 velocityIterations, int32 positionIterations) -{ - // If new fixtures were added, we need to find the new contacts. - if (m_flags & e_newFixture) - { - m_contactManager.FindNewContacts(); - m_flags &= ~e_newFixture; - } - - m_flags |= e_locked; - - b2TimeStep step; - step.dt = dt; - step.velocityIterations = velocityIterations; - step.positionIterations = positionIterations; - if (dt > 0.0f) - { - step.inv_dt = 1.0f / dt; - } - else - { - step.inv_dt = 0.0f; - } - - step.dtRatio = m_inv_dt0 * dt; - - step.warmStarting = m_warmStarting; - - // Update contacts. This is where some contacts are destroyed. - m_contactManager.Collide(); - - // Integrate velocities, solve velocity constraints, and integrate positions. - if (step.dt > 0.0f) - { - Solve(step); - } - - // Handle TOI events. - if (m_continuousPhysics && step.dt > 0.0f) - { - SolveTOI(); - } - - if (step.dt > 0.0f) - { - m_inv_dt0 = step.inv_dt; - } - - if (m_flags & e_clearForces) - { - ClearForces(); - } - - m_flags &= ~e_locked; -} - -void b2World::ClearForces() -{ - for (b2Body* body = m_bodyList; body; body = body->GetNext()) - { - body->m_force.SetZero(); - body->m_torque = 0.0f; - } -} - -struct b2WorldQueryWrapper -{ - bool QueryCallback(int32 proxyId) - { - b2Fixture* fixture = (b2Fixture*)broadPhase->GetUserData(proxyId); - return callback->ReportFixture(fixture); - } - - const b2BroadPhase* broadPhase; - b2QueryCallback* callback; -}; - -void b2World::QueryAABB(b2QueryCallback* callback, const b2AABB& aabb) const -{ - b2WorldQueryWrapper wrapper; - wrapper.broadPhase = &m_contactManager.m_broadPhase; - wrapper.callback = callback; - m_contactManager.m_broadPhase.Query(&wrapper, aabb); -} - -struct b2WorldRayCastWrapper -{ - float32 RayCastCallback(const b2RayCastInput& input, int32 proxyId) - { - void* userData = broadPhase->GetUserData(proxyId); - b2Fixture* fixture = (b2Fixture*)userData; - b2RayCastOutput output; - bool hit = fixture->RayCast(&output, input); - - if (hit) - { - float32 fraction = output.fraction; - b2Vec2 point = (1.0f - fraction) * input.p1 + fraction * input.p2; - return callback->ReportFixture(fixture, point, output.normal, fraction); - } - - return input.maxFraction; - } - - const b2BroadPhase* broadPhase; - b2RayCastCallback* callback; -}; - -void b2World::RayCast(b2RayCastCallback* callback, const b2Vec2& point1, const b2Vec2& point2) const -{ - b2WorldRayCastWrapper wrapper; - wrapper.broadPhase = &m_contactManager.m_broadPhase; - wrapper.callback = callback; - b2RayCastInput input; - input.maxFraction = 1.0f; - input.p1 = point1; - input.p2 = point2; - m_contactManager.m_broadPhase.RayCast(&wrapper, input); -} - -void b2World::DrawShape(b2Fixture* fixture, const b2Transform& xf, const b2Color& color) -{ - switch (fixture->GetType()) - { - case b2Shape::e_circle: - { - b2CircleShape* circle = (b2CircleShape*)fixture->GetShape(); - - b2Vec2 center = b2Mul(xf, circle->m_p); - float32 radius = circle->m_radius; - b2Vec2 axis = xf.R.col1; - - m_debugDraw->DrawSolidCircle(center, radius, axis, color); - } - break; - - case b2Shape::e_polygon: - { - b2PolygonShape* poly = (b2PolygonShape*)fixture->GetShape(); - int32 vertexCount = poly->m_vertexCount; - b2Assert(vertexCount <= b2_maxPolygonVertices); - b2Vec2 vertices[b2_maxPolygonVertices]; - - for (int32 i = 0; i < vertexCount; ++i) - { - vertices[i] = b2Mul(xf, poly->m_vertices[i]); - } - - m_debugDraw->DrawSolidPolygon(vertices, vertexCount, color); - } - break; - } -} - -void b2World::DrawJoint(b2Joint* joint) -{ - b2Body* bodyA = joint->GetBodyA(); - b2Body* bodyB = joint->GetBodyB(); - const b2Transform& xf1 = bodyA->GetTransform(); - const b2Transform& xf2 = bodyB->GetTransform(); - b2Vec2 x1 = xf1.position; - b2Vec2 x2 = xf2.position; - b2Vec2 p1 = joint->GetAnchorA(); - b2Vec2 p2 = joint->GetAnchorB(); - - b2Color color(0.5f, 0.8f, 0.8f); - - switch (joint->GetType()) - { - case e_distanceJoint: - m_debugDraw->DrawSegment(p1, p2, color); - break; - - case e_pulleyJoint: - { - b2PulleyJoint* pulley = (b2PulleyJoint*)joint; - b2Vec2 s1 = pulley->GetGroundAnchorA(); - b2Vec2 s2 = pulley->GetGroundAnchorB(); - m_debugDraw->DrawSegment(s1, p1, color); - m_debugDraw->DrawSegment(s2, p2, color); - m_debugDraw->DrawSegment(s1, s2, color); - } - break; - - case e_mouseJoint: - // don't draw this - break; - - default: - m_debugDraw->DrawSegment(x1, p1, color); - m_debugDraw->DrawSegment(p1, p2, color); - m_debugDraw->DrawSegment(x2, p2, color); - } -} - -void b2World::DrawDebugData() -{ - if (m_debugDraw == NULL) - { - return; - } - - uint32 flags = m_debugDraw->GetFlags(); - - if (flags & b2DebugDraw::e_shapeBit) - { - for (b2Body* b = m_bodyList; b; b = b->GetNext()) - { - const b2Transform& xf = b->GetTransform(); - for (b2Fixture* f = b->GetFixtureList(); f; f = f->GetNext()) - { - if (b->IsActive() == false) - { - DrawShape(f, xf, b2Color(0.5f, 0.5f, 0.3f)); - } - else if (b->GetType() == b2_staticBody) - { - DrawShape(f, xf, b2Color(0.5f, 0.9f, 0.5f)); - } - else if (b->GetType() == b2_kinematicBody) - { - DrawShape(f, xf, b2Color(0.5f, 0.5f, 0.9f)); - } - else if (b->IsAwake() == false) - { - DrawShape(f, xf, b2Color(0.6f, 0.6f, 0.6f)); - } - else - { - DrawShape(f, xf, b2Color(0.9f, 0.7f, 0.7f)); - } - } - } - } - - if (flags & b2DebugDraw::e_jointBit) - { - for (b2Joint* j = m_jointList; j; j = j->GetNext()) - { - DrawJoint(j); - } - } - - if (flags & b2DebugDraw::e_pairBit) - { - b2Color color(0.3f, 0.9f, 0.9f); - for (b2Contact* c = m_contactManager.m_contactList; c; c = c->GetNext()) - { - b2Fixture* fixtureA = c->GetFixtureA(); - b2Fixture* fixtureB = c->GetFixtureB(); - - b2Vec2 cA = fixtureA->GetAABB().GetCenter(); - b2Vec2 cB = fixtureB->GetAABB().GetCenter(); - - m_debugDraw->DrawSegment(cA, cB, color); - } - } - - if (flags & b2DebugDraw::e_aabbBit) - { - b2Color color(0.9f, 0.3f, 0.9f); - b2BroadPhase* bp = &m_contactManager.m_broadPhase; - - for (b2Body* b = m_bodyList; b; b = b->GetNext()) - { - if (b->IsActive() == false) - { - continue; - } - - for (b2Fixture* f = b->GetFixtureList(); f; f = f->GetNext()) - { - b2AABB aabb = bp->GetFatAABB(f->m_proxyId); - b2Vec2 vs[4]; - vs[0].Set(aabb.lowerBound.x, aabb.lowerBound.y); - vs[1].Set(aabb.upperBound.x, aabb.lowerBound.y); - vs[2].Set(aabb.upperBound.x, aabb.upperBound.y); - vs[3].Set(aabb.lowerBound.x, aabb.upperBound.y); - - m_debugDraw->DrawPolygon(vs, 4, color); - } - } - } - - if (flags & b2DebugDraw::e_centerOfMassBit) - { - for (b2Body* b = m_bodyList; b; b = b->GetNext()) - { - b2Transform xf = b->GetTransform(); - xf.position = b->GetWorldCenter(); - m_debugDraw->DrawTransform(xf); - } - } -} - -int32 b2World::GetProxyCount() const -{ - return m_contactManager.m_broadPhase.GetProxyCount(); -} diff --git a/Littlest/libs/Box2D/Dynamics/b2World.h b/Littlest/libs/Box2D/Dynamics/b2World.h deleted file mode 100644 index bff1427..0000000 --- a/Littlest/libs/Box2D/Dynamics/b2World.h +++ /dev/null @@ -1,285 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_WORLD_H -#define B2_WORLD_H - -#include -#include -#include -#include -#include - -struct b2AABB; -struct b2BodyDef; -struct b2JointDef; -struct b2TimeStep; -class b2Body; -class b2Fixture; -class b2Joint; - -/// The world class manages all physics entities, dynamic simulation, -/// and asynchronous queries. The world also contains efficient memory -/// management facilities. -class b2World -{ -public: - /// Construct a world object. - /// @param gravity the world gravity vector. - /// @param doSleep improve performance by not simulating inactive bodies. - b2World(const b2Vec2& gravity, bool doSleep); - - /// Destruct the world. All physics entities are destroyed and all heap memory is released. - ~b2World(); - - /// Register a destruction listener. The listener is owned by you and must - /// remain in scope. - void SetDestructionListener(b2DestructionListener* listener); - - /// Register a contact filter to provide specific control over collision. - /// Otherwise the default filter is used (b2_defaultFilter). The listener is - /// owned by you and must remain in scope. - void SetContactFilter(b2ContactFilter* filter); - - /// Register a contact event listener. The listener is owned by you and must - /// remain in scope. - void SetContactListener(b2ContactListener* listener); - - /// Register a routine for debug drawing. The debug draw functions are called - /// inside with b2World::DrawDebugData method. The debug draw object is owned - /// by you and must remain in scope. - void SetDebugDraw(b2DebugDraw* debugDraw); - - /// Create a rigid body given a definition. No reference to the definition - /// is retained. - /// @warning This function is locked during callbacks. - b2Body* CreateBody(const b2BodyDef* def); - - /// Destroy a rigid body given a definition. No reference to the definition - /// is retained. This function is locked during callbacks. - /// @warning This automatically deletes all associated shapes and joints. - /// @warning This function is locked during callbacks. - void DestroyBody(b2Body* body); - - /// Create a joint to constrain bodies together. No reference to the definition - /// is retained. This may cause the connected bodies to cease colliding. - /// @warning This function is locked during callbacks. - b2Joint* CreateJoint(const b2JointDef* def); - - /// Destroy a joint. This may cause the connected bodies to begin colliding. - /// @warning This function is locked during callbacks. - void DestroyJoint(b2Joint* joint); - - /// Take a time step. This performs collision detection, integration, - /// and constraint solution. - /// @param timeStep the amount of time to simulate, this should not vary. - /// @param velocityIterations for the velocity constraint solver. - /// @param positionIterations for the position constraint solver. - void Step( float32 timeStep, - int32 velocityIterations, - int32 positionIterations); - - /// Call this after you are done with time steps to clear the forces. You normally - /// call this after each call to Step, unless you are performing sub-steps. By default, - /// forces will be automatically cleared, so you don't need to call this function. - /// @see SetAutoClearForces - void ClearForces(); - - /// Call this to draw shapes and other debug draw data. - void DrawDebugData(); - - /// Query the world for all fixtures that potentially overlap the - /// provided AABB. - /// @param callback a user implemented callback class. - /// @param aabb the query box. - void QueryAABB(b2QueryCallback* callback, const b2AABB& aabb) const; - - /// Ray-cast the world for all fixtures in the path of the ray. Your callback - /// controls whether you get the closest point, any point, or n-points. - /// The ray-cast ignores shapes that contain the starting point. - /// @param callback a user implemented callback class. - /// @param point1 the ray starting point - /// @param point2 the ray ending point - void RayCast(b2RayCastCallback* callback, const b2Vec2& point1, const b2Vec2& point2) const; - - /// Get the world body list. With the returned body, use b2Body::GetNext to get - /// the next body in the world list. A NULL body indicates the end of the list. - /// @return the head of the world body list. - b2Body* GetBodyList(); - - /// Get the world joint list. With the returned joint, use b2Joint::GetNext to get - /// the next joint in the world list. A NULL joint indicates the end of the list. - /// @return the head of the world joint list. - b2Joint* GetJointList(); - - /// Get the world contact list. With the returned contact, use b2Contact::GetNext to get - /// the next contact in the world list. A NULL contact indicates the end of the list. - /// @return the head of the world contact list. - /// @warning contacts are - b2Contact* GetContactList(); - - /// Enable/disable warm starting. For testing. - void SetWarmStarting(bool flag) { m_warmStarting = flag; } - - /// Enable/disable continuous physics. For testing. - void SetContinuousPhysics(bool flag) { m_continuousPhysics = flag; } - - /// Get the number of broad-phase proxies. - int32 GetProxyCount() const; - - /// Get the number of bodies. - int32 GetBodyCount() const; - - /// Get the number of joints. - int32 GetJointCount() const; - - /// Get the number of contacts (each may have 0 or more contact points). - int32 GetContactCount() const; - - /// Change the global gravity vector. - void SetGravity(const b2Vec2& gravity); - - /// Get the global gravity vector. - b2Vec2 GetGravity() const; - - /// Is the world locked (in the middle of a time step). - bool IsLocked() const; - - /// Set flag to control automatic clearing of forces after each time step. - void SetAutoClearForces(bool flag); - - /// Get the flag that controls automatic clearing of forces after each time step. - bool GetAutoClearForces() const; - -private: - - // m_flags - enum - { - e_newFixture = 0x0001, - e_locked = 0x0002, - e_clearForces = 0x0004, - }; - - friend class b2Body; - friend class b2ContactManager; - friend class b2Controller; - - void Solve(const b2TimeStep& step); - void SolveTOI(); - void SolveTOI(b2Body* body); - - void DrawJoint(b2Joint* joint); - void DrawShape(b2Fixture* shape, const b2Transform& xf, const b2Color& color); - - b2BlockAllocator m_blockAllocator; - b2StackAllocator m_stackAllocator; - - int32 m_flags; - - b2ContactManager m_contactManager; - - b2Body* m_bodyList; - b2Joint* m_jointList; - - int32 m_bodyCount; - int32 m_jointCount; - - b2Vec2 m_gravity; - bool m_allowSleep; - - b2Body* m_groundBody; - - b2DestructionListener* m_destructionListener; - b2DebugDraw* m_debugDraw; - - // This is used to compute the time step ratio to - // support a variable time step. - float32 m_inv_dt0; - - // This is for debugging the solver. - bool m_warmStarting; - - // This is for debugging the solver. - bool m_continuousPhysics; -}; - -inline b2Body* b2World::GetBodyList() -{ - return m_bodyList; -} - -inline b2Joint* b2World::GetJointList() -{ - return m_jointList; -} - -inline b2Contact* b2World::GetContactList() -{ - return m_contactManager.m_contactList; -} - -inline int32 b2World::GetBodyCount() const -{ - return m_bodyCount; -} - -inline int32 b2World::GetJointCount() const -{ - return m_jointCount; -} - -inline int32 b2World::GetContactCount() const -{ - return m_contactManager.m_contactCount; -} - -inline void b2World::SetGravity(const b2Vec2& gravity) -{ - m_gravity = gravity; -} - -inline b2Vec2 b2World::GetGravity() const -{ - return m_gravity; -} - -inline bool b2World::IsLocked() const -{ - return (m_flags & e_locked) == e_locked; -} - -inline void b2World::SetAutoClearForces(bool flag) -{ - if (flag) - { - m_flags |= e_clearForces; - } - else - { - m_flags &= ~e_clearForces; - } -} - -/// Get the flag that controls automatic clearing of forces after each time step. -inline bool b2World::GetAutoClearForces() const -{ - return (m_flags & e_clearForces) == e_clearForces; -} - -#endif diff --git a/Littlest/libs/Box2D/Dynamics/b2WorldCallbacks.cpp b/Littlest/libs/Box2D/Dynamics/b2WorldCallbacks.cpp deleted file mode 100644 index bc5fefb..0000000 --- a/Littlest/libs/Box2D/Dynamics/b2WorldCallbacks.cpp +++ /dev/null @@ -1,61 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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. -*/ - -#include -#include - -// Return true if contact calculations should be performed between these two shapes. -// If you implement your own collision filter you may want to build from this implementation. -bool b2ContactFilter::ShouldCollide(b2Fixture* fixtureA, b2Fixture* fixtureB) -{ - const b2Filter& filterA = fixtureA->GetFilterData(); - const b2Filter& filterB = fixtureB->GetFilterData(); - - if (filterA.groupIndex == filterB.groupIndex && filterA.groupIndex != 0) - { - return filterA.groupIndex > 0; - } - - bool collide = (filterA.maskBits & filterB.categoryBits) != 0 && (filterA.categoryBits & filterB.maskBits) != 0; - return collide; -} - -b2DebugDraw::b2DebugDraw() -{ - m_drawFlags = 0; -} - -void b2DebugDraw::SetFlags(uint32 flags) -{ - m_drawFlags = flags; -} - -uint32 b2DebugDraw::GetFlags() const -{ - return m_drawFlags; -} - -void b2DebugDraw::AppendFlags(uint32 flags) -{ - m_drawFlags |= flags; -} - -void b2DebugDraw::ClearFlags(uint32 flags) -{ - m_drawFlags &= ~flags; -} diff --git a/Littlest/libs/Box2D/Dynamics/b2WorldCallbacks.h b/Littlest/libs/Box2D/Dynamics/b2WorldCallbacks.h deleted file mode 100644 index 82ee67e..0000000 --- a/Littlest/libs/Box2D/Dynamics/b2WorldCallbacks.h +++ /dev/null @@ -1,217 +0,0 @@ -/* -* Copyright (c) 2006-2009 Erin Catto http://www.gphysics.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 B2_WORLD_CALLBACKS_H -#define B2_WORLD_CALLBACKS_H - -#include - -struct b2Vec2; -struct b2Transform; -class b2Fixture; -class b2Body; -class b2Joint; -class b2Contact; -struct b2ContactPoint; -struct b2ContactResult; -struct b2Manifold; - -/// Joints and fixtures are destroyed when their associated -/// body is destroyed. Implement this listener so that you -/// may nullify references to these joints and shapes. -class b2DestructionListener -{ -public: - virtual ~b2DestructionListener() {} - - /// Called when any joint is about to be destroyed due - /// to the destruction of one of its attached bodies. - virtual void SayGoodbye(b2Joint* joint) = 0; - - /// Called when any fixture is about to be destroyed due - /// to the destruction of its parent body. - virtual void SayGoodbye(b2Fixture* fixture) = 0; -}; - -/// Implement this class to provide collision filtering. In other words, you can implement -/// this class if you want finer control over contact creation. -class b2ContactFilter -{ -public: - virtual ~b2ContactFilter() {} - - /// Return true if contact calculations should be performed between these two shapes. - /// @warning for performance reasons this is only called when the AABBs begin to overlap. - virtual bool ShouldCollide(b2Fixture* fixtureA, b2Fixture* fixtureB); -}; - -/// Contact impulses for reporting. Impulses are used instead of forces because -/// sub-step forces may approach infinity for rigid body collisions. These -/// match up one-to-one with the contact points in b2Manifold. -struct b2ContactImpulse -{ - float32 normalImpulses[b2_maxManifoldPoints]; - float32 tangentImpulses[b2_maxManifoldPoints]; -}; - -/// Implement this class to get contact information. You can use these results for -/// things like sounds and game logic. You can also get contact results by -/// traversing the contact lists after the time step. However, you might miss -/// some contacts because continuous physics leads to sub-stepping. -/// Additionally you may receive multiple callbacks for the same contact in a -/// single time step. -/// You should strive to make your callbacks efficient because there may be -/// many callbacks per time step. -/// @warning You cannot create/destroy Box2D entities inside these callbacks. -class b2ContactListener -{ -public: - virtual ~b2ContactListener() {} - - /// Called when two fixtures begin to touch. - virtual void BeginContact(b2Contact* contact) { B2_NOT_USED(contact); } - - /// Called when two fixtures cease to touch. - virtual void EndContact(b2Contact* contact) { B2_NOT_USED(contact); } - - /// This is called after a contact is updated. This allows you to inspect a - /// contact before it goes to the solver. If you are careful, you can modify the - /// contact manifold (e.g. disable contact). - /// A copy of the old manifold is provided so that you can detect changes. - /// Note: this is called only for awake bodies. - /// Note: this is called even when the number of contact points is zero. - /// Note: this is not called for sensors. - /// Note: if you set the number of contact points to zero, you will not - /// get an EndContact callback. However, you may get a BeginContact callback - /// the next step. - virtual void PreSolve(b2Contact* contact, const b2Manifold* oldManifold) - { - B2_NOT_USED(contact); - B2_NOT_USED(oldManifold); - } - - /// This lets you inspect a contact after the solver is finished. This is useful - /// for inspecting impulses. - /// Note: the contact manifold does not include time of impact impulses, which can be - /// arbitrarily large if the sub-step is small. Hence the impulse is provided explicitly - /// in a separate data structure. - /// Note: this is only called for contacts that are touching, solid, and awake. - virtual void PostSolve(b2Contact* contact, const b2ContactImpulse* impulse) - { - B2_NOT_USED(contact); - B2_NOT_USED(impulse); - } -}; - -/// Callback class for AABB queries. -/// See b2World::Query -class b2QueryCallback -{ -public: - virtual ~b2QueryCallback() {} - - /// Called for each fixture found in the query AABB. - /// @return false to terminate the query. - virtual bool ReportFixture(b2Fixture* fixture) = 0; -}; - -/// Callback class for ray casts. -/// See b2World::RayCast -class b2RayCastCallback -{ -public: - virtual ~b2RayCastCallback() {} - - /// Called for each fixture found in the query. You control how the ray cast - /// proceeds by returning a float: - /// return -1: ignore this fixture and continue - /// return 0: terminate the ray cast - /// return fraction: clip the ray to this point - /// return 1: don't clip the ray and continue - /// @param fixture the fixture hit by the ray - /// @param point the point of initial intersection - /// @param normal the normal vector at the point of intersection - /// @return -1 to filter, 0 to terminate, fraction to clip the ray for - /// closest hit, 1 to continue - virtual float32 ReportFixture( b2Fixture* fixture, const b2Vec2& point, - const b2Vec2& normal, float32 fraction) = 0; -}; - -/// Color for debug drawing. Each value has the range [0,1]. -struct b2Color -{ - b2Color() {} - b2Color(float32 r, float32 g, float32 b) : r(r), g(g), b(b) {} - void Set(float32 ri, float32 gi, float32 bi) { r = ri; g = gi; b = bi; } - float32 r, g, b; -}; - -/// Implement and register this class with a b2World to provide debug drawing of physics -/// entities in your game. -class b2DebugDraw -{ -public: - b2DebugDraw(); - - virtual ~b2DebugDraw() {} - - enum - { - e_shapeBit = 0x0001, ///< draw shapes - e_jointBit = 0x0002, ///< draw joint connections - e_aabbBit = 0x0004, ///< draw axis aligned bounding boxes - e_pairBit = 0x0008, ///< draw broad-phase pairs - e_centerOfMassBit = 0x0010, ///< draw center of mass frame - }; - - /// Set the drawing flags. - void SetFlags(uint32 flags); - - /// Get the drawing flags. - uint32 GetFlags() const; - - /// Append flags to the current flags. - void AppendFlags(uint32 flags); - - /// Clear flags from the current flags. - void ClearFlags(uint32 flags); - - /// Draw a closed polygon provided in CCW order. - virtual void DrawPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color) = 0; - - /// Draw a solid closed polygon provided in CCW order. - virtual void DrawSolidPolygon(const b2Vec2* vertices, int32 vertexCount, const b2Color& color) = 0; - - /// Draw a circle. - virtual void DrawCircle(const b2Vec2& center, float32 radius, const b2Color& color) = 0; - - /// Draw a solid circle. - virtual void DrawSolidCircle(const b2Vec2& center, float32 radius, const b2Vec2& axis, const b2Color& color) = 0; - - /// Draw a line segment. - virtual void DrawSegment(const b2Vec2& p1, const b2Vec2& p2, const b2Color& color) = 0; - - /// Draw a transform. Choose your own length scale. - /// @param xf a transform. - virtual void DrawTransform(const b2Transform& xf) = 0; - -protected: - uint32 m_drawFlags; -}; - -#endif diff --git a/Littlest/libs/CocosDenshion/CDAudioManager.h b/Littlest/libs/CocosDenshion/CDAudioManager.h deleted file mode 100644 index 2475929..0000000 --- a/Littlest/libs/CocosDenshion/CDAudioManager.h +++ /dev/null @@ -1,243 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - 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. - - $Id$ - */ - -#import "CocosDenshion.h" -#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 30000 - #import -#else - #import "CDXMacOSXSupport.h" -#endif - -/** Different modes of the engine */ -typedef enum { - kAMM_FxOnly, //!Other apps will be able to play audio - kAMM_FxPlusMusic, //!Only this app will play audio - kAMM_FxPlusMusicIfNoOtherAudio, //!If another app is playing audio at start up then allow it to continue and don't play music - kAMM_MediaPlayback, //!This app takes over audio e.g music player app - kAMM_PlayAndRecord //!App takes over audio and has input and output -} tAudioManagerMode; - -/** Possible states of the engine */ -typedef enum { - kAMStateUninitialised, //!Audio manager has not been initialised - do not use - kAMStateInitialising, //!Audio manager is in the process of initialising - do not use - kAMStateInitialised //!Audio manager is initialised - safe to use -} tAudioManagerState; - -typedef enum { - kAMRBDoNothing, //Audio manager will not do anything on resign or becoming active - kAMRBStopPlay, //Background music is stopped on resign and resumed on become active - kAMRBStop //Background music is stopped on resign but not resumed - maybe because you want to do this from within your game -} tAudioManagerResignBehavior; - -/** Notifications */ -extern NSString * const kCDN_AudioManagerInitialised; - -@interface CDAsynchInitialiser : NSOperation {} -@end - -/** CDAudioManager supports two long audio source channels called left and right*/ -typedef enum { - kASC_Left = 0, - kASC_Right = 1 -} tAudioSourceChannel; - -typedef enum { - kLAS_Init, - kLAS_Loaded, - kLAS_Playing, - kLAS_Paused, - kLAS_Stopped, -} tLongAudioSourceState; - -@class CDLongAudioSource; -@protocol CDLongAudioSourceDelegate -@optional -/** The audio source completed playing */ -- (void) cdAudioSourceDidFinishPlaying:(CDLongAudioSource *) audioSource; -/** The file used to load the audio source has changed */ -- (void) cdAudioSourceFileDidChange:(CDLongAudioSource *) audioSource; -@end - -/** - CDLongAudioSource represents an audio source that has a long duration which makes - it costly to load into memory for playback as an effect using CDSoundEngine. Examples - include background music and narration tracks. The audio file may or may not be compressed. - Bear in mind that current iDevices can only use hardware to decode a single compressed - audio file at a time and playing multiple compressed files will result in a performance drop - as software decompression will take place. - @since v0.99 - */ -@interface CDLongAudioSource : NSObject { - AVAudioPlayer *audioSourcePlayer; - NSString *audioSourceFilePath; - NSInteger numberOfLoops; - float volume; - id delegate; - BOOL mute; - BOOL enabled_; - BOOL backgroundMusic; -@public - BOOL systemPaused;//Used for auto resign handling - NSTimeInterval systemPauseLocation;//Used for auto resign handling -@protected - tLongAudioSourceState state; -} -@property (readonly) AVAudioPlayer *audioSourcePlayer; -@property (readonly) NSString *audioSourceFilePath; -@property (readwrite, nonatomic) NSInteger numberOfLoops; -@property (readwrite, nonatomic) float volume; -@property (assign) id delegate; -/* This long audio source functions as background music */ -@property (readwrite, nonatomic) BOOL backgroundMusic; - -/** Loads the file into the audio source */ --(void) load:(NSString*) filePath; -/** Plays the audio source */ --(void) play; -/** Stops playing the audio soruce */ --(void) stop; -/** Pauses the audio source */ --(void) pause; -/** Rewinds the audio source */ --(void) rewind; -/** Resumes playing the audio source if it was paused */ --(void) resume; -/** Returns whether or not the audio source is playing */ --(BOOL) isPlaying; - -@end - -/** - CDAudioManager manages audio requirements for a game. It provides access to a CDSoundEngine object - for playing sound effects. It provides access to two CDLongAudioSource object (left and right channel) - for playing long duration audio such as background music and narration tracks. Additionally it manages - the audio session to take care of things like audio session interruption and interacting with the audio - of other apps that are running on the device. - - Requirements: - - Firmware: OS 2.2 or greater - - Files: CDAudioManager.*, CocosDenshion.* - - Frameworks: OpenAL, AudioToolbox, AVFoundation - @since v0.8 - */ -@interface CDAudioManager : NSObject { - CDSoundEngine *soundEngine; - CDLongAudioSource *backgroundMusic; - NSMutableArray *audioSourceChannels; - NSString* _audioSessionCategory; - BOOL _audioWasPlayingAtStartup; - tAudioManagerMode _mode; - SEL backgroundMusicCompletionSelector; - id backgroundMusicCompletionListener; - BOOL willPlayBackgroundMusic; - BOOL _mute; - BOOL _resigned; - BOOL _interrupted; - BOOL _audioSessionActive; - BOOL enabled_; - - //For handling resign/become active - BOOL _isObservingAppEvents; - tAudioManagerResignBehavior _resignBehavior; -} - -@property (readonly) CDSoundEngine *soundEngine; -@property (readonly) CDLongAudioSource *backgroundMusic; -@property (readonly) BOOL willPlayBackgroundMusic; - -/** Returns the shared singleton */ -+ (CDAudioManager *) sharedManager; -+ (tAudioManagerState) sharedManagerState; -/** Configures the shared singleton with a mode*/ -+ (void) configure: (tAudioManagerMode) mode; -/** Initializes the engine asynchronously with a mode */ -+ (void) initAsynchronously: (tAudioManagerMode) mode; -/** Initializes the engine synchronously with a mode, channel definition and a total number of channels */ -- (id) init: (tAudioManagerMode) mode; --(void) audioSessionInterrupted; --(void) audioSessionResumed; --(void) setResignBehavior:(tAudioManagerResignBehavior) resignBehavior autoHandle:(BOOL) autoHandle; -/** Returns true is audio is muted at a hardware level e.g user has ringer switch set to off */ --(BOOL) isDeviceMuted; -/** Returns true if another app is playing audio such as the iPod music player */ --(BOOL) isOtherAudioPlaying; -/** Sets the way the audio manager interacts with the operating system such as whether it shares output with other apps or obeys the mute switch */ --(void) setMode:(tAudioManagerMode) mode; -/** Shuts down the shared audio manager instance so that it can be reinitialised */ -+(void) end; - -/** Call if you want to use built in resign behavior but need to do some additional audio processing on resign active. */ -- (void) applicationWillResignActive; -/** Call if you want to use built in resign behavior but need to do some additional audio processing on become active. */ -- (void) applicationDidBecomeActive; - -//New AVAudioPlayer API -/** Loads the data from the specified file path to the channel's audio source */ --(CDLongAudioSource*) audioSourceLoad:(NSString*) filePath channel:(tAudioSourceChannel) channel; -/** Retrieves the audio source for the specified channel */ --(CDLongAudioSource*) audioSourceForChannel:(tAudioSourceChannel) channel; - -//Legacy AVAudioPlayer API -/** Plays music in background. The music can be looped or not - It is recommended to use .aac files as background music since they are decoded by the device (hardware). - */ --(void) playBackgroundMusic:(NSString*) filePath loop:(BOOL) loop; -/** Preloads a background music */ --(void) preloadBackgroundMusic:(NSString*) filePath; -/** Stops playing the background music */ --(void) stopBackgroundMusic; -/** Pauses the background music */ --(void) pauseBackgroundMusic; -/** Rewinds the background music */ --(void) rewindBackgroundMusic; -/** Resumes playing the background music */ --(void) resumeBackgroundMusic; -/** Returns whether or not the background music is playing */ --(BOOL) isBackgroundMusicPlaying; - --(void) setBackgroundMusicCompletionListener:(id) listener selector:(SEL) selector; - -@end - -/** Fader for long audio source objects */ -@interface CDLongAudioSourceFader : CDPropertyModifier{} -@end - -static const int kCDNoBuffer = -1; - -/** Allows buffers to be associated with file names */ -@interface CDBufferManager:NSObject{ - NSMutableDictionary* loadedBuffers; - NSMutableArray *freedBuffers; - CDSoundEngine *soundEngine; - int nextBufferId; -} - --(id) initWithEngine:(CDSoundEngine *) theSoundEngine; --(int) bufferForFile:(NSString*) filePath create:(BOOL) create; --(void) releaseBufferForFile:(NSString *) filePath; - -@end - diff --git a/Littlest/libs/CocosDenshion/CDAudioManager.m b/Littlest/libs/CocosDenshion/CDAudioManager.m deleted file mode 100644 index 0929f3c..0000000 --- a/Littlest/libs/CocosDenshion/CDAudioManager.m +++ /dev/null @@ -1,887 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - 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. - - $Id$ - */ - - -#import "CDAudioManager.h" - -NSString * const kCDN_AudioManagerInitialised = @"kCDN_AudioManagerInitialised"; - -//NSOperation object used to asynchronously initialise -@implementation CDAsynchInitialiser - --(void) main { - [super main]; - [CDAudioManager sharedManager]; -} - -@end - -@implementation CDLongAudioSource - -@synthesize audioSourcePlayer, audioSourceFilePath, delegate, backgroundMusic; - --(id) init { - if ((self = [super init])) { - state = kLAS_Init; - volume = 1.0f; - mute = NO; - enabled_ = YES; - } - return self; -} - --(void) dealloc { - CDLOGINFO(@"Denshion::CDLongAudioSource - deallocating %@", self); - [audioSourcePlayer release]; - [audioSourceFilePath release]; - [super dealloc]; -} - --(void) load:(NSString*) filePath { - //We have alread loaded a file previously, check if we are being asked to load the same file - if (state == kLAS_Init || ![filePath isEqualToString:audioSourceFilePath]) { - CDLOGINFO(@"Denshion::CDLongAudioSource - Loading new audio source %@",filePath); - //New file - if (state != kLAS_Init) { - [audioSourceFilePath release];//Release old file path - [audioSourcePlayer release];//Release old AVAudioPlayer, they can't be reused - } - audioSourceFilePath = [filePath copy]; - NSError *error = nil; - NSString *path = [CDUtilities fullPathFromRelativePath:audioSourceFilePath]; - audioSourcePlayer = [(AVAudioPlayer*)[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:&error]; - if (error == nil) { - [audioSourcePlayer prepareToPlay]; - audioSourcePlayer.delegate = self; - if (delegate && [delegate respondsToSelector:@selector(cdAudioSourceFileDidChange:)]) { - //Tell our delegate the file has changed - [delegate cdAudioSourceFileDidChange:self]; - } - } else { - CDLOG(@"Denshion::CDLongAudioSource - Error initialising audio player: %@",error); - } - } else { - //Same file - just return it to a consistent state - [self pause]; - [self rewind]; - } - audioSourcePlayer.volume = volume; - audioSourcePlayer.numberOfLoops = numberOfLoops; - state = kLAS_Loaded; -} - --(void) play { - if (enabled_) { - self->systemPaused = NO; - [audioSourcePlayer play]; - } else { - CDLOGINFO(@"Denshion::CDLongAudioSource long audio source didn't play because it is disabled"); - } -} - --(void) stop { - [audioSourcePlayer stop]; -} - --(void) pause { - [audioSourcePlayer pause]; -} - --(void) rewind { - [audioSourcePlayer setCurrentTime:0]; -} - --(void) resume { - [audioSourcePlayer play]; -} - --(BOOL) isPlaying { - if (state != kLAS_Init) { - return [audioSourcePlayer isPlaying]; - } else { - return NO; - } -} - --(void) setVolume:(float) newVolume -{ - volume = newVolume; - if (state != kLAS_Init && !mute) { - audioSourcePlayer.volume = newVolume; - } -} - --(float) volume -{ - return volume; -} - -#pragma mark Audio Interrupt Protocol --(BOOL) mute -{ - return mute; -} - --(void) setMute:(BOOL) muteValue -{ - if (mute != muteValue) { - if (mute) { - //Turn sound back on - audioSourcePlayer.volume = volume; - } else { - audioSourcePlayer.volume = 0.0f; - } - mute = muteValue; - } -} - --(BOOL) enabled -{ - return enabled_; -} - --(void) setEnabled:(BOOL)enabledValue -{ - if (enabledValue != enabled_) { - enabled_ = enabledValue; - if (!enabled_) { - //"Stop" the sounds - [self pause]; - [self rewind]; - } - } -} - --(NSInteger) numberOfLoops { - return numberOfLoops; -} - --(void) setNumberOfLoops:(NSInteger) loopCount -{ - audioSourcePlayer.numberOfLoops = loopCount; - numberOfLoops = loopCount; -} - -- (void)audioPlayerDidFinishPlaying:(AVAudioPlayer *)player successfully:(BOOL)flag { - CDLOGINFO(@"Denshion::CDLongAudioSource - audio player finished"); -#if TARGET_IPHONE_SIMULATOR - CDLOGINFO(@"Denshion::CDLongAudioSource - workaround for OpenAL clobbered audio issue"); - //This is a workaround for an issue in all simulators (tested to 3.1.2). Problem is - //that OpenAL audio playback is clobbered when an AVAudioPlayer stops. Workaround - //is to keep the player playing on an endless loop with 0 volume and then when - //it is played again reset the volume and set loop count appropriately. - //NB: this workaround is not foolproof but it is good enough for most situations. - player.numberOfLoops = -1; - player.volume = 0; - [player play]; -#endif - if (delegate && [delegate respondsToSelector:@selector(cdAudioSourceDidFinishPlaying:)]) { - [delegate cdAudioSourceDidFinishPlaying:self]; - } -} - --(void)audioPlayerBeginInterruption:(AVAudioPlayer *)player { - CDLOGINFO(@"Denshion::CDLongAudioSource - audio player interrupted"); -} - --(void)audioPlayerEndInterruption:(AVAudioPlayer *)player { - CDLOGINFO(@"Denshion::CDLongAudioSource - audio player resumed"); - if (self.backgroundMusic) { - //Check if background music can play as rules may have changed during - //the interruption. This is to address a specific issue in 4.x when - //fast task switching - if([CDAudioManager sharedManager].willPlayBackgroundMusic) { - [player play]; - } - } else { - [player play]; - } -} - -@end - - -@interface CDAudioManager (PrivateMethods) --(BOOL) audioSessionSetActive:(BOOL) active; --(BOOL) audioSessionSetCategory:(NSString*) category; --(void) badAlContextHandler; -@end - - -@implementation CDAudioManager -#define BACKGROUND_MUSIC_CHANNEL kASC_Left - -@synthesize soundEngine, willPlayBackgroundMusic; -static CDAudioManager *sharedManager; -static tAudioManagerState _sharedManagerState = kAMStateUninitialised; -static tAudioManagerMode configuredMode; -static BOOL configured = FALSE; - --(BOOL) audioSessionSetActive:(BOOL) active { - NSError *activationError = nil; - if ([[AVAudioSession sharedInstance] setActive:active error:&activationError]) { - _audioSessionActive = active; - CDLOGINFO(@"Denshion::CDAudioManager - Audio session set active %i succeeded", active); - return YES; - } else { - //Failed - CDLOG(@"Denshion::CDAudioManager - Audio session set active %i failed with error %@", active, activationError); - return NO; - } -} - --(BOOL) audioSessionSetCategory:(NSString*) category { - NSError *categoryError = nil; - if ([[AVAudioSession sharedInstance] setCategory:category error:&categoryError]) { - CDLOGINFO(@"Denshion::CDAudioManager - Audio session set category %@ succeeded", category); - return YES; - } else { - //Failed - CDLOG(@"Denshion::CDAudioManager - Audio session set category %@ failed with error %@", category, categoryError); - return NO; - } -} - -// Init -+ (CDAudioManager *) sharedManager -{ - @synchronized(self) { - if (!sharedManager) { - if (!configured) { - //Set defaults here - configuredMode = kAMM_FxPlusMusicIfNoOtherAudio; - } - sharedManager = [[CDAudioManager alloc] init:configuredMode]; - _sharedManagerState = kAMStateInitialised;//This is only really relevant when using asynchronous initialisation - [[NSNotificationCenter defaultCenter] postNotificationName:kCDN_AudioManagerInitialised object:nil]; - } - } - return sharedManager; -} - -+ (tAudioManagerState) sharedManagerState { - return _sharedManagerState; -} - -/** - * Call this to set up audio manager asynchronously. Initialisation is finished when sharedManagerState == kAMStateInitialised - */ -+ (void) initAsynchronously: (tAudioManagerMode) mode { - @synchronized(self) { - if (_sharedManagerState == kAMStateUninitialised) { - _sharedManagerState = kAMStateInitialising; - [CDAudioManager configure:mode]; - CDAsynchInitialiser *initOp = [[[CDAsynchInitialiser alloc] init] autorelease]; - NSOperationQueue *opQ = [[[NSOperationQueue alloc] init] autorelease]; - [opQ addOperation:initOp]; - } - } -} - -+ (id) alloc -{ - @synchronized(self) { - NSAssert(sharedManager == nil, @"Attempted to allocate a second instance of a singleton."); - return [super alloc]; - } - return nil; -} - -/* - * Call this method before accessing the shared manager in order to configure the shared audio manager - */ -+ (void) configure: (tAudioManagerMode) mode { - configuredMode = mode; - configured = TRUE; -} - --(BOOL) isOtherAudioPlaying { - UInt32 isPlaying = 0; - UInt32 varSize = sizeof(isPlaying); - AudioSessionGetProperty (kAudioSessionProperty_OtherAudioIsPlaying, &varSize, &isPlaying); - return (isPlaying != 0); -} - --(void) setMode:(tAudioManagerMode) mode { - - _mode = mode; - switch (_mode) { - - case kAMM_FxOnly: - //Share audio with other app - CDLOGINFO(@"Denshion::CDAudioManager - Audio will be shared"); - //_audioSessionCategory = kAudioSessionCategory_AmbientSound; - _audioSessionCategory = AVAudioSessionCategoryAmbient; - willPlayBackgroundMusic = NO; - break; - - case kAMM_FxPlusMusic: - //Use audio exclusively - if other audio is playing it will be stopped - CDLOGINFO(@"Denshion::CDAudioManager - Audio will be exclusive"); - //_audioSessionCategory = kAudioSessionCategory_SoloAmbientSound; - _audioSessionCategory = AVAudioSessionCategorySoloAmbient; - willPlayBackgroundMusic = YES; - break; - - case kAMM_MediaPlayback: - //Use audio exclusively, ignore mute switch and sleep - CDLOGINFO(@"Denshion::CDAudioManager - Media playback mode, audio will be exclusive"); - //_audioSessionCategory = kAudioSessionCategory_MediaPlayback; - _audioSessionCategory = AVAudioSessionCategoryPlayback; - willPlayBackgroundMusic = YES; - break; - - case kAMM_PlayAndRecord: - //Use audio exclusively, ignore mute switch and sleep, has inputs and outputs - CDLOGINFO(@"Denshion::CDAudioManager - Play and record mode, audio will be exclusive"); - //_audioSessionCategory = kAudioSessionCategory_PlayAndRecord; - _audioSessionCategory = AVAudioSessionCategoryPlayAndRecord; - willPlayBackgroundMusic = YES; - break; - - default: - //kAudioManagerFxPlusMusicIfNoOtherAudio - if ([self isOtherAudioPlaying]) { - CDLOGINFO(@"Denshion::CDAudioManager - Other audio is playing audio will be shared"); - //_audioSessionCategory = kAudioSessionCategory_AmbientSound; - _audioSessionCategory = AVAudioSessionCategoryAmbient; - willPlayBackgroundMusic = NO; - } else { - CDLOGINFO(@"Denshion::CDAudioManager - Other audio is not playing audio will be exclusive"); - //_audioSessionCategory = kAudioSessionCategory_SoloAmbientSound; - _audioSessionCategory = AVAudioSessionCategorySoloAmbient; - willPlayBackgroundMusic = YES; - } - - break; - } - - [self audioSessionSetCategory:_audioSessionCategory]; - -} - -/** - * This method is used to work around various bugs introduced in 4.x OS versions. In some circumstances the - * audio session is interrupted but never resumed, this results in the loss of OpenAL audio when following - * standard practices. If we detect this situation then we will attempt to resume the audio session ourselves. - * Known triggers: lock the device then unlock it (iOS 4.2 gm), playback a song using MPMediaPlayer (iOS 4.0) - */ -- (void) badAlContextHandler { - if (_interrupted && alcGetCurrentContext() == NULL) { - CDLOG(@"Denshion::CDAudioManager - bad OpenAL context detected, attempting to resume audio session"); - [self audioSessionResumed]; - } -} - -- (id) init: (tAudioManagerMode) mode { - if ((self = [super init])) { - - //Initialise the audio session - AVAudioSession* session = [AVAudioSession sharedInstance]; - session.delegate = self; - - _mode = mode; - backgroundMusicCompletionSelector = nil; - _isObservingAppEvents = FALSE; - _mute = NO; - _resigned = NO; - _interrupted = NO; - enabled_ = YES; - _audioSessionActive = NO; - [self setMode:mode]; - soundEngine = [[CDSoundEngine alloc] init]; - - //Set up audioSource channels - audioSourceChannels = [[NSMutableArray alloc] init]; - CDLongAudioSource *leftChannel = [[CDLongAudioSource alloc] init]; - leftChannel.backgroundMusic = YES; - CDLongAudioSource *rightChannel = [[CDLongAudioSource alloc] init]; - rightChannel.backgroundMusic = NO; - [audioSourceChannels insertObject:leftChannel atIndex:kASC_Left]; - [audioSourceChannels insertObject:rightChannel atIndex:kASC_Right]; - [leftChannel release]; - [rightChannel release]; - //Used to support legacy APIs - backgroundMusic = [self audioSourceForChannel:BACKGROUND_MUSIC_CHANNEL]; - backgroundMusic.delegate = self; - - //Add handler for bad al context messages, these are posted by the sound engine. - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(badAlContextHandler) name:kCDN_BadAlContext object:nil]; - - } - return self; -} - --(void) dealloc { - CDLOGINFO(@"Denshion::CDAudioManager - deallocating"); - [self stopBackgroundMusic]; - [soundEngine release]; - [[NSNotificationCenter defaultCenter] removeObserver:self]; - [self audioSessionSetActive:NO]; - [audioSourceChannels release]; - [super dealloc]; -} - -/** Retrieves the audio source for the specified channel */ --(CDLongAudioSource*) audioSourceForChannel:(tAudioSourceChannel) channel -{ - return (CDLongAudioSource*)[audioSourceChannels objectAtIndex:channel]; -} - -/** Loads the data from the specified file path to the channel's audio source */ --(CDLongAudioSource*) audioSourceLoad:(NSString*) filePath channel:(tAudioSourceChannel) channel -{ - CDLongAudioSource *audioSource = [self audioSourceForChannel:channel]; - if (audioSource) { - [audioSource load:filePath]; - } - return audioSource; -} - --(BOOL) isBackgroundMusicPlaying { - return [self.backgroundMusic isPlaying]; -} - -//NB: originally I tried using a route change listener and intended to store the current route, -//however, on a 3gs running 3.1.2 no route change is generated when the user switches the -//ringer mute switch to off (i.e. enables sound) therefore polling is the only reliable way to -//determine ringer switch state --(BOOL) isDeviceMuted { - -#if TARGET_IPHONE_SIMULATOR - //Calling audio route stuff on the simulator causes problems - return NO; -#else - CFStringRef newAudioRoute; - UInt32 propertySize = sizeof (CFStringRef); - - AudioSessionGetProperty ( - kAudioSessionProperty_AudioRoute, - &propertySize, - &newAudioRoute - ); - - if (newAudioRoute == NULL) { - //Don't expect this to happen but playing safe otherwise a null in the CFStringCompare will cause a crash - return YES; - } else { - CFComparisonResult newDeviceIsMuted = CFStringCompare ( - newAudioRoute, - (CFStringRef) @"", - 0 - ); - - return (newDeviceIsMuted == kCFCompareEqualTo); - } -#endif -} - -#pragma mark Audio Interrupt Protocol - --(BOOL) mute { - return _mute; -} - --(void) setMute:(BOOL) muteValue { - if (muteValue != _mute) { - _mute = muteValue; - [soundEngine setMute:muteValue]; - for( CDLongAudioSource *audioSource in audioSourceChannels) { - audioSource.mute = muteValue; - } - } -} - --(BOOL) enabled { - return enabled_; -} - --(void) setEnabled:(BOOL) enabledValue { - if (enabledValue != enabled_) { - enabled_ = enabledValue; - [soundEngine setEnabled:enabled_]; - for( CDLongAudioSource *audioSource in audioSourceChannels) { - audioSource.enabled = enabled_; - } - } -} - --(CDLongAudioSource*) backgroundMusic -{ - return backgroundMusic; -} - -//Load background music ready for playing --(void) preloadBackgroundMusic:(NSString*) filePath -{ - [self.backgroundMusic load:filePath]; -} - --(void) playBackgroundMusic:(NSString*) filePath loop:(BOOL) loop -{ - [self.backgroundMusic load:filePath]; - - if (!willPlayBackgroundMusic || _mute) { - CDLOGINFO(@"Denshion::CDAudioManager - play bgm aborted because audio is not exclusive or sound is muted"); - return; - } - - if (loop) { - [self.backgroundMusic setNumberOfLoops:-1]; - } else { - [self.backgroundMusic setNumberOfLoops:0]; - } - [self.backgroundMusic play]; -} - --(void) stopBackgroundMusic -{ - [self.backgroundMusic stop]; -} - --(void) pauseBackgroundMusic -{ - [self.backgroundMusic pause]; -} - --(void) resumeBackgroundMusic -{ - if (!willPlayBackgroundMusic || _mute) { - CDLOGINFO(@"Denshion::CDAudioManager - resume bgm aborted because audio is not exclusive or sound is muted"); - return; - } - - [self.backgroundMusic resume]; -} - --(void) rewindBackgroundMusic -{ - [self.backgroundMusic rewind]; -} - --(void) setBackgroundMusicCompletionListener:(id) listener selector:(SEL) selector { - backgroundMusicCompletionListener = listener; - backgroundMusicCompletionSelector = selector; -} - -/* - * Call this method to have the audio manager automatically handle application resign and - * become active. Pass a tAudioManagerResignBehavior to indicate the desired behavior - * for resigning and becoming active again. - * - * If autohandle is YES then the applicationWillResignActive and applicationDidBecomActive - * methods are automatically called, otherwise you must call them yourself at the appropriate time. - * - * Based on idea of Dominique Bongard - */ --(void) setResignBehavior:(tAudioManagerResignBehavior) resignBehavior autoHandle:(BOOL) autoHandle { - - if (!_isObservingAppEvents && autoHandle) { - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillResignActive:) name:@"UIApplicationWillResignActiveNotification" object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationDidBecomeActive:) name:@"UIApplicationDidBecomeActiveNotification" object:nil]; - [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(applicationWillTerminate:) name:@"UIApplicationWillTerminateNotification" object:nil]; - _isObservingAppEvents = TRUE; - } - _resignBehavior = resignBehavior; -} - -- (void) applicationWillResignActive { - self->_resigned = YES; - - //Set the audio sesssion to one that allows sharing so that other audio won't be clobbered on resume - [self audioSessionSetCategory:AVAudioSessionCategoryAmbient]; - - switch (_resignBehavior) { - - case kAMRBStopPlay: - - for( CDLongAudioSource *audioSource in audioSourceChannels) { - if (audioSource.isPlaying) { - audioSource->systemPaused = YES; - audioSource->systemPauseLocation = audioSource.audioSourcePlayer.currentTime; - [audioSource stop]; - } else { - //Music is either paused or stopped, if it is paused it will be restarted - //by OS so we will stop it. - audioSource->systemPaused = NO; - [audioSource stop]; - } - } - break; - - case kAMRBStop: - //Stop music regardless of whether it is playing or not because if it was paused - //then the OS would resume it - for( CDLongAudioSource *audioSource in audioSourceChannels) { - [audioSource stop]; - } - - default: - break; - - } - CDLOGINFO(@"Denshion::CDAudioManager - handled resign active"); -} - -//Called when application resigns active only if setResignBehavior has been called -- (void) applicationWillResignActive:(NSNotification *) notification -{ - [self applicationWillResignActive]; -} - -- (void) applicationDidBecomeActive { - - if (self->_resigned) { - _resigned = NO; - //Reset the mode incase something changed with audio while we were inactive - [self setMode:_mode]; - switch (_resignBehavior) { - - case kAMRBStopPlay: - - //Music had been stopped but stop maintains current time - //so playing again will continue from where music was before resign active. - //We check if music can be played because while we were inactive the user might have - //done something that should force music to not play such as starting a track in the iPod - if (self.willPlayBackgroundMusic) { - for( CDLongAudioSource *audioSource in audioSourceChannels) { - if (audioSource->systemPaused) { - [audioSource resume]; - audioSource->systemPaused = NO; - } - } - } - break; - - default: - break; - - } - CDLOGINFO(@"Denshion::CDAudioManager - audio manager handled become active"); - } -} - -//Called when application becomes active only if setResignBehavior has been called -- (void) applicationDidBecomeActive:(NSNotification *) notification -{ - [self applicationDidBecomeActive]; -} - -//Called when application terminates only if setResignBehavior has been called -- (void) applicationWillTerminate:(NSNotification *) notification -{ - CDLOGINFO(@"Denshion::CDAudioManager - audio manager handling terminate"); - [self stopBackgroundMusic]; -} - -/** The audio source completed playing */ -- (void) cdAudioSourceDidFinishPlaying:(CDLongAudioSource *) audioSource { - CDLOGINFO(@"Denshion::CDAudioManager - audio manager got told background music finished"); - if (backgroundMusicCompletionSelector != nil) { - [backgroundMusicCompletionListener performSelector:backgroundMusicCompletionSelector]; - } -} - --(void) beginInterruption { - CDLOGINFO(@"Denshion::CDAudioManager - begin interruption"); - [self audioSessionInterrupted]; -} - --(void) endInterruption { - CDLOGINFO(@"Denshion::CDAudioManager - end interruption"); - [self audioSessionResumed]; -} - -#if __IPHONE_OS_VERSION_MAX_ALLOWED >= 40000 --(void) endInterruptionWithFlags:(NSUInteger)flags { - CDLOGINFO(@"Denshion::CDAudioManager - interruption ended with flags %i",flags); - if (flags == AVAudioSessionInterruptionFlags_ShouldResume) { - [self audioSessionResumed]; - } -} -#endif - --(void)audioSessionInterrupted -{ - if (!_interrupted) { - CDLOGINFO(@"Denshion::CDAudioManager - Audio session interrupted"); - _interrupted = YES; - - // Deactivate the current audio session - [self audioSessionSetActive:NO]; - - if (alcGetCurrentContext() != NULL) { - CDLOGINFO(@"Denshion::CDAudioManager - Setting OpenAL context to NULL"); - - ALenum error = AL_NO_ERROR; - - // set the current context to NULL will 'shutdown' openAL - alcMakeContextCurrent(NULL); - - if((error = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDAudioManager - Error making context current %x\n", error); - } - #pragma unused(error) - } - } -} - --(void)audioSessionResumed -{ - if (_interrupted) { - CDLOGINFO(@"Denshion::CDAudioManager - Audio session resumed"); - _interrupted = NO; - - BOOL activationResult = NO; - // Reactivate the current audio session - activationResult = [self audioSessionSetActive:YES]; - - //This code is to handle a problem with iOS 4.0 and 4.01 where reactivating the session can fail if - //task switching is performed too rapidly. A test case that reliably reproduces the issue is to call the - //iPhone and then hang up after two rings (timing may vary ;)) - //Basically we keep waiting and trying to let the OS catch up with itself but the number of tries is - //limited. - if (!activationResult) { - CDLOG(@"Denshion::CDAudioManager - Failure reactivating audio session, will try wait-try cycle"); - int activateCount = 0; - while (!activationResult && activateCount < 10) { - [NSThread sleepForTimeInterval:0.5]; - activationResult = [self audioSessionSetActive:YES]; - activateCount++; - CDLOGINFO(@"Denshion::CDAudioManager - Reactivation attempt %i status = %i",activateCount,activationResult); - } - } - - if (alcGetCurrentContext() == NULL) { - CDLOGINFO(@"Denshion::CDAudioManager - Restoring OpenAL context"); - ALenum error = AL_NO_ERROR; - // Restore open al context - alcMakeContextCurrent([soundEngine openALContext]); - if((error = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDAudioManager - Error making context current%x\n", error); - } - #pragma unused(error) - } - } -} - -+(void) end { - [sharedManager release]; - sharedManager = nil; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -@implementation CDLongAudioSourceFader - --(void) _setTargetProperty:(float) newVal { - ((CDLongAudioSource*)target).volume = newVal; -} - --(float) _getTargetProperty { - return ((CDLongAudioSource*)target).volume; -} - --(void) _stopTarget { - //Pause instead of stop as stop releases resources and causes problems in the simulator - [((CDLongAudioSource*)target) pause]; -} - --(Class) _allowableType { - return [CDLongAudioSource class]; -} - -@end -/////////////////////////////////////////////////////////////////////////////////////// -@implementation CDBufferManager - --(id) initWithEngine:(CDSoundEngine *) theSoundEngine { - if ((self = [super init])) { - soundEngine = theSoundEngine; - loadedBuffers = [[NSMutableDictionary alloc] initWithCapacity:CD_BUFFERS_START]; - freedBuffers = [[NSMutableArray alloc] init]; - nextBufferId = 0; - } - return self; -} - --(void) dealloc { - [loadedBuffers release]; - [freedBuffers release]; - [super dealloc]; -} - --(int) bufferForFile:(NSString*) filePath create:(BOOL) create { - - NSNumber* soundId = (NSNumber*)[loadedBuffers objectForKey:filePath]; - if(soundId == nil) - { - if (create) { - NSNumber* bufferId = nil; - //First try to get a buffer from the free buffers - if ([freedBuffers count] > 0) { - bufferId = [[[freedBuffers lastObject] retain] autorelease]; - [freedBuffers removeLastObject]; - CDLOGINFO(@"Denshion::CDBufferManager reusing buffer id %i",[bufferId intValue]); - } else { - bufferId = [[NSNumber alloc] initWithInt:nextBufferId]; - [bufferId autorelease]; - CDLOGINFO(@"Denshion::CDBufferManager generating new buffer id %i",[bufferId intValue]); - nextBufferId++; - } - - if ([soundEngine loadBuffer:[bufferId intValue] filePath:filePath]) { - //File successfully loaded - CDLOGINFO(@"Denshion::CDBufferManager buffer loaded %@ %@",bufferId,filePath); - [loadedBuffers setObject:bufferId forKey:filePath]; - return [bufferId intValue]; - } else { - //File didn't load, put buffer id on free list - [freedBuffers addObject:bufferId]; - return kCDNoBuffer; - } - } else { - //No matching buffer was found - return kCDNoBuffer; - } - } else { - return [soundId intValue]; - } -} - --(void) releaseBufferForFile:(NSString *) filePath { - int bufferId = [self bufferForFile:filePath create:NO]; - if (bufferId != kCDNoBuffer) { - [soundEngine unloadBuffer:bufferId]; - [loadedBuffers removeObjectForKey:filePath]; - NSNumber *freedBufferId = [[NSNumber alloc] initWithInt:bufferId]; - [freedBufferId autorelease]; - [freedBuffers addObject:freedBufferId]; - } -} -@end - - - diff --git a/Littlest/libs/CocosDenshion/CDConfig.h b/Littlest/libs/CocosDenshion/CDConfig.h deleted file mode 100644 index 2bd8f76..0000000 --- a/Littlest/libs/CocosDenshion/CDConfig.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - 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. - - $Id$ - */ -#define COCOSDENSHION_VERSION "Aphex.rc" - - -/** - If enabled code useful for debugging such as parameter check assertions will be performed. - If you experience any problems you should enable this and test your code with a debug build. - */ -//#define CD_DEBUG 1 - -/** - The total number of sounds/buffers that can be loaded assuming memory is sufficient - */ -//Number of buffers slots that will be initially created -#define CD_BUFFERS_START 64 -//Number of buffers that will be added -#define CD_BUFFERS_INCREMENT 16 - -/** - If enabled, OpenAL code will use static buffers. When static buffers are used the audio - data is managed outside of OpenAL, this eliminates a memcpy operation which leads to - higher performance when loading sounds. - - However, the downside is that when the audio data is freed you must - be certain that it is no longer being accessed otherwise your app will crash. Testing on OS 2.2.1 - and 3.1.2 has shown that this may occur if a buffer is being used by a source with state = AL_PLAYING - when the buffer is deleted. If the data is freed too quickly after the source is stopped then - a crash will occur. The implemented workaround is that when static buffers are used the unloadBuffer code will wait for - any playing sources to finish playing before the associated buffer and data are deleted, however, this delay may negate any - performance gains that are achieved during loading. - - Performance tests on a 1st gen iPod running OS 2.2.1 loading the CocosDenshionDemo sounds were ~0.14 seconds without - static buffers and ~0.12 seconds when using static buffers. - - */ -//#define CD_USE_STATIC_BUFFERS 1 - - diff --git a/Littlest/libs/CocosDenshion/CDOpenALSupport.h b/Littlest/libs/CocosDenshion/CDOpenALSupport.h deleted file mode 100644 index 661c69e..0000000 --- a/Littlest/libs/CocosDenshion/CDOpenALSupport.h +++ /dev/null @@ -1,77 +0,0 @@ -/* - - Disclaimer: IMPORTANT: This Apple software is supplied to you by - Apple Inc. ("Apple") in consideration of your agreement to the - following terms, and your use, installation, modification or - redistribution of this Apple software constitutes acceptance of these - terms. If you do not agree with these terms, please do not use, - install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and - subject to these terms, Apple grants you a personal, non-exclusive - license, under Apple's copyrights in this original Apple software (the - "Apple Software"), to use, reproduce, modify and redistribute the Apple - Software, with or without modifications, in source and/or binary forms; - provided that if you redistribute the Apple Software in its entirety and - without modifications, you must retain this notice and the following - text and disclaimers in all such redistributions of the Apple Software. - Neither the name, trademarks, service marks or logos of Apple Inc. - may be used to endorse or promote products derived from the Apple - Software without specific prior written permission from Apple. Except - as expressly stated in this notice, no other rights or licenses, express - or implied, are granted by Apple herein, including but not limited to - any patent rights that may be infringed by your derivative works or by - other works in which the Apple Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE - MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION - THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS - FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND - OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, - MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED - AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), - STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - - Copyright (C) 2009 Apple Inc. All Rights Reserved. - - $Id$ - */ - -/* - This file contains code from version 1.1 and 1.4 of MyOpenALSupport.h taken from Apple's oalTouch version. - The 1.4 version code is used for loading IMA4 files, however, this code causes very noticeable clicking - when used to load wave files that are looped so the 1.1 version code is used specifically for loading - wav files. - */ - -#ifndef __CD_OPENAL_H -#define __CD_OPENAL_H - -#ifdef __cplusplus -extern "C" { -#endif - - -#import -#import -#import - - -//Taken from oalTouch MyOpenALSupport 1.1 -void* CDloadWaveAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate); -void* CDloadCafAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate); -void* CDGetOpenALAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate); - -#ifdef __cplusplus -} -#endif - -#endif - - diff --git a/Littlest/libs/CocosDenshion/CDOpenALSupport.m b/Littlest/libs/CocosDenshion/CDOpenALSupport.m deleted file mode 100644 index ab0df8e..0000000 --- a/Littlest/libs/CocosDenshion/CDOpenALSupport.m +++ /dev/null @@ -1,246 +0,0 @@ -/* - - Disclaimer: IMPORTANT: This Apple software is supplied to you by - Apple Inc. ("Apple") in consideration of your agreement to the - following terms, and your use, installation, modification or - redistribution of this Apple software constitutes acceptance of these - terms. If you do not agree with these terms, please do not use, - install, modify or redistribute this Apple software. - - In consideration of your agreement to abide by the following terms, and - subject to these terms, Apple grants you a personal, non-exclusive - license, under Apple's copyrights in this original Apple software (the - "Apple Software"), to use, reproduce, modify and redistribute the Apple - Software, with or without modifications, in source and/or binary forms; - provided that if you redistribute the Apple Software in its entirety and - without modifications, you must retain this notice and the following - text and disclaimers in all such redistributions of the Apple Software. - Neither the name, trademarks, service marks or logos of Apple Inc. - may be used to endorse or promote products derived from the Apple - Software without specific prior written permission from Apple. Except - as expressly stated in this notice, no other rights or licenses, express - or implied, are granted by Apple herein, including but not limited to - any patent rights that may be infringed by your derivative works or by - other works in which the Apple Software may be incorporated. - - The Apple Software is provided by Apple on an "AS IS" basis. APPLE - MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION - THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS - FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND - OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS. - - IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL - OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, - MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED - AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), - STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - - Copyright (C) 2009 Apple Inc. All Rights Reserved. - - $Id: CDOpenALSupport.h 16 2010-03-11 06:22:10Z steveoldmeadow $ - */ - -#import "CDOpenALSupport.h" -#import "CocosDenshion.h" -#import -#import - -//Taken from oalTouch MyOpenALSupport 1.1 -void* CDloadWaveAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate) -{ - OSStatus err = noErr; - UInt64 fileDataSize = 0; - AudioStreamBasicDescription theFileFormat; - UInt32 thePropertySize = sizeof(theFileFormat); - AudioFileID afid = 0; - void* theData = NULL; - - // Open a file with ExtAudioFileOpen() - err = AudioFileOpenURL(inFileURL, kAudioFileReadPermission, 0, &afid); - if(err) { CDLOG(@"MyGetOpenALAudioData: AudioFileOpenURL FAILED, Error = %ld\n", err); goto Exit; } - - // Get the audio data format - err = AudioFileGetProperty(afid, kAudioFilePropertyDataFormat, &thePropertySize, &theFileFormat); - if(err) { CDLOG(@"MyGetOpenALAudioData: AudioFileGetProperty(kAudioFileProperty_DataFormat) FAILED, Error = %ld\n", err); goto Exit; } - - if (theFileFormat.mChannelsPerFrame > 2) { - CDLOG(@"MyGetOpenALAudioData - Unsupported Format, channel count is greater than stereo\n"); goto Exit; - } - - if ((theFileFormat.mFormatID != kAudioFormatLinearPCM) || (!TestAudioFormatNativeEndian(theFileFormat))) { - CDLOG(@"MyGetOpenALAudioData - Unsupported Format, must be little-endian PCM\n"); goto Exit; - } - - if ((theFileFormat.mBitsPerChannel != 8) && (theFileFormat.mBitsPerChannel != 16)) { - CDLOG(@"MyGetOpenALAudioData - Unsupported Format, must be 8 or 16 bit PCM\n"); goto Exit; - } - - - thePropertySize = sizeof(fileDataSize); - err = AudioFileGetProperty(afid, kAudioFilePropertyAudioDataByteCount, &thePropertySize, &fileDataSize); - if(err) { CDLOG(@"MyGetOpenALAudioData: AudioFileGetProperty(kAudioFilePropertyAudioDataByteCount) FAILED, Error = %ld\n", err); goto Exit; } - - // Read all the data into memory - UInt32 dataSize = (UInt32)fileDataSize; - theData = malloc(dataSize); - if (theData) - { - AudioFileReadBytes(afid, false, 0, &dataSize, theData); - if(err == noErr) - { - // success - *outDataSize = (ALsizei)dataSize; - //This fix was added by me, however, 8 bit sounds have a clipping sound at the end so aren't really usable (SO) - if (theFileFormat.mBitsPerChannel == 16) { - *outDataFormat = (theFileFormat.mChannelsPerFrame > 1) ? AL_FORMAT_STEREO16 : AL_FORMAT_MONO16; - } else { - *outDataFormat = (theFileFormat.mChannelsPerFrame > 1) ? AL_FORMAT_STEREO8 : AL_FORMAT_MONO8; - } - *outSampleRate = (ALsizei)theFileFormat.mSampleRate; - } - else - { - // failure - free (theData); - theData = NULL; // make sure to return NULL - CDLOG(@"MyGetOpenALAudioData: ExtAudioFileRead FAILED, Error = %ld\n", err); goto Exit; - } - } - -Exit: - // Dispose the ExtAudioFileRef, it is no longer needed - if (afid) AudioFileClose(afid); - return theData; -} - -//Taken from oalTouch MyOpenALSupport 1.4 -void* CDloadCafAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate) -{ - OSStatus status = noErr; - BOOL abort = NO; - SInt64 theFileLengthInFrames = 0; - AudioStreamBasicDescription theFileFormat; - UInt32 thePropertySize = sizeof(theFileFormat); - ExtAudioFileRef extRef = NULL; - void* theData = NULL; - AudioStreamBasicDescription theOutputFormat; - UInt32 dataSize = 0; - - // Open a file with ExtAudioFileOpen() - status = ExtAudioFileOpenURL(inFileURL, &extRef); - if (status != noErr) - { - CDLOG(@"MyGetOpenALAudioData: ExtAudioFileOpenURL FAILED, Error = %ld\n", status); - abort = YES; - } - if (abort) - goto Exit; - - // Get the audio data format - status = ExtAudioFileGetProperty(extRef, kExtAudioFileProperty_FileDataFormat, &thePropertySize, &theFileFormat); - if (status != noErr) - { - CDLOG(@"MyGetOpenALAudioData: ExtAudioFileGetProperty(kExtAudioFileProperty_FileDataFormat) FAILED, Error = %ld\n", status); - abort = YES; - } - if (abort) - goto Exit; - - if (theFileFormat.mChannelsPerFrame > 2) - { - CDLOG(@"MyGetOpenALAudioData - Unsupported Format, channel count is greater than stereo\n"); - abort = YES; - } - if (abort) - goto Exit; - - // Set the client format to 16 bit signed integer (native-endian) data - // Maintain the channel count and sample rate of the original source format - theOutputFormat.mSampleRate = theFileFormat.mSampleRate; - theOutputFormat.mChannelsPerFrame = theFileFormat.mChannelsPerFrame; - - theOutputFormat.mFormatID = kAudioFormatLinearPCM; - theOutputFormat.mBytesPerPacket = 2 * theOutputFormat.mChannelsPerFrame; - theOutputFormat.mFramesPerPacket = 1; - theOutputFormat.mBytesPerFrame = 2 * theOutputFormat.mChannelsPerFrame; - theOutputFormat.mBitsPerChannel = 16; - theOutputFormat.mFormatFlags = kAudioFormatFlagsNativeEndian | kAudioFormatFlagIsPacked | kAudioFormatFlagIsSignedInteger; - - // Set the desired client (output) data format - status = ExtAudioFileSetProperty(extRef, kExtAudioFileProperty_ClientDataFormat, sizeof(theOutputFormat), &theOutputFormat); - if (status != noErr) - { - CDLOG(@"MyGetOpenALAudioData: ExtAudioFileSetProperty(kExtAudioFileProperty_ClientDataFormat) FAILED, Error = %ld\n", status); - abort = YES; - } - if (abort) - goto Exit; - - // Get the total frame count - thePropertySize = sizeof(theFileLengthInFrames); - status = ExtAudioFileGetProperty(extRef, kExtAudioFileProperty_FileLengthFrames, &thePropertySize, &theFileLengthInFrames); - if (status != noErr) - { - CDLOG(@"MyGetOpenALAudioData: ExtAudioFileGetProperty(kExtAudioFileProperty_FileLengthFrames) FAILED, Error = %ld\n", status); - abort = YES; - } - if (abort) - goto Exit; - - // Read all the data into memory - dataSize = (UInt32) theFileLengthInFrames * theOutputFormat.mBytesPerFrame; - theData = malloc(dataSize); - if (theData) - { - AudioBufferList theDataBuffer; - theDataBuffer.mNumberBuffers = 1; - theDataBuffer.mBuffers[0].mDataByteSize = dataSize; - theDataBuffer.mBuffers[0].mNumberChannels = theOutputFormat.mChannelsPerFrame; - theDataBuffer.mBuffers[0].mData = theData; - - // Read the data into an AudioBufferList - status = ExtAudioFileRead(extRef, (UInt32*)&theFileLengthInFrames, &theDataBuffer); - if(status == noErr) - { - // success - *outDataSize = (ALsizei)dataSize; - *outDataFormat = (theOutputFormat.mChannelsPerFrame > 1) ? AL_FORMAT_STEREO16 : AL_FORMAT_MONO16; - *outSampleRate = (ALsizei)theOutputFormat.mSampleRate; - } - else - { - // failure - free (theData); - theData = NULL; // make sure to return NULL - CDLOG(@"MyGetOpenALAudioData: ExtAudioFileRead FAILED, Error = %ld\n", status); - abort = YES; - } - } - if (abort) - goto Exit; - -Exit: - // Dispose the ExtAudioFileRef, it is no longer needed - if (extRef) ExtAudioFileDispose(extRef); - return theData; -} - -void* CDGetOpenALAudioData(CFURLRef inFileURL, ALsizei *outDataSize, ALenum *outDataFormat, ALsizei* outSampleRate) { - - CFStringRef extension = CFURLCopyPathExtension(inFileURL); - CFComparisonResult isWavFile = 0; - if (extension != NULL) { - isWavFile = CFStringCompare (extension,(CFStringRef)@"wav", kCFCompareCaseInsensitive); - CFRelease(extension); - } - - if (isWavFile == kCFCompareEqualTo) { - return CDloadWaveAudioData(inFileURL, outDataSize, outDataFormat, outSampleRate); - } else { - return CDloadCafAudioData(inFileURL, outDataSize, outDataFormat, outSampleRate); - } -} - diff --git a/Littlest/libs/CocosDenshion/CocosDenshion.h b/Littlest/libs/CocosDenshion/CocosDenshion.h deleted file mode 100644 index b0a66e4..0000000 --- a/Littlest/libs/CocosDenshion/CocosDenshion.h +++ /dev/null @@ -1,440 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - 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. - - $Id$ - */ - - - -/** -@file -@b IMPORTANT -There are 3 different ways of using CocosDenshion. Depending on which you choose you -will need to include different files and frameworks. - -@par SimpleAudioEngine -This is recommended for basic audio requirements. If you just want to play some sound fx -and some background music and have no interest in learning the lower level workings then -this is the interface to use. - -Requirements: - - Firmware: OS 2.2 or greater - - Files: SimpleAudioEngine.*, CocosDenshion.* - - Frameworks: OpenAL, AudioToolbox, AVFoundation - -@par CDAudioManager -CDAudioManager is basically a thin wrapper around an AVAudioPlayer object used for playing -background music and a CDSoundEngine object used for playing sound effects. It manages the -audio session for you deals with audio session interruption. It is fairly low level and it -is expected you have some understanding of the underlying technologies. For example, for -many use cases regarding background music it is expected you will work directly with the -backgroundMusic AVAudioPlayer which is exposed as a property. - -Requirements: - - Firmware: OS 2.2 or greater - - Files: CDAudioManager.*, CocosDenshion.* - - Frameworks: OpenAL, AudioToolbox, AVFoundation - -@par CDSoundEngine -CDSoundEngine is a sound engine built upon OpenAL and derived from Apple's oalTouch -example. It can playback up to 32 sounds simultaneously with control over pitch, pan -and gain. It can be set up to handle audio session interruption automatically. You -may decide to use CDSoundEngine directly instead of CDAudioManager or SimpleAudioEngine -because you require OS 2.0 compatibility. - -Requirements: - - Firmware: OS 2.0 or greater - - Files: CocosDenshion.* - - Frameworks: OpenAL, AudioToolbox - -*/ - -#import -#import -#import -#import -#import "CDConfig.h" - - -#if !defined(CD_DEBUG) || CD_DEBUG == 0 -#define CDLOG(...) do {} while (0) -#define CDLOGINFO(...) do {} while (0) - -#elif CD_DEBUG == 1 -#define CDLOG(...) NSLog(__VA_ARGS__) -#define CDLOGINFO(...) do {} while (0) - -#elif CD_DEBUG > 1 -#define CDLOG(...) NSLog(__VA_ARGS__) -#define CDLOGINFO(...) NSLog(__VA_ARGS__) -#endif // CD_DEBUG - - -#import "CDOpenALSupport.h" - -//Tested source limit on 2.2.1 and 3.1.2 with up to 128 sources and appears to work. Older OS versions e.g 2.2 may support only 32 -#define CD_SOURCE_LIMIT 32 //Total number of sources we will ever want, may actually get less -#define CD_NO_SOURCE 0xFEEDFAC //Return value indicating playback failed i.e. no source -#define CD_IGNORE_AUDIO_SESSION 0xBEEFBEE //Used internally to indicate audio session will not be handled -#define CD_MUTE 0xFEEDBAB //Return value indicating sound engine is muted or non functioning -#define CD_NO_SOUND = -1; - -#define CD_SAMPLE_RATE_HIGH 44100 -#define CD_SAMPLE_RATE_MID 22050 -#define CD_SAMPLE_RATE_LOW 16000 -#define CD_SAMPLE_RATE_BASIC 8000 -#define CD_SAMPLE_RATE_DEFAULT 44100 - -extern NSString * const kCDN_BadAlContext; -extern NSString * const kCDN_AsynchLoadComplete; - -extern float const kCD_PitchDefault; -extern float const kCD_PitchLowerOneOctave; -extern float const kCD_PitchHigherOneOctave; -extern float const kCD_PanDefault; -extern float const kCD_PanFullLeft; -extern float const kCD_PanFullRight; -extern float const kCD_GainDefault; - -enum bufferState { - CD_BS_EMPTY = 0, - CD_BS_LOADED = 1, - CD_BS_FAILED = 2 -}; - -typedef struct _sourceGroup { - int startIndex; - int currentIndex; - int totalSources; - bool enabled; - bool nonInterruptible; - int *sourceStatuses;//pointer into array of source status information -} sourceGroup; - -typedef struct _bufferInfo { - ALuint bufferId; - int bufferState; - void* bufferData; - ALenum format; - ALsizei sizeInBytes; - ALsizei frequencyInHertz; -} bufferInfo; - -typedef struct _sourceInfo { - bool usable; - ALuint sourceId; - ALuint attachedBufferId; -} sourceInfo; - -#pragma mark CDAudioTransportProtocol - -@protocol CDAudioTransportProtocol -/** Play the audio */ --(BOOL) play; -/** Pause the audio, retain resources */ --(BOOL) pause; -/** Stop the audio, release resources */ --(BOOL) stop; -/** Return playback to beginning */ --(BOOL) rewind; -@end - -#pragma mark CDAudioInterruptProtocol - -@protocol CDAudioInterruptProtocol -/** Is audio mute */ --(BOOL) mute; -/** If YES then audio is silenced but not stopped, calls to start new audio will proceed but silently */ --(void) setMute:(BOOL) muteValue; -/** Is audio enabled */ --(BOOL) enabled; -/** If NO then all audio is stopped and any calls to start new audio will be ignored */ --(void) setEnabled:(BOOL) enabledValue; -@end - -#pragma mark CDUtilities -/** - Collection of utilities required by CocosDenshion - */ -@interface CDUtilities : NSObject -{ -} - -/** Fundamentally the same as the corresponding method is CCFileUtils but added to break binding to cocos2d */ -+(NSString*) fullPathFromRelativePath:(NSString*) relPath; - -@end - - -#pragma mark CDSoundEngine - -/** CDSoundEngine is built upon OpenAL and works with SDK 2.0. - CDSoundEngine is a sound engine built upon OpenAL and derived from Apple's oalTouch - example. It can playback up to 32 sounds simultaneously with control over pitch, pan - and gain. It can be set up to handle audio session interruption automatically. You - may decide to use CDSoundEngine directly instead of CDAudioManager or SimpleAudioEngine - because you require OS 2.0 compatibility. - - Requirements: - - Firmware: OS 2.0 or greater - - Files: CocosDenshion.* - - Frameworks: OpenAL, AudioToolbox - - @since v0.8 - */ -@class CDSoundSource; -@interface CDSoundEngine : NSObject { - - bufferInfo *_buffers; - sourceInfo *_sources; - sourceGroup *_sourceGroups; - ALCcontext *context; - int _sourceGroupTotal; - UInt32 _audioSessionCategory; - BOOL _handleAudioSession; - ALfloat _preMuteGain; - NSObject *_mutexBufferLoad; - BOOL mute_; - BOOL enabled_; - - ALenum lastErrorCode_; - BOOL functioning_; - float asynchLoadProgress_; - BOOL getGainWorks_; - - //For managing dynamic allocation of sources and buffers - int sourceTotal_; - int bufferTotal; - -} - -@property (readwrite, nonatomic) ALfloat masterGain; -@property (readonly) ALenum lastErrorCode;//Last OpenAL error code that was generated -@property (readonly) BOOL functioning;//Is the sound engine functioning -@property (readwrite) float asynchLoadProgress; -@property (readonly) BOOL getGainWorks;//Does getting the gain for a source work -/** Total number of sources available */ -@property (readonly) int sourceTotal; -/** Total number of source groups that have been defined */ -@property (readonly) int sourceGroupTotal; - -/** Sets the sample rate for the audio mixer. For best performance this should match the sample rate of your audio content */ -+(void) setMixerSampleRate:(Float32) sampleRate; - -/** Initializes the engine with a group definition and a total number of groups */ --(id)init; - -/** Plays a sound in a channel group with a pitch, pan and gain. The sound could played looped or not */ --(ALuint) playSound:(int) soundId sourceGroupId:(int)sourceGroupId pitch:(float) pitch pan:(float) pan gain:(float) gain loop:(BOOL) loop; - -/** Creates and returns a sound source object for the specified sound within the specified source group. - */ --(CDSoundSource *) soundSourceForSound:(int) soundId sourceGroupId:(int) sourceGroupId; - -/** Stops playing a sound */ -- (void) stopSound:(ALuint) sourceId; -/** Stops playing a source group */ -- (void) stopSourceGroup:(int) sourceGroupId; -/** Stops all playing sounds */ --(void) stopAllSounds; --(void) defineSourceGroups:(NSArray*) sourceGroupDefinitions; --(void) defineSourceGroups:(int[]) sourceGroupDefinitions total:(int) total; --(void) setSourceGroupNonInterruptible:(int) sourceGroupId isNonInterruptible:(BOOL) isNonInterruptible; --(void) setSourceGroupEnabled:(int) sourceGroupId enabled:(BOOL) enabled; --(BOOL) sourceGroupEnabled:(int) sourceGroupId; --(BOOL) loadBufferFromData:(int) soundId soundData:(ALvoid*) soundData format:(ALenum) format size:(ALsizei) size freq:(ALsizei) freq; --(BOOL) loadBuffer:(int) soundId filePath:(NSString*) filePath; --(void) loadBuffersAsynchronously:(NSArray *) loadRequests; --(BOOL) unloadBuffer:(int) soundId; --(ALCcontext *) openALContext; - -/** Returns the duration of the buffer in seconds or a negative value if the buffer id is invalid */ --(float) bufferDurationInSeconds:(int) soundId; -/** Returns the size of the buffer in bytes or a negative value if the buffer id is invalid */ --(ALsizei) bufferSizeInBytes:(int) soundId; -/** Returns the sampling frequency of the buffer in hertz or a negative value if the buffer id is invalid */ --(ALsizei) bufferFrequencyInHertz:(int) soundId; - -/** Used internally, never call unless you know what you are doing */ --(void) _soundSourcePreRelease:(CDSoundSource *) soundSource; - -@end - -#pragma mark CDSoundSource -/** CDSoundSource is a wrapper around an OpenAL sound source. - It allows you to manipulate properties such as pitch, gain, pan and looping while the - sound is playing. CDSoundSource is based on the old CDSourceWrapper class but with much - added functionality. - - @since v1.0 - */ -@interface CDSoundSource : NSObject { - ALenum lastError; -@public - ALuint _sourceId; - ALuint _sourceIndex; - CDSoundEngine* _engine; - int _soundId; - float _preMuteGain; - BOOL enabled_; - BOOL mute_; -} -@property (readwrite, nonatomic) float pitch; -@property (readwrite, nonatomic) float gain; -@property (readwrite, nonatomic) float pan; -@property (readwrite, nonatomic) BOOL looping; -@property (readonly) BOOL isPlaying; -@property (readwrite, nonatomic) int soundId; -/** Returns the duration of the attached buffer in seconds or a negative value if the buffer is invalid */ -@property (readonly) float durationInSeconds; - -/** Stores the last error code that occurred. Check against AL_NO_ERROR */ -@property (readonly) ALenum lastError; -/** Do not init yourself, get an instance from the sourceForSound factory method on CDSoundEngine */ --(id)init:(ALuint) theSourceId sourceIndex:(int) index soundEngine:(CDSoundEngine*) engine; - -@end - -#pragma mark CDAudioInterruptTargetGroup - -/** Container for objects that implement audio interrupt protocol i.e. they can be muted and enabled. - Setting mute and enabled for the group propagates to all children. - Designed to be used with your CDSoundSource objects to get them to comply with global enabled and mute settings - if that is what you want to do.*/ -@interface CDAudioInterruptTargetGroup : NSObject { - BOOL mute_; - BOOL enabled_; - NSMutableArray *children_; -} --(void) addAudioInterruptTarget:(NSObject*) interruptibleTarget; -@end - -#pragma mark CDAsynchBufferLoader - -/** CDAsynchBufferLoader - TODO - */ -@interface CDAsynchBufferLoader : NSOperation { - NSArray *_loadRequests; - CDSoundEngine *_soundEngine; -} - --(id) init:(NSArray *)loadRequests soundEngine:(CDSoundEngine *) theSoundEngine; - -@end - -#pragma mark CDBufferLoadRequest - -/** CDBufferLoadRequest */ -@interface CDBufferLoadRequest: NSObject -{ - NSString *filePath; - int soundId; - //id loader; -} - -@property (readonly) NSString *filePath; -@property (readonly) int soundId; - -- (id)init:(int) theSoundId filePath:(const NSString *) theFilePath; -@end - -/** Interpolation type */ -typedef enum { - kIT_Linear, //!Straight linear interpolation fade - kIT_SCurve, //!S curved interpolation - kIT_Exponential //!Exponential interpolation -} tCDInterpolationType; - -#pragma mark CDFloatInterpolator -@interface CDFloatInterpolator: NSObject -{ - float start; - float end; - float lastValue; - tCDInterpolationType interpolationType; -} -@property (readwrite, nonatomic) float start; -@property (readwrite, nonatomic) float end; -@property (readwrite, nonatomic) tCDInterpolationType interpolationType; - -/** Return a value between min and max based on t which represents fractional progress where 0 is the start - and 1 is the end */ --(float) interpolate:(float) t; --(id) init:(tCDInterpolationType) type startVal:(float) startVal endVal:(float) endVal; - -@end - -#pragma mark CDPropertyModifier - -/** Base class for classes that modify properties such as pitch, pan and gain */ -@interface CDPropertyModifier: NSObject -{ - CDFloatInterpolator *interpolator; - float startValue; - float endValue; - id target; - BOOL stopTargetWhenComplete; - -} -@property (readwrite, nonatomic) BOOL stopTargetWhenComplete; -@property (readwrite, nonatomic) float startValue; -@property (readwrite, nonatomic) float endValue; -@property (readwrite, nonatomic) tCDInterpolationType interpolationType; - --(id) init:(id) theTarget interpolationType:(tCDInterpolationType) type startVal:(float) startVal endVal:(float) endVal; -/** Set to a fractional value between 0 and 1 where 0 equals the start and 1 equals the end*/ --(void) modify:(float) t; - --(void) _setTargetProperty:(float) newVal; --(float) _getTargetProperty; --(void) _stopTarget; --(Class) _allowableType; - -@end - -#pragma mark CDSoundSourceFader - -/** Fader for CDSoundSource objects */ -@interface CDSoundSourceFader : CDPropertyModifier{} -@end - -#pragma mark CDSoundSourcePanner - -/** Panner for CDSoundSource objects */ -@interface CDSoundSourcePanner : CDPropertyModifier{} -@end - -#pragma mark CDSoundSourcePitchBender - -/** Pitch bender for CDSoundSource objects */ -@interface CDSoundSourcePitchBender : CDPropertyModifier{} -@end - -#pragma mark CDSoundEngineFader - -/** Fader for CDSoundEngine objects */ -@interface CDSoundEngineFader : CDPropertyModifier{} -@end - - - - diff --git a/Littlest/libs/CocosDenshion/CocosDenshion.m b/Littlest/libs/CocosDenshion/CocosDenshion.m deleted file mode 100644 index 876a952..0000000 --- a/Littlest/libs/CocosDenshion/CocosDenshion.m +++ /dev/null @@ -1,1598 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - 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. - - $Id$ - */ - -#import "CocosDenshion.h" - -typedef ALvoid AL_APIENTRY (*alBufferDataStaticProcPtr) (const ALint bid, ALenum format, ALvoid* data, ALsizei size, ALsizei freq); -ALvoid alBufferDataStaticProc(const ALint bid, ALenum format, ALvoid* data, ALsizei size, ALsizei freq) -{ - static alBufferDataStaticProcPtr proc = NULL; - - if (proc == NULL) { - proc = (alBufferDataStaticProcPtr) alcGetProcAddress(NULL, (const ALCchar*) "alBufferDataStatic"); - } - - if (proc) - proc(bid, format, data, size, freq); - - return; -} - -typedef ALvoid AL_APIENTRY (*alcMacOSXMixerOutputRateProcPtr) (const ALdouble value); -ALvoid alcMacOSXMixerOutputRateProc(const ALdouble value) -{ - static alcMacOSXMixerOutputRateProcPtr proc = NULL; - - if (proc == NULL) { - proc = (alcMacOSXMixerOutputRateProcPtr) alcGetProcAddress(NULL, (const ALCchar*) "alcMacOSXMixerOutputRate"); - } - - if (proc) - proc(value); - - return; -} - -NSString * const kCDN_BadAlContext = @"kCDN_BadAlContext"; -NSString * const kCDN_AsynchLoadComplete = @"kCDN_AsynchLoadComplete"; -float const kCD_PitchDefault = 1.0f; -float const kCD_PitchLowerOneOctave = 0.5f; -float const kCD_PitchHigherOneOctave = 2.0f; -float const kCD_PanDefault = 0.0f; -float const kCD_PanFullLeft = -1.0f; -float const kCD_PanFullRight = 1.0f; -float const kCD_GainDefault = 1.0f; - -@interface CDSoundEngine (PrivateMethods) --(BOOL) _initOpenAL; --(void) _testGetGain; --(void) _dumpSourceGroupsInfo; --(void) _getSourceIndexForSourceGroup; --(void) _freeSourceGroups; --(BOOL) _setUpSourceGroups:(int[]) definitions total:(int) total; -@end - -#pragma mark - -#pragma mark CDUtilities - -@implementation CDUtilities - -+(NSString*) fullPathFromRelativePath:(NSString*) relPath -{ - // do not convert an absolute path (starting with '/') - if(([relPath length] > 0) && ([relPath characterAtIndex:0] == '/')) - { - return relPath; - } - - NSMutableArray *imagePathComponents = [NSMutableArray arrayWithArray:[relPath pathComponents]]; - NSString *file = [imagePathComponents lastObject]; - - [imagePathComponents removeLastObject]; - NSString *imageDirectory = [NSString pathWithComponents:imagePathComponents]; - - NSString *fullpath = [[NSBundle mainBundle] pathForResource:file ofType:nil inDirectory:imageDirectory]; - if (fullpath == nil) - fullpath = relPath; - - return fullpath; -} - -@end - -#pragma mark - -#pragma mark CDSoundEngine - -@implementation CDSoundEngine - -static Float32 _mixerSampleRate; -static BOOL _mixerRateSet = NO; - -@synthesize lastErrorCode = lastErrorCode_; -@synthesize functioning = functioning_; -@synthesize asynchLoadProgress = asynchLoadProgress_; -@synthesize getGainWorks = getGainWorks_; -@synthesize sourceTotal = sourceTotal_; - -+ (void) setMixerSampleRate:(Float32) sampleRate { - _mixerRateSet = YES; - _mixerSampleRate = sampleRate; -} - -- (void) _testGetGain { - float testValue = 0.7f; - ALuint testSourceId = _sources[0].sourceId; - alSourcef(testSourceId, AL_GAIN, 0.0f);//Start from know value - alSourcef(testSourceId, AL_GAIN, testValue); - ALfloat gainVal; - alGetSourcef(testSourceId, AL_GAIN, &gainVal); - getGainWorks_ = (gainVal == testValue); -} - -//Generate sources one at a time until we fail --(void) _generateSources { - - _sources = (sourceInfo*)malloc( sizeof(_sources[0]) * CD_SOURCE_LIMIT); - BOOL hasFailed = NO; - sourceTotal_ = 0; - alGetError();//Clear error - while (!hasFailed && sourceTotal_ < CD_SOURCE_LIMIT) { - alGenSources(1, &(_sources[sourceTotal_].sourceId)); - if (alGetError() == AL_NO_ERROR) { - //Now try attaching source to null buffer - alSourcei(_sources[sourceTotal_].sourceId, AL_BUFFER, 0); - if (alGetError() == AL_NO_ERROR) { - _sources[sourceTotal_].usable = true; - sourceTotal_++; - } else { - hasFailed = YES; - } - } else { - _sources[sourceTotal_].usable = false; - hasFailed = YES; - } - } - //Mark the rest of the sources as not usable - for (int i=sourceTotal_; i < CD_SOURCE_LIMIT; i++) { - _sources[i].usable = false; - } -} - --(void) _generateBuffers:(int) startIndex endIndex:(int) endIndex { - if (_buffers) { - alGetError(); - for (int i=startIndex; i <= endIndex; i++) { - alGenBuffers(1, &_buffers[i].bufferId); - _buffers[i].bufferData = NULL; - if (alGetError() == AL_NO_ERROR) { - _buffers[i].bufferState = CD_BS_EMPTY; - } else { - _buffers[i].bufferState = CD_BS_FAILED; - CDLOG(@"Denshion::CDSoundEngine - buffer creation failed %i",i); - } - } - } -} - -/** - * Internal method called during init - */ -- (BOOL) _initOpenAL -{ - //ALenum error; - context = NULL; - ALCdevice *newDevice = NULL; - - //Set the mixer rate for the audio mixer - if (!_mixerRateSet) { - _mixerSampleRate = CD_SAMPLE_RATE_DEFAULT; - } - alcMacOSXMixerOutputRateProc(_mixerSampleRate); - CDLOGINFO(@"Denshion::CDSoundEngine - mixer output rate set to %0.2f",_mixerSampleRate); - - // Create a new OpenAL Device - // Pass NULL to specify the system's default output device - newDevice = alcOpenDevice(NULL); - if (newDevice != NULL) - { - // Create a new OpenAL Context - // The new context will render to the OpenAL Device just created - context = alcCreateContext(newDevice, 0); - if (context != NULL) - { - // Make the new context the Current OpenAL Context - alcMakeContextCurrent(context); - - // Create some OpenAL Buffer Objects - [self _generateBuffers:0 endIndex:bufferTotal-1]; - - // Create some OpenAL Source Objects - [self _generateSources]; - - } - } else { - return FALSE;//No device - } - alGetError();//Clear error - return TRUE; -} - -- (void) dealloc { - - ALCcontext *currentContext = NULL; - ALCdevice *device = NULL; - - [self stopAllSounds]; - - CDLOGINFO(@"Denshion::CDSoundEngine - Deallocing sound engine."); - [self _freeSourceGroups]; - - // Delete the Sources - CDLOGINFO(@"Denshion::CDSoundEngine - deleting sources."); - for (int i=0; i < sourceTotal_; i++) { - alSourcei(_sources[i].sourceId, AL_BUFFER, 0);//Detach from current buffer - alDeleteSources(1, &(_sources[i].sourceId)); - if((lastErrorCode_ = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDSoundEngine - Error deleting source! %x\n", lastErrorCode_); - } - } - - // Delete the Buffers - CDLOGINFO(@"Denshion::CDSoundEngine - deleting buffers."); - for (int i=0; i < bufferTotal; i++) { - alDeleteBuffers(1, &_buffers[i].bufferId); -#ifdef CD_USE_STATIC_BUFFERS - if (_buffers[i].bufferData) { - free(_buffers[i].bufferData); - } -#endif - } - CDLOGINFO(@"Denshion::CDSoundEngine - free buffers."); - free(_buffers); - currentContext = alcGetCurrentContext(); - //Get device for active context - device = alcGetContextsDevice(currentContext); - //Release context - CDLOGINFO(@"Denshion::CDSoundEngine - destroy context."); - alcDestroyContext(currentContext); - //Close device - CDLOGINFO(@"Denshion::CDSoundEngine - close device."); - alcCloseDevice(device); - CDLOGINFO(@"Denshion::CDSoundEngine - free sources."); - free(_sources); - - //Release mutexes - [_mutexBufferLoad release]; - - [super dealloc]; -} - --(int) sourceGroupTotal { - return _sourceGroupTotal; -} - --(void) _freeSourceGroups -{ - CDLOGINFO(@"Denshion::CDSoundEngine freeing source groups"); - if(_sourceGroups) { - for (int i=0; i < _sourceGroupTotal; i++) { - if (_sourceGroups[i].sourceStatuses) { - free(_sourceGroups[i].sourceStatuses); - CDLOGINFO(@"Denshion::CDSoundEngine freed source statuses %i",i); - } - } - free(_sourceGroups); - } -} - --(BOOL) _redefineSourceGroups:(int[]) definitions total:(int) total -{ - if (_sourceGroups) { - //Stop all sounds - [self stopAllSounds]; - //Need to free source groups - [self _freeSourceGroups]; - } - return [self _setUpSourceGroups:definitions total:total]; -} - --(BOOL) _setUpSourceGroups:(int[]) definitions total:(int) total -{ - _sourceGroups = (sourceGroup *)malloc( sizeof(_sourceGroups[0]) * total); - if(!_sourceGroups) { - CDLOG(@"Denshion::CDSoundEngine - source groups memory allocation failed"); - return NO; - } - - _sourceGroupTotal = total; - int sourceCount = 0; - for (int i=0; i < _sourceGroupTotal; i++) { - - _sourceGroups[i].startIndex = 0; - _sourceGroups[i].currentIndex = _sourceGroups[i].startIndex; - _sourceGroups[i].enabled = false; - _sourceGroups[i].nonInterruptible = false; - _sourceGroups[i].totalSources = definitions[i]; - _sourceGroups[i].sourceStatuses = malloc(sizeof(_sourceGroups[i].sourceStatuses[0]) * _sourceGroups[i].totalSources); - if (_sourceGroups[i].sourceStatuses) { - for (int j=0; j < _sourceGroups[i].totalSources; j++) { - //First bit is used to indicate whether source is locked, index is shifted back 1 bit - _sourceGroups[i].sourceStatuses[j] = (sourceCount + j) << 1; - } - } - sourceCount += definitions[i]; - } - return YES; -} - --(void) defineSourceGroups:(int[]) sourceGroupDefinitions total:(int) total { - [self _redefineSourceGroups:sourceGroupDefinitions total:total]; -} - --(void) defineSourceGroups:(NSArray*) sourceGroupDefinitions { - CDLOGINFO(@"Denshion::CDSoundEngine - source groups defined by NSArray."); - int totalDefs = [sourceGroupDefinitions count]; - int* defs = (int *)malloc( sizeof(int) * totalDefs); - int currentIndex = 0; - for (id currentDef in sourceGroupDefinitions) { - if ([currentDef isKindOfClass:[NSNumber class]]) { - defs[currentIndex] = [(NSNumber*)currentDef integerValue]; - CDLOGINFO(@"Denshion::CDSoundEngine - found definition %i.",defs[currentIndex]); - } else { - CDLOG(@"Denshion::CDSoundEngine - warning, did not understand source definition."); - defs[currentIndex] = 0; - } - currentIndex++; - } - [self _redefineSourceGroups:defs total:totalDefs]; - free(defs); -} - -- (id)init -{ - if ((self = [super init])) { - - //Create mutexes - _mutexBufferLoad = [[NSObject alloc] init]; - - asynchLoadProgress_ = 0.0f; - - bufferTotal = CD_BUFFERS_START; - _buffers = (bufferInfo *)malloc( sizeof(_buffers[0]) * bufferTotal); - - // Initialize our OpenAL environment - if ([self _initOpenAL]) { - //Set up the default source group - a single group that contains all the sources - int sourceDefs[1]; - sourceDefs[0] = self.sourceTotal; - [self _setUpSourceGroups:sourceDefs total:1]; - - functioning_ = YES; - //Synchronize premute gain - _preMuteGain = self.masterGain; - mute_ = NO; - enabled_ = YES; - //Test whether get gain works for sources - [self _testGetGain]; - } else { - //Something went wrong with OpenAL - functioning_ = NO; - } - } - - return self; -} - -/** - * Delete the buffer identified by soundId - * @return true if buffer deleted successfully, otherwise false - */ -- (BOOL) unloadBuffer:(int) soundId -{ - //Ensure soundId is within array bounds otherwise memory corruption will occur - if (soundId < 0 || soundId >= bufferTotal) { - CDLOG(@"Denshion::CDSoundEngine - soundId is outside array bounds, maybe you need to increase CD_MAX_BUFFERS"); - return FALSE; - } - - //Before a buffer can be deleted any sources that are attached to it must be stopped - for (int i=0; i < sourceTotal_; i++) { - //Note: tried getting the AL_BUFFER attribute of the source instead but doesn't - //appear to work on a device - just returned zero. - if (_buffers[soundId].bufferId == _sources[i].attachedBufferId) { - - CDLOG(@"Denshion::CDSoundEngine - Found attached source %i %i %i",i,_buffers[soundId].bufferId,_sources[i].sourceId); -#ifdef CD_USE_STATIC_BUFFERS - //When using static buffers a crash may occur if a source is playing with a buffer that is about - //to be deleted even though we stop the source and successfully delete the buffer. Crash is confirmed - //on 2.2.1 and 3.1.2, however, it will only occur if a source is used rapidly after having its prior - //data deleted. To avoid any possibility of the crash we wait for the source to finish playing. - ALint state; - - alGetSourcei(_sources[i].sourceId, AL_SOURCE_STATE, &state); - - if (state == AL_PLAYING) { - CDLOG(@"Denshion::CDSoundEngine - waiting for source to complete playing before removing buffer data"); - alSourcei(_sources[i].sourceId, AL_LOOPING, FALSE);//Turn off looping otherwise loops will never end - while (state == AL_PLAYING) { - alGetSourcei(_sources[i].sourceId, AL_SOURCE_STATE, &state); - usleep(10000); - } - } -#endif - //Stop source and detach - alSourceStop(_sources[i].sourceId); - if((lastErrorCode_ = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDSoundEngine - error stopping source: %x\n", lastErrorCode_); - } - - alSourcei(_sources[i].sourceId, AL_BUFFER, 0);//Attach to "NULL" buffer to detach - if((lastErrorCode_ = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDSoundEngine - error detaching buffer: %x\n", lastErrorCode_); - } else { - //Record that source is now attached to nothing - _sources[i].attachedBufferId = 0; - } - } - } - - alDeleteBuffers(1, &_buffers[soundId].bufferId); - if((lastErrorCode_ = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDSoundEngine - error deleting buffer: %x\n", lastErrorCode_); - _buffers[soundId].bufferState = CD_BS_FAILED; - return FALSE; - } else { -#ifdef CD_USE_STATIC_BUFFERS - //Free previous data, if alDeleteBuffer has returned without error then no - if (_buffers[soundId].bufferData) { - CDLOGINFO(@"Denshion::CDSoundEngine - freeing static data for soundId %i @ %i",soundId,_buffers[soundId].bufferData); - free(_buffers[soundId].bufferData);//Free the old data - _buffers[soundId].bufferData = NULL; - } -#endif - } - - alGenBuffers(1, &_buffers[soundId].bufferId); - if((lastErrorCode_ = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDSoundEngine - error regenerating buffer: %x\n", lastErrorCode_); - _buffers[soundId].bufferState = CD_BS_FAILED; - return FALSE; - } else { - //We now have an empty buffer - _buffers[soundId].bufferState = CD_BS_EMPTY; - CDLOGINFO(@"Denshion::CDSoundEngine - buffer %i successfully unloaded\n",soundId); - return TRUE; - } -} - -/** - * Load buffers asynchronously - * Check asynchLoadProgress for progress. asynchLoadProgress represents fraction of completion. When it equals 1.0 loading - * is complete. NB: asynchLoadProgress is simply based on the number of load requests, it does not take into account - * file sizes. - * @param An array of CDBufferLoadRequest objects - */ -- (void) loadBuffersAsynchronously:(NSArray *) loadRequests { - @synchronized(self) { - asynchLoadProgress_ = 0.0f; - CDAsynchBufferLoader *loaderOp = [[[CDAsynchBufferLoader alloc] init:loadRequests soundEngine:self] autorelease]; - NSOperationQueue *opQ = [[[NSOperationQueue alloc] init] autorelease]; - [opQ addOperation:loaderOp]; - } -} - --(BOOL) _resizeBuffers:(int) increment { - - void * tmpBufferInfos = realloc( _buffers, sizeof(_buffers[0]) * (bufferTotal + increment) ); - - if(!tmpBufferInfos) { - free(tmpBufferInfos); - return NO; - } else { - _buffers = tmpBufferInfos; - int oldBufferTotal = bufferTotal; - bufferTotal = bufferTotal + increment; - [self _generateBuffers:oldBufferTotal endIndex:bufferTotal-1]; - return YES; - } -} - --(BOOL) loadBufferFromData:(int) soundId soundData:(ALvoid*) soundData format:(ALenum) format size:(ALsizei) size freq:(ALsizei) freq { - - @synchronized(_mutexBufferLoad) { - - if (!functioning_) { - //OpenAL initialisation has previously failed - CDLOG(@"Denshion::CDSoundEngine - Loading buffer failed because sound engine state != functioning"); - return FALSE; - } - - //Ensure soundId is within array bounds otherwise memory corruption will occur - if (soundId < 0) { - CDLOG(@"Denshion::CDSoundEngine - soundId is negative"); - return FALSE; - } - - if (soundId >= bufferTotal) { - //Need to resize the buffers - int requiredIncrement = CD_BUFFERS_INCREMENT; - while (bufferTotal + requiredIncrement < soundId) { - requiredIncrement += CD_BUFFERS_INCREMENT; - } - CDLOGINFO(@"Denshion::CDSoundEngine - attempting to resize buffers by %i for sound %i",requiredIncrement,soundId); - if (![self _resizeBuffers:requiredIncrement]) { - CDLOG(@"Denshion::CDSoundEngine - buffer resize failed"); - return FALSE; - } - } - - if (soundData) - { - if (_buffers[soundId].bufferState != CD_BS_EMPTY) { - CDLOGINFO(@"Denshion::CDSoundEngine - non empty buffer, regenerating"); - if (![self unloadBuffer:soundId]) { - //Deletion of buffer failed, delete buffer routine has set buffer state and lastErrorCode - return NO; - } - } - -#ifdef CD_DEBUG - //Check that sample rate matches mixer rate and warn if they do not - if (freq != (int)_mixerSampleRate) { - CDLOGINFO(@"Denshion::CDSoundEngine - WARNING sample rate does not match mixer sample rate performance may not be optimal."); - } -#endif - -#ifdef CD_USE_STATIC_BUFFERS - alBufferDataStaticProc(_buffers[soundId].bufferId, format, soundData, size, freq); - _buffers[soundId].bufferData = data;//Save the pointer to the new data -#else - alBufferData(_buffers[soundId].bufferId, format, soundData, size, freq); -#endif - if((lastErrorCode_ = alGetError()) != AL_NO_ERROR) { - CDLOG(@"Denshion::CDSoundEngine - error attaching audio to buffer: %x", lastErrorCode_); - _buffers[soundId].bufferState = CD_BS_FAILED; - return FALSE; - } - } else { - CDLOG(@"Denshion::CDSoundEngine Buffer data is null!"); - _buffers[soundId].bufferState = CD_BS_FAILED; - return FALSE; - } - - _buffers[soundId].format = format; - _buffers[soundId].sizeInBytes = size; - _buffers[soundId].frequencyInHertz = freq; - _buffers[soundId].bufferState = CD_BS_LOADED; - CDLOGINFO(@"Denshion::CDSoundEngine Buffer %i loaded format:%i freq:%i size:%i",soundId,format,freq,size); - return TRUE; - }//end mutex -} - -/** - * Load sound data for later play back. - * @return TRUE if buffer loaded okay for play back otherwise false - */ -- (BOOL) loadBuffer:(int) soundId filePath:(NSString*) filePath -{ - - ALvoid* data; - ALenum format; - ALsizei size; - ALsizei freq; - - CDLOGINFO(@"Denshion::CDSoundEngine - Loading openAL buffer %i %@", soundId, filePath); - - CFURLRef fileURL = nil; - NSString *path = [CDUtilities fullPathFromRelativePath:filePath]; - if (path) { - fileURL = (CFURLRef)[[NSURL fileURLWithPath:path] retain]; - } - - if (fileURL) - { - data = CDGetOpenALAudioData(fileURL, &size, &format, &freq); - CFRelease(fileURL); - BOOL result = [self loadBufferFromData:soundId soundData:data format:format size:size freq:freq]; -#ifndef CD_USE_STATIC_BUFFERS - free(data);//Data can be freed here because alBufferData performs a memcpy -#endif - return result; - } else { - CDLOG(@"Denshion::CDSoundEngine Could not find file!\n"); - //Don't change buffer state here as it will be the same as before method was called - return FALSE; - } -} - --(BOOL) validateBufferId:(int) soundId { - if (soundId < 0 || soundId >= bufferTotal) { - CDLOGINFO(@"Denshion::CDSoundEngine - validateBufferId buffer outside range %i",soundId); - return NO; - } else if (_buffers[soundId].bufferState != CD_BS_LOADED) { - CDLOGINFO(@"Denshion::CDSoundEngine - validateBufferId invalide buffer state %i",soundId); - return NO; - } else { - return YES; - } -} - --(float) bufferDurationInSeconds:(int) soundId { - if ([self validateBufferId:soundId]) { - float factor = 0.0f; - switch (_buffers[soundId].format) { - case AL_FORMAT_MONO8: - factor = 1.0f; - break; - case AL_FORMAT_MONO16: - factor = 0.5f; - break; - case AL_FORMAT_STEREO8: - factor = 0.5f; - break; - case AL_FORMAT_STEREO16: - factor = 0.25f; - break; - } - return (float)_buffers[soundId].sizeInBytes/(float)_buffers[soundId].frequencyInHertz * factor; - } else { - return -1.0f; - } -} - --(ALsizei) bufferSizeInBytes:(int) soundId { - if ([self validateBufferId:soundId]) { - return _buffers[soundId].sizeInBytes; - } else { - return -1.0f; - } -} - --(ALsizei) bufferFrequencyInHertz:(int) soundId { - if ([self validateBufferId:soundId]) { - return _buffers[soundId].frequencyInHertz; - } else { - return -1.0f; - } -} - -- (ALfloat) masterGain { - if (mute_) { - //When mute the real gain will always be 0 therefore return the preMuteGain value - return _preMuteGain; - } else { - ALfloat gain; - alGetListenerf(AL_GAIN, &gain); - return gain; - } -} - -/** - * Overall gain setting multiplier. e.g 0.5 is half the gain. - */ -- (void) setMasterGain:(ALfloat) newGainValue { - if (mute_) { - _preMuteGain = newGainValue; - } else { - alListenerf(AL_GAIN, newGainValue); - } -} - -#pragma mark CDSoundEngine AudioInterrupt protocol -- (BOOL) mute { - return mute_; -} - -/** - * Setting mute silences all sounds but playing sounds continue to advance playback - */ -- (void) setMute:(BOOL) newMuteValue { - - if (newMuteValue == mute_) { - return; - } - - mute_ = newMuteValue; - if (mute_) { - //Remember what the gain was - _preMuteGain = self.masterGain; - //Set gain to 0 - do not use the property as this will adjust preMuteGain when muted - alListenerf(AL_GAIN, 0.0f); - } else { - //Restore gain to what it was before being muted - self.masterGain = _preMuteGain; - } -} - -- (BOOL) enabled { - return enabled_; -} - -- (void) setEnabled:(BOOL)enabledValue -{ - if (enabled_ == enabledValue) { - return; - } - enabled_ = enabledValue; - if (enabled_ == NO) { - [self stopAllSounds]; - } -} - --(void) _lockSource:(int) sourceIndex lock:(BOOL) lock { - BOOL found = NO; - for (int i=0; i < _sourceGroupTotal && !found; i++) { - if (_sourceGroups[i].sourceStatuses) { - for (int j=0; j < _sourceGroups[i].totalSources && !found; j++) { - //First bit is used to indicate whether source is locked, index is shifted back 1 bit - if((_sourceGroups[i].sourceStatuses[j] >> 1)==sourceIndex) { - if (lock) { - //Set first bit to lock this source - _sourceGroups[i].sourceStatuses[j] |= 1; - } else { - //Unset first bit to unlock this source - _sourceGroups[i].sourceStatuses[j] &= ~1; - } - found = YES; - } - } - } - } -} - --(int) _getSourceIndexForSourceGroup:(int)sourceGroupId -{ - //Ensure source group id is valid to prevent memory corruption - if (sourceGroupId < 0 || sourceGroupId >= _sourceGroupTotal) { - CDLOG(@"Denshion::CDSoundEngine invalid source group id %i",sourceGroupId); - return CD_NO_SOURCE; - } - - int sourceIndex = -1;//Using -1 to indicate no source found - BOOL complete = NO; - ALint sourceState = 0; - sourceGroup *thisSourceGroup = &_sourceGroups[sourceGroupId]; - thisSourceGroup->currentIndex = thisSourceGroup->startIndex; - while (!complete) { - //Iterate over sources looking for one that is not locked, first bit indicates if source is locked - if ((thisSourceGroup->sourceStatuses[thisSourceGroup->currentIndex] & 1) == 0) { - //This source is not locked - sourceIndex = thisSourceGroup->sourceStatuses[thisSourceGroup->currentIndex] >> 1;//shift back to get the index - if (thisSourceGroup->nonInterruptible) { - //Check if this source is playing, if so it can't be interrupted - alGetSourcei(_sources[sourceIndex].sourceId, AL_SOURCE_STATE, &sourceState); - if (sourceState != AL_PLAYING) { - //complete = YES; - //Set start index so next search starts at the next position - thisSourceGroup->startIndex = thisSourceGroup->currentIndex + 1; - break; - } else { - sourceIndex = -1;//The source index was no good because the source was playing - } - } else { - //complete = YES; - //Set start index so next search starts at the next position - thisSourceGroup->startIndex = thisSourceGroup->currentIndex + 1; - break; - } - } - thisSourceGroup->currentIndex++; - if (thisSourceGroup->currentIndex >= thisSourceGroup->totalSources) { - //Reset to the beginning - thisSourceGroup->currentIndex = 0; - } - if (thisSourceGroup->currentIndex == thisSourceGroup->startIndex) { - //We have looped around and got back to the start - complete = YES; - } - } - - //Reset start index to beginning if beyond bounds - if (thisSourceGroup->startIndex >= thisSourceGroup->totalSources) { - thisSourceGroup->startIndex = 0; - } - - if (sourceIndex >= 0) { - return sourceIndex; - } else { - return CD_NO_SOURCE; - } - -} - -/** - * Play a sound. - * @param soundId the id of the sound to play (buffer id). - * @param SourceGroupId the source group that will be used to play the sound. - * @param pitch pitch multiplier. e.g 1.0 is unaltered, 0.5 is 1 octave lower. - * @param pan stereo position. -1 is fully left, 0 is centre and 1 is fully right. - * @param gain gain multiplier. e.g. 1.0 is unaltered, 0.5 is half the gain - * @param loop should the sound be looped or one shot. - * @return the id of the source being used to play the sound or CD_MUTE if the sound engine is muted or non functioning - * or CD_NO_SOURCE if a problem occurs setting up the source - * - */ -- (ALuint)playSound:(int) soundId sourceGroupId:(int)sourceGroupId pitch:(float) pitch pan:(float) pan gain:(float) gain loop:(BOOL) loop { - -#ifdef CD_DEBUG - //Sanity check parameters - only in DEBUG - NSAssert(soundId >= 0, @"soundId can not be negative"); - NSAssert(soundId < bufferTotal, @"soundId exceeds limit"); - NSAssert(sourceGroupId >= 0, @"sourceGroupId can not be negative"); - NSAssert(sourceGroupId < _sourceGroupTotal, @"sourceGroupId exceeds limit"); - NSAssert(pitch > 0, @"pitch must be greater than zero"); - NSAssert(pan >= -1 && pan <= 1, @"pan must be between -1 and 1"); - NSAssert(gain >= 0, @"gain can not be negative"); -#endif - //If mute or initialisation has failed or buffer is not loaded then do nothing - if (!enabled_ || !functioning_ || _buffers[soundId].bufferState != CD_BS_LOADED || _sourceGroups[sourceGroupId].enabled) { -#ifdef CD_DEBUG - if (!functioning_) { - CDLOGINFO(@"Denshion::CDSoundEngine - sound playback aborted because sound engine is not functioning"); - } else if (_buffers[soundId].bufferState != CD_BS_LOADED) { - CDLOGINFO(@"Denshion::CDSoundEngine - sound playback aborted because buffer %i is not loaded", soundId); - } -#endif - return CD_MUTE; - } - - int sourceIndex = [self _getSourceIndexForSourceGroup:sourceGroupId];//This method ensures sourceIndex is valid - - if (sourceIndex != CD_NO_SOURCE) { - ALint state; - ALuint source = _sources[sourceIndex].sourceId; - ALuint buffer = _buffers[soundId].bufferId; - alGetError();//Clear the error code - alGetSourcei(source, AL_SOURCE_STATE, &state); - if (state == AL_PLAYING) { - alSourceStop(source); - } - alSourcei(source, AL_BUFFER, buffer);//Attach to sound - alSourcef(source, AL_PITCH, pitch);//Set pitch - alSourcei(source, AL_LOOPING, loop);//Set looping - alSourcef(source, AL_GAIN, gain);//Set gain/volume - float sourcePosAL[] = {pan, 0.0f, 0.0f};//Set position - just using left and right panning - alSourcefv(source, AL_POSITION, sourcePosAL); - alGetError();//Clear the error code - alSourcePlay(source); - if((lastErrorCode_ = alGetError()) == AL_NO_ERROR) { - //Everything was okay - _sources[sourceIndex].attachedBufferId = buffer; - return source; - } else { - if (alcGetCurrentContext() == NULL) { - CDLOGINFO(@"Denshion::CDSoundEngine - posting bad OpenAL context message"); - [[NSNotificationCenter defaultCenter] postNotificationName:kCDN_BadAlContext object:nil]; - } - return CD_NO_SOURCE; - } - } else { - return CD_NO_SOURCE; - } -} - --(BOOL) _soundSourceAttachToBuffer:(CDSoundSource*) soundSource soundId:(int) soundId { - //Attach the source to the buffer - ALint state; - ALuint source = soundSource->_sourceId; - ALuint buffer = _buffers[soundId].bufferId; - alGetSourcei(source, AL_SOURCE_STATE, &state); - if (state == AL_PLAYING) { - alSourceStop(source); - } - alGetError();//Clear the error code - alSourcei(source, AL_BUFFER, buffer);//Attach to sound data - if((lastErrorCode_ = alGetError()) == AL_NO_ERROR) { - _sources[soundSource->_sourceIndex].attachedBufferId = buffer; - //_sourceBufferAttachments[soundSource->_sourceIndex] = buffer;//Keep track of which - soundSource->_soundId = soundId; - return YES; - } else { - return NO; - } -} - -/** - * Get a sound source for the specified sound in the specified source group - */ --(CDSoundSource *) soundSourceForSound:(int) soundId sourceGroupId:(int) sourceGroupId -{ - if (!functioning_) { - return nil; - } - //Check if a source is available - int sourceIndex = [self _getSourceIndexForSourceGroup:sourceGroupId]; - if (sourceIndex != CD_NO_SOURCE) { - CDSoundSource *result = [[CDSoundSource alloc] init:_sources[sourceIndex].sourceId sourceIndex:sourceIndex soundEngine:self]; - [self _lockSource:sourceIndex lock:YES]; - //Try to attach to the buffer - if ([self _soundSourceAttachToBuffer:result soundId:soundId]) { - //Set to a known state - result.pitch = 1.0f; - result.pan = 0.0f; - result.gain = 1.0f; - result.looping = NO; - return [result autorelease]; - } else { - //Release the sound source we just created, this will also unlock the source - [result release]; - return nil; - } - } else { - //No available source within that source group - return nil; - } -} - --(void) _soundSourcePreRelease:(CDSoundSource *) soundSource { - CDLOGINFO(@"Denshion::CDSoundEngine _soundSourcePreRelease %i",soundSource->_sourceIndex); - //Unlock the sound source's source - [self _lockSource:soundSource->_sourceIndex lock:NO]; -} - -/** - * Stop all sounds playing within a source group - */ -- (void) stopSourceGroup:(int) sourceGroupId { - - if (!functioning_ || sourceGroupId >= _sourceGroupTotal || sourceGroupId < 0) { - return; - } - int sourceCount = _sourceGroups[sourceGroupId].totalSources; - for (int i=0; i < sourceCount; i++) { - int sourceIndex = _sourceGroups[sourceGroupId].sourceStatuses[i] >> 1; - alSourceStop(_sources[sourceIndex].sourceId); - } - alGetError();//Clear error in case we stopped any sounds that couldn't be stopped -} - -/** - * Stop a sound playing. - * @param sourceId an OpenAL source identifier i.e. the return value of playSound - */ -- (void)stopSound:(ALuint) sourceId { - if (!functioning_) { - return; - } - alSourceStop(sourceId); - alGetError();//Clear error in case we stopped any sounds that couldn't be stopped -} - -- (void) stopAllSounds { - for (int i=0; i < sourceTotal_; i++) { - alSourceStop(_sources[i].sourceId); - } - alGetError();//Clear error in case we stopped any sounds that couldn't be stopped -} - -/** - * Set a source group as non interruptible. Default is that source groups are interruptible. - * Non interruptible means that if a request to play a sound is made for a source group and there are - * no free sources available then the play request will be ignored and CD_NO_SOURCE will be returned. - */ -- (void) setSourceGroupNonInterruptible:(int) sourceGroupId isNonInterruptible:(BOOL) isNonInterruptible { - //Ensure source group id is valid to prevent memory corruption - if (sourceGroupId < 0 || sourceGroupId >= _sourceGroupTotal) { - CDLOG(@"Denshion::CDSoundEngine setSourceGroupNonInterruptible invalid source group id %i",sourceGroupId); - return; - } - - if (isNonInterruptible) { - _sourceGroups[sourceGroupId].nonInterruptible = true; - } else { - _sourceGroups[sourceGroupId].nonInterruptible = false; - } -} - -/** - * Set the mute property for a source group. If mute is turned on any sounds in that source group - * will be stopped and further sounds in that source group will play. However, turning mute off - * will not restart any sounds that were playing when mute was turned on. Also the mute setting - * for the sound engine must be taken into account. If the sound engine is mute no sounds will play - * no matter what the source group mute setting is. - */ -- (void) setSourceGroupEnabled:(int) sourceGroupId enabled:(BOOL) enabled { - //Ensure source group id is valid to prevent memory corruption - if (sourceGroupId < 0 || sourceGroupId >= _sourceGroupTotal) { - CDLOG(@"Denshion::CDSoundEngine setSourceGroupEnabled invalid source group id %i",sourceGroupId); - return; - } - - if (enabled) { - _sourceGroups[sourceGroupId].enabled = true; - [self stopSourceGroup:sourceGroupId]; - } else { - _sourceGroups[sourceGroupId].enabled = false; - } -} - -/** - * Return the mute property for the source group identified by sourceGroupId - */ -- (BOOL) sourceGroupEnabled:(int) sourceGroupId { - return _sourceGroups[sourceGroupId].enabled; -} - --(ALCcontext *) openALContext { - return context; -} - -- (void) _dumpSourceGroupsInfo { -#ifdef CD_DEBUG - CDLOGINFO(@"-------------- source Group Info --------------"); - for (int i=0; i < _sourceGroupTotal; i++) { - CDLOGINFO(@"Group: %i start:%i total:%i",i,_sourceGroups[i].startIndex, _sourceGroups[i].totalSources); - CDLOGINFO(@"----- mute:%i nonInterruptible:%i",_sourceGroups[i].enabled, _sourceGroups[i].nonInterruptible); - CDLOGINFO(@"----- Source statuses ----"); - for (int j=0; j < _sourceGroups[i].totalSources; j++) { - CDLOGINFO(@"Source status:%i index=%i locked=%i",j,_sourceGroups[i].sourceStatuses[j] >> 1, _sourceGroups[i].sourceStatuses[j] & 1); - } - } -#endif -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -@implementation CDSoundSource - -@synthesize lastError; - -//Macro for handling the al error code -#define CDSOUNDSOURCE_UPDATE_LAST_ERROR (lastError = alGetError()) -#define CDSOUNDSOURCE_ERROR_HANDLER ( CDSOUNDSOURCE_UPDATE_LAST_ERROR == AL_NO_ERROR) - --(id)init:(ALuint) theSourceId sourceIndex:(int) index soundEngine:(CDSoundEngine*) engine { - if ((self = [super init])) { - _sourceId = theSourceId; - _engine = engine; - _sourceIndex = index; - enabled_ = YES; - mute_ = NO; - _preMuteGain = self.gain; - } - return self; -} - --(void) dealloc -{ - CDLOGINFO(@"Denshion::CDSoundSource deallocated %i",self->_sourceIndex); - - //Notify sound engine we are about to release - [_engine _soundSourcePreRelease:self]; - [super dealloc]; -} - -- (void) setPitch:(float) newPitchValue { - alSourcef(_sourceId, AL_PITCH, newPitchValue); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; -} - -- (void) setGain:(float) newGainValue { - if (!mute_) { - alSourcef(_sourceId, AL_GAIN, newGainValue); - } else { - _preMuteGain = newGainValue; - } - CDSOUNDSOURCE_UPDATE_LAST_ERROR; -} - -- (void) setPan:(float) newPanValue { - float sourcePosAL[] = {newPanValue, 0.0f, 0.0f};//Set position - just using left and right panning - alSourcefv(_sourceId, AL_POSITION, sourcePosAL); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - -} - -- (void) setLooping:(BOOL) newLoopingValue { - alSourcei(_sourceId, AL_LOOPING, newLoopingValue); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - -} - -- (BOOL) isPlaying { - ALint state; - alGetSourcei(_sourceId, AL_SOURCE_STATE, &state); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - return (state == AL_PLAYING); -} - -- (float) pitch { - ALfloat pitchVal; - alGetSourcef(_sourceId, AL_PITCH, &pitchVal); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - return pitchVal; -} - -- (float) pan { - ALfloat sourcePosAL[] = {0.0f,0.0f,0.0f}; - alGetSourcefv(_sourceId, AL_POSITION, sourcePosAL); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - return sourcePosAL[0]; -} - -- (float) gain { - if (!mute_) { - ALfloat val; - alGetSourcef(_sourceId, AL_GAIN, &val); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - return val; - } else { - return _preMuteGain; - } -} - -- (BOOL) looping { - ALfloat val; - alGetSourcef(_sourceId, AL_LOOPING, &val); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - return val; -} - --(BOOL) stop { - alSourceStop(_sourceId); - return CDSOUNDSOURCE_ERROR_HANDLER; -} - --(BOOL) play { - if (enabled_) { - alSourcePlay(_sourceId); - CDSOUNDSOURCE_UPDATE_LAST_ERROR; - if (lastError != AL_NO_ERROR) { - if (alcGetCurrentContext() == NULL) { - CDLOGINFO(@"Denshion::CDSoundSource - posting bad OpenAL context message"); - [[NSNotificationCenter defaultCenter] postNotificationName:kCDN_BadAlContext object:nil]; - } - return NO; - } else { - return YES; - } - } else { - return NO; - } -} - --(BOOL) pause { - alSourcePause(_sourceId); - return CDSOUNDSOURCE_ERROR_HANDLER; -} - --(BOOL) rewind { - alSourceRewind(_sourceId); - return CDSOUNDSOURCE_ERROR_HANDLER; -} - --(void) setSoundId:(int) soundId { - [_engine _soundSourceAttachToBuffer:self soundId:soundId]; -} - --(int) soundId { - return _soundId; -} - --(float) durationInSeconds { - return [_engine bufferDurationInSeconds:_soundId]; -} - -#pragma mark CDSoundSource AudioInterrupt protocol -- (BOOL) mute { - return mute_; -} - -/** - * Setting mute silences all sounds but playing sounds continue to advance playback - */ -- (void) setMute:(BOOL) newMuteValue { - - if (newMuteValue == mute_) { - return; - } - - if (newMuteValue) { - //Remember what the gain was - _preMuteGain = self.gain; - self.gain = 0.0f; - mute_ = newMuteValue;//Make sure this is done after setting the gain property as the setter behaves differently depending on mute value - } else { - //Restore gain to what it was before being muted - mute_ = newMuteValue; - self.gain = _preMuteGain; - } -} - -- (BOOL) enabled { - return enabled_; -} - -- (void) setEnabled:(BOOL)enabledValue -{ - if (enabled_ == enabledValue) { - return; - } - enabled_ = enabledValue; - if (enabled_ == NO) { - [self stop]; - } -} - -@end - -//////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark CDAudioInterruptTargetGroup - -@implementation CDAudioInterruptTargetGroup - --(id) init { - if ((self = [super init])) { - children_ = [[NSMutableArray alloc] initWithCapacity:32]; - enabled_ = YES; - mute_ = NO; - } - return self; -} - --(void) addAudioInterruptTarget:(NSObject*) interruptibleTarget { - //Synchronize child with group settings; - [interruptibleTarget setMute:mute_]; - [interruptibleTarget setEnabled:enabled_]; - [children_ addObject:interruptibleTarget]; -} - --(void) removeAudioInterruptTarget:(NSObject*) interruptibleTarget { - [children_ removeObjectIdenticalTo:interruptibleTarget]; -} - -- (BOOL) mute { - return mute_; -} - -/** - * Setting mute silences all sounds but playing sounds continue to advance playback - */ -- (void) setMute:(BOOL) newMuteValue { - - if (newMuteValue == mute_) { - return; - } - - for (NSObject* target in children_) { - [target setMute:newMuteValue]; - } -} - -- (BOOL) enabled { - return enabled_; -} - -- (void) setEnabled:(BOOL)enabledValue -{ - if (enabledValue == enabled_) { - return; - } - - for (NSObject* target in children_) { - [target setEnabled:enabledValue]; - } -} - -@end - - - -//////////////////////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark CDAsynchBufferLoader - -@implementation CDAsynchBufferLoader - --(id) init:(NSArray *)loadRequests soundEngine:(CDSoundEngine *) theSoundEngine { - if ((self = [super init])) { - _loadRequests = loadRequests; - [_loadRequests retain]; - _soundEngine = theSoundEngine; - [_soundEngine retain]; - } - return self; -} - --(void) main { - CDLOGINFO(@"Denshion::CDAsynchBufferLoader - loading buffers"); - [super main]; - _soundEngine.asynchLoadProgress = 0.0f; - - if ([_loadRequests count] > 0) { - float increment = 1.0f / [_loadRequests count]; - //Iterate over load request and load - for (CDBufferLoadRequest *loadRequest in _loadRequests) { - [_soundEngine loadBuffer:loadRequest.soundId filePath:loadRequest.filePath]; - _soundEngine.asynchLoadProgress += increment; - } - } - - //Completed - _soundEngine.asynchLoadProgress = 1.0f; - [[NSNotificationCenter defaultCenter] postNotificationName:kCDN_AsynchLoadComplete object:nil]; - -} - --(void) dealloc { - [_loadRequests release]; - [_soundEngine release]; - [super dealloc]; -} - -@end - - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark CDBufferLoadRequest - -@implementation CDBufferLoadRequest - -@synthesize filePath, soundId; - --(id) init:(int) theSoundId filePath:(const NSString *) theFilePath { - if ((self = [super init])) { - soundId = theSoundId; - filePath = [theFilePath copy];//TODO: is retain necessary or does copy set retain count - [filePath retain]; - } - return self; -} - --(void) dealloc { - [filePath release]; - [super dealloc]; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark CDFloatInterpolator - -@implementation CDFloatInterpolator -@synthesize start,end,interpolationType; - --(float) interpolate:(float) t { - - if (t < 1.0f) { - switch (interpolationType) { - case kIT_Linear: - //Linear interpolation - return ((end - start) * t) + start; - - case kIT_SCurve: - //Cubic s curve t^2 * (3 - 2t) - return ((float)(t * t * (3.0 - (2.0 * t))) * (end - start)) + start; - - case kIT_Exponential: - //Formulas taken from EaseAction - if (end > start) { - //Fade in - float logDelta = (t==0) ? 0 : powf(2, 10 * (t/1 - 1)) - 1 * 0.001f; - return ((end - start) * logDelta) + start; - } else { - //Fade Out - float logDelta = (-powf(2, -10 * t/1) + 1); - return ((end - start) * logDelta) + start; - } - default: - return 0.0f; - } - } else { - return end; - } -} - --(id) init:(tCDInterpolationType) type startVal:(float) startVal endVal:(float) endVal { - if ((self = [super init])) { - start = startVal; - end = endVal; - interpolationType = type; - } - return self; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark CDPropertyModifier - -@implementation CDPropertyModifier - -@synthesize stopTargetWhenComplete; - --(id) init:(id) theTarget interpolationType:(tCDInterpolationType) type startVal:(float) startVal endVal:(float) endVal { - if ((self = [super init])) { - if (target) { - //Release the previous target if there is one - [target release]; - } - target = theTarget; -#if CD_DEBUG - //Check target is of the required type - if (![theTarget isMemberOfClass:[self _allowableType]] ) { - CDLOG(@"Denshion::CDPropertyModifier target is not of type %@",[self _allowableType]); - NSAssert([theTarget isKindOfClass:[CDSoundEngine class]], @"CDPropertyModifier target not of required type"); - } -#endif - [target retain]; - startValue = startVal; - endValue = endVal; - if (interpolator) { - //Release previous interpolator if there is one - [interpolator release]; - } - interpolator = [[CDFloatInterpolator alloc] init:type startVal:startVal endVal:endVal]; - stopTargetWhenComplete = NO; - } - return self; -} - --(void) dealloc { - CDLOGINFO(@"Denshion::CDPropertyModifier deallocated %@",self); - [target release]; - [interpolator release]; - [super dealloc]; -} - --(void) modify:(float) t { - if (t < 1.0) { - [self _setTargetProperty:[interpolator interpolate:t]]; - } else { - //At the end - [self _setTargetProperty:endValue]; - if (stopTargetWhenComplete) { - [self _stopTarget]; - } - } -} - --(float) startValue { - return startValue; -} - --(void) setStartValue:(float) startVal -{ - startValue = startVal; - interpolator.start = startVal; -} - --(float) endValue { - return startValue; -} - --(void) setEndValue:(float) endVal -{ - endValue = endVal; - interpolator.end = endVal; -} - --(tCDInterpolationType) interpolationType { - return interpolator.interpolationType; -} - --(void) setInterpolationType:(tCDInterpolationType) interpolationType { - interpolator.interpolationType = interpolationType; -} - --(void) _setTargetProperty:(float) newVal { - -} - --(float) _getTargetProperty { - return 0.0f; -} - --(void) _stopTarget { - -} - --(Class) _allowableType { - return [NSObject class]; -} -@end - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark CDSoundSourceFader - -@implementation CDSoundSourceFader - --(void) _setTargetProperty:(float) newVal { - ((CDSoundSource*)target).gain = newVal; -} - --(float) _getTargetProperty { - return ((CDSoundSource*)target).gain; -} - --(void) _stopTarget { - [((CDSoundSource*)target) stop]; -} - --(Class) _allowableType { - return [CDSoundSource class]; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark CDSoundSourcePanner - -@implementation CDSoundSourcePanner - --(void) _setTargetProperty:(float) newVal { - ((CDSoundSource*)target).pan = newVal; -} - --(float) _getTargetProperty { - return ((CDSoundSource*)target).pan; -} - --(void) _stopTarget { - [((CDSoundSource*)target) stop]; -} - --(Class) _allowableType { - return [CDSoundSource class]; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark CDSoundSourcePitchBender - -@implementation CDSoundSourcePitchBender - --(void) _setTargetProperty:(float) newVal { - ((CDSoundSource*)target).pitch = newVal; -} - --(float) _getTargetProperty { - return ((CDSoundSource*)target).pitch; -} - --(void) _stopTarget { - [((CDSoundSource*)target) stop]; -} - --(Class) _allowableType { - return [CDSoundSource class]; -} - -@end - -/////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -#pragma mark CDSoundEngineFader - -@implementation CDSoundEngineFader - --(void) _setTargetProperty:(float) newVal { - ((CDSoundEngine*)target).masterGain = newVal; -} - --(float) _getTargetProperty { - return ((CDSoundEngine*)target).masterGain; -} - --(void) _stopTarget { - [((CDSoundEngine*)target) stopAllSounds]; -} - --(Class) _allowableType { - return [CDSoundEngine class]; -} - -@end - - diff --git a/Littlest/libs/CocosDenshion/SimpleAudioEngine.h b/Littlest/libs/CocosDenshion/SimpleAudioEngine.h deleted file mode 100644 index 35396c6..0000000 --- a/Littlest/libs/CocosDenshion/SimpleAudioEngine.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - 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. - - $Id$ - */ - - -#import "CDAudioManager.h" - -/** - A wrapper to the CDAudioManager object. - This is recommended for basic audio requirements. If you just want to play some sound fx - and some background music and have no interest in learning the lower level workings then - this is the interface to use. - - Requirements: - - Firmware: OS 2.2 or greater - - Files: SimpleAudioEngine.*, CocosDenshion.* - - Frameworks: OpenAL, AudioToolbox, AVFoundation - @since v0.8 - */ -@interface SimpleAudioEngine : NSObject { - - BOOL mute_; - BOOL enabled_; -} - -/** Background music volume. Range is 0.0f to 1.0f. This will only have an effect if willPlayBackgroundMusic returns YES */ -@property (readwrite) float backgroundMusicVolume; -/** Effects volume. Range is 0.0f to 1.0f */ -@property (readwrite) float effectsVolume; -/** If NO it indicates background music will not be played either because no background music is loaded or the audio session does not permit it.*/ -@property (readonly) BOOL willPlayBackgroundMusic; - -/** returns the shared instance of the SimpleAudioEngine object */ -+ (SimpleAudioEngine*) sharedEngine; - -/** Preloads a music file so it will be ready to play as background music */ --(void) preloadBackgroundMusic:(NSString*) filePath; - -/** plays background music in a loop*/ --(void) playBackgroundMusic:(NSString*) filePath; -/** plays background music, if loop is true the music will repeat otherwise it will be played once */ --(void) playBackgroundMusic:(NSString*) filePath loop:(BOOL) loop; -/** stops playing background music */ --(void) stopBackgroundMusic; -/** pauses the background music */ --(void) pauseBackgroundMusic; -/** resume background music that has been paused */ --(void) resumeBackgroundMusic; -/** rewind the background music */ --(void) rewindBackgroundMusic; -/** returns whether or not the background music is playing */ --(BOOL) isBackgroundMusicPlaying; - -/** plays an audio effect with a file path*/ --(ALuint) playEffect:(NSString*) filePath; -/** stop a sound that is playing, note you must pass in the soundId that is returned when you started playing the sound with playEffect */ --(void) stopEffect:(ALuint) soundId; -/** plays an audio effect with a file path, pitch, pan and gain */ --(ALuint) playEffect:(NSString*) filePath pitch:(Float32) pitch pan:(Float32) pan gain:(Float32) gain; -/** preloads an audio effect */ --(void) preloadEffect:(NSString*) filePath; -/** unloads an audio effect from memory */ --(void) unloadEffect:(NSString*) filePath; -/** Gets a CDSoundSource object set up to play the specified file. */ --(CDSoundSource *) soundSourceForFile:(NSString*) filePath; - -/** Shuts down the shared audio engine instance so that it can be reinitialised */ -+(void) end; - -@end diff --git a/Littlest/libs/CocosDenshion/SimpleAudioEngine.m b/Littlest/libs/CocosDenshion/SimpleAudioEngine.m deleted file mode 100644 index cdff26c..0000000 --- a/Littlest/libs/CocosDenshion/SimpleAudioEngine.m +++ /dev/null @@ -1,220 +0,0 @@ -/* - Copyright (c) 2010 Steve Oldmeadow - - 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. - - $Id$ - */ - -#import "SimpleAudioEngine.h" - -@implementation SimpleAudioEngine - -static SimpleAudioEngine *sharedEngine = nil; -static CDSoundEngine* soundEngine = nil; -static CDAudioManager *am = nil; -static CDBufferManager *bufferManager = nil; - -// Init -+ (SimpleAudioEngine *) sharedEngine -{ - @synchronized(self) { - if (!sharedEngine) - sharedEngine = [[SimpleAudioEngine alloc] init]; - } - return sharedEngine; -} - -+ (id) alloc -{ - @synchronized(self) { - NSAssert(sharedEngine == nil, @"Attempted to allocate a second instance of a singleton."); - return [super alloc]; - } - return nil; -} - --(id) init -{ - if((self=[super init])) { - am = [CDAudioManager sharedManager]; - soundEngine = am.soundEngine; - bufferManager = [[CDBufferManager alloc] initWithEngine:soundEngine]; - mute_ = NO; - enabled_ = YES; - } - return self; -} - -// Memory -- (void) dealloc -{ - am = nil; - soundEngine = nil; - bufferManager = nil; - [super dealloc]; -} - -+(void) end -{ - am = nil; - [CDAudioManager end]; - [bufferManager release]; - [sharedEngine release]; - sharedEngine = nil; -} - -#pragma mark SimpleAudioEngine - background music - --(void) preloadBackgroundMusic:(NSString*) filePath { - [am preloadBackgroundMusic:filePath]; -} - --(void) playBackgroundMusic:(NSString*) filePath -{ - [am playBackgroundMusic:filePath loop:TRUE]; -} - --(void) playBackgroundMusic:(NSString*) filePath loop:(BOOL) loop -{ - [am playBackgroundMusic:filePath loop:loop]; -} - --(void) stopBackgroundMusic -{ - [am stopBackgroundMusic]; -} - --(void) pauseBackgroundMusic { - [am pauseBackgroundMusic]; -} - --(void) resumeBackgroundMusic { - [am resumeBackgroundMusic]; -} - --(void) rewindBackgroundMusic { - [am rewindBackgroundMusic]; -} - --(BOOL) isBackgroundMusicPlaying { - return [am isBackgroundMusicPlaying]; -} - --(BOOL) willPlayBackgroundMusic { - return [am willPlayBackgroundMusic]; -} - -#pragma mark SimpleAudioEngine - sound effects - --(ALuint) playEffect:(NSString*) filePath -{ - return [self playEffect:filePath pitch:1.0f pan:0.0f gain:1.0f]; -} - --(ALuint) playEffect:(NSString*) filePath pitch:(Float32) pitch pan:(Float32) pan gain:(Float32) gain -{ - int soundId = [bufferManager bufferForFile:filePath create:YES]; - if (soundId != kCDNoBuffer) { - return [soundEngine playSound:soundId sourceGroupId:0 pitch:pitch pan:pan gain:gain loop:false]; - } else { - return CD_MUTE; - } -} - --(void) stopEffect:(ALuint) soundId { - [soundEngine stopSound:soundId]; -} - --(void) preloadEffect:(NSString*) filePath -{ - int soundId = [bufferManager bufferForFile:filePath create:YES]; - if (soundId == kCDNoBuffer) { - CDLOG(@"Denshion::SimpleAudioEngine sound failed to preload %@",filePath); - } -} - --(void) unloadEffect:(NSString*) filePath -{ - CDLOGINFO(@"Denshion::SimpleAudioEngine unloadedEffect %@",filePath); - [bufferManager releaseBufferForFile:filePath]; -} - -#pragma mark Audio Interrupt Protocol --(BOOL) mute -{ - return mute_; -} - --(void) setMute:(BOOL) muteValue -{ - if (mute_ != muteValue) { - mute_ = muteValue; - am.mute = mute_; - } -} - --(BOOL) enabled -{ - return enabled_; -} - --(void) setEnabled:(BOOL) enabledValue -{ - if (enabled_ != enabledValue) { - enabled_ = enabledValue; - am.enabled = enabled_; - } -} - - -#pragma mark SimpleAudioEngine - BackgroundMusicVolume --(float) backgroundMusicVolume -{ - return am.backgroundMusic.volume; -} - --(void) setBackgroundMusicVolume:(float) volume -{ - am.backgroundMusic.volume = volume; -} - -#pragma mark SimpleAudioEngine - EffectsVolume --(float) effectsVolume -{ - return am.soundEngine.masterGain; -} - --(void) setEffectsVolume:(float) volume -{ - am.soundEngine.masterGain = volume; -} - --(CDSoundSource *) soundSourceForFile:(NSString*) filePath { - int soundId = [bufferManager bufferForFile:filePath create:YES]; - if (soundId != kCDNoBuffer) { - CDSoundSource *result = [soundEngine soundSourceForSound:soundId sourceGroupId:0]; - CDLOGINFO(@"Denshion::SimpleAudioEngine sound source created for %@",filePath); - return result; - } else { - return nil; - } -} - -@end diff --git a/Littlest/libs/FontLabel/FontLabel.h b/Littlest/libs/FontLabel/FontLabel.h deleted file mode 100644 index 6de9c2c..0000000 --- a/Littlest/libs/FontLabel/FontLabel.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// FontLabel.h -// FontLabel -// -// Created by Kevin Ballard on 5/8/09. -// Copyright © 2009 Zynga Game Networks -// -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class ZFont; -@class ZAttributedString; - -@interface FontLabel : UILabel { - void *reserved; // works around a bug in UILabel - ZFont *zFont; - ZAttributedString *zAttributedText; -} -@property (nonatomic, setter=setCGFont:) CGFontRef cgFont __AVAILABILITY_INTERNAL_DEPRECATED; -@property (nonatomic, assign) CGFloat pointSize __AVAILABILITY_INTERNAL_DEPRECATED; -@property (nonatomic, retain, setter=setZFont:) ZFont *zFont; -// if attributedText is nil, fall back on using the inherited UILabel properties -// if attributedText is non-nil, the font/text/textColor -// in addition, adjustsFontSizeToFitWidth does not work with attributed text -@property (nonatomic, copy) ZAttributedString *zAttributedText; -// -initWithFrame:fontName:pointSize: uses FontManager to look up the font name -- (id)initWithFrame:(CGRect)frame fontName:(NSString *)fontName pointSize:(CGFloat)pointSize; -- (id)initWithFrame:(CGRect)frame zFont:(ZFont *)font; -- (id)initWithFrame:(CGRect)frame font:(CGFontRef)font pointSize:(CGFloat)pointSize __AVAILABILITY_INTERNAL_DEPRECATED; -@end diff --git a/Littlest/libs/FontLabel/FontLabel.m b/Littlest/libs/FontLabel/FontLabel.m deleted file mode 100644 index 58975b1..0000000 --- a/Littlest/libs/FontLabel/FontLabel.m +++ /dev/null @@ -1,195 +0,0 @@ -// -// FontLabel.m -// FontLabel -// -// Created by Kevin Ballard on 5/8/09. -// Copyright © 2009 Zynga Game Networks -// -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "FontLabel.h" -#import "FontManager.h" -#import "FontLabelStringDrawing.h" -#import "ZFont.h" - -@interface ZFont (ZFontPrivate) -@property (nonatomic, readonly) CGFloat ratio; -@end - -@implementation FontLabel -@synthesize zFont; -@synthesize zAttributedText; - -- (id)initWithFrame:(CGRect)frame fontName:(NSString *)fontName pointSize:(CGFloat)pointSize { - return [self initWithFrame:frame zFont:[[FontManager sharedManager] zFontWithName:fontName pointSize:pointSize]]; -} - -- (id)initWithFrame:(CGRect)frame zFont:(ZFont *)font { - if ((self = [super initWithFrame:frame])) { - zFont = [font retain]; - } - return self; -} - -- (id)initWithFrame:(CGRect)frame font:(CGFontRef)font pointSize:(CGFloat)pointSize { - return [self initWithFrame:frame zFont:[ZFont fontWithCGFont:font size:pointSize]]; -} - -- (CGFontRef)cgFont { - return self.zFont.cgFont; -} - -- (void)setCGFont:(CGFontRef)font { - if (self.zFont.cgFont != font) { - self.zFont = [ZFont fontWithCGFont:font size:self.zFont.pointSize]; - } -} - -- (CGFloat)pointSize { - return self.zFont.pointSize; -} - -- (void)setPointSize:(CGFloat)pointSize { - if (self.zFont.pointSize != pointSize) { - self.zFont = [ZFont fontWithCGFont:self.zFont.cgFont size:pointSize]; - } -} - -- (void)setZAttributedText:(ZAttributedString *)attStr { - if (zAttributedText != attStr) { - [zAttributedText release]; - zAttributedText = [attStr copy]; - [self setNeedsDisplay]; - } -} - -- (void)drawTextInRect:(CGRect)rect { - if (self.zFont == NULL && self.zAttributedText == nil) { - [super drawTextInRect:rect]; - return; - } - - if (self.zAttributedText == nil) { - // this method is documented as setting the text color for us, but that doesn't appear to be the case - if (self.highlighted) { - [(self.highlightedTextColor ?: [UIColor whiteColor]) setFill]; - } else { - [(self.textColor ?: [UIColor blackColor]) setFill]; - } - - ZFont *actualFont = self.zFont; - CGSize origSize = rect.size; - if (self.numberOfLines == 1) { - origSize.height = actualFont.leading; - CGPoint point = CGPointMake(rect.origin.x, - rect.origin.y + roundf(((rect.size.height - actualFont.leading) / 2.0f))); - CGSize size = [self.text sizeWithZFont:actualFont]; - if (self.adjustsFontSizeToFitWidth && self.minimumFontSize < actualFont.pointSize) { - if (size.width > origSize.width) { - CGFloat desiredRatio = (origSize.width * actualFont.ratio) / size.width; - CGFloat desiredPointSize = desiredRatio * actualFont.pointSize / actualFont.ratio; - actualFont = [actualFont fontWithSize:MAX(MAX(desiredPointSize, self.minimumFontSize), 1.0f)]; - size = [self.text sizeWithZFont:actualFont]; - } - if (!CGSizeEqualToSize(origSize, size)) { - switch (self.baselineAdjustment) { - case UIBaselineAdjustmentAlignCenters: - point.y += roundf((origSize.height - size.height) / 2.0f); - break; - case UIBaselineAdjustmentAlignBaselines: - point.y += (self.zFont.ascender - actualFont.ascender); - break; - case UIBaselineAdjustmentNone: - break; - } - } - } - size.width = MIN(size.width, origSize.width); - // adjust the point for alignment - switch (self.textAlignment) { - case UITextAlignmentLeft: - break; - case UITextAlignmentCenter: - point.x += (origSize.width - size.width) / 2.0f; - break; - case UITextAlignmentRight: - point.x += origSize.width - size.width; - break; - } - [self.text drawAtPoint:point forWidth:size.width withZFont:actualFont lineBreakMode:self.lineBreakMode]; - } else { - CGSize size = [self.text sizeWithZFont:actualFont constrainedToSize:origSize lineBreakMode:self.lineBreakMode numberOfLines:self.numberOfLines]; - CGPoint point = rect.origin; - point.y += roundf((rect.size.height - size.height) / 2.0f); - rect = (CGRect){point, CGSizeMake(rect.size.width, size.height)}; - [self.text drawInRect:rect withZFont:actualFont lineBreakMode:self.lineBreakMode alignment:self.textAlignment numberOfLines:self.numberOfLines]; - } - } else { - ZAttributedString *attStr = self.zAttributedText; - if (self.highlighted) { - // modify the string to change the base color - ZMutableAttributedString *mutStr = [[attStr mutableCopy] autorelease]; - NSRange activeRange = NSMakeRange(0, attStr.length); - while (activeRange.length > 0) { - NSRange effective; - UIColor *color = [attStr attribute:ZForegroundColorAttributeName atIndex:activeRange.location - longestEffectiveRange:&effective inRange:activeRange]; - if (color == nil) { - [mutStr addAttribute:ZForegroundColorAttributeName value:[UIColor whiteColor] range:effective]; - } - activeRange.location += effective.length, activeRange.length -= effective.length; - } - attStr = mutStr; - } - CGSize size = [attStr sizeConstrainedToSize:rect.size lineBreakMode:self.lineBreakMode numberOfLines:self.numberOfLines]; - CGPoint point = rect.origin; - point.y += roundf((rect.size.height - size.height) / 2.0f); - rect = (CGRect){point, CGSizeMake(rect.size.width, size.height)}; - [attStr drawInRect:rect withLineBreakMode:self.lineBreakMode alignment:self.textAlignment numberOfLines:self.numberOfLines]; - } -} - -- (CGRect)textRectForBounds:(CGRect)bounds limitedToNumberOfLines:(NSInteger)numberOfLines { - if (self.zFont == NULL && self.zAttributedText == nil) { - return [super textRectForBounds:bounds limitedToNumberOfLines:numberOfLines]; - } - - if (numberOfLines == 1) { - // if numberOfLines == 1 we need to use the version that converts spaces - CGSize size; - if (self.zAttributedText == nil) { - size = [self.text sizeWithZFont:self.zFont]; - } else { - size = [self.zAttributedText size]; - } - bounds.size.width = MIN(bounds.size.width, size.width); - bounds.size.height = MIN(bounds.size.height, size.height); - } else { - if (numberOfLines > 0) bounds.size.height = MIN(bounds.size.height, self.zFont.leading * numberOfLines); - if (self.zAttributedText == nil) { - bounds.size = [self.text sizeWithZFont:self.zFont constrainedToSize:bounds.size lineBreakMode:self.lineBreakMode]; - } else { - bounds.size = [self.zAttributedText sizeConstrainedToSize:bounds.size lineBreakMode:self.lineBreakMode]; - } - } - return bounds; -} - -- (void)dealloc { - [zFont release]; - [zAttributedText release]; - [super dealloc]; -} -@end diff --git a/Littlest/libs/FontLabel/FontLabelStringDrawing.h b/Littlest/libs/FontLabel/FontLabelStringDrawing.h deleted file mode 100644 index 821da22..0000000 --- a/Littlest/libs/FontLabel/FontLabelStringDrawing.h +++ /dev/null @@ -1,69 +0,0 @@ -// -// FontLabelStringDrawing.h -// FontLabel -// -// Created by Kevin Ballard on 5/5/09. -// Copyright © 2009 Zynga Game Networks -// -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import "ZAttributedString.h" - -@class ZFont; - -@interface NSString (FontLabelStringDrawing) -// CGFontRef-based methods -- (CGSize)sizeWithCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize __AVAILABILITY_INTERNAL_DEPRECATED; -- (CGSize)sizeWithCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize constrainedToSize:(CGSize)size __AVAILABILITY_INTERNAL_DEPRECATED; -- (CGSize)sizeWithCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize constrainedToSize:(CGSize)size - lineBreakMode:(UILineBreakMode)lineBreakMode __AVAILABILITY_INTERNAL_DEPRECATED; -- (CGSize)drawAtPoint:(CGPoint)point withCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize __AVAILABILITY_INTERNAL_DEPRECATED; -- (CGSize)drawInRect:(CGRect)rect withCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize __AVAILABILITY_INTERNAL_DEPRECATED; -- (CGSize)drawInRect:(CGRect)rect withCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize - lineBreakMode:(UILineBreakMode)lineBreakMode __AVAILABILITY_INTERNAL_DEPRECATED; -- (CGSize)drawInRect:(CGRect)rect withCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize - lineBreakMode:(UILineBreakMode)lineBreakMode alignment:(UITextAlignment)alignment __AVAILABILITY_INTERNAL_DEPRECATED; - -// ZFont-based methods -- (CGSize)sizeWithZFont:(ZFont *)font; -- (CGSize)sizeWithZFont:(ZFont *)font constrainedToSize:(CGSize)size; -- (CGSize)sizeWithZFont:(ZFont *)font constrainedToSize:(CGSize)size lineBreakMode:(UILineBreakMode)lineBreakMode; -- (CGSize)sizeWithZFont:(ZFont *)font constrainedToSize:(CGSize)size lineBreakMode:(UILineBreakMode)lineBreakMode - numberOfLines:(NSUInteger)numberOfLines; -- (CGSize)drawAtPoint:(CGPoint)point withZFont:(ZFont *)font; -- (CGSize)drawAtPoint:(CGPoint)point forWidth:(CGFloat)width withZFont:(ZFont *)font lineBreakMode:(UILineBreakMode)lineBreakMode; -- (CGSize)drawInRect:(CGRect)rect withZFont:(ZFont *)font; -- (CGSize)drawInRect:(CGRect)rect withZFont:(ZFont *)font lineBreakMode:(UILineBreakMode)lineBreakMode; -- (CGSize)drawInRect:(CGRect)rect withZFont:(ZFont *)font lineBreakMode:(UILineBreakMode)lineBreakMode - alignment:(UITextAlignment)alignment; -- (CGSize)drawInRect:(CGRect)rect withZFont:(ZFont *)font lineBreakMode:(UILineBreakMode)lineBreakMode - alignment:(UITextAlignment)alignment numberOfLines:(NSUInteger)numberOfLines; -@end - -@interface ZAttributedString (ZAttributedStringDrawing) -- (CGSize)size; -- (CGSize)sizeConstrainedToSize:(CGSize)size; -- (CGSize)sizeConstrainedToSize:(CGSize)size lineBreakMode:(UILineBreakMode)lineBreakMode; -- (CGSize)sizeConstrainedToSize:(CGSize)size lineBreakMode:(UILineBreakMode)lineBreakMode - numberOfLines:(NSUInteger)numberOfLines; -- (CGSize)drawAtPoint:(CGPoint)point; -- (CGSize)drawAtPoint:(CGPoint)point forWidth:(CGFloat)width lineBreakMode:(UILineBreakMode)lineBreakMode; -- (CGSize)drawInRect:(CGRect)rect; -- (CGSize)drawInRect:(CGRect)rect withLineBreakMode:(UILineBreakMode)lineBreakMode; -- (CGSize)drawInRect:(CGRect)rect withLineBreakMode:(UILineBreakMode)lineBreakMode alignment:(UITextAlignment)alignment; -- (CGSize)drawInRect:(CGRect)rect withLineBreakMode:(UILineBreakMode)lineBreakMode alignment:(UITextAlignment)alignment - numberOfLines:(NSUInteger)numberOfLines; -@end diff --git a/Littlest/libs/FontLabel/FontLabelStringDrawing.m b/Littlest/libs/FontLabel/FontLabelStringDrawing.m deleted file mode 100644 index 2907372..0000000 --- a/Littlest/libs/FontLabel/FontLabelStringDrawing.m +++ /dev/null @@ -1,892 +0,0 @@ -// -// FontLabelStringDrawing.m -// FontLabel -// -// Created by Kevin Ballard on 5/5/09. -// Copyright © 2009 Zynga Game Networks -// -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "FontLabelStringDrawing.h" -#import "ZFont.h" -#import "ZAttributedStringPrivate.h" - -@interface ZFont (ZFontPrivate) -@property (nonatomic, readonly) CGFloat ratio; -@end - -#define kUnicodeHighSurrogateStart 0xD800 -#define kUnicodeHighSurrogateEnd 0xDBFF -#define kUnicodeHighSurrogateMask kUnicodeHighSurrogateStart -#define kUnicodeLowSurrogateStart 0xDC00 -#define kUnicodeLowSurrogateEnd 0xDFFF -#define kUnicodeLowSurrogateMask kUnicodeLowSurrogateStart -#define kUnicodeSurrogateTypeMask 0xFC00 -#define UnicharIsHighSurrogate(c) ((c & kUnicodeSurrogateTypeMask) == kUnicodeHighSurrogateMask) -#define UnicharIsLowSurrogate(c) ((c & kUnicodeSurrogateTypeMask) == kUnicodeLowSurrogateMask) -#define ConvertSurrogatePairToUTF32(high, low) ((UInt32)((high - 0xD800) * 0x400 + (low - 0xDC00) + 0x10000)) - -typedef enum { - kFontTableFormat4 = 4, - kFontTableFormat12 = 12, -} FontTableFormat; - -typedef struct fontTable { - NSUInteger retainCount; - CFDataRef cmapTable; - FontTableFormat format; - union { - struct { - UInt16 segCountX2; - UInt16 *endCodes; - UInt16 *startCodes; - UInt16 *idDeltas; - UInt16 *idRangeOffsets; - } format4; - struct { - UInt32 nGroups; - struct { - UInt32 startCharCode; - UInt32 endCharCode; - UInt32 startGlyphCode; - } *groups; - } format12; - } cmap; -} fontTable; - -static FontTableFormat supportedFormats[] = { kFontTableFormat4, kFontTableFormat12 }; -static size_t supportedFormatsCount = sizeof(supportedFormats) / sizeof(FontTableFormat); - -static fontTable *newFontTable(CFDataRef cmapTable, FontTableFormat format) { - fontTable *table = (struct fontTable *)malloc(sizeof(struct fontTable)); - table->retainCount = 1; - table->cmapTable = CFRetain(cmapTable); - table->format = format; - return table; -} - -static fontTable *retainFontTable(fontTable *table) { - if (table != NULL) { - table->retainCount++; - } - return table; -} - -static void releaseFontTable(fontTable *table) { - if (table != NULL) { - if (table->retainCount <= 1) { - CFRelease(table->cmapTable); - free(table); - } else { - table->retainCount--; - } - } -} - -static const void *fontTableRetainCallback(CFAllocatorRef allocator, const void *value) { - return retainFontTable((fontTable *)value); -} - -static void fontTableReleaseCallback(CFAllocatorRef allocator, const void *value) { - releaseFontTable((fontTable *)value); -} - -static const CFDictionaryValueCallBacks kFontTableDictionaryValueCallBacks = { - .version = 0, - .retain = &fontTableRetainCallback, - .release = &fontTableReleaseCallback, - .copyDescription = NULL, - .equal = NULL -}; - -// read the cmap table from the font -// we only know how to understand some of the table formats at the moment -static fontTable *readFontTableFromCGFont(CGFontRef font) { - CFDataRef cmapTable = CGFontCopyTableForTag(font, 'cmap'); - NSCAssert1(cmapTable != NULL, @"CGFontCopyTableForTag returned NULL for 'cmap' tag in font %@", - (font ? [(id)CFCopyDescription(font) autorelease] : @"(null)")); - const UInt8 * const bytes = CFDataGetBytePtr(cmapTable); - NSCAssert1(OSReadBigInt16(bytes, 0) == 0, @"cmap table for font %@ has bad version number", - (font ? [(id)CFCopyDescription(font) autorelease] : @"(null)")); - UInt16 numberOfSubtables = OSReadBigInt16(bytes, 2); - const UInt8 *unicodeSubtable = NULL; - //UInt16 unicodeSubtablePlatformID; - UInt16 unicodeSubtablePlatformSpecificID; - FontTableFormat unicodeSubtableFormat; - const UInt8 * const encodingSubtables = &bytes[4]; - for (UInt16 i = 0; i < numberOfSubtables; i++) { - const UInt8 * const encodingSubtable = &encodingSubtables[8 * i]; - UInt16 platformID = OSReadBigInt16(encodingSubtable, 0); - UInt16 platformSpecificID = OSReadBigInt16(encodingSubtable, 2); - // find the best subtable - // best is defined by a combination of encoding and format - // At the moment we only support format 4, so ignore all other format tables - // We prefer platformID == 0, but we will also accept Microsoft's unicode format - if (platformID == 0 || (platformID == 3 && platformSpecificID == 1)) { - BOOL preferred = NO; - if (unicodeSubtable == NULL) { - preferred = YES; - } else if (platformID == 0 && platformSpecificID > unicodeSubtablePlatformSpecificID) { - preferred = YES; - } - if (preferred) { - UInt32 offset = OSReadBigInt32(encodingSubtable, 4); - const UInt8 *subtable = &bytes[offset]; - UInt16 format = OSReadBigInt16(subtable, 0); - for (size_t i = 0; i < supportedFormatsCount; i++) { - if (format == supportedFormats[i]) { - if (format >= 8) { - // the version is a fixed-point - UInt16 formatFrac = OSReadBigInt16(subtable, 2); - if (formatFrac != 0) { - // all the current formats with a Fixed version are always *.0 - continue; - } - } - unicodeSubtable = subtable; - //unicodeSubtablePlatformID = platformID; - unicodeSubtablePlatformSpecificID = platformSpecificID; - unicodeSubtableFormat = format; - break; - } - } - } - } - } - fontTable *table = NULL; - if (unicodeSubtable != NULL) { - table = newFontTable(cmapTable, unicodeSubtableFormat); - switch (unicodeSubtableFormat) { - case kFontTableFormat4: - // subtable format 4 - //UInt16 length = OSReadBigInt16(unicodeSubtable, 2); - //UInt16 language = OSReadBigInt16(unicodeSubtable, 4); - table->cmap.format4.segCountX2 = OSReadBigInt16(unicodeSubtable, 6); - //UInt16 searchRange = OSReadBigInt16(unicodeSubtable, 8); - //UInt16 entrySelector = OSReadBigInt16(unicodeSubtable, 10); - //UInt16 rangeShift = OSReadBigInt16(unicodeSubtable, 12); - table->cmap.format4.endCodes = (UInt16*)&unicodeSubtable[14]; - table->cmap.format4.startCodes = (UInt16*)&((UInt8*)table->cmap.format4.endCodes)[table->cmap.format4.segCountX2+2]; - table->cmap.format4.idDeltas = (UInt16*)&((UInt8*)table->cmap.format4.startCodes)[table->cmap.format4.segCountX2]; - table->cmap.format4.idRangeOffsets = (UInt16*)&((UInt8*)table->cmap.format4.idDeltas)[table->cmap.format4.segCountX2]; - //UInt16 *glyphIndexArray = &idRangeOffsets[segCountX2]; - break; - case kFontTableFormat12: - table->cmap.format12.nGroups = OSReadBigInt32(unicodeSubtable, 12); - table->cmap.format12.groups = (void *)&unicodeSubtable[16]; - break; - default: - releaseFontTable(table); - table = NULL; - } - } - CFRelease(cmapTable); - return table; -} - -// outGlyphs must be at least size n -static void mapCharactersToGlyphsInFont(const fontTable *table, unichar characters[], size_t charLen, CGGlyph outGlyphs[], size_t *outGlyphLen) { - if (table != NULL) { - NSUInteger j = 0; - switch (table->format) { - case kFontTableFormat4: { - for (NSUInteger i = 0; i < charLen; i++, j++) { - unichar c = characters[i]; - UInt16 segOffset; - BOOL foundSegment = NO; - for (segOffset = 0; segOffset < table->cmap.format4.segCountX2; segOffset += 2) { - UInt16 endCode = OSReadBigInt16(table->cmap.format4.endCodes, segOffset); - if (endCode >= c) { - foundSegment = YES; - break; - } - } - if (!foundSegment) { - // no segment - // this is an invalid font - outGlyphs[j] = 0; - } else { - UInt16 startCode = OSReadBigInt16(table->cmap.format4.startCodes, segOffset); - if (!(startCode <= c)) { - // the code falls in a hole between segments - outGlyphs[j] = 0; - } else { - UInt16 idRangeOffset = OSReadBigInt16(table->cmap.format4.idRangeOffsets, segOffset); - if (idRangeOffset == 0) { - UInt16 idDelta = OSReadBigInt16(table->cmap.format4.idDeltas, segOffset); - outGlyphs[j] = (c + idDelta) % 65536; - } else { - // use the glyphIndexArray - UInt16 glyphOffset = idRangeOffset + 2 * (c - startCode); - outGlyphs[j] = OSReadBigInt16(&((UInt8*)table->cmap.format4.idRangeOffsets)[segOffset], glyphOffset); - } - } - } - } - break; - } - case kFontTableFormat12: { - UInt32 lastSegment = UINT32_MAX; - for (NSUInteger i = 0; i < charLen; i++, j++) { - unichar c = characters[i]; - UInt32 c32 = c; - if (UnicharIsHighSurrogate(c)) { - if (i+1 < charLen) { // do we have another character after this one? - unichar cc = characters[i+1]; - if (UnicharIsLowSurrogate(cc)) { - c32 = ConvertSurrogatePairToUTF32(c, cc); - i++; - } - } - } - // Start the heuristic search - // If this is an ASCII char, just do a linear search - // Otherwise do a hinted, modified binary search - // Start the first pivot at the last range found - // And when moving the pivot, limit the movement by increasing - // powers of two. This should help with locality - __typeof__(table->cmap.format12.groups[0]) *foundGroup = NULL; - if (c32 <= 0x7F) { - // ASCII - for (UInt32 idx = 0; idx < table->cmap.format12.nGroups; idx++) { - __typeof__(table->cmap.format12.groups[idx]) *group = &table->cmap.format12.groups[idx]; - if (c32 < OSSwapBigToHostInt32(group->startCharCode)) { - // we've fallen into a hole - break; - } else if (c32 <= OSSwapBigToHostInt32(group->endCharCode)) { - // this is the range - foundGroup = group; - break; - } - } - } else { - // heuristic search - UInt32 maxJump = (lastSegment == UINT32_MAX ? UINT32_MAX / 2 : 8); - UInt32 lowIdx = 0, highIdx = table->cmap.format12.nGroups; // highIdx is the first invalid idx - UInt32 pivot = (lastSegment == UINT32_MAX ? lowIdx + (highIdx - lowIdx) / 2 : lastSegment); - while (highIdx > lowIdx) { - __typeof__(table->cmap.format12.groups[pivot]) *group = &table->cmap.format12.groups[pivot]; - if (c32 < OSSwapBigToHostInt32(group->startCharCode)) { - highIdx = pivot; - } else if (c32 > OSSwapBigToHostInt32(group->endCharCode)) { - lowIdx = pivot + 1; - } else { - // we've hit the range - foundGroup = group; - break; - } - if (highIdx - lowIdx > maxJump * 2) { - if (highIdx == pivot) { - pivot -= maxJump; - } else { - pivot += maxJump; - } - maxJump *= 2; - } else { - pivot = lowIdx + (highIdx - lowIdx) / 2; - } - } - if (foundGroup != NULL) lastSegment = pivot; - } - if (foundGroup == NULL) { - outGlyphs[j] = 0; - } else { - outGlyphs[j] = (CGGlyph)(OSSwapBigToHostInt32(foundGroup->startGlyphCode) + - (c32 - OSSwapBigToHostInt32(foundGroup->startCharCode))); - } - } - break; - } - } - if (outGlyphLen != NULL) *outGlyphLen = j; - } else { - // we have no table, so just null out the glyphs - bzero(outGlyphs, charLen*sizeof(CGGlyph)); - if (outGlyphLen != NULL) *outGlyphLen = 0; - } -} - -static BOOL mapGlyphsToAdvancesInFont(ZFont *font, size_t n, CGGlyph glyphs[], CGFloat outAdvances[]) { - int advances[n]; - if (CGFontGetGlyphAdvances(font.cgFont, glyphs, n, advances)) { - CGFloat ratio = font.ratio; - - for (size_t i = 0; i < n; i++) { - outAdvances[i] = advances[i]*ratio; - } - return YES; - } else { - bzero(outAdvances, n*sizeof(CGFloat)); - } - return NO; -} - -static id getValueOrDefaultForRun(ZAttributeRun *run, NSString *key) { - id value = [run.attributes objectForKey:key]; - if (value == nil) { - static NSDictionary *defaultValues = nil; - if (defaultValues == nil) { - defaultValues = [[NSDictionary alloc] initWithObjectsAndKeys: - [ZFont fontWithUIFont:[UIFont systemFontOfSize:12]], ZFontAttributeName, - [UIColor blackColor], ZForegroundColorAttributeName, - [UIColor clearColor], ZBackgroundColorAttributeName, - [NSNumber numberWithInt:ZUnderlineStyleNone], ZUnderlineStyleAttributeName, - nil]; - } - value = [defaultValues objectForKey:key]; - } - return value; -} - -static void readRunInformation(NSArray *attributes, NSUInteger len, CFMutableDictionaryRef fontTableMap, - NSUInteger index, ZAttributeRun **currentRun, NSUInteger *nextRunStart, - ZFont **currentFont, fontTable **currentTable) { - *currentRun = [attributes objectAtIndex:index]; - *nextRunStart = ([attributes count] > index+1 ? [[attributes objectAtIndex:index+1] index] : len); - *currentFont = getValueOrDefaultForRun(*currentRun, ZFontAttributeName); - if (!CFDictionaryGetValueIfPresent(fontTableMap, (*currentFont).cgFont, (const void **)currentTable)) { - *currentTable = readFontTableFromCGFont((*currentFont).cgFont); - CFDictionarySetValue(fontTableMap, (*currentFont).cgFont, *currentTable); - releaseFontTable(*currentTable); - } -} - -static CGSize drawOrSizeTextConstrainedToSize(BOOL performDraw, NSString *string, NSArray *attributes, CGSize constrainedSize, NSUInteger maxLines, - UILineBreakMode lineBreakMode, UITextAlignment alignment, BOOL ignoreColor) { - NSUInteger len = [string length]; - NSUInteger idx = 0; - CGPoint drawPoint = CGPointZero; - CGSize retValue = CGSizeZero; - CGContextRef ctx = (performDraw ? UIGraphicsGetCurrentContext() : NULL); - - BOOL convertNewlines = (maxLines == 1); - - // Extract the characters from the string - // Convert newlines to spaces if necessary - unichar *characters = (unichar *)malloc(sizeof(unichar) * len); - if (convertNewlines) { - NSCharacterSet *charset = [NSCharacterSet newlineCharacterSet]; - NSRange range = NSMakeRange(0, len); - size_t cIdx = 0; - while (range.length > 0) { - NSRange newlineRange = [string rangeOfCharacterFromSet:charset options:0 range:range]; - if (newlineRange.location == NSNotFound) { - [string getCharacters:&characters[cIdx] range:range]; - cIdx += range.length; - break; - } else { - NSUInteger delta = newlineRange.location - range.location; - if (newlineRange.location > range.location) { - [string getCharacters:&characters[cIdx] range:NSMakeRange(range.location, delta)]; - } - cIdx += delta; - characters[cIdx] = (unichar)' '; - cIdx++; - delta += newlineRange.length; - range.location += delta, range.length -= delta; - if (newlineRange.length == 1 && range.length >= 1 && - [string characterAtIndex:newlineRange.location] == (unichar)'\r' && - [string characterAtIndex:range.location] == (unichar)'\n') { - // CRLF sequence, skip the LF - range.location += 1, range.length -= 1; - } - } - } - len = cIdx; - } else { - [string getCharacters:characters range:NSMakeRange(0, len)]; - } - - // Create storage for glyphs and advances - CGGlyph *glyphs; - CGFloat *advances; - { - NSUInteger maxRunLength = 0; - ZAttributeRun *a = [attributes objectAtIndex:0]; - for (NSUInteger i = 1; i < [attributes count]; i++) { - ZAttributeRun *b = [attributes objectAtIndex:i]; - maxRunLength = MAX(maxRunLength, b.index - a.index); - a = b; - } - maxRunLength = MAX(maxRunLength, len - a.index); - maxRunLength++; // for a potential ellipsis - glyphs = (CGGlyph *)malloc(sizeof(CGGlyph) * maxRunLength); - advances = (CGFloat *)malloc(sizeof(CGFloat) * maxRunLength); - } - - // Use this table to cache all fontTable objects - CFMutableDictionaryRef fontTableMap = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, - &kFontTableDictionaryValueCallBacks); - - // Fetch initial style values - NSUInteger currentRunIdx = 0; - ZAttributeRun *currentRun; - NSUInteger nextRunStart; - ZFont *currentFont; - fontTable *currentTable; - -#define READ_RUN() readRunInformation(attributes, len, fontTableMap, \ - currentRunIdx, ¤tRun, &nextRunStart, \ - ¤tFont, ¤tTable) - - READ_RUN(); - - // fetch the glyphs for the first run - size_t glyphCount; - NSUInteger glyphIdx; - -#define READ_GLYPHS() do { \ - mapCharactersToGlyphsInFont(currentTable, &characters[currentRun.index], (nextRunStart - currentRun.index), glyphs, &glyphCount); \ - mapGlyphsToAdvancesInFont(currentFont, (nextRunStart - currentRun.index), glyphs, advances); \ - glyphIdx = 0; \ - } while (0) - - READ_GLYPHS(); - - NSMutableCharacterSet *alphaCharset = [NSMutableCharacterSet alphanumericCharacterSet]; - [alphaCharset addCharactersInString:@"([{'\"\u2019\u02BC"]; - - // scan left-to-right looking for newlines or until we hit the width constraint - // When we hit a wrapping point, calculate truncation as follows: - // If we have room to draw at least one more character on the next line, no truncation - // Otherwise apply the truncation algorithm to the current line. - // After calculating any truncation, draw. - // Each time we hit the end of an attribute run, calculate the new font and make sure - // it fits (vertically) within the size constraint. If not, truncate this line. - // When we draw, iterate over the attribute runs for this line and draw each run separately - BOOL lastLine = NO; // used to indicate truncation and to stop the iterating - NSUInteger lineCount = 1; - while (idx < len && !lastLine) { - if (maxLines > 0 && lineCount == maxLines) { - lastLine = YES; - } - // scan left-to-right - struct { - NSUInteger index; - NSUInteger glyphIndex; - NSUInteger currentRunIdx; - } indexCache = { idx, glyphIdx, currentRunIdx }; - CGSize lineSize = CGSizeMake(0, currentFont.leading); - CGFloat lineAscender = currentFont.ascender; - struct { - NSUInteger index; - NSUInteger glyphIndex; - NSUInteger currentRunIdx; - CGSize lineSize; - } lastWrapCache = {0, 0, 0, CGSizeZero}; - BOOL inAlpha = NO; // used for calculating wrap points - - BOOL finishLine = NO; - for (;idx <= len && !finishLine;) { - NSUInteger skipCount = 0; - if (idx == len) { - finishLine = YES; - lastLine = YES; - } else { - if (idx >= nextRunStart) { - // cycle the font and table and grab the next set of glyphs - do { - currentRunIdx++; - READ_RUN(); - } while (idx >= nextRunStart); - READ_GLYPHS(); - // re-scan the characters to synchronize the glyph index - for (NSUInteger j = currentRun.index; j < idx; j++) { - if (UnicharIsHighSurrogate(characters[j]) && j+1 lineSize.height) { - lineSize.height = currentFont.leading; - if (retValue.height + currentFont.ascender > constrainedSize.height) { - lastLine = YES; - finishLine = YES; - } - } - lineAscender = MAX(lineAscender, currentFont.ascender); - } - unichar c = characters[idx]; - // Mark a wrap point before spaces and after any stretch of non-alpha characters - BOOL markWrap = NO; - if (c == (unichar)' ') { - markWrap = YES; - } else if ([alphaCharset characterIsMember:c]) { - if (!inAlpha) { - markWrap = YES; - inAlpha = YES; - } - } else { - inAlpha = NO; - } - if (markWrap) { - lastWrapCache = (__typeof__(lastWrapCache)){ - .index = idx, - .glyphIndex = glyphIdx, - .currentRunIdx = currentRunIdx, - .lineSize = lineSize - }; - } - // process the line - if (c == (unichar)'\n' || c == 0x0085) { // U+0085 is the NEXT_LINE unicode character - finishLine = YES; - skipCount = 1; - } else if (c == (unichar)'\r') { - finishLine = YES; - // check for CRLF - if (idx+1 < len && characters[idx+1] == (unichar)'\n') { - skipCount = 2; - } else { - skipCount = 1; - } - } else if (lineSize.width + advances[glyphIdx] > constrainedSize.width) { - finishLine = YES; - if (retValue.height + lineSize.height + currentFont.ascender > constrainedSize.height) { - lastLine = YES; - } - // walk backwards if wrapping is necessary - if (lastWrapCache.index > indexCache.index && lineBreakMode != UILineBreakModeCharacterWrap && - (!lastLine || lineBreakMode != UILineBreakModeClip)) { - // we're doing some sort of word wrapping - idx = lastWrapCache.index; - lineSize = lastWrapCache.lineSize; - if (!lastLine) { - // re-check if this is the last line - if (lastWrapCache.currentRunIdx != currentRunIdx) { - currentRunIdx = lastWrapCache.currentRunIdx; - READ_RUN(); - READ_GLYPHS(); - } - if (retValue.height + lineSize.height + currentFont.ascender > constrainedSize.height) { - lastLine = YES; - } - } - glyphIdx = lastWrapCache.glyphIndex; - // skip any spaces - for (NSUInteger j = idx; j < len && characters[j] == (unichar)' '; j++) { - skipCount++; - } - } - } - } - if (finishLine) { - // TODO: support head/middle truncation - if (lastLine && idx < len && lineBreakMode == UILineBreakModeTailTruncation) { - // truncate - unichar ellipsis = 0x2026; // ellipsis (…) - CGGlyph ellipsisGlyph; - mapCharactersToGlyphsInFont(currentTable, &ellipsis, 1, &ellipsisGlyph, NULL); - CGFloat ellipsisWidth; - mapGlyphsToAdvancesInFont(currentFont, 1, &ellipsisGlyph, &ellipsisWidth); - while ((idx - indexCache.index) > 1 && lineSize.width + ellipsisWidth > constrainedSize.width) { - // we have more than 1 character and we're too wide, so back up - idx--; - if (UnicharIsHighSurrogate(characters[idx]) && UnicharIsLowSurrogate(characters[idx+1])) { - idx--; - } - if (idx < currentRun.index) { - ZFont *oldFont = currentFont; - do { - currentRunIdx--; - READ_RUN(); - } while (idx < currentRun.index); - READ_GLYPHS(); - glyphIdx = glyphCount-1; - if (oldFont != currentFont) { - mapCharactersToGlyphsInFont(currentTable, &ellipsis, 1, &ellipsisGlyph, NULL); - mapGlyphsToAdvancesInFont(currentFont, 1, &ellipsisGlyph, &ellipsisWidth); - } - } else { - glyphIdx--; - } - lineSize.width -= advances[glyphIdx]; - } - // skip any spaces before truncating - while ((idx - indexCache.index) > 1 && characters[idx-1] == (unichar)' ') { - idx--; - if (idx < currentRun.index) { - currentRunIdx--; - READ_RUN(); - READ_GLYPHS(); - glyphIdx = glyphCount-1; - } else { - glyphIdx--; - } - lineSize.width -= advances[glyphIdx]; - } - lineSize.width += ellipsisWidth; - glyphs[glyphIdx] = ellipsisGlyph; - idx++; - glyphIdx++; - } - retValue.width = MAX(retValue.width, lineSize.width); - retValue.height += lineSize.height; - - // draw - if (performDraw) { - switch (alignment) { - case UITextAlignmentLeft: - drawPoint.x = 0; - break; - case UITextAlignmentCenter: - drawPoint.x = (constrainedSize.width - lineSize.width) / 2.0f; - break; - case UITextAlignmentRight: - drawPoint.x = constrainedSize.width - lineSize.width; - break; - } - NSUInteger stopGlyphIdx = glyphIdx; - NSUInteger lastRunIdx = currentRunIdx; - NSUInteger stopCharIdx = idx; - idx = indexCache.index; - if (currentRunIdx != indexCache.currentRunIdx) { - currentRunIdx = indexCache.currentRunIdx; - READ_RUN(); - READ_GLYPHS(); - } - glyphIdx = indexCache.glyphIndex; - for (NSUInteger drawIdx = currentRunIdx; drawIdx <= lastRunIdx; drawIdx++) { - if (drawIdx != currentRunIdx) { - currentRunIdx = drawIdx; - READ_RUN(); - READ_GLYPHS(); - } - NSUInteger numGlyphs; - if (drawIdx == lastRunIdx) { - numGlyphs = stopGlyphIdx - glyphIdx; - idx = stopCharIdx; - } else { - numGlyphs = glyphCount - glyphIdx; - idx = nextRunStart; - } - CGContextSetFont(ctx, currentFont.cgFont); - CGContextSetFontSize(ctx, currentFont.pointSize); - // calculate the fragment size - CGFloat fragmentWidth = 0; - for (NSUInteger g = 0; g < numGlyphs; g++) { - fragmentWidth += advances[glyphIdx + g]; - } - - if (!ignoreColor) { - UIColor *foregroundColor = getValueOrDefaultForRun(currentRun, ZForegroundColorAttributeName); - UIColor *backgroundColor = getValueOrDefaultForRun(currentRun, ZBackgroundColorAttributeName); - if (backgroundColor != nil && ![backgroundColor isEqual:[UIColor clearColor]]) { - [backgroundColor setFill]; - UIRectFillUsingBlendMode((CGRect){ drawPoint, { fragmentWidth, lineSize.height } }, kCGBlendModeNormal); - } - [foregroundColor setFill]; - } - - CGContextShowGlyphsAtPoint(ctx, drawPoint.x, drawPoint.y + lineAscender, &glyphs[glyphIdx], numGlyphs); - NSNumber *underlineStyle = getValueOrDefaultForRun(currentRun, ZUnderlineStyleAttributeName); - if ([underlineStyle integerValue] & ZUnderlineStyleMask) { - // we only support single for the time being - UIRectFill(CGRectMake(drawPoint.x, drawPoint.y + lineAscender, fragmentWidth, 1)); - } - drawPoint.x += fragmentWidth; - glyphIdx += numGlyphs; - } - drawPoint.y += lineSize.height; - } - idx += skipCount; - glyphIdx += skipCount; - lineCount++; - } else { - lineSize.width += advances[glyphIdx]; - glyphIdx++; - idx++; - if (idx < len && UnicharIsHighSurrogate(characters[idx-1]) && UnicharIsLowSurrogate(characters[idx])) { - // skip the second half of the surrogate pair - idx++; - } - } - } - } - CFRelease(fontTableMap); - free(glyphs); - free(advances); - free(characters); - -#undef READ_GLYPHS -#undef READ_RUN - - return retValue; -} - -static NSArray *attributeRunForFont(ZFont *font) { - return [NSArray arrayWithObject:[ZAttributeRun attributeRunWithIndex:0 - attributes:[NSDictionary dictionaryWithObject:font - forKey:ZFontAttributeName]]]; -} - -static CGSize drawTextInRect(CGRect rect, NSString *text, NSArray *attributes, UILineBreakMode lineBreakMode, - UITextAlignment alignment, NSUInteger numberOfLines, BOOL ignoreColor) { - CGContextRef ctx = UIGraphicsGetCurrentContext(); - - CGContextSaveGState(ctx); - - // flip it upside-down because our 0,0 is upper-left, whereas ttfs are for screens where 0,0 is lower-left - CGAffineTransform textTransform = CGAffineTransformMake(1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f); - CGContextSetTextMatrix(ctx, textTransform); - - CGContextTranslateCTM(ctx, rect.origin.x, rect.origin.y); - - CGContextSetTextDrawingMode(ctx, kCGTextFill); - CGSize size = drawOrSizeTextConstrainedToSize(YES, text, attributes, rect.size, numberOfLines, lineBreakMode, alignment, ignoreColor); - - CGContextRestoreGState(ctx); - - return size; -} - -@implementation NSString (FontLabelStringDrawing) -// CGFontRef-based methods -- (CGSize)sizeWithCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize { - return [self sizeWithZFont:[ZFont fontWithCGFont:font size:pointSize]]; -} - -- (CGSize)sizeWithCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize constrainedToSize:(CGSize)size { - return [self sizeWithZFont:[ZFont fontWithCGFont:font size:pointSize] constrainedToSize:size]; -} - -- (CGSize)sizeWithCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize constrainedToSize:(CGSize)size - lineBreakMode:(UILineBreakMode)lineBreakMode { - return [self sizeWithZFont:[ZFont fontWithCGFont:font size:pointSize] constrainedToSize:size lineBreakMode:lineBreakMode]; -} - -- (CGSize)drawAtPoint:(CGPoint)point withCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize { - return [self drawAtPoint:point withZFont:[ZFont fontWithCGFont:font size:pointSize]]; -} - -- (CGSize)drawInRect:(CGRect)rect withCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize { - return [self drawInRect:rect withZFont:[ZFont fontWithCGFont:font size:pointSize]]; -} - -- (CGSize)drawInRect:(CGRect)rect withCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize lineBreakMode:(UILineBreakMode)lineBreakMode { - return [self drawInRect:rect withZFont:[ZFont fontWithCGFont:font size:pointSize] lineBreakMode:lineBreakMode]; -} - -- (CGSize)drawInRect:(CGRect)rect withCGFont:(CGFontRef)font pointSize:(CGFloat)pointSize - lineBreakMode:(UILineBreakMode)lineBreakMode alignment:(UITextAlignment)alignment { - return [self drawInRect:rect withZFont:[ZFont fontWithCGFont:font size:pointSize] lineBreakMode:lineBreakMode alignment:alignment]; -} - -// ZFont-based methods -- (CGSize)sizeWithZFont:(ZFont *)font { - CGSize size = drawOrSizeTextConstrainedToSize(NO, self, attributeRunForFont(font), CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX), 1, - UILineBreakModeClip, UITextAlignmentLeft, YES); - return CGSizeMake(ceilf(size.width), ceilf(size.height)); -} - -- (CGSize)sizeWithZFont:(ZFont *)font constrainedToSize:(CGSize)size { - return [self sizeWithZFont:font constrainedToSize:size lineBreakMode:UILineBreakModeWordWrap]; -} - -/* - According to experimentation with UIStringDrawing, this can actually return a CGSize whose height is greater - than the one passed in. The two cases are as follows: - 1. If the given size parameter's height is smaller than a single line, the returned value will - be the height of one line. - 2. If the given size parameter's height falls between multiples of a line height, and the wrapped string - actually extends past the size.height, and the difference between size.height and the previous multiple - of a line height is >= the font's ascender, then the returned size's height is extended to the next line. - To put it simply, if the baseline point of a given line falls in the given size, the entire line will - be present in the output size. - */ -- (CGSize)sizeWithZFont:(ZFont *)font constrainedToSize:(CGSize)size lineBreakMode:(UILineBreakMode)lineBreakMode { - size = drawOrSizeTextConstrainedToSize(NO, self, attributeRunForFont(font), size, 0, lineBreakMode, UITextAlignmentLeft, YES); - return CGSizeMake(ceilf(size.width), ceilf(size.height)); -} - -- (CGSize)sizeWithZFont:(ZFont *)font constrainedToSize:(CGSize)size lineBreakMode:(UILineBreakMode)lineBreakMode - numberOfLines:(NSUInteger)numberOfLines { - size = drawOrSizeTextConstrainedToSize(NO, self, attributeRunForFont(font), size, numberOfLines, lineBreakMode, UITextAlignmentLeft, YES); - return CGSizeMake(ceilf(size.width), ceilf(size.height)); -} - -- (CGSize)drawAtPoint:(CGPoint)point withZFont:(ZFont *)font { - return [self drawAtPoint:point forWidth:CGFLOAT_MAX withZFont:font lineBreakMode:UILineBreakModeClip]; -} - -- (CGSize)drawAtPoint:(CGPoint)point forWidth:(CGFloat)width withZFont:(ZFont *)font lineBreakMode:(UILineBreakMode)lineBreakMode { - return drawTextInRect((CGRect){ point, { width, CGFLOAT_MAX } }, self, attributeRunForFont(font), lineBreakMode, UITextAlignmentLeft, 1, YES); -} - -- (CGSize)drawInRect:(CGRect)rect withZFont:(ZFont *)font { - return [self drawInRect:rect withZFont:font lineBreakMode:UILineBreakModeWordWrap]; -} - -- (CGSize)drawInRect:(CGRect)rect withZFont:(ZFont *)font lineBreakMode:(UILineBreakMode)lineBreakMode { - return [self drawInRect:rect withZFont:font lineBreakMode:lineBreakMode alignment:UITextAlignmentLeft]; -} - -- (CGSize)drawInRect:(CGRect)rect withZFont:(ZFont *)font lineBreakMode:(UILineBreakMode)lineBreakMode - alignment:(UITextAlignment)alignment { - return drawTextInRect(rect, self, attributeRunForFont(font), lineBreakMode, alignment, 0, YES); -} - -- (CGSize)drawInRect:(CGRect)rect withZFont:(ZFont *)font lineBreakMode:(UILineBreakMode)lineBreakMode - alignment:(UITextAlignment)alignment numberOfLines:(NSUInteger)numberOfLines { - return drawTextInRect(rect, self, attributeRunForFont(font), lineBreakMode, alignment, numberOfLines, YES); -} -@end - -@implementation ZAttributedString (ZAttributedStringDrawing) -- (CGSize)size { - CGSize size = drawOrSizeTextConstrainedToSize(NO, self.string, self.attributes, CGSizeMake(CGFLOAT_MAX, CGFLOAT_MAX), 1, - UILineBreakModeClip, UITextAlignmentLeft, NO); - return CGSizeMake(ceilf(size.width), ceilf(size.height)); -} - -- (CGSize)sizeConstrainedToSize:(CGSize)size { - return [self sizeConstrainedToSize:size lineBreakMode:UILineBreakModeWordWrap]; -} - -- (CGSize)sizeConstrainedToSize:(CGSize)size lineBreakMode:(UILineBreakMode)lineBreakMode { - size = drawOrSizeTextConstrainedToSize(NO, self.string, self.attributes, size, 0, lineBreakMode, UITextAlignmentLeft, NO); - return CGSizeMake(ceilf(size.width), ceilf(size.height)); -} - -- (CGSize)sizeConstrainedToSize:(CGSize)size lineBreakMode:(UILineBreakMode)lineBreakMode - numberOfLines:(NSUInteger)numberOfLines { - size = drawOrSizeTextConstrainedToSize(NO, self.string, self.attributes, size, numberOfLines, lineBreakMode, UITextAlignmentLeft, NO); - return CGSizeMake(ceilf(size.width), ceilf(size.height)); -} - -- (CGSize)drawAtPoint:(CGPoint)point { - return [self drawAtPoint:point forWidth:CGFLOAT_MAX lineBreakMode:UILineBreakModeClip]; -} - -- (CGSize)drawAtPoint:(CGPoint)point forWidth:(CGFloat)width lineBreakMode:(UILineBreakMode)lineBreakMode { - return drawTextInRect((CGRect){ point, { width, CGFLOAT_MAX } }, self.string, self.attributes, lineBreakMode, UITextAlignmentLeft, 1, NO); -} - -- (CGSize)drawInRect:(CGRect)rect { - return [self drawInRect:rect withLineBreakMode:UILineBreakModeWordWrap]; -} - -- (CGSize)drawInRect:(CGRect)rect withLineBreakMode:(UILineBreakMode)lineBreakMode { - return [self drawInRect:rect withLineBreakMode:lineBreakMode alignment:UITextAlignmentLeft]; -} - -- (CGSize)drawInRect:(CGRect)rect withLineBreakMode:(UILineBreakMode)lineBreakMode alignment:(UITextAlignment)alignment { - return drawTextInRect(rect, self.string, self.attributes, lineBreakMode, alignment, 0, NO); -} - -- (CGSize)drawInRect:(CGRect)rect withLineBreakMode:(UILineBreakMode)lineBreakMode alignment:(UITextAlignment)alignment - numberOfLines:(NSUInteger)numberOfLines { - return drawTextInRect(rect, self.string, self.attributes, lineBreakMode, alignment, numberOfLines, NO); -} -@end diff --git a/Littlest/libs/FontLabel/FontManager.h b/Littlest/libs/FontLabel/FontManager.h deleted file mode 100644 index 1592b8a..0000000 --- a/Littlest/libs/FontLabel/FontManager.h +++ /dev/null @@ -1,85 +0,0 @@ -// -// FontManager.h -// FontLabel -// -// Created by Kevin Ballard on 5/5/09. -// Copyright © 2009 Zynga Game Networks -// -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@class ZFont; - -@interface FontManager : NSObject { - CFMutableDictionaryRef fonts; - NSMutableDictionary *urls; -} -+ (FontManager *)sharedManager; -/*! - @method - @abstract Loads a TTF font from the main bundle - @param filename The name of the font file to load (with or without extension). - @return YES if the font was loaded, NO if an error occurred - @discussion If the font has already been loaded, this method does nothing and returns YES. - This method first attempts to load the font by appending .ttf to the filename. - If that file does not exist, it tries the filename exactly as given. -*/ -- (BOOL)loadFont:(NSString *)filename; -/*! - @method - @abstract Loads a font from the given file URL - @param url A file URL that points to a font file - @return YES if the font was loaded, NO if an error occurred - @discussion If the font has already been loaded, this method does nothing and returns YES. -*/ -- (BOOL)loadFontURL:(NSURL *)url; -/*! - @method - @abstract Returns the loaded font with the given filename - @param filename The name of the font file that was given to -loadFont: - @return A CGFontRef, or NULL if the specified font cannot be found - @discussion If the font has not been loaded yet, -loadFont: will be - called with the given name first. -*/ -- (CGFontRef)fontWithName:(NSString *)filename __AVAILABILITY_INTERNAL_DEPRECATED; -/*! - @method - @abstract Returns a ZFont object corresponding to the loaded font with the given filename and point size - @param filename The name of the font file that was given to -loadFont: - @param pointSize The point size of the font - @return A ZFont, or NULL if the specified font cannot be found - @discussion If the font has not been loaded yet, -loadFont: will be - called with the given name first. -*/ -- (ZFont *)zFontWithName:(NSString *)filename pointSize:(CGFloat)pointSize; -/*! - @method - @abstract Returns a ZFont object corresponding to the loaded font with the given file URL and point size - @param url A file URL that points to a font file - @param pointSize The point size of the font - @return A ZFont, or NULL if the specified font cannot be loaded - @discussion If the font has not been loaded yet, -loadFontURL: will be called with the given URL first. -*/ -- (ZFont *)zFontWithURL:(NSURL *)url pointSize:(CGFloat)pointSize; -/*! - @method - @abstract Returns a CFArrayRef of all loaded CGFont objects - @return A CFArrayRef of all loaded CGFont objects - @description You are responsible for releasing the CFArrayRef -*/ -- (CFArrayRef)copyAllFonts; -@end diff --git a/Littlest/libs/FontLabel/FontManager.m b/Littlest/libs/FontLabel/FontManager.m deleted file mode 100644 index 12eac2d..0000000 --- a/Littlest/libs/FontLabel/FontManager.m +++ /dev/null @@ -1,123 +0,0 @@ -// -// FontManager.m -// FontLabel -// -// Created by Kevin Ballard on 5/5/09. -// Copyright © 2009 Zynga Game Networks -// -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "FontManager.h" -#import "ZFont.h" - -static FontManager *sharedFontManager = nil; - -@implementation FontManager -+ (FontManager *)sharedManager { - @synchronized(self) { - if (sharedFontManager == nil) { - sharedFontManager = [[self alloc] init]; - } - } - return sharedFontManager; -} - -- (id)init { - if ((self = [super init])) { - fonts = CFDictionaryCreateMutable(NULL, 0, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - urls = [[NSMutableDictionary alloc] init]; - } - return self; -} - -- (BOOL)loadFont:(NSString *)filename { - NSString *fontPath = [[NSBundle mainBundle] pathForResource:filename ofType:@"ttf"]; - if (fontPath == nil) { - fontPath = [[NSBundle mainBundle] pathForResource:filename ofType:nil]; - } - if (fontPath == nil) return NO; - - NSURL *url = [NSURL fileURLWithPath:fontPath]; - if ([self loadFontURL:url]) { - [urls setObject:url forKey:filename]; - return YES; - } - return NO; -} - -- (BOOL)loadFontURL:(NSURL *)url { - CGDataProviderRef fontDataProvider = CGDataProviderCreateWithURL((CFURLRef)url); - if (fontDataProvider == NULL) return NO; - CGFontRef newFont = CGFontCreateWithDataProvider(fontDataProvider); - CGDataProviderRelease(fontDataProvider); - if (newFont == NULL) return NO; - - CFDictionarySetValue(fonts, url, newFont); - CGFontRelease(newFont); - return YES; -} - -- (CGFontRef)fontWithName:(NSString *)filename { - CGFontRef font = NULL; - NSURL *url = [urls objectForKey:filename]; - if (url == nil && [self loadFont:filename]) { - url = [urls objectForKey:filename]; - } - if (url != nil) { - font = (CGFontRef)CFDictionaryGetValue(fonts, url); - } - return font; -} - -- (ZFont *)zFontWithName:(NSString *)filename pointSize:(CGFloat)pointSize { - NSURL *url = [urls objectForKey:filename]; - if (url == nil && [self loadFont:filename]) { - url = [urls objectForKey:filename]; - } - if (url != nil) { - CGFontRef cgFont = (CGFontRef)CFDictionaryGetValue(fonts, url); - if (cgFont != NULL) { - return [ZFont fontWithCGFont:cgFont size:pointSize]; - } - } - return nil; -} - -- (ZFont *)zFontWithURL:(NSURL *)url pointSize:(CGFloat)pointSize { - CGFontRef cgFont = (CGFontRef)CFDictionaryGetValue(fonts, url); - if (cgFont == NULL && [self loadFontURL:url]) { - cgFont = (CGFontRef)CFDictionaryGetValue(fonts, url); - } - if (cgFont != NULL) { - return [ZFont fontWithCGFont:cgFont size:pointSize]; - } - return nil; -} - -- (CFArrayRef)copyAllFonts { - CFIndex count = CFDictionaryGetCount(fonts); - CGFontRef *values = (CGFontRef *)malloc(sizeof(CGFontRef) * count); - CFDictionaryGetKeysAndValues(fonts, NULL, (const void **)values); - CFArrayRef array = CFArrayCreate(NULL, (const void **)values, count, &kCFTypeArrayCallBacks); - free(values); - return array; -} - -- (void)dealloc { - CFRelease(fonts); - [urls release]; - [super dealloc]; -} -@end diff --git a/Littlest/libs/FontLabel/ZAttributedString.h b/Littlest/libs/FontLabel/ZAttributedString.h deleted file mode 100644 index e194c81..0000000 --- a/Littlest/libs/FontLabel/ZAttributedString.h +++ /dev/null @@ -1,77 +0,0 @@ -// -// ZAttributedString.h -// FontLabel -// -// Created by Kevin Ballard on 9/22/09. -// Copyright 2009 Zynga Game Networks. All rights reserved. -// - -#import - -#if NS_BLOCKS_AVAILABLE -#define Z_BLOCKS 1 -#else -// set this to 1 if you are using PLBlocks -#define Z_BLOCKS 0 -#endif - -#if Z_BLOCKS -enum { - ZAttributedStringEnumerationReverse = (1UL << 1), - ZAttributedStringEnumerationLongestEffectiveRangeNotRequired = (1UL << 20) -}; -typedef NSUInteger ZAttributedStringEnumerationOptions; -#endif - -@interface ZAttributedString : NSObject { - NSMutableString *_buffer; - NSMutableArray *_attributes; -} -@property (nonatomic, readonly) NSUInteger length; -@property (nonatomic, readonly) NSString *string; -- (id)initWithAttributedString:(ZAttributedString *)attr; -- (id)initWithString:(NSString *)str; -- (id)initWithString:(NSString *)str attributes:(NSDictionary *)attributes; -- (id)attribute:(NSString *)attributeName atIndex:(NSUInteger)index effectiveRange:(NSRangePointer)aRange; -- (id)attribute:(NSString *)attributeName atIndex:(NSUInteger)index longestEffectiveRange:(NSRangePointer)aRange inRange:(NSRange)rangeLimit; -- (ZAttributedString *)attributedSubstringFromRange:(NSRange)aRange; -- (NSDictionary *)attributesAtIndex:(NSUInteger)index effectiveRange:(NSRangePointer)aRange; -- (NSDictionary *)attributesAtIndex:(NSUInteger)index longestEffectiveRange:(NSRangePointer)aRange inRange:(NSRange)rangeLimit; -#if Z_BLOCKS -- (void)enumerateAttribute:(NSString *)attrName inRange:(NSRange)enumerationRange options:(ZAttributedStringEnumerationOptions)opts - usingBlock:(void (^)(id value, NSRange range, BOOL *stop))block; -- (void)enumerateAttributesInRange:(NSRange)enumerationRange options:(ZAttributedStringEnumerationOptions)opts - usingBlock:(void (^)(NSDictionary *attrs, NSRange range, BOOL *stop))block; -#endif -- (BOOL)isEqualToAttributedString:(ZAttributedString *)otherString; -@end - -@interface ZMutableAttributedString : ZAttributedString { -} -- (void)addAttribute:(NSString *)name value:(id)value range:(NSRange)range; -- (void)addAttributes:(NSDictionary *)attributes range:(NSRange)range; -- (void)appendAttributedString:(ZAttributedString *)str; -- (void)deleteCharactersInRange:(NSRange)range; -- (void)insertAttributedString:(ZAttributedString *)str atIndex:(NSUInteger)idx; -- (void)removeAttribute:(NSString *)name range:(NSRange)range; -- (void)replaceCharactersInRange:(NSRange)range withAttributedString:(ZAttributedString *)str; -- (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)str; -- (void)setAttributedString:(ZAttributedString *)str; -- (void)setAttributes:(NSDictionary *)attributes range:(NSRange)range; -@end - -extern NSString * const ZFontAttributeName; -extern NSString * const ZForegroundColorAttributeName; -extern NSString * const ZBackgroundColorAttributeName; -extern NSString * const ZUnderlineStyleAttributeName; - -enum { - ZUnderlineStyleNone = 0x00, - ZUnderlineStyleSingle = 0x01 -}; -#define ZUnderlineStyleMask 0x00FF - -enum { - ZUnderlinePatternSolid = 0x0000 -}; -#define ZUnderlinePatternMask 0xFF00 diff --git a/Littlest/libs/FontLabel/ZAttributedString.m b/Littlest/libs/FontLabel/ZAttributedString.m deleted file mode 100644 index 79f0323..0000000 --- a/Littlest/libs/FontLabel/ZAttributedString.m +++ /dev/null @@ -1,596 +0,0 @@ -// -// ZAttributedString.m -// FontLabel -// -// Created by Kevin Ballard on 9/22/09. -// Copyright 2009 Zynga Game Networks. All rights reserved. -// - -#import "ZAttributedString.h" -#import "ZAttributedStringPrivate.h" - -@interface ZAttributedString () -- (NSUInteger)indexOfEffectiveAttributeRunForIndex:(NSUInteger)index; -- (NSDictionary *)attributesAtIndex:(NSUInteger)index effectiveRange:(NSRangePointer)aRange uniquingOnName:(NSString *)attributeName; -- (NSDictionary *)attributesAtIndex:(NSUInteger)index longestEffectiveRange:(NSRangePointer)aRange - inRange:(NSRange)rangeLimit uniquingOnName:(NSString *)attributeName; -@end - -@interface ZAttributedString () -@property (nonatomic, readonly) NSArray *attributes; -@end - -@implementation ZAttributedString -@synthesize string = _buffer; -@synthesize attributes = _attributes; - -- (id)initWithAttributedString:(ZAttributedString *)attr { - NSParameterAssert(attr != nil); - if ((self = [super init])) { - _buffer = [attr->_buffer mutableCopy]; - _attributes = [[NSMutableArray alloc] initWithArray:attr->_attributes copyItems:YES]; - } - return self; -} - -- (id)initWithString:(NSString *)str { - return [self initWithString:str attributes:nil]; -} - -- (id)initWithString:(NSString *)str attributes:(NSDictionary *)attributes { - if ((self = [super init])) { - _buffer = [str mutableCopy]; - _attributes = [[NSMutableArray alloc] initWithObjects:[ZAttributeRun attributeRunWithIndex:0 attributes:attributes], nil]; - } - return self; -} - -- (id)init { - return [self initWithString:@"" attributes:nil]; -} - -- (id)initWithCoder:(NSCoder *)decoder { - if ((self = [super init])) { - _buffer = [[decoder decodeObjectForKey:@"buffer"] mutableCopy]; - _attributes = [[decoder decodeObjectForKey:@"attributes"] mutableCopy]; - } - return self; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [aCoder encodeObject:_buffer forKey:@"buffer"]; - [aCoder encodeObject:_attributes forKey:@"attributes"]; -} - -- (id)copyWithZone:(NSZone *)zone { - return [self retain]; -} - -- (id)mutableCopyWithZone:(NSZone *)zone { - return [(ZMutableAttributedString *)[ZMutableAttributedString allocWithZone:zone] initWithAttributedString:self]; -} - -- (NSUInteger)length { - return [_buffer length]; -} - -- (NSString *)description { - NSMutableArray *components = [NSMutableArray arrayWithCapacity:[_attributes count]*2]; - NSRange range = NSMakeRange(0, 0); - for (NSUInteger i = 0; i <= [_attributes count]; i++) { - range.location = NSMaxRange(range); - ZAttributeRun *run; - if (i < [_attributes count]) { - run = [_attributes objectAtIndex:i]; - range.length = run.index - range.location; - } else { - run = nil; - range.length = [_buffer length] - range.location; - } - if (range.length > 0) { - [components addObject:[NSString stringWithFormat:@"\"%@\"", [_buffer substringWithRange:range]]]; - } - if (run != nil) { - NSMutableArray *attrDesc = [NSMutableArray arrayWithCapacity:[run.attributes count]]; - for (id key in run.attributes) { - [attrDesc addObject:[NSString stringWithFormat:@"%@: %@", key, [run.attributes objectForKey:key]]]; - } - [components addObject:[NSString stringWithFormat:@"{%@}", [attrDesc componentsJoinedByString:@", "]]]; - } - } - return [NSString stringWithFormat:@"%@", [components componentsJoinedByString:@" "]]; -} - -- (id)attribute:(NSString *)attributeName atIndex:(NSUInteger)index effectiveRange:(NSRangePointer)aRange { - NSParameterAssert(attributeName != nil); - return [[self attributesAtIndex:index effectiveRange:aRange uniquingOnName:attributeName] objectForKey:attributeName]; -} - -- (id)attribute:(NSString *)attributeName atIndex:(NSUInteger)index longestEffectiveRange:(NSRangePointer)aRange inRange:(NSRange)rangeLimit { - NSParameterAssert(attributeName != nil); - return [[self attributesAtIndex:index longestEffectiveRange:aRange inRange:rangeLimit uniquingOnName:attributeName] objectForKey:attributeName]; -} - -- (ZAttributedString *)attributedSubstringFromRange:(NSRange)aRange { - if (NSMaxRange(aRange) > [_buffer length]) { - @throw [NSException exceptionWithName:NSRangeException reason:@"range was outisde of the attributed string" userInfo:nil]; - } - ZMutableAttributedString *newStr = [self mutableCopy]; - if (aRange.location > 0) { - [newStr deleteCharactersInRange:NSMakeRange(0, aRange.location)]; - } - if (NSMaxRange(aRange) < [_buffer length]) { - [newStr deleteCharactersInRange:NSMakeRange(aRange.length, [_buffer length] - NSMaxRange(aRange))]; - } - return [newStr autorelease]; -} - -- (NSDictionary *)attributesAtIndex:(NSUInteger)index effectiveRange:(NSRangePointer)aRange { - return [NSDictionary dictionaryWithDictionary:[self attributesAtIndex:index effectiveRange:aRange uniquingOnName:nil]]; -} - -- (NSDictionary *)attributesAtIndex:(NSUInteger)index longestEffectiveRange:(NSRangePointer)aRange inRange:(NSRange)rangeLimit { - return [NSDictionary dictionaryWithDictionary:[self attributesAtIndex:index longestEffectiveRange:aRange inRange:rangeLimit uniquingOnName:nil]]; -} - -#if Z_BLOCKS -// Warning: this code has not been tested. The only guarantee is that it compiles. -- (void)enumerateAttribute:(NSString *)attrName inRange:(NSRange)enumerationRange options:(ZAttributedStringEnumerationOptions)opts - usingBlock:(void (^)(id, NSRange, BOOL*))block { - if (opts & ZAttributedStringEnumerationLongestEffectiveRangeNotRequired) { - [self enumerateAttributesInRange:enumerationRange options:opts usingBlock:^(NSDictionary *attrs, NSRange range, BOOL *stop) { - id value = [attrs objectForKey:attrName]; - if (value != nil) { - block(value, range, stop); - } - }]; - } else { - __block id oldValue = nil; - __block NSRange effectiveRange = NSMakeRange(0, 0); - [self enumerateAttributesInRange:enumerationRange options:opts usingBlock:^(NSDictionary *attrs, NSRange range, BOOL *stop) { - id value = [attrs objectForKey:attrName]; - if (oldValue == nil) { - oldValue = value; - effectiveRange = range; - } else if (value != nil && [oldValue isEqual:value]) { - // combine the attributes - effectiveRange = NSUnionRange(effectiveRange, range); - } else { - BOOL innerStop = NO; - block(oldValue, effectiveRange, &innerStop); - if (innerStop) { - *stop = YES; - oldValue = nil; - } else { - oldValue = value; - } - } - }]; - if (oldValue != nil) { - BOOL innerStop = NO; // necessary for the block, but unused - block(oldValue, effectiveRange, &innerStop); - } - } -} - -- (void)enumerateAttributesInRange:(NSRange)enumerationRange options:(ZAttributedStringEnumerationOptions)opts - usingBlock:(void (^)(NSDictionary*, NSRange, BOOL*))block { - // copy the attributes so we can mutate the string if necessary during enumeration - // also clip the array during copy to only the subarray of attributes that cover the requested range - NSArray *attrs; - if (NSEqualRanges(enumerationRange, NSMakeRange(0, 0))) { - attrs = [NSArray arrayWithArray:_attributes]; - } else { - // in this binary search, last is the first run after the range - NSUInteger first = 0, last = [_attributes count]; - while (last > first+1) { - NSUInteger pivot = (last + first) / 2; - ZAttributeRun *run = [_attributes objectAtIndex:pivot]; - if (run.index < enumerationRange.location) { - first = pivot; - } else if (run.index >= NSMaxRange(enumerationRange)) { - last = pivot; - } - } - attrs = [_attributes subarrayWithRange:NSMakeRange(first, last-first)]; - } - if (opts & ZAttributedStringEnumerationReverse) { - NSUInteger end = [_buffer length]; - for (ZAttributeRun *run in [attrs reverseObjectEnumerator]) { - BOOL stop = NO; - NSUInteger start = run.index; - // clip to enumerationRange - start = MAX(start, enumerationRange.location); - end = MIN(end, NSMaxRange(enumerationRange)); - block(run.attributes, NSMakeRange(start, end - start), &stop); - if (stop) break; - end = run.index; - } - } else { - NSUInteger start = 0; - ZAttributeRun *run = [attrs objectAtIndex:0]; - NSInteger offset = 0; - NSInteger oldLength = [_buffer length]; - for (NSUInteger i = 1;;i++) { - NSUInteger end; - if (i >= [attrs count]) { - end = oldLength; - } else { - end = [[attrs objectAtIndex:i] index]; - } - BOOL stop = NO; - NSUInteger clippedStart = MAX(start, enumerationRange.location); - NSUInteger clippedEnd = MIN(end, NSMaxRange(enumerationRange)); - block(run.attributes, NSMakeRange(clippedStart + offset, clippedEnd - start), &stop); - if (stop || i >= [attrs count]) break; - start = end; - NSUInteger newLength = [_buffer length]; - offset += (newLength - oldLength); - oldLength = newLength; - } - } -} -#endif - -- (BOOL)isEqualToAttributedString:(ZAttributedString *)otherString { - return ([_buffer isEqualToString:otherString->_buffer] && [_attributes isEqualToArray:otherString->_attributes]); -} - -- (BOOL)isEqual:(id)object { - return [object isKindOfClass:[ZAttributedString class]] && [self isEqualToAttributedString:(ZAttributedString *)object]; -} - -#pragma mark - - -- (NSUInteger)indexOfEffectiveAttributeRunForIndex:(NSUInteger)index { - NSUInteger first = 0, last = [_attributes count]; - while (last > first + 1) { - NSUInteger pivot = (last + first) / 2; - ZAttributeRun *run = [_attributes objectAtIndex:pivot]; - if (run.index > index) { - last = pivot; - } else if (run.index < index) { - first = pivot; - } else { - first = pivot; - break; - } - } - return first; -} - -- (NSDictionary *)attributesAtIndex:(NSUInteger)index effectiveRange:(NSRangePointer)aRange uniquingOnName:(NSString *)attributeName { - if (index >= [_buffer length]) { - @throw [NSException exceptionWithName:NSRangeException reason:@"index beyond range of attributed string" userInfo:nil]; - } - NSUInteger runIndex = [self indexOfEffectiveAttributeRunForIndex:index]; - ZAttributeRun *run = [_attributes objectAtIndex:runIndex]; - if (aRange != NULL) { - aRange->location = run.index; - runIndex++; - if (runIndex < [_attributes count]) { - aRange->length = [[_attributes objectAtIndex:runIndex] index] - aRange->location; - } else { - aRange->length = [_buffer length] - aRange->location; - } - } - return run.attributes; -} -- (NSDictionary *)attributesAtIndex:(NSUInteger)index longestEffectiveRange:(NSRangePointer)aRange - inRange:(NSRange)rangeLimit uniquingOnName:(NSString *)attributeName { - if (index >= [_buffer length]) { - @throw [NSException exceptionWithName:NSRangeException reason:@"index beyond range of attributed string" userInfo:nil]; - } else if (NSMaxRange(rangeLimit) > [_buffer length]) { - @throw [NSException exceptionWithName:NSRangeException reason:@"rangeLimit beyond range of attributed string" userInfo:nil]; - } - NSUInteger runIndex = [self indexOfEffectiveAttributeRunForIndex:index]; - ZAttributeRun *run = [_attributes objectAtIndex:runIndex]; - if (aRange != NULL) { - if (attributeName != nil) { - id value = [run.attributes objectForKey:attributeName]; - NSUInteger endRunIndex = runIndex+1; - runIndex--; - // search backwards - while (1) { - if (run.index <= rangeLimit.location) { - break; - } - ZAttributeRun *prevRun = [_attributes objectAtIndex:runIndex]; - id prevValue = [prevRun.attributes objectForKey:attributeName]; - if (prevValue == value || (value != nil && [prevValue isEqual:value])) { - runIndex--; - run = prevRun; - } else { - break; - } - } - // search forwards - ZAttributeRun *endRun = nil; - while (endRunIndex < [_attributes count]) { - ZAttributeRun *nextRun = [_attributes objectAtIndex:endRunIndex]; - if (nextRun.index >= NSMaxRange(rangeLimit)) { - endRun = nextRun; - break; - } - id nextValue = [nextRun.attributes objectForKey:attributeName]; - if (nextValue == value || (value != nil && [nextValue isEqual:value])) { - endRunIndex++; - } else { - endRun = nextRun; - break; - } - } - aRange->location = MAX(run.index, rangeLimit.location); - aRange->length = MIN((endRun ? endRun.index : [_buffer length]), NSMaxRange(rangeLimit)) - aRange->location; - } else { - // with no attribute name, we don't need to do any real searching, - // as we already guarantee each run has unique attributes. - // just make sure to clip the range to the rangeLimit - aRange->location = MAX(run.index, rangeLimit.location); - ZAttributeRun *endRun = (runIndex+1 < [_attributes count] ? [_attributes objectAtIndex:runIndex+1] : nil); - aRange->length = MIN((endRun ? endRun.index : [_buffer length]), NSMaxRange(rangeLimit)) - aRange->location; - } - } - return run.attributes; -} - -- (void)dealloc { - [_buffer release]; - [_attributes release]; - [super dealloc]; -} -@end - -@interface ZMutableAttributedString () -- (void)cleanupAttributesInRange:(NSRange)range; -- (NSRange)rangeOfAttributeRunsForRange:(NSRange)range; -- (void)offsetRunsInRange:(NSRange )range byOffset:(NSInteger)offset; -@end - -@implementation ZMutableAttributedString -- (id)copyWithZone:(NSZone *)zone { - return [(ZAttributedString *)[ZAttributedString allocWithZone:zone] initWithAttributedString:self]; -} - -- (void)addAttribute:(NSString *)name value:(id)value range:(NSRange)range { - range = [self rangeOfAttributeRunsForRange:range]; - for (ZAttributeRun *run in [_attributes subarrayWithRange:range]) { - [run.attributes setObject:value forKey:name]; - } - [self cleanupAttributesInRange:range]; -} - -- (void)addAttributes:(NSDictionary *)attributes range:(NSRange)range { - range = [self rangeOfAttributeRunsForRange:range]; - for (ZAttributeRun *run in [_attributes subarrayWithRange:range]) { - [run.attributes addEntriesFromDictionary:attributes]; - } - [self cleanupAttributesInRange:range]; -} - -- (void)appendAttributedString:(ZAttributedString *)str { - [self insertAttributedString:str atIndex:[_buffer length]]; -} - -- (void)deleteCharactersInRange:(NSRange)range { - NSRange runRange = [self rangeOfAttributeRunsForRange:range]; - [_buffer replaceCharactersInRange:range withString:@""]; - [_attributes removeObjectsInRange:runRange]; - for (NSUInteger i = runRange.location; i < [_attributes count]; i++) { - ZAttributeRun *run = [_attributes objectAtIndex:i]; - ZAttributeRun *newRun = [[ZAttributeRun alloc] initWithIndex:(run.index - range.length) attributes:run.attributes]; - [_attributes replaceObjectAtIndex:i withObject:newRun]; - [newRun release]; - } - [self cleanupAttributesInRange:NSMakeRange(runRange.location, 0)]; -} - -- (void)insertAttributedString:(ZAttributedString *)str atIndex:(NSUInteger)idx { - [self replaceCharactersInRange:NSMakeRange(idx, 0) withAttributedString:str]; -} - -- (void)removeAttribute:(NSString *)name range:(NSRange)range { - range = [self rangeOfAttributeRunsForRange:range]; - for (ZAttributeRun *run in [_attributes subarrayWithRange:range]) { - [run.attributes removeObjectForKey:name]; - } - [self cleanupAttributesInRange:range]; -} - -- (void)replaceCharactersInRange:(NSRange)range withAttributedString:(ZAttributedString *)str { - NSRange replaceRange = [self rangeOfAttributeRunsForRange:range]; - NSInteger offset = [str->_buffer length] - range.length; - [_buffer replaceCharactersInRange:range withString:str->_buffer]; - [_attributes replaceObjectsInRange:replaceRange withObjectsFromArray:str->_attributes]; - NSRange newRange = NSMakeRange(replaceRange.location, [str->_attributes count]); - [self offsetRunsInRange:newRange byOffset:range.location]; - [self offsetRunsInRange:NSMakeRange(NSMaxRange(newRange), [_attributes count] - NSMaxRange(newRange)) byOffset:offset]; - [self cleanupAttributesInRange:NSMakeRange(newRange.location, 0)]; - [self cleanupAttributesInRange:NSMakeRange(NSMaxRange(newRange), 0)]; -} - -- (void)replaceCharactersInRange:(NSRange)range withString:(NSString *)str { - [self replaceCharactersInRange:range withAttributedString:[[[ZAttributedString alloc] initWithString:str] autorelease]]; -} - -- (void)setAttributedString:(ZAttributedString *)str { - [_buffer release], _buffer = [str->_buffer mutableCopy]; - [_attributes release], _attributes = [str->_attributes mutableCopy]; -} - -- (void)setAttributes:(NSDictionary *)attributes range:(NSRange)range { - range = [self rangeOfAttributeRunsForRange:range]; - for (ZAttributeRun *run in [_attributes subarrayWithRange:range]) { - [run.attributes setDictionary:attributes]; - } - [self cleanupAttributesInRange:range]; -} - -#pragma mark - - -// splits the existing runs to provide one or more new runs for the given range -- (NSRange)rangeOfAttributeRunsForRange:(NSRange)range { - NSParameterAssert(NSMaxRange(range) <= [_buffer length]); - - // find (or create) the first run - NSUInteger first = 0; - ZAttributeRun *lastRun = nil; - for (;;first++) { - if (first >= [_attributes count]) { - // we didn't find a run - first = [_attributes count]; - ZAttributeRun *newRun = [[ZAttributeRun alloc] initWithIndex:range.location attributes:lastRun.attributes]; - [_attributes addObject:newRun]; - [newRun release]; - break; - } - ZAttributeRun *run = [_attributes objectAtIndex:first]; - if (run.index == range.location) { - break; - } else if (run.index > range.location) { - ZAttributeRun *newRun = [[ZAttributeRun alloc] initWithIndex:range.location attributes:lastRun.attributes]; - [_attributes insertObject:newRun atIndex:first]; - [newRun release]; - break; - } - lastRun = run; - } - - if (((ZAttributeRun *)[_attributes lastObject]).index < NSMaxRange(range)) { - NSRange subrange = NSMakeRange(first, [_attributes count] - first); - if (NSMaxRange(range) < [_buffer length]) { - ZAttributeRun *newRun = [[ZAttributeRun alloc] initWithIndex:NSMaxRange(range) attributes:[[_attributes lastObject] attributes]]; - [_attributes addObject:newRun]; - [newRun release]; - } - return subrange; - } else { - // find the last run within and the first run after the range - NSUInteger lastIn = first, firstAfter = [_attributes count]-1; - while (firstAfter > lastIn + 1) { - NSUInteger idx = (firstAfter + lastIn) / 2; - ZAttributeRun *run = [_attributes objectAtIndex:idx]; - if (run.index < range.location) { - lastIn = idx; - } else if (run.index > range.location) { - firstAfter = idx; - } else { - // this is definitively the first run after the range - firstAfter = idx; - break; - } - } - if ([[_attributes objectAtIndex:firstAfter] index] > NSMaxRange(range)) { - // the first after is too far after, insert another run! - ZAttributeRun *newRun = [[ZAttributeRun alloc] initWithIndex:NSMaxRange(range) - attributes:[[_attributes objectAtIndex:firstAfter-1] attributes]]; - [_attributes insertObject:newRun atIndex:firstAfter]; - [newRun release]; - } - return NSMakeRange(lastIn, firstAfter - lastIn); - } -} - -- (void)cleanupAttributesInRange:(NSRange)range { - // expand the range to include one surrounding attribute on each side - if (range.location > 0) { - range.location -= 1; - range.length += 1; - } - if (NSMaxRange(range) < [_attributes count]) { - range.length += 1; - } else { - // make sure the range is capped to the attributes count - range.length = [_attributes count] - range.location; - } - if (range.length == 0) return; - ZAttributeRun *lastRun = [_attributes objectAtIndex:range.location]; - for (NSUInteger i = range.location+1; i < NSMaxRange(range);) { - ZAttributeRun *run = [_attributes objectAtIndex:i]; - if ([lastRun.attributes isEqualToDictionary:run.attributes]) { - [_attributes removeObjectAtIndex:i]; - range.length -= 1; - } else { - lastRun = run; - i++; - } - } -} - -- (void)offsetRunsInRange:(NSRange)range byOffset:(NSInteger)offset { - for (NSUInteger i = range.location; i < NSMaxRange(range); i++) { - ZAttributeRun *run = [_attributes objectAtIndex:i]; - ZAttributeRun *newRun = [[ZAttributeRun alloc] initWithIndex:run.index + offset attributes:run.attributes]; - [_attributes replaceObjectAtIndex:i withObject:newRun]; - [newRun release]; - } -} -@end - -@implementation ZAttributeRun -@synthesize index = _index; -@synthesize attributes = _attributes; - -+ (id)attributeRunWithIndex:(NSUInteger)idx attributes:(NSDictionary *)attrs { - return [[[self alloc] initWithIndex:idx attributes:attrs] autorelease]; -} - -- (id)initWithIndex:(NSUInteger)idx attributes:(NSDictionary *)attrs { - NSParameterAssert(idx >= 0); - if ((self = [super init])) { - _index = idx; - if (attrs == nil) { - _attributes = [[NSMutableDictionary alloc] init]; - } else { - _attributes = [attrs mutableCopy]; - } - } - return self; -} - -- (id)initWithCoder:(NSCoder *)decoder { - if ((self = [super init])) { - _index = [[decoder decodeObjectForKey:@"index"] unsignedIntegerValue]; - _attributes = [[decoder decodeObjectForKey:@"attributes"] mutableCopy]; - } - return self; -} - -- (id)init { - return [self initWithIndex:0 attributes:[NSDictionary dictionary]]; -} - -- (id)copyWithZone:(NSZone *)zone { - return [[ZAttributeRun allocWithZone:zone] initWithIndex:_index attributes:_attributes]; -} - -- (void)encodeWithCoder:(NSCoder *)aCoder { - [aCoder encodeObject:[NSNumber numberWithUnsignedInteger:_index] forKey:@"index"]; - [aCoder encodeObject:_attributes forKey:@"attributes"]; -} - -- (NSString *)description { - NSMutableArray *components = [NSMutableArray arrayWithCapacity:[_attributes count]]; - for (id key in _attributes) { - [components addObject:[NSString stringWithFormat:@"%@=%@", key, [_attributes objectForKey:key]]]; - } - return [NSString stringWithFormat:@"<%@: %p index=%lu attributes={%@}>", - NSStringFromClass([self class]), self, (unsigned long)_index, [components componentsJoinedByString:@" "]]; -} - -- (BOOL)isEqual:(id)object { - if (![object isKindOfClass:[ZAttributeRun class]]) return NO; - ZAttributeRun *other = (ZAttributeRun *)object; - return _index == other->_index && [_attributes isEqualToDictionary:other->_attributes]; -} - -- (void)dealloc { - [_attributes release]; - [super dealloc]; -} -@end - -NSString * const ZFontAttributeName = @"ZFontAttributeName"; -NSString * const ZForegroundColorAttributeName = @"ZForegroundColorAttributeName"; -NSString * const ZBackgroundColorAttributeName = @"ZBackgroundColorAttributeName"; -NSString * const ZUnderlineStyleAttributeName = @"ZUnderlineStyleAttributeName"; diff --git a/Littlest/libs/FontLabel/ZAttributedStringPrivate.h b/Littlest/libs/FontLabel/ZAttributedStringPrivate.h deleted file mode 100644 index 1021d7b..0000000 --- a/Littlest/libs/FontLabel/ZAttributedStringPrivate.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// ZAttributedStringPrivate.h -// FontLabel -// -// Created by Kevin Ballard on 9/23/09. -// Copyright 2009 Zynga Game Networks. All rights reserved. -// - -#import -#import "ZAttributedString.h" - -@interface ZAttributeRun : NSObject { - NSUInteger _index; - NSMutableDictionary *_attributes; -} -@property (nonatomic, readonly) NSUInteger index; -@property (nonatomic, readonly) NSMutableDictionary *attributes; -+ (id)attributeRunWithIndex:(NSUInteger)idx attributes:(NSDictionary *)attrs; -- (id)initWithIndex:(NSUInteger)idx attributes:(NSDictionary *)attrs; -@end - -@interface ZAttributedString (ZAttributedStringPrivate) -@property (nonatomic, readonly) NSArray *attributes; -@end diff --git a/Littlest/libs/FontLabel/ZFont.h b/Littlest/libs/FontLabel/ZFont.h deleted file mode 100644 index 05ae823..0000000 --- a/Littlest/libs/FontLabel/ZFont.h +++ /dev/null @@ -1,47 +0,0 @@ -// -// ZFont.h -// FontLabel -// -// Created by Kevin Ballard on 7/2/09. -// Copyright © 2009 Zynga Game Networks -// -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import - -@interface ZFont : NSObject { - CGFontRef _cgFont; - CGFloat _pointSize; - CGFloat _ratio; - NSString *_familyName; - NSString *_fontName; - NSString *_postScriptName; -} -@property (nonatomic, readonly) CGFontRef cgFont; -@property (nonatomic, readonly) CGFloat pointSize; -@property (nonatomic, readonly) CGFloat ascender; -@property (nonatomic, readonly) CGFloat descender; -@property (nonatomic, readonly) CGFloat leading; -@property (nonatomic, readonly) CGFloat xHeight; -@property (nonatomic, readonly) CGFloat capHeight; -@property (nonatomic, readonly) NSString *familyName; -@property (nonatomic, readonly) NSString *fontName; -@property (nonatomic, readonly) NSString *postScriptName; -+ (ZFont *)fontWithCGFont:(CGFontRef)cgFont size:(CGFloat)fontSize; -+ (ZFont *)fontWithUIFont:(UIFont *)uiFont; -- (id)initWithCGFont:(CGFontRef)cgFont size:(CGFloat)fontSize; -- (ZFont *)fontWithSize:(CGFloat)fontSize; -@end diff --git a/Littlest/libs/FontLabel/ZFont.m b/Littlest/libs/FontLabel/ZFont.m deleted file mode 100644 index 793b13a..0000000 --- a/Littlest/libs/FontLabel/ZFont.m +++ /dev/null @@ -1,170 +0,0 @@ -// -// ZFont.m -// FontLabel -// -// Created by Kevin Ballard on 7/2/09. -// Copyright © 2009 Zynga Game Networks -// -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "ZFont.h" - -@interface ZFont () -@property (nonatomic, readonly) CGFloat ratio; -- (NSString *)copyNameTableEntryForID:(UInt16)nameID; -@end - -@implementation ZFont -@synthesize cgFont=_cgFont, pointSize=_pointSize, ratio=_ratio; - -+ (ZFont *)fontWithCGFont:(CGFontRef)cgFont size:(CGFloat)fontSize { - return [[[self alloc] initWithCGFont:cgFont size:fontSize] autorelease]; -} - -+ (ZFont *)fontWithUIFont:(UIFont *)uiFont { - NSParameterAssert(uiFont != nil); - CGFontRef cgFont = CGFontCreateWithFontName((CFStringRef)uiFont.fontName); - ZFont *zFont = [[self alloc] initWithCGFont:cgFont size:uiFont.pointSize]; - CGFontRelease(cgFont); - return [zFont autorelease]; -} - -- (id)initWithCGFont:(CGFontRef)cgFont size:(CGFloat)fontSize { - if ((self = [super init])) { - _cgFont = CGFontRetain(cgFont); - _pointSize = fontSize; - _ratio = fontSize/CGFontGetUnitsPerEm(cgFont); - } - return self; -} - -- (id)init { - NSAssert(NO, @"-init is not valid for ZFont"); - return nil; -} - -- (CGFloat)ascender { - return ceilf(self.ratio * CGFontGetAscent(self.cgFont)); -} - -- (CGFloat)descender { - return floorf(self.ratio * CGFontGetDescent(self.cgFont)); -} - -- (CGFloat)leading { - return (self.ascender - self.descender); -} - -- (CGFloat)capHeight { - return ceilf(self.ratio * CGFontGetCapHeight(self.cgFont)); -} - -- (CGFloat)xHeight { - return ceilf(self.ratio * CGFontGetXHeight(self.cgFont)); -} - -- (NSString *)familyName { - if (_familyName == nil) { - _familyName = [self copyNameTableEntryForID:1]; - } - return _familyName; -} - -- (NSString *)fontName { - if (_fontName == nil) { - _fontName = [self copyNameTableEntryForID:4]; - } - return _fontName; -} - -- (NSString *)postScriptName { - if (_postScriptName == nil) { - _postScriptName = [self copyNameTableEntryForID:6]; - } - return _postScriptName; -} - -- (ZFont *)fontWithSize:(CGFloat)fontSize { - if (fontSize == self.pointSize) return self; - NSParameterAssert(fontSize > 0.0); - return [[[ZFont alloc] initWithCGFont:self.cgFont size:fontSize] autorelease]; -} - -- (BOOL)isEqual:(id)object { - if (![object isKindOfClass:[ZFont class]]) return NO; - ZFont *font = (ZFont *)object; - return (font.cgFont == self.cgFont && font.pointSize == self.pointSize); -} - -- (NSString *)copyNameTableEntryForID:(UInt16)aNameID { - CFDataRef nameTable = CGFontCopyTableForTag(self.cgFont, 'name'); - NSAssert1(nameTable != NULL, @"CGFontCopyTableForTag returned NULL for 'name' tag in font %@", - [(id)CFCopyDescription(self.cgFont) autorelease]); - const UInt8 * const bytes = CFDataGetBytePtr(nameTable); - NSAssert1(OSReadBigInt16(bytes, 0) == 0, @"name table for font %@ has bad version number", - [(id)CFCopyDescription(self.cgFont) autorelease]); - const UInt16 count = OSReadBigInt16(bytes, 2); - const UInt16 stringOffset = OSReadBigInt16(bytes, 4); - const UInt8 * const nameRecords = &bytes[6]; - UInt16 nameLength = 0; - UInt16 nameOffset = 0; - NSStringEncoding encoding = 0; - for (UInt16 idx = 0; idx < count; idx++) { - const uintptr_t recordOffset = 12 * idx; - const UInt16 nameID = OSReadBigInt16(nameRecords, recordOffset + 6); - if (nameID != aNameID) continue; - const UInt16 platformID = OSReadBigInt16(nameRecords, recordOffset + 0); - const UInt16 platformSpecificID = OSReadBigInt16(nameRecords, recordOffset + 2); - encoding = 0; - // for now, we only support a subset of encodings - switch (platformID) { - case 0: // Unicode - encoding = NSUTF16StringEncoding; - break; - case 1: // Macintosh - switch (platformSpecificID) { - case 0: - encoding = NSMacOSRomanStringEncoding; - break; - } - case 3: // Microsoft - switch (platformSpecificID) { - case 1: - encoding = NSUTF16StringEncoding; - break; - } - } - if (encoding == 0) continue; - nameLength = OSReadBigInt16(nameRecords, recordOffset + 8); - nameOffset = OSReadBigInt16(nameRecords, recordOffset + 10); - break; - } - NSString *result = nil; - if (nameOffset > 0) { - const UInt8 *nameBytes = &bytes[stringOffset + nameOffset]; - result = [[NSString alloc] initWithBytes:nameBytes length:nameLength encoding:encoding]; - } - CFRelease(nameTable); - return result; -} - -- (void)dealloc { - CGFontRelease(_cgFont); - [_familyName release]; - [_fontName release]; - [_postScriptName release]; - [super dealloc]; -} -@end diff --git a/Littlest/libs/TouchJSON/CDataScanner.h b/Littlest/libs/TouchJSON/CDataScanner.h deleted file mode 100644 index a768892..0000000 --- a/Littlest/libs/TouchJSON/CDataScanner.h +++ /dev/null @@ -1,68 +0,0 @@ -// -// CDataScanner.h -// TouchJSON -// -// Created by Jonathan Wight on 04/16/08. -// Copyright (c) 2008 Jonathan Wight -// -// 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 - -// NSScanner - -@interface CDataScanner : NSObject { - NSData *data; - - u_int8_t *start; - u_int8_t *end; - u_int8_t *current; - NSUInteger length; - - NSCharacterSet *doubleCharacters; -} - -@property (readwrite, nonatomic, retain) NSData *data; -@property (readwrite, nonatomic, assign) NSUInteger scanLocation; -@property (readonly, nonatomic, assign) BOOL isAtEnd; - -+ (id)scannerWithData:(NSData *)inData; - -- (unichar)currentCharacter; -- (unichar)scanCharacter; -- (BOOL)scanCharacter:(unichar)inCharacter; - -- (BOOL)scanUTF8String:(const char *)inString intoString:(NSString **)outValue; -- (BOOL)scanString:(NSString *)inString intoString:(NSString **)outValue; -- (BOOL)scanCharactersFromSet:(NSCharacterSet *)inSet intoString:(NSString **)outValue; // inSet must only contain 7-bit ASCII characters - -- (BOOL)scanUpToString:(NSString *)string intoString:(NSString **)outValue; -- (BOOL)scanUpToCharactersFromSet:(NSCharacterSet *)set intoString:(NSString **)outValue; // inSet must only contain 7-bit ASCII characters - -- (BOOL)scanNumber:(NSNumber **)outValue; - -- (void)skipWhitespace; - -- (NSString *)remainingString; - -@end diff --git a/Littlest/libs/TouchJSON/CDataScanner.m b/Littlest/libs/TouchJSON/CDataScanner.m deleted file mode 100644 index 44df309..0000000 --- a/Littlest/libs/TouchJSON/CDataScanner.m +++ /dev/null @@ -1,270 +0,0 @@ -// -// CDataScanner.m -// TouchJSON -// -// Created by Jonathan Wight on 04/16/08. -// Copyright (c) 2008 Jonathan Wight -// -// 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 "CDataScanner.h" - -#import "CDataScanner_Extensions.h" - -@interface CDataScanner () -@property (readwrite, nonatomic, retain) NSCharacterSet *doubleCharacters; -@end - -#pragma mark - - -inline static unichar CharacterAtPointer(void *start, void *end) -{ -#pragma unused(end) - -const u_int8_t theByte = *(u_int8_t *)start; -if (theByte & 0x80) - { - // TODO -- UNICODE!!!! (well in theory nothing todo here) - } -const unichar theCharacter = theByte; -return(theCharacter); -} - -@implementation CDataScanner - -@dynamic data; -@dynamic scanLocation; -@dynamic isAtEnd; -@synthesize doubleCharacters; - -+ (id)scannerWithData:(NSData *)inData -{ -CDataScanner *theScanner = [[[self alloc] init] autorelease]; -theScanner.data = inData; -return(theScanner); -} - -- (id)init -{ -if ((self = [super init]) != nil) - { - self.doubleCharacters = [NSCharacterSet characterSetWithCharactersInString:@"0123456789eE-."]; - } -return(self); -} - -- (void)dealloc -{ -self.data = NULL; -self.doubleCharacters = NULL; -// -[super dealloc]; -} - -- (NSUInteger)scanLocation -{ -return(current - start); -} - -- (NSData *)data -{ -return(data); -} - -- (void)setData:(NSData *)inData -{ -if (data != inData) - { - if (data) - { - [data release]; - data = NULL; - } - - if (inData) - { - data = [inData retain]; - // - start = (u_int8_t *)data.bytes; - end = start + data.length; - current = start; - length = data.length; - } - } -} - -- (void)setScanLocation:(NSUInteger)inScanLocation -{ -current = start + inScanLocation; -} - -- (BOOL)isAtEnd -{ -return(self.scanLocation >= length); -} - -- (unichar)currentCharacter -{ -return(CharacterAtPointer(current, end)); -} - -#pragma mark - - -- (unichar)scanCharacter -{ -const unichar theCharacter = CharacterAtPointer(current++, end); -return(theCharacter); -} - -- (BOOL)scanCharacter:(unichar)inCharacter -{ -unichar theCharacter = CharacterAtPointer(current, end); -if (theCharacter == inCharacter) - { - ++current; - return(YES); - } -else - return(NO); -} - -- (BOOL)scanUTF8String:(const char *)inString intoString:(NSString **)outValue; -{ -const size_t theLength = strlen(inString); -if ((size_t)(end - current) < theLength) - return(NO); -if (strncmp((char *)current, inString, theLength) == 0) - { - current += theLength; - if (outValue) - *outValue = [NSString stringWithUTF8String:inString]; - return(YES); - } -return(NO); -} - -- (BOOL)scanString:(NSString *)inString intoString:(NSString **)outValue -{ -if ((size_t)(end - current) < inString.length) - return(NO); -if (strncmp((char *)current, [inString UTF8String], inString.length) == 0) - { - current += inString.length; - if (outValue) - *outValue = inString; - return(YES); - } -return(NO); -} - -- (BOOL)scanCharactersFromSet:(NSCharacterSet *)inSet intoString:(NSString **)outValue -{ -u_int8_t *P; -for (P = current; P < end && [inSet characterIsMember:*P] == YES; ++P) - ; - -if (P == current) - { - return(NO); - } - -if (outValue) - { - *outValue = [[[NSString alloc] initWithBytes:current length:P - current encoding:NSUTF8StringEncoding] autorelease]; - } - -current = P; - -return(YES); -} - -- (BOOL)scanUpToString:(NSString *)inString intoString:(NSString **)outValue -{ -const char *theToken = [inString UTF8String]; -const char *theResult = strnstr((char *)current, theToken, end - current); -if (theResult == NULL) - { - return(NO); - } - -if (outValue) - { - *outValue = [[[NSString alloc] initWithBytes:current length:theResult - (char *)current encoding:NSUTF8StringEncoding] autorelease]; - } - -current = (u_int8_t *)theResult; - -return(YES); -} - -- (BOOL)scanUpToCharactersFromSet:(NSCharacterSet *)inSet intoString:(NSString **)outValue -{ -u_int8_t *P; -for (P = current; P < end && [inSet characterIsMember:*P] == NO; ++P) - ; - -if (P == current) - { - return(NO); - } - -if (outValue) - { - *outValue = [[[NSString alloc] initWithBytes:current length:P - current encoding:NSUTF8StringEncoding] autorelease]; - } - -current = P; - -return(YES); -} - -- (BOOL)scanNumber:(NSNumber **)outValue -{ -// Replace all of this with a strtod call -NSString *theString = NULL; -if ([self scanCharactersFromSet:doubleCharacters intoString:&theString]) - { - if (outValue) - *outValue = [NSNumber numberWithDouble:[theString doubleValue]]; // TODO dont use doubleValue - return(YES); - } -return(NO); -} - -- (void)skipWhitespace -{ -u_int8_t *P; -for (P = current; P < end && (isspace(*P)); ++P) - ; - -current = P; -} - -- (NSString *)remainingString -{ -NSData *theRemainingData = [NSData dataWithBytes:current length:end - current]; -NSString *theString = [[[NSString alloc] initWithData:theRemainingData encoding:NSUTF8StringEncoding] autorelease]; -return(theString); -} - -@end diff --git a/Littlest/libs/TouchJSON/Extensions/CDataScanner_Extensions.h b/Littlest/libs/TouchJSON/Extensions/CDataScanner_Extensions.h deleted file mode 100644 index 8c3c8dd..0000000 --- a/Littlest/libs/TouchJSON/Extensions/CDataScanner_Extensions.h +++ /dev/null @@ -1,37 +0,0 @@ -// -// CDataScanner_Extensions.h -// TouchJSON -// -// Created by Jonathan Wight on 12/08/2005. -// Copyright (c) 2005 Jonathan Wight -// -// 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 "CDataScanner.h" - -@interface CDataScanner (CDataScanner_Extensions) - -- (BOOL)scanCStyleComment:(NSString **)outComment; -- (BOOL)scanCPlusPlusStyleComment:(NSString **)outComment; - -@end diff --git a/Littlest/libs/TouchJSON/Extensions/CDataScanner_Extensions.m b/Littlest/libs/TouchJSON/Extensions/CDataScanner_Extensions.m deleted file mode 100644 index c1a16d9..0000000 --- a/Littlest/libs/TouchJSON/Extensions/CDataScanner_Extensions.m +++ /dev/null @@ -1,80 +0,0 @@ -// -// NSScanner_Extensions.m -// TouchJSON -// -// Created by Jonathan Wight on 12/08/2005. -// Copyright (c) 2005 Jonathan Wight -// -// 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 "CDataScanner_Extensions.h" - -#import "NSCharacterSet_Extensions.h" - -@implementation CDataScanner (CDataScanner_Extensions) - -- (BOOL)scanCStyleComment:(NSString **)outComment -{ -if ([self scanString:@"/*" intoString:NULL] == YES) - { - NSString *theComment = NULL; - if ([self scanUpToString:@"*/" intoString:&theComment] == NO) - [NSException raise:NSGenericException format:@"Started to scan a C style comment but it wasn't terminated."]; - - if ([theComment rangeOfString:@"/*"].location != NSNotFound) - [NSException raise:NSGenericException format:@"C style comments should not be nested."]; - - if ([self scanString:@"*/" intoString:NULL] == NO) - [NSException raise:NSGenericException format:@"C style comment did not end correctly."]; - - if (outComment != NULL) - *outComment = theComment; - - return(YES); - } -else - { - return(NO); - } -} - -- (BOOL)scanCPlusPlusStyleComment:(NSString **)outComment -{ -if ([self scanString:@"//" intoString:NULL] == YES) - { - NSString *theComment = NULL; - [self scanUpToCharactersFromSet:[NSCharacterSet linebreaksCharacterSet] intoString:&theComment]; - [self scanCharactersFromSet:[NSCharacterSet linebreaksCharacterSet] intoString:NULL]; - - if (outComment != NULL) - *outComment = theComment; - - return(YES); - } -else - { - return(NO); - } -} - -@end diff --git a/Littlest/libs/TouchJSON/Extensions/NSCharacterSet_Extensions.h b/Littlest/libs/TouchJSON/Extensions/NSCharacterSet_Extensions.h deleted file mode 100644 index c934a7d..0000000 --- a/Littlest/libs/TouchJSON/Extensions/NSCharacterSet_Extensions.h +++ /dev/null @@ -1,36 +0,0 @@ -// -// NSCharacterSet_Extensions.h -// TouchJSON -// -// Created by Jonathan Wight on 12/08/2005. -// Copyright (c) 2005 Jonathan Wight -// -// 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 - -@interface NSCharacterSet (NSCharacterSet_Extensions) - -+ (NSCharacterSet *)linebreaksCharacterSet; - -@end diff --git a/Littlest/libs/TouchJSON/Extensions/NSCharacterSet_Extensions.m b/Littlest/libs/TouchJSON/Extensions/NSCharacterSet_Extensions.m deleted file mode 100644 index f0306a5..0000000 --- a/Littlest/libs/TouchJSON/Extensions/NSCharacterSet_Extensions.m +++ /dev/null @@ -1,48 +0,0 @@ -// -// NSCharacterSet_Extensions.m -// TouchJSON -// -// Created by Jonathan Wight on 12/08/2005. -// Copyright (c) 2005 Jonathan Wight -// -// 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 "NSCharacterSet_Extensions.h" - -@implementation NSCharacterSet (NSCharacterSet_Extensions) - -#define LF 0x000a // Line Feed -#define FF 0x000c // Form Feed -#define CR 0x000d // Carriage Return -#define NEL 0x0085 // Next Line -#define LS 0x2028 // Line Separator -#define PS 0x2029 // Paragraph Separator - -+ (NSCharacterSet *)linebreaksCharacterSet -{ -unichar theCharacters[] = { LF, FF, CR, NEL, LS, PS, }; - -return([NSCharacterSet characterSetWithCharactersInString:[NSString stringWithCharacters:theCharacters length:sizeof(theCharacters) / sizeof(*theCharacters)]]); -} - -@end diff --git a/Littlest/libs/TouchJSON/Extensions/NSDictionary_JSONExtensions.h b/Littlest/libs/TouchJSON/Extensions/NSDictionary_JSONExtensions.h deleted file mode 100644 index 4d88124..0000000 --- a/Littlest/libs/TouchJSON/Extensions/NSDictionary_JSONExtensions.h +++ /dev/null @@ -1,36 +0,0 @@ -// -// NSDictionary_JSONExtensions.h -// TouchJSON -// -// Created by Jonathan Wight on 04/17/08. -// Copyright (c) 2008 Jonathan Wight -// -// 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 - -@interface NSDictionary (NSDictionary_JSONExtensions) - -+ (id)dictionaryWithJSONData:(NSData *)inData error:(NSError **)outError; - -@end diff --git a/Littlest/libs/TouchJSON/Extensions/NSDictionary_JSONExtensions.m b/Littlest/libs/TouchJSON/Extensions/NSDictionary_JSONExtensions.m deleted file mode 100644 index 005efc6..0000000 --- a/Littlest/libs/TouchJSON/Extensions/NSDictionary_JSONExtensions.m +++ /dev/null @@ -1,41 +0,0 @@ -// -// NSDictionary_JSONExtensions.m -// TouchJSON -// -// Created by Jonathan Wight on 04/17/08. -// Copyright (c) 2008 Jonathan Wight -// -// 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 "NSDictionary_JSONExtensions.h" - -#import "CJSONDeserializer.h" - -@implementation NSDictionary (NSDictionary_JSONExtensions) - -+ (id)dictionaryWithJSONData:(NSData *)inData error:(NSError **)outError -{ -return([[CJSONDeserializer deserializer] deserialize:inData error:outError]); -} - -@end diff --git a/Littlest/libs/TouchJSON/Extensions/NSScanner_Extensions.h b/Littlest/libs/TouchJSON/Extensions/NSScanner_Extensions.h deleted file mode 100644 index fc8c774..0000000 --- a/Littlest/libs/TouchJSON/Extensions/NSScanner_Extensions.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// NSScanner_Extensions.h -// CocoaJSON -// -// Created by Jonathan Wight on 12/08/2005. -// Copyright (c) 2005 Jonathan Wight -// -// 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 - -@interface NSScanner (NSScanner_Extensions) - -- (NSString *)remainingString; - -- (unichar)currentCharacter; -- (unichar)scanCharacter; -- (BOOL)scanCharacter:(unichar)inCharacter; -- (void)backtrack:(unsigned)inCount; - -- (BOOL)scanCStyleComment:(NSString **)outComment; -- (BOOL)scanCPlusPlusStyleComment:(NSString **)outComment; - -@end diff --git a/Littlest/libs/TouchJSON/Extensions/NSScanner_Extensions.m b/Littlest/libs/TouchJSON/Extensions/NSScanner_Extensions.m deleted file mode 100644 index 981366f..0000000 --- a/Littlest/libs/TouchJSON/Extensions/NSScanner_Extensions.m +++ /dev/null @@ -1,118 +0,0 @@ -// -// NSScanner_Extensions.m -// CocoaJSON -// -// Created by Jonathan Wight on 12/08/2005. -// Copyright (c) 2005 Jonathan Wight -// -// 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 "NSScanner_Extensions.h" - -#import "NSCharacterSet_Extensions.h" - -@implementation NSScanner (NSScanner_Extensions) - -- (NSString *)remainingString -{ -return([[self string] substringFromIndex:[self scanLocation]]); -} - -- (unichar)currentCharacter -{ -return([[self string] characterAtIndex:[self scanLocation]]); -} - -- (unichar)scanCharacter -{ -unsigned theScanLocation = [self scanLocation]; -unichar theCharacter = [[self string] characterAtIndex:theScanLocation]; -[self setScanLocation:theScanLocation + 1]; -return(theCharacter); -} - -- (BOOL)scanCharacter:(unichar)inCharacter -{ -unsigned theScanLocation = [self scanLocation]; -if ([[self string] characterAtIndex:theScanLocation] == inCharacter) - { - [self setScanLocation:theScanLocation + 1]; - return(YES); - } -else - return(NO); -} - -- (void)backtrack:(unsigned)inCount -{ -unsigned theScanLocation = [self scanLocation]; -if (inCount > theScanLocation) - [NSException raise:NSGenericException format:@"Backtracked too far."]; -[self setScanLocation:theScanLocation - inCount]; -} - -- (BOOL)scanCStyleComment:(NSString **)outComment -{ -if ([self scanString:@"/*" intoString:NULL] == YES) - { - NSString *theComment = NULL; - if ([self scanUpToString:@"*/" intoString:&theComment] == NO) - [NSException raise:NSGenericException format:@"Started to scan a C style comment but it wasn't terminated."]; - - if ([theComment rangeOfString:@"/*"].location != NSNotFound) - [NSException raise:NSGenericException format:@"C style comments should not be nested."]; - - if ([self scanString:@"*/" intoString:NULL] == NO) - [NSException raise:NSGenericException format:@"C style comment did not end correctly."]; - - if (outComment != NULL) - *outComment = theComment; - - return(YES); - } -else - { - return(NO); - } -} - -- (BOOL)scanCPlusPlusStyleComment:(NSString **)outComment -{ -if ([self scanString:@"//" intoString:NULL] == YES) - { - NSString *theComment = NULL; - [self scanUpToCharactersFromSet:[NSCharacterSet linebreaksCharacterSet] intoString:&theComment]; - [self scanCharactersFromSet:[NSCharacterSet linebreaksCharacterSet] intoString:NULL]; - - if (outComment != NULL) - *outComment = theComment; - - return(YES); - } -else - { - return(NO); - } -} - -@end diff --git a/Littlest/libs/TouchJSON/JSON/CJSONDeserializer.h b/Littlest/libs/TouchJSON/JSON/CJSONDeserializer.h deleted file mode 100644 index 7a805f9..0000000 --- a/Littlest/libs/TouchJSON/JSON/CJSONDeserializer.h +++ /dev/null @@ -1,59 +0,0 @@ -// -// CJSONDeserializer.h -// TouchJSON -// -// Created by Jonathan Wight on 12/15/2005. -// Copyright (c) 2005 Jonathan Wight -// -// 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 - -extern NSString *const kJSONDeserializerErrorDomain /* = @"CJSONDeserializerErrorDomain" */; - -@protocol CDeserializerProtocol - -- (id)deserializeAsDictionary:(NSData *)inData error:(NSError **)outError; - -@end - -#pragma mark - - -@interface CJSONDeserializer : NSObject { - -} - -+ (id)deserializer; - -- (id)deserializeAsDictionary:(NSData *)inData error:(NSError **)outError; - -@end - -#pragma mark - - -@interface CJSONDeserializer (CJSONDeserializer_Deprecated) - -/// You should switch to using deserializeAsDictionary:error: instead. -- (id)deserialize:(NSData *)inData error:(NSError **)outError; - -@end diff --git a/Littlest/libs/TouchJSON/JSON/CJSONDeserializer.m b/Littlest/libs/TouchJSON/JSON/CJSONDeserializer.m deleted file mode 100644 index 1dbb317..0000000 --- a/Littlest/libs/TouchJSON/JSON/CJSONDeserializer.m +++ /dev/null @@ -1,84 +0,0 @@ -// -// CJSONDeserializer.m -// TouchJSON -// -// Created by Jonathan Wight on 12/15/2005. -// Copyright (c) 2005 Jonathan Wight -// -// 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 "CJSONDeserializer.h" - -#import "CJSONScanner.h" -#import "CDataScanner.h" - -NSString *const kJSONDeserializerErrorDomain = @"CJSONDeserializerErrorDomain"; - -@implementation CJSONDeserializer - -+ (id)deserializer -{ -return([[[self alloc] init] autorelease]); -} - -- (id)deserializeAsDictionary:(NSData *)inData error:(NSError **)outError; -{ -if (inData == NULL || [inData length] == 0) - { - if (outError) - *outError = [NSError errorWithDomain:kJSONDeserializerErrorDomain code:-1 userInfo:NULL]; - - return(NULL); - } -CJSONScanner *theScanner = [CJSONScanner scannerWithData:inData]; -NSDictionary *theDictionary = NULL; -if ([theScanner scanJSONDictionary:&theDictionary error:outError] == YES) - return(theDictionary); -else - return(NULL); -} - -@end - -#pragma mark - - -@implementation CJSONDeserializer (CJSONDeserializer_Deprecated) - -- (id)deserialize:(NSData *)inData error:(NSError **)outError -{ -if (inData == NULL || [inData length] == 0) - { - if (outError) - *outError = [NSError errorWithDomain:kJSONDeserializerErrorDomain code:-1 userInfo:NULL]; - - return(NULL); - } -CJSONScanner *theScanner = [CJSONScanner scannerWithData:inData]; -id theObject = NULL; -if ([theScanner scanJSONObject:&theObject error:outError] == YES) - return(theObject); -else - return(NULL); -} - -@end diff --git a/Littlest/libs/TouchJSON/JSON/CJSONScanner.h b/Littlest/libs/TouchJSON/JSON/CJSONScanner.h deleted file mode 100644 index 70d6074..0000000 --- a/Littlest/libs/TouchJSON/JSON/CJSONScanner.h +++ /dev/null @@ -1,43 +0,0 @@ -// -// CJSONScanner.h -// TouchJSON -// -// Created by Jonathan Wight on 12/07/2005. -// Copyright (c) 2005 Jonathan Wight -// -// 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 "CDataScanner.h" - -@interface CJSONScanner : CDataScanner { -} - -- (BOOL)scanJSONObject:(id *)outObject error:(NSError **)outError; -- (BOOL)scanJSONDictionary:(NSDictionary **)outDictionary error:(NSError **)outError; -- (BOOL)scanJSONArray:(NSArray **)outArray error:(NSError **)outError; -- (BOOL)scanJSONStringConstant:(NSString **)outStringConstant error:(NSError **)outError; -- (BOOL)scanJSONNumberConstant:(NSNumber **)outNumberConstant error:(NSError **)outError; - -@end - -extern NSString *const kJSONScannerErrorDomain /* = @"CJSONScannerErrorDomain" */; diff --git a/Littlest/libs/TouchJSON/JSON/CJSONScanner.m b/Littlest/libs/TouchJSON/JSON/CJSONScanner.m deleted file mode 100644 index c9b1d58..0000000 --- a/Littlest/libs/TouchJSON/JSON/CJSONScanner.m +++ /dev/null @@ -1,536 +0,0 @@ -// -// CJSONScanner.m -// TouchJSON -// -// Created by Jonathan Wight on 12/07/2005. -// Copyright (c) 2005 Jonathan Wight -// -// 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 "CJSONScanner.h" - -#import "NSCharacterSet_Extensions.h" -#import "CDataScanner_Extensions.h" - -#if !defined(TREAT_COMMENTS_AS_WHITESPACE) -#define TREAT_COMMENTS_AS_WHITESPACE 0 -#endif // !defined(TREAT_COMMENTS_AS_WHITESPACE) - -NSString *const kJSONScannerErrorDomain = @"CJSONScannerErrorDomain"; - -inline static int HexToInt(char inCharacter) -{ -int theValues[] = { 0x0 /* 48 '0' */, 0x1 /* 49 '1' */, 0x2 /* 50 '2' */, 0x3 /* 51 '3' */, 0x4 /* 52 '4' */, 0x5 /* 53 '5' */, 0x6 /* 54 '6' */, 0x7 /* 55 '7' */, 0x8 /* 56 '8' */, 0x9 /* 57 '9' */, -1 /* 58 ':' */, -1 /* 59 ';' */, -1 /* 60 '<' */, -1 /* 61 '=' */, -1 /* 62 '>' */, -1 /* 63 '?' */, -1 /* 64 '@' */, 0xa /* 65 'A' */, 0xb /* 66 'B' */, 0xc /* 67 'C' */, 0xd /* 68 'D' */, 0xe /* 69 'E' */, 0xf /* 70 'F' */, -1 /* 71 'G' */, -1 /* 72 'H' */, -1 /* 73 'I' */, -1 /* 74 'J' */, -1 /* 75 'K' */, -1 /* 76 'L' */, -1 /* 77 'M' */, -1 /* 78 'N' */, -1 /* 79 'O' */, -1 /* 80 'P' */, -1 /* 81 'Q' */, -1 /* 82 'R' */, -1 /* 83 'S' */, -1 /* 84 'T' */, -1 /* 85 'U' */, -1 /* 86 'V' */, -1 /* 87 'W' */, -1 /* 88 'X' */, -1 /* 89 'Y' */, -1 /* 90 'Z' */, -1 /* 91 '[' */, -1 /* 92 '\' */, -1 /* 93 ']' */, -1 /* 94 '^' */, -1 /* 95 '_' */, -1 /* 96 '`' */, 0xa /* 97 'a' */, 0xb /* 98 'b' */, 0xc /* 99 'c' */, 0xd /* 100 'd' */, 0xe /* 101 'e' */, 0xf /* 102 'f' */, }; -if (inCharacter >= '0' && inCharacter <= 'f') - return(theValues[inCharacter - '0']); -else - return(-1); -} - -@interface CJSONScanner () -- (BOOL)scanNotQuoteCharactersIntoString:(NSString **)outValue; -@end - -#pragma mark - - -@implementation CJSONScanner - -- (id)init -{ -if ((self = [super init]) != nil) - { - } -return(self); -} - -- (void)dealloc -{ -// -[super dealloc]; -} - -#pragma mark - - -- (void)setData:(NSData *)inData -{ -NSData *theData = inData; -if (theData && theData.length >= 4) - { - // This code is lame, but it works. Because the first character of any JSON string will always be a (ascii) control character we can work out the Unicode encoding by the bit pattern. See section 3 of http://www.ietf.org/rfc/rfc4627.txt - const char *theChars = theData.bytes; - NSStringEncoding theEncoding = NSUTF8StringEncoding; - if (theChars[0] != 0 && theChars[1] == 0) - { - if (theChars[2] != 0 && theChars[3] == 0) - theEncoding = NSUTF16LittleEndianStringEncoding; - else if (theChars[2] == 0 && theChars[3] == 0) - theEncoding = NSUTF32LittleEndianStringEncoding; - } - else if (theChars[0] == 0 && theChars[2] == 0 && theChars[3] != 0) - { - if (theChars[1] == 0) - theEncoding = NSUTF32BigEndianStringEncoding; - else if (theChars[1] != 0) - theEncoding = NSUTF16BigEndianStringEncoding; - } - - if (theEncoding != NSUTF8StringEncoding) - { - NSString *theString = [[NSString alloc] initWithData:theData encoding:theEncoding]; - theData = [theString dataUsingEncoding:NSUTF8StringEncoding]; - [theString release]; - } - } -[super setData:theData]; -} - -#pragma mark - - -- (BOOL)scanJSONObject:(id *)outObject error:(NSError **)outError -{ -[self skipWhitespace]; - -id theObject = NULL; - -const unichar C = [self currentCharacter]; -switch (C) - { - case 't': - if ([self scanUTF8String:"true" intoString:NULL]) - { - theObject = [NSNumber numberWithBool:YES]; - } - break; - case 'f': - if ([self scanUTF8String:"false" intoString:NULL]) - { - theObject = [NSNumber numberWithBool:NO]; - } - break; - case 'n': - if ([self scanUTF8String:"null" intoString:NULL]) - { - theObject = [NSNull null]; - } - break; - case '\"': - case '\'': - [self scanJSONStringConstant:&theObject error:outError]; - break; - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': - case '-': - [self scanJSONNumberConstant:&theObject error:outError]; - break; - case '{': - [self scanJSONDictionary:&theObject error:outError]; - break; - case '[': - [self scanJSONArray:&theObject error:outError]; - break; - default: - - break; - } - -if (outObject != NULL) - *outObject = theObject; -return(YES); -} - -- (BOOL)scanJSONDictionary:(NSDictionary **)outDictionary error:(NSError **)outError -{ -NSUInteger theScanLocation = [self scanLocation]; - -if ([self scanCharacter:'{'] == NO) - { - if (outError) - { - NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: - @"Could not scan dictionary. Dictionary that does not start with '{' character.", NSLocalizedDescriptionKey, - NULL]; - *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-1 userInfo:theUserInfo]; - } - return(NO); - } - -NSMutableDictionary *theDictionary = [[NSMutableDictionary alloc] init]; - -while ([self currentCharacter] != '}') - { - [self skipWhitespace]; - - if ([self currentCharacter] == '}') - break; - - NSString *theKey = NULL; - if ([self scanJSONStringConstant:&theKey error:outError] == NO) - { - [self setScanLocation:theScanLocation]; - if (outError) - { - NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: - @"Could not scan dictionary. Failed to scan a key.", NSLocalizedDescriptionKey, - NULL]; - *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-2 userInfo:theUserInfo]; - } - [theDictionary release]; - return(NO); - } - - [self skipWhitespace]; - - if ([self scanCharacter:':'] == NO) - { - [self setScanLocation:theScanLocation]; - if (outError) - { - NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: - @"Could not scan dictionary. Key was not terminated with a ':' character.", NSLocalizedDescriptionKey, - NULL]; - *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-3 userInfo:theUserInfo]; - } - [theDictionary release]; - return(NO); - } - - id theValue = NULL; - if ([self scanJSONObject:&theValue error:outError] == NO) - { - [self setScanLocation:theScanLocation]; - if (outError) - { - NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: - @"Could not scan dictionary. Failed to scan a value.", NSLocalizedDescriptionKey, - NULL]; - *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-4 userInfo:theUserInfo]; - } - [theDictionary release]; - return(NO); - } - - [theDictionary setValue:theValue forKey:theKey]; - - [self skipWhitespace]; - if ([self scanCharacter:','] == NO) - { - if ([self currentCharacter] != '}') - { - [self setScanLocation:theScanLocation]; - if (outError) - { - NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: - @"Could not scan dictionary. Key value pairs not delimited with a ',' character.", NSLocalizedDescriptionKey, - NULL]; - *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-5 userInfo:theUserInfo]; - } - [theDictionary release]; - return(NO); - } - break; - } - else - { - [self skipWhitespace]; - if ([self currentCharacter] == '}') - break; - } - } - -if ([self scanCharacter:'}'] == NO) - { - [self setScanLocation:theScanLocation]; - if (outError) - { - NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: - @"Could not scan dictionary. Dictionary not terminated by a '}' character.", NSLocalizedDescriptionKey, - NULL]; - *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-6 userInfo:theUserInfo]; - } - [theDictionary release]; - return(NO); - } - -if (outDictionary != NULL) - *outDictionary = [[theDictionary copy] autorelease]; - -[theDictionary release]; - -return(YES); -} - -- (BOOL)scanJSONArray:(NSArray **)outArray error:(NSError **)outError -{ -NSUInteger theScanLocation = [self scanLocation]; - -if ([self scanCharacter:'['] == NO) - { - if (outError) - { - NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: - @"Could not scan array. Array not started by a '{' character.", NSLocalizedDescriptionKey, - NULL]; - *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-7 userInfo:theUserInfo]; - } - return(NO); - } - -NSMutableArray *theArray = [[NSMutableArray alloc] init]; - -[self skipWhitespace]; -while ([self currentCharacter] != ']') - { - NSString *theValue = NULL; - if ([self scanJSONObject:&theValue error:outError] == NO) - { - [self setScanLocation:theScanLocation]; - if (outError) - { - NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: - @"Could not scan array. Could not scan a value.", NSLocalizedDescriptionKey, - NULL]; - *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-8 userInfo:theUserInfo]; - } - [theArray release]; - return(NO); - } - - [theArray addObject:theValue]; - - [self skipWhitespace]; - if ([self scanCharacter:','] == NO) - { - [self skipWhitespace]; - if ([self currentCharacter] != ']') - { - [self setScanLocation:theScanLocation]; - if (outError) - { - NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: - @"Could not scan array. Array not terminated by a ']' character.", NSLocalizedDescriptionKey, - NULL]; - *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-9 userInfo:theUserInfo]; - } - [theArray release]; - return(NO); - } - - break; - } - [self skipWhitespace]; - } - -[self skipWhitespace]; - -if ([self scanCharacter:']'] == NO) - { - [self setScanLocation:theScanLocation]; - if (outError) - { - NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: - @"Could not scan array. Array not terminated by a ']' character.", NSLocalizedDescriptionKey, - NULL]; - *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-10 userInfo:theUserInfo]; - } - [theArray release]; - return(NO); - } - -if (outArray != NULL) - *outArray = [[theArray copy] autorelease]; - -[theArray release]; - -return(YES); -} - -- (BOOL)scanJSONStringConstant:(NSString **)outStringConstant error:(NSError **)outError -{ -NSUInteger theScanLocation = [self scanLocation]; - -[self skipWhitespace]; // TODO - i want to remove this method. But breaks unit tests. - -NSMutableString *theString = [[NSMutableString alloc] init]; - -if ([self scanCharacter:'"'] == NO) - { - [self setScanLocation:theScanLocation]; - if (outError) - { - NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: - @"Could not scan string constant. String not started by a '\"' character.", NSLocalizedDescriptionKey, - NULL]; - *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-11 userInfo:theUserInfo]; - } - [theString release]; - return(NO); - } - -while ([self scanCharacter:'"'] == NO) - { - NSString *theStringChunk = NULL; - if ([self scanNotQuoteCharactersIntoString:&theStringChunk]) - { - [theString appendString:theStringChunk]; - } - - if ([self scanCharacter:'\\'] == YES) - { - unichar theCharacter = [self scanCharacter]; - switch (theCharacter) - { - case '"': - case '\\': - case '/': - break; - case 'b': - theCharacter = '\b'; - break; - case 'f': - theCharacter = '\f'; - break; - case 'n': - theCharacter = '\n'; - break; - case 'r': - theCharacter = '\r'; - break; - case 't': - theCharacter = '\t'; - break; - case 'u': - { - theCharacter = 0; - - int theShift; - for (theShift = 12; theShift >= 0; theShift -= 4) - { - const int theDigit = HexToInt([self scanCharacter]); - if (theDigit == -1) - { - [self setScanLocation:theScanLocation]; - if (outError) - { - NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: - @"Could not scan string constant. Unicode character could not be decoded.", NSLocalizedDescriptionKey, - NULL]; - *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-12 userInfo:theUserInfo]; - } - [theString release]; - return(NO); - } - theCharacter |= (theDigit << theShift); - } - } - break; - default: - { - [self setScanLocation:theScanLocation]; - if (outError) - { - NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: - @"Could not scan string constant. Unknown escape code.", NSLocalizedDescriptionKey, - NULL]; - *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-13 userInfo:theUserInfo]; - } - [theString release]; - return(NO); - } - break; - } - CFStringAppendCharacters((CFMutableStringRef)theString, &theCharacter, 1); - } - } - -if (outStringConstant != NULL) - *outStringConstant = [[theString copy] autorelease]; - -[theString release]; - -return(YES); -} - -- (BOOL)scanJSONNumberConstant:(NSNumber **)outNumberConstant error:(NSError **)outError -{ -NSNumber *theNumber = NULL; -if ([self scanNumber:&theNumber] == YES) - { - if (outNumberConstant != NULL) - *outNumberConstant = theNumber; - return(YES); - } -else - { - if (outError) - { - NSDictionary *theUserInfo = [NSDictionary dictionaryWithObjectsAndKeys: - @"Could not scan number constant.", NSLocalizedDescriptionKey, - NULL]; - *outError = [NSError errorWithDomain:kJSONScannerErrorDomain code:-14 userInfo:theUserInfo]; - } - return(NO); - } -} - -#if TREAT_COMMENTS_AS_WHITESPACE -- (void)skipWhitespace -{ -[super skipWhitespace]; -[self scanCStyleComment:NULL]; -[self scanCPlusPlusStyleComment:NULL]; -[super skipWhitespace]; -} -#endif // TREAT_COMMENTS_AS_WHITESPACE - -#pragma mark - - -- (BOOL)scanNotQuoteCharactersIntoString:(NSString **)outValue -{ -u_int8_t *P; -for (P = current; P < end && *P != '\"' && *P != '\\'; ++P) - ; - -if (P == current) - { - return(NO); - } - -if (outValue) - { - *outValue = [[[NSString alloc] initWithBytes:current length:P - current encoding:NSUTF8StringEncoding] autorelease]; - } - -current = P; - -return(YES); -} - -@end diff --git a/Littlest/libs/TouchJSON/JSON/CJSONSerializer.h b/Littlest/libs/TouchJSON/JSON/CJSONSerializer.h deleted file mode 100644 index b858bf1..0000000 --- a/Littlest/libs/TouchJSON/JSON/CJSONSerializer.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// CJSONSerializer.h -// TouchJSON -// -// Created by Jonathan Wight on 12/07/2005. -// Copyright (c) 2005 Jonathan Wight -// -// 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 - -@interface CJSONSerializer : NSObject { -} - -+ (id)serializer; - -- (NSString *)serializeObject:(id)inObject; - -- (NSString *)serializeNull:(NSNull *)inNull; -- (NSString *)serializeNumber:(NSNumber *)inNumber; -- (NSString *)serializeString:(NSString *)inString; -- (NSString *)serializeArray:(NSArray *)inArray; -- (NSString *)serializeDictionary:(NSDictionary *)inDictionary; - -@end diff --git a/Littlest/libs/TouchJSON/JSON/CJSONSerializer.m b/Littlest/libs/TouchJSON/JSON/CJSONSerializer.m deleted file mode 100644 index 7511e11..0000000 --- a/Littlest/libs/TouchJSON/JSON/CJSONSerializer.m +++ /dev/null @@ -1,184 +0,0 @@ -// -// CJSONSerializer.m -// TouchJSON -// -// Created by Jonathan Wight on 12/07/2005. -// Copyright (c) 2005 Jonathan Wight -// -// 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 "CJSONSerializer.h" - -@implementation CJSONSerializer - -+ (id)serializer -{ -return([[[self alloc] init] autorelease]); -} - -- (NSString *)serializeObject:(id)inObject; -{ -NSString *theResult = @""; - -if ([inObject isKindOfClass:[NSNull class]]) - { - theResult = [self serializeNull:inObject]; - } -else if ([inObject isKindOfClass:[NSNumber class]]) - { - theResult = [self serializeNumber:inObject]; - } -else if ([inObject isKindOfClass:[NSString class]]) - { - theResult = [self serializeString:inObject]; - } -else if ([inObject isKindOfClass:[NSArray class]]) - { - theResult = [self serializeArray:inObject]; - } -else if ([inObject isKindOfClass:[NSDictionary class]]) - { - theResult = [self serializeDictionary:inObject]; - } -else if ([inObject isKindOfClass:[NSData class]]) - { - NSString *theString = [[[NSString alloc] initWithData:inObject encoding:NSUTF8StringEncoding] autorelease]; - theResult = [self serializeString:theString]; - } -else - { - [NSException raise:NSGenericException format:@"Cannot serialize data of type '%@'", NSStringFromClass([inObject class])]; - } -if (theResult == NULL) - [NSException raise:NSGenericException format:@"Could not serialize object '%@'", inObject]; -return(theResult); -} - -- (NSString *)serializeNull:(NSNull *)inNull -{ -#pragma unused (inNull) -return(@"null"); -} - -- (NSString *)serializeNumber:(NSNumber *)inNumber -{ -NSString *theResult = NULL; -switch (CFNumberGetType((CFNumberRef)inNumber)) - { - case kCFNumberCharType: - { - int theValue = [inNumber intValue]; - if (theValue == 0) - theResult = @"false"; - else if (theValue == 1) - theResult = @"true"; - else - theResult = [inNumber stringValue]; - } - break; - case kCFNumberSInt8Type: - case kCFNumberSInt16Type: - case kCFNumberSInt32Type: - case kCFNumberSInt64Type: - case kCFNumberFloat32Type: - case kCFNumberFloat64Type: - case kCFNumberShortType: - case kCFNumberIntType: - case kCFNumberLongType: - case kCFNumberLongLongType: - case kCFNumberFloatType: - case kCFNumberDoubleType: - case kCFNumberCFIndexType: - default: - theResult = [inNumber stringValue]; - break; - } -return(theResult); -} - -- (NSString *)serializeString:(NSString *)inString -{ -NSMutableString *theMutableCopy = [[inString mutableCopy] autorelease]; -[theMutableCopy replaceOccurrencesOfString:@"\\" withString:@"\\\\" options:0 range:NSMakeRange(0, [theMutableCopy length])]; -[theMutableCopy replaceOccurrencesOfString:@"\"" withString:@"\\\"" options:0 range:NSMakeRange(0, [theMutableCopy length])]; -[theMutableCopy replaceOccurrencesOfString:@"/" withString:@"\\/" options:0 range:NSMakeRange(0, [theMutableCopy length])]; -[theMutableCopy replaceOccurrencesOfString:@"\b" withString:@"\\b" options:0 range:NSMakeRange(0, [theMutableCopy length])]; -[theMutableCopy replaceOccurrencesOfString:@"\f" withString:@"\\f" options:0 range:NSMakeRange(0, [theMutableCopy length])]; -[theMutableCopy replaceOccurrencesOfString:@"\n" withString:@"\\n" options:0 range:NSMakeRange(0, [theMutableCopy length])]; -[theMutableCopy replaceOccurrencesOfString:@"\n" withString:@"\\n" options:0 range:NSMakeRange(0, [theMutableCopy length])]; -[theMutableCopy replaceOccurrencesOfString:@"\t" withString:@"\\t" options:0 range:NSMakeRange(0, [theMutableCopy length])]; -/* - case 'u': - { - theCharacter = 0; - - int theShift; - for (theShift = 12; theShift >= 0; theShift -= 4) - { - int theDigit = HexToInt([self scanCharacter]); - if (theDigit == -1) - { - [self setScanLocation:theScanLocation]; - return(NO); - } - theCharacter |= (theDigit << theShift); - } - } -*/ -return([NSString stringWithFormat:@"\"%@\"", theMutableCopy]); -} - -- (NSString *)serializeArray:(NSArray *)inArray -{ -NSMutableString *theString = [NSMutableString string]; - -NSEnumerator *theEnumerator = [inArray objectEnumerator]; -id theValue = NULL; -while ((theValue = [theEnumerator nextObject]) != NULL) - { - [theString appendString:[self serializeObject:theValue]]; - if (theValue != [inArray lastObject]) - [theString appendString:@","]; - } -return([NSString stringWithFormat:@"[%@]", theString]); -} - -- (NSString *)serializeDictionary:(NSDictionary *)inDictionary -{ -NSMutableString *theString = [NSMutableString string]; - -NSArray *theKeys = [inDictionary allKeys]; -NSEnumerator *theEnumerator = [theKeys objectEnumerator]; -NSString *theKey = NULL; -while ((theKey = [theEnumerator nextObject]) != NULL) - { - id theValue = [inDictionary objectForKey:theKey]; - - [theString appendFormat:@"%@:%@", [self serializeString:theKey], [self serializeObject:theValue]]; - if (theKey != [theKeys lastObject]) - [theString appendString:@","]; - } -return([NSString stringWithFormat:@"{%@}", theString]); -} - -@end diff --git a/Littlest/libs/cocos2d/CCAction.h b/Littlest/libs/cocos2d/CCAction.h deleted file mode 100644 index f3269aa..0000000 --- a/Littlest/libs/cocos2d/CCAction.h +++ /dev/null @@ -1,191 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 -#import - -#import "ccTypes.h" - -enum { - //! Default tag - kCCActionTagInvalid = -1, -}; - -/** Base class for CCAction objects. - */ -@interface CCAction : NSObject -{ - id originalTarget_; - id target_; - NSInteger tag_; -} - -/** The "target". The action will modify the target properties. - 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'. - */ -@property (nonatomic,readonly,assign) id target; - -/** 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 ActionManager, you should NOT call this method. - @since v0.8.2 -*/ -@property (nonatomic,readonly,assign) id originalTarget; - - -/** The action tag. An identifier of the action */ -@property (nonatomic,readwrite,assign) NSInteger tag; - -/** Allocates and initializes the action */ -+(id) action; - -/** Initializes the action */ --(id) init; - --(id) copyWithZone: (NSZone*) zone; - -//! return YES if the action has finished --(BOOL) isDone; -//! called before the action start. It will also set the target. --(void) startWithTarget:(id)target; -//! 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];" --(void) stop; -//! called every frame with it's delta time. DON'T override unless you know what you are doing. --(void) step: (ccTime) 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 --(void) update: (ccTime) time; - -@end - -/** 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 - Infitite time actions are valid - */ -@interface CCFiniteTimeAction : CCAction -{ - //! duration in seconds - ccTime duration_; -} -//! duration in seconds of the action -@property (nonatomic,readwrite) ccTime duration; - -/** returns a reversed action */ -- (CCFiniteTimeAction*) reverse; -@end - - -@class CCActionInterval; -/** 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 - */ -@interface CCRepeatForever : CCAction -{ - CCActionInterval *other; -} -/** Inner action. It will be copied */ -@property (nonatomic,copy) CCActionInterval *action; - -/** creates the action */ -+(id) actionWithAction: (CCActionInterval*) action; -/** initializes the action */ --(id) initWithAction: (CCActionInterval*) action; -@end - -/** 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 IntervalAction - */ -@interface CCSpeed : CCAction -{ - CCActionInterval *other; - float speed; -} -/** alter the speed of the inner function in runtime */ -@property (nonatomic,readwrite) float speed; -/** creates the action */ -+(id) actionWithAction: (CCActionInterval*) action speed:(float)rate; -/** initializes the action */ --(id) initWithAction: (CCActionInterval*) action speed:(float)rate; -@end - -@class CCNode; -/** 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 - */ -@interface CCFollow : CCAction -{ - /* node to follow */ - CCNode *followedNode_; - - /* whether camera should be limited to certain area */ - BOOL boundarySet; - - /* if screensize is bigger than the boundary - update not needed */ - BOOL boundaryFullyCovered; - - /* fast access to the screen dimensions */ - CGPoint halfScreenSize; - CGPoint fullScreenSize; - - /* world boundaries */ - float leftBoundary; - float rightBoundary; - float topBoundary; - float bottomBoundary; -} - -/** alter behavior - turn on/off boundary */ -@property (nonatomic,readwrite) BOOL boundarySet; - -/** creates the action with no boundary set */ -+(id) actionWithTarget:(CCNode *)followedNode; - -/** creates the action with a set boundary */ -+(id) actionWithTarget:(CCNode *)followedNode worldBoundary:(CGRect)rect; - -/** initializes the action */ --(id) initWithTarget:(CCNode *)followedNode; - -/** initializes the action with a set boundary */ --(id) initWithTarget:(CCNode *)followedNode worldBoundary:(CGRect)rect; - -@end - diff --git a/Littlest/libs/cocos2d/CCAction.m b/Littlest/libs/cocos2d/CCAction.m deleted file mode 100644 index 7202767..0000000 --- a/Littlest/libs/cocos2d/CCAction.m +++ /dev/null @@ -1,361 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 -#import "CCDirector.h" -#import "ccMacros.h" -#import "CCAction.h" -#import "CCActionInterval.h" -#import "Support/CGPointExtension.h" - -// -// Action Base Class -// -#pragma mark - -#pragma mark Action -@implementation CCAction - -@synthesize tag = tag_, target = target_, originalTarget = originalTarget_; - -+(id) action -{ - return [[[self alloc] init] autorelease]; -} - --(id) init -{ - if( (self=[super init]) ) { - originalTarget_ = target_ = nil; - tag_ = kCCActionTagInvalid; - } - return self; -} - --(void) dealloc -{ - CCLOGINFO(@"cocos2d: deallocing %@", self); - [super dealloc]; -} - --(NSString*) description -{ - return [NSString stringWithFormat:@"<%@ = %08X | Tag = %i>", [self class], self, tag_]; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone: zone] init]; - copy.tag = tag_; - return copy; -} - --(void) startWithTarget:(id)aTarget -{ - originalTarget_ = target_ = aTarget; -} - --(void) stop -{ - target_ = nil; -} - --(BOOL) isDone -{ - return YES; -} - --(void) step: (ccTime) dt -{ - NSLog(@"[Action step]. override me"); -} - --(void) update: (ccTime) time -{ - NSLog(@"[Action update]. override me"); -} -@end - -// -// FiniteTimeAction -// -#pragma mark - -#pragma mark FiniteTimeAction -@implementation CCFiniteTimeAction -@synthesize duration = duration_; - -- (CCFiniteTimeAction*) reverse -{ - CCLOG(@"cocos2d: FiniteTimeAction#reverse: Implement me"); - return nil; -} -@end - - -// -// RepeatForever -// -#pragma mark - -#pragma mark RepeatForever -@implementation CCRepeatForever -+(id) actionWithAction: (CCActionInterval*) action -{ - return [[[self alloc] initWithAction: action] autorelease]; -} - --(id) initWithAction: (CCActionInterval*) action -{ - if( (self=[super init]) ) - other = [action retain]; - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone: zone] initWithAction:[[other copy] autorelease] ]; - return copy; -} - --(void) dealloc -{ - [other release]; - [super dealloc]; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - [other startWithTarget:target_]; -} - --(void) step:(ccTime) dt -{ - [other step: dt]; - if( [other isDone] ) { - ccTime diff = dt + other.duration - other.elapsed; - [other startWithTarget:target_]; - - // to prevent jerk. issue #390 - [other step: diff]; - } -} - - --(BOOL) isDone -{ - return NO; -} - -- (CCActionInterval *) reverse -{ - return [CCRepeatForever actionWithAction:[other reverse]]; -} - -@synthesize action=other; -@end - -// -// Speed -// -#pragma mark - -#pragma mark Speed -@implementation CCSpeed -@synthesize speed; - -+(id) actionWithAction: (CCActionInterval*) action speed:(float)r -{ - return [[[self alloc] initWithAction: action speed:r] autorelease]; -} - --(id) initWithAction: (CCActionInterval*) action speed:(float)r -{ - if( (self=[super init]) ) { - other = [action retain]; - speed = r; - } - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone: zone] initWithAction:[[other copy] autorelease] speed:speed]; - return copy; -} - --(void) dealloc -{ - [other release]; - [super dealloc]; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - [other startWithTarget:target_]; -} - --(void) stop -{ - [other stop]; - [super stop]; -} - --(void) step:(ccTime) dt -{ - [other step: dt * speed]; -} - --(BOOL) isDone -{ - return [other isDone]; -} - -- (CCActionInterval *) reverse -{ - return [CCSpeed actionWithAction:[other reverse] speed:speed]; -} -@end - -// -// Follow -// -#pragma mark - -#pragma mark Follow -@implementation CCFollow - -@synthesize boundarySet; - -+(id) actionWithTarget:(CCNode *) fNode -{ - return [[[self alloc] initWithTarget:fNode] autorelease]; -} - -+(id) actionWithTarget:(CCNode *) fNode worldBoundary:(CGRect)rect -{ - return [[[self alloc] initWithTarget:fNode worldBoundary:rect] autorelease]; -} - --(id) initWithTarget:(CCNode *)fNode -{ - if( (self=[super init]) ) { - - followedNode_ = [fNode retain]; - boundarySet = FALSE; - boundaryFullyCovered = FALSE; - - CGSize s = [[CCDirector sharedDirector] winSize]; - fullScreenSize = CGPointMake(s.width, s.height); - halfScreenSize = ccpMult(fullScreenSize, .5f); - } - - return self; -} - --(id) initWithTarget:(CCNode *)fNode worldBoundary:(CGRect)rect -{ - if( (self=[super init]) ) { - - followedNode_ = [fNode retain]; - boundarySet = TRUE; - boundaryFullyCovered = FALSE; - - CGSize winSize = [[CCDirector sharedDirector] winSize]; - fullScreenSize = CGPointMake(winSize.width, winSize.height); - halfScreenSize = ccpMult(fullScreenSize, .5f); - - leftBoundary = -((rect.origin.x+rect.size.width) - fullScreenSize.x); - rightBoundary = -rect.origin.x ; - topBoundary = -rect.origin.y; - bottomBoundary = -((rect.origin.y+rect.size.height) - fullScreenSize.y); - - if(rightBoundary < leftBoundary) - { - // screen width is larger than world's boundary width - //set both in the middle of the world - rightBoundary = leftBoundary = (leftBoundary + rightBoundary) / 2; - } - if(topBoundary < bottomBoundary) - { - // screen width is larger than world's boundary width - //set both in the middle of the world - topBoundary = bottomBoundary = (topBoundary + bottomBoundary) / 2; - } - - if( (topBoundary == bottomBoundary) && (leftBoundary == rightBoundary) ) - boundaryFullyCovered = TRUE; - } - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone: zone] init]; - copy.tag = tag_; - return copy; -} - --(void) step:(ccTime) dt -{ -#define CLAMP(x,y,z) MIN(MAX(x,y),z) - - if(boundarySet) - { - // whole map fits inside a single screen, no need to modify the position - unless map boundaries are increased - if(boundaryFullyCovered) - return; - - CGPoint tempPos = ccpSub( halfScreenSize, followedNode_.position); - [target_ setPosition:ccp(CLAMP(tempPos.x,leftBoundary,rightBoundary), CLAMP(tempPos.y,bottomBoundary,topBoundary))]; - } - else - [target_ setPosition:ccpSub( halfScreenSize, followedNode_.position )]; - -#undef CLAMP -} - - --(BOOL) isDone -{ - return !followedNode_.isRunning; -} - --(void) stop -{ - target_ = nil; - [super stop]; -} - --(void) dealloc -{ - [followedNode_ release]; - [super dealloc]; -} - -@end - - diff --git a/Littlest/libs/cocos2d/CCActionCamera.h b/Littlest/libs/cocos2d/CCActionCamera.h deleted file mode 100644 index 131c084..0000000 --- a/Littlest/libs/cocos2d/CCActionCamera.h +++ /dev/null @@ -1,72 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 "CCActionInterval.h" - -@class CCCamera; - -/** Base class for CCCamera actions - */ -@interface CCActionCamera : CCActionInterval -{ - float centerXOrig_; - float centerYOrig_; - float centerZOrig_; - - float eyeXOrig_; - float eyeYOrig_; - float eyeZOrig_; - - float upXOrig_; - float upYOrig_; - float upZOrig_; -} -@end - -/** CCOrbitCamera action - Orbits the camera around the center of the screen using spherical coordinates - */ -@interface CCOrbitCamera : CCActionCamera -{ - float radius_; - float deltaRadius_; - float angleZ_; - float deltaAngleZ_; - float angleX_; - float deltaAngleX_; - - float radZ_; - float radDeltaZ_; - float radX_; - float radDeltaX_; - -} -/** creates a CCOrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX */ -+(id) actionWithDuration:(float) t radius:(float)r deltaRadius:(float) dr angleZ:(float)z deltaAngleZ:(float)dz angleX:(float)x deltaAngleX:(float)dx; -/** initializes a CCOrbitCamera action with radius, delta-radius, z, deltaZ, x, deltaX */ --(id) initWithDuration:(float) t radius:(float)r deltaRadius:(float) dr angleZ:(float)z deltaAngleZ:(float)dz angleX:(float)x deltaAngleX:(float)dx; -/** positions the camera according to spherical coordinates */ --(void) sphericalRadius:(float*) r zenith:(float*) zenith azimuth:(float*) azimuth; -@end diff --git a/Littlest/libs/cocos2d/CCActionCamera.m b/Littlest/libs/cocos2d/CCActionCamera.m deleted file mode 100644 index 5134c6f..0000000 --- a/Littlest/libs/cocos2d/CCActionCamera.m +++ /dev/null @@ -1,146 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 "CCActionCamera.h" -#import "CCNode.h" -#import "CCCamera.h" -#import "ccMacros.h" - -// -// CameraAction -// -@implementation CCActionCamera --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - CCCamera *camera = [target_ camera]; - [camera centerX:¢erXOrig_ centerY:¢erYOrig_ centerZ:¢erZOrig_]; - [camera eyeX:&eyeXOrig_ eyeY:&eyeYOrig_ eyeZ:&eyeZOrig_]; - [camera upX:&upXOrig_ upY:&upYOrig_ upZ: &upZOrig_]; -} - --(id) reverse -{ - return [CCReverseTime actionWithAction:self]; -} -@end - -@implementation CCOrbitCamera -+(id) actionWithDuration:(float)t radius:(float)r deltaRadius:(float) dr angleZ:(float)z deltaAngleZ:(float)dz angleX:(float)x deltaAngleX:(float)dx -{ - return [[[self alloc] initWithDuration:t radius:r deltaRadius:dr angleZ:z deltaAngleZ:dz angleX:x deltaAngleX:dx] autorelease]; -} - --(id) copyWithZone: (NSZone*) zone -{ - return [[[self class] allocWithZone: zone] initWithDuration:duration_ radius:radius_ deltaRadius:deltaRadius_ angleZ:angleZ_ deltaAngleZ:deltaAngleZ_ angleX:angleX_ deltaAngleX:deltaAngleX_]; -} - - --(id) initWithDuration:(float)t radius:(float)r deltaRadius:(float) dr angleZ:(float)z deltaAngleZ:(float)dz angleX:(float)x deltaAngleX:(float)dx -{ - if((self=[super initWithDuration:t]) ) { - - radius_ = r; - deltaRadius_ = dr; - angleZ_ = z; - deltaAngleZ_ = dz; - angleX_ = x; - deltaAngleX_ = dx; - - radDeltaZ_ = (CGFloat)CC_DEGREES_TO_RADIANS(dz); - radDeltaX_ = (CGFloat)CC_DEGREES_TO_RADIANS(dx); - } - - return self; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - float r, zenith, azimuth; - - [self sphericalRadius: &r zenith:&zenith azimuth:&azimuth]; - -#if 0 // isnan() is not supported on the simulator, and isnan() always returns false. - if( isnan(radius_) ) - radius_ = r; - - if( isnan( angleZ_) ) - angleZ_ = (CGFloat)CC_RADIANS_TO_DEGREES(zenith); - - if( isnan( angleX_ ) ) - angleX_ = (CGFloat)CC_RADIANS_TO_DEGREES(azimuth); -#endif - - radZ_ = (CGFloat)CC_DEGREES_TO_RADIANS(angleZ_); - radX_ = (CGFloat)CC_DEGREES_TO_RADIANS(angleX_); -} - --(void) update: (ccTime) dt -{ - float r = (radius_ + deltaRadius_ * dt) *[CCCamera getZEye]; - float za = radZ_ + radDeltaZ_ * dt; - float xa = radX_ + radDeltaX_ * dt; - - float i = sinf(za) * cosf(xa) * r + centerXOrig_; - float j = sinf(za) * sinf(xa) * r + centerYOrig_; - float k = cosf(za) * r + centerZOrig_; - - [[target_ camera] setEyeX:i eyeY:j eyeZ:k]; -} - --(void) sphericalRadius:(float*) newRadius zenith:(float*) zenith azimuth:(float*) azimuth -{ - float ex, ey, ez, cx, cy, cz, x, y, z; - float r; // radius - float s; - - CCCamera *camera = [target_ camera]; - [camera eyeX:&ex eyeY:&ey eyeZ:&ez]; - [camera centerX:&cx centerY:&cy centerZ:&cz]; - - x = ex-cx; - y = ey-cy; - z = ez-cz; - - r = sqrtf( x*x + y*y + z*z); - s = sqrtf( x*x + y*y); - if(s==0.0f) - s = FLT_EPSILON; - if(r==0.0f) - r = FLT_EPSILON; - - *zenith = acosf( z/r); - if( x < 0 ) - *azimuth = (float)M_PI - asinf(y/s); - else - *azimuth = asinf(y/s); - - *newRadius = r / [CCCamera getZEye]; -} -@end diff --git a/Littlest/libs/cocos2d/CCActionEase.h b/Littlest/libs/cocos2d/CCActionEase.h deleted file mode 100644 index fced701..0000000 --- a/Littlest/libs/cocos2d/CCActionEase.h +++ /dev/null @@ -1,159 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2009 Jason Booth - * - * 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 "CCActionInterval.h" - -/** Base class for Easing actions - */ -@interface CCActionEase : CCActionInterval -{ - CCActionInterval * other; -} -/** creates the action */ -+(id) actionWithAction: (CCActionInterval*) action; -/** initializes the action */ --(id) initWithAction: (CCActionInterval*) action; -@end - -/** Base class for Easing actions with rate parameters - */ -@interface CCEaseRateAction : CCActionEase -{ - float rate; -} -/** rate value for the actions */ -@property (nonatomic,readwrite,assign) float rate; -/** Creates the action with the inner action and the rate parameter */ -+(id) actionWithAction: (CCActionInterval*) action rate:(float)rate; -/** Initializes the action with the inner action and the rate parameter */ --(id) initWithAction: (CCActionInterval*) action rate:(float)rate; -@end - -/** CCEaseIn action with a rate - */ -@interface CCEaseIn : CCEaseRateAction {} @end - -/** CCEaseOut action with a rate - */ -@interface CCEaseOut : CCEaseRateAction {} @end - -/** CCEaseInOut action with a rate - */ -@interface CCEaseInOut : CCEaseRateAction {} @end - -/** CCEase Exponential In - */ -@interface CCEaseExponentialIn : CCActionEase {} @end -/** Ease Exponential Out - */ -@interface CCEaseExponentialOut : CCActionEase {} @end -/** Ease Exponential InOut - */ -@interface CCEaseExponentialInOut : CCActionEase {} @end -/** Ease Sine In - */ -@interface CCEaseSineIn : CCActionEase {} @end -/** Ease Sine Out - */ -@interface CCEaseSineOut : CCActionEase {} @end -/** Ease Sine InOut - */ -@interface CCEaseSineInOut : CCActionEase {} @end - -/** Ease Elastic abstract class - @since v0.8.2 - */ -@interface CCEaseElastic : CCActionEase -{ - float period_; -} - -/** period of the wave in radians. default is 0.3 */ -@property (nonatomic,readwrite) float period; - -/** Creates the action with the inner action and the period in radians (default is 0.3) */ -+(id) actionWithAction: (CCActionInterval*) action period:(float)period; -/** Initializes the action with the inner action and the period in radians (default is 0.3) */ --(id) initWithAction: (CCActionInterval*) action period:(float)period; -@end - -/** Ease Elastic In action. - @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action. - @since v0.8.2 - */ -@interface CCEaseElasticIn : CCEaseElastic {} @end -/** Ease Elastic Out action. - @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action. - @since v0.8.2 - */ -@interface CCEaseElasticOut : CCEaseElastic {} @end -/** Ease Elastic InOut action. - @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action. - @since v0.8.2 - */ -@interface CCEaseElasticInOut : CCEaseElastic {} @end - -/** CCEaseBounce abstract class. - @since v0.8.2 -*/ -@interface CCEaseBounce : CCActionEase {} @end - -/** CCEaseBounceIn action. - @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action. - @since v0.8.2 -*/ -@interface CCEaseBounceIn : CCEaseBounce {} @end - -/** EaseBounceOut action. - @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action. - @since v0.8.2 - */ -@interface CCEaseBounceOut : CCEaseBounce {} @end - -/** CCEaseBounceInOut action. - @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action. - @since v0.8.2 - */ -@interface CCEaseBounceInOut : CCEaseBounce {} @end - -/** CCEaseBackIn action. - @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action. - @since v0.8.2 - */ -@interface CCEaseBackIn : CCActionEase {} @end - -/** CCEaseBackOut action. - @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action. - @since v0.8.2 - */ -@interface CCEaseBackOut : CCActionEase {} @end - -/** CCEaseBackInOut action. - @warning This action doesn't use a bijective fucntion. Actions like Sequence might have an unexpected result when used with this action. - @since v0.8.2 - */ -@interface CCEaseBackInOut : CCActionEase {} @end - diff --git a/Littlest/libs/cocos2d/CCActionEase.m b/Littlest/libs/cocos2d/CCActionEase.m deleted file mode 100644 index f28be11..0000000 --- a/Littlest/libs/cocos2d/CCActionEase.m +++ /dev/null @@ -1,534 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2009 Jason Booth - * - * 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. - * - */ - - -/* - * Elastic, Back and Bounce actions based on code from: - * http://github.com/NikhilK/silverlightfx/ - * - * by http://github.com/NikhilK - */ - -#import "CCActionEase.h" - -#ifndef M_PI_X_2 -#define M_PI_X_2 (float)M_PI * 2.0f -#endif - -#pragma mark EaseAction - -// -// EaseAction -// -@implementation CCActionEase - -+(id) actionWithAction: (CCActionInterval*) action -{ - return [[[self alloc] initWithAction: action] autorelease ]; -} - --(id) initWithAction: (CCActionInterval*) action -{ - NSAssert( action!=nil, @"Ease: arguments must be non-nil"); - - if( (self=[super initWithDuration: action.duration]) ) - other = [action retain]; - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone:zone] initWithAction:[[other copy] autorelease]]; - return copy; -} - --(void) dealloc -{ - [other release]; - [super dealloc]; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - [other startWithTarget:target_]; -} - --(void) stop -{ - [other stop]; - [super stop]; -} - --(void) update: (ccTime) t -{ - [other update: t]; -} - --(CCActionInterval*) reverse -{ - return [[self class] actionWithAction: [other reverse]]; -} -@end - - -#pragma mark - -#pragma mark EaseRate - -// -// EaseRateAction -// -@implementation CCEaseRateAction -@synthesize rate; -+(id) actionWithAction: (CCActionInterval*) action rate:(float)aRate -{ - return [[[self alloc] initWithAction: action rate:aRate] autorelease ]; -} - --(id) initWithAction: (CCActionInterval*) action rate:(float)aRate -{ - if( (self=[super initWithAction:action ]) ) - self.rate = aRate; - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone:zone] initWithAction:[[other copy] autorelease] rate:rate]; - return copy; -} - --(void) dealloc -{ - [super dealloc]; -} - --(CCActionInterval*) reverse -{ - return [[self class] actionWithAction: [other reverse] rate:1/rate]; -} -@end - -// -// EeseIn -// -@implementation CCEaseIn --(void) update: (ccTime) t -{ - [other update: powf(t,rate)]; -} -@end - -// -// EaseOut -// -@implementation CCEaseOut --(void) update: (ccTime) t -{ - [other update: powf(t,1/rate)]; -} -@end - -// -// EaseInOut -// -@implementation CCEaseInOut --(void) update: (ccTime) t -{ - int sign =1; - int r = (int) rate; - if (r % 2 == 0) - sign = -1; - t *= 2; - if (t < 1) - [other update: 0.5f * powf (t, rate)]; - else - [other update: sign*0.5f * (powf (t-2, rate) + sign*2)]; -} - -// InOut and OutIn are symmetrical --(CCActionInterval*) reverse -{ - return [[self class] actionWithAction: [other reverse] rate:rate]; -} - -@end - -#pragma mark - -#pragma mark EaseExponential - -// -// EaseExponentialIn -// -@implementation CCEaseExponentialIn --(void) update: (ccTime) t -{ - [other update: (t==0) ? 0 : powf(2, 10 * (t/1 - 1)) - 1 * 0.001f]; -} - -- (CCActionInterval*) reverse -{ - return [CCEaseExponentialOut actionWithAction: [other reverse]]; -} -@end - -// -// EaseExponentialOut -// -@implementation CCEaseExponentialOut --(void) update: (ccTime) t -{ - [other update: (t==1) ? 1 : (-powf(2, -10 * t/1) + 1)]; -} - -- (CCActionInterval*) reverse -{ - return [CCEaseExponentialIn actionWithAction: [other reverse]]; -} -@end - -// -// EaseExponentialInOut -// -@implementation CCEaseExponentialInOut --(void) update: (ccTime) t -{ - t /= 0.5f; - if (t < 1) - t = 0.5f * powf(2, 10 * (t - 1)); - else - t = 0.5f * (-powf(2, -10 * (t -1) ) + 2); - - [other update:t]; -} -@end - - -#pragma mark - -#pragma mark EaseSin actions - -// -// EaseSineIn -// -@implementation CCEaseSineIn --(void) update: (ccTime) t -{ - [other update:-1*cosf(t * (float)M_PI_2) +1]; -} - -- (CCActionInterval*) reverse -{ - return [CCEaseSineOut actionWithAction: [other reverse]]; -} -@end - -// -// EaseSineOut -// -@implementation CCEaseSineOut --(void) update: (ccTime) t -{ - [other update:sinf(t * (float)M_PI_2)]; -} - -- (CCActionInterval*) reverse -{ - return [CCEaseSineIn actionWithAction: [other reverse]]; -} -@end - -// -// EaseSineInOut -// -@implementation CCEaseSineInOut --(void) update: (ccTime) t -{ - [other update:-0.5f*(cosf( (float)M_PI*t) - 1)]; -} -@end - -#pragma mark - -#pragma mark EaseElastic actions - -// -// EaseElastic -// -@implementation CCEaseElastic - -@synthesize period = period_; - -+(id) actionWithAction: (CCActionInterval*) action -{ - return [[[self alloc] initWithAction:action period:0.3f] autorelease]; -} - -+(id) actionWithAction: (CCActionInterval*) action period:(float)period -{ - return [[[self alloc] initWithAction:action period:period] autorelease]; -} - --(id) initWithAction: (CCActionInterval*) action -{ - return [self initWithAction:action period:0.3f]; -} - --(id) initWithAction: (CCActionInterval*) action period:(float)period -{ - if( (self=[super initWithAction:action]) ) - period_ = period; - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone:zone] initWithAction:[[other copy] autorelease] period:period_]; - return copy; -} - --(CCActionInterval*) reverse -{ - NSAssert(NO,@"Override me"); - return nil; -} - -@end - -// -// EaseElasticIn -// - -@implementation CCEaseElasticIn --(void) update: (ccTime) t -{ - ccTime newT = 0; - if (t == 0 || t == 1) - newT = t; - - else { - float s = period_ / 4; - t = t - 1; - newT = -powf(2, 10 * t) * sinf( (t-s) *M_PI_X_2 / period_); - } - [other update:newT]; -} - -- (CCActionInterval*) reverse -{ - return [CCEaseElasticOut actionWithAction: [other reverse] period:period_]; -} - -@end - -// -// EaseElasticOut -// -@implementation CCEaseElasticOut - --(void) update: (ccTime) t -{ - ccTime newT = 0; - if (t == 0 || t == 1) { - newT = t; - - } else { - float s = period_ / 4; - newT = powf(2, -10 * t) * sinf( (t-s) *M_PI_X_2 / period_) + 1; - } - [other update:newT]; -} - -- (CCActionInterval*) reverse -{ - return [CCEaseElasticIn actionWithAction: [other reverse] period:period_]; -} - -@end - -// -// EaseElasticInOut -// -@implementation CCEaseElasticInOut --(void) update: (ccTime) t -{ - ccTime newT = 0; - - if( t == 0 || t == 1 ) - newT = t; - else { - t = t * 2; - if(! period_ ) - period_ = 0.3f * 1.5f; - ccTime s = period_ / 4; - - t = t -1; - if( t < 0 ) - newT = -0.5f * powf(2, 10 * t) * sinf((t - s) * M_PI_X_2 / period_); - else - newT = powf(2, -10 * t) * sinf((t - s) * M_PI_X_2 / period_) * 0.5f + 1; - } - [other update:newT]; -} - -- (CCActionInterval*) reverse -{ - return [CCEaseElasticInOut actionWithAction: [other reverse] period:period_]; -} - -@end - -#pragma mark - -#pragma mark EaseBounce actions - -// -// EaseBounce -// -@implementation CCEaseBounce --(ccTime) bounceTime:(ccTime) t -{ - if (t < 1 / 2.75) { - return 7.5625f * t * t; - } - else if (t < 2 / 2.75) { - t -= 1.5f / 2.75f; - return 7.5625f * t * t + 0.75f; - } - else if (t < 2.5 / 2.75) { - t -= 2.25f / 2.75f; - return 7.5625f * t * t + 0.9375f; - } - - t -= 2.625f / 2.75f; - return 7.5625f * t * t + 0.984375f; -} -@end - -// -// EaseBounceIn -// - -@implementation CCEaseBounceIn - --(void) update: (ccTime) t -{ - ccTime newT = 1 - [self bounceTime:1-t]; - [other update:newT]; -} - -- (CCActionInterval*) reverse -{ - return [CCEaseBounceOut actionWithAction: [other reverse]]; -} - -@end - -@implementation CCEaseBounceOut - --(void) update: (ccTime) t -{ - ccTime newT = [self bounceTime:t]; - [other update:newT]; -} - -- (CCActionInterval*) reverse -{ - return [CCEaseBounceIn actionWithAction: [other reverse]]; -} - -@end - -@implementation CCEaseBounceInOut - --(void) update: (ccTime) t -{ - ccTime newT = 0; - if (t < 0.5) { - t = t * 2; - newT = (1 - [self bounceTime:1-t] ) * 0.5f; - } else - newT = [self bounceTime:t * 2 - 1] * 0.5f + 0.5f; - - [other update:newT]; -} -@end - -#pragma mark - -#pragma mark Ease Back actions - -// -// EaseBackIn -// -@implementation CCEaseBackIn - --(void) update: (ccTime) t -{ - ccTime overshoot = 1.70158f; - [other update: t * t * ((overshoot + 1) * t - overshoot)]; -} - -- (CCActionInterval*) reverse -{ - return [CCEaseBackOut actionWithAction: [other reverse]]; -} -@end - -// -// EaseBackOut -// -@implementation CCEaseBackOut --(void) update: (ccTime) t -{ - ccTime overshoot = 1.70158f; - - t = t - 1; - [other update: t * t * ((overshoot + 1) * t + overshoot) + 1]; -} - -- (CCActionInterval*) reverse -{ - return [CCEaseBackIn actionWithAction: [other reverse]]; -} -@end - -// -// EaseBackInOut -// -@implementation CCEaseBackInOut - --(void) update: (ccTime) t -{ - ccTime overshoot = 1.70158f * 1.525f; - - t = t * 2; - if (t < 1) - [other update: (t * t * ((overshoot + 1) * t - overshoot)) / 2]; - else { - t = t - 2; - [other update: (t * t * ((overshoot + 1) * t + overshoot)) / 2 + 1]; - } -} -@end diff --git a/Littlest/libs/cocos2d/CCActionGrid.h b/Littlest/libs/cocos2d/CCActionGrid.h deleted file mode 100644 index 13b6bc7..0000000 --- a/Littlest/libs/cocos2d/CCActionGrid.h +++ /dev/null @@ -1,165 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2009 On-Core - * - * 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 "CCActionInterval.h" -#import "CCActionInstant.h" -#import "CCGrid.h" - -@class CCGridBase; - -/** Base class for Grid actions */ -@interface CCGridAction : CCActionInterval -{ - ccGridSize gridSize_; -} - -/** size of the grid */ -@property (nonatomic,readwrite) ccGridSize gridSize; - -/** creates the action with size and duration */ -+(id) actionWithSize:(ccGridSize)size duration:(ccTime)d; -/** initializes the action with size and duration */ --(id) initWithSize:(ccGridSize)gridSize duration:(ccTime)d; -/** returns the grid */ --(CCGridBase *)grid; - -@end - -//////////////////////////////////////////////////////////// - -/** Base class for CCGrid3D actions. - Grid3D actions can modify a non-tiled grid. - */ -@interface CCGrid3DAction : CCGridAction -{ -} - -/** returns the vertex than belongs to certain position in the grid */ --(ccVertex3F)vertex:(ccGridSize)pos; -/** returns the non-transformed vertex than belongs to certain position in the grid */ --(ccVertex3F)originalVertex:(ccGridSize)pos; -/** sets a new vertex to a certain position of the grid */ --(void)setVertex:(ccGridSize)pos vertex:(ccVertex3F)vertex; - -@end - -//////////////////////////////////////////////////////////// - -/** Base class for CCTiledGrid3D actions */ -@interface CCTiledGrid3DAction : CCGridAction -{ -} - -/** returns the tile that belongs to a certain position of the grid */ --(ccQuad3)tile:(ccGridSize)pos; -/** returns the non-transformed tile that belongs to a certain position of the grid */ --(ccQuad3)originalTile:(ccGridSize)pos; -/** sets a new tile to a certain position of the grid */ --(void)setTile:(ccGridSize)pos coords:(ccQuad3)coords; - -@end - -//////////////////////////////////////////////////////////// - -/** CCAccelDeccelAmplitude action */ -@interface CCAccelDeccelAmplitude : CCActionInterval -{ - float rate; - CCActionInterval *other; -} - -/** amplitude rate */ -@property (nonatomic,readwrite) float rate; - -/** creates the action with an inner action that has the amplitude property, and a duration time */ -+(id)actionWithAction:(CCAction*)action duration:(ccTime)d; -/** initializes the action with an inner action that has the amplitude property, and a duration time */ --(id)initWithAction:(CCAction*)action duration:(ccTime)d; - -@end - -//////////////////////////////////////////////////////////// - -/** CCAccelAmplitude action */ -@interface CCAccelAmplitude : CCActionInterval -{ - float rate; - CCActionInterval *other; -} - -/** amplitude rate */ -@property (nonatomic,readwrite) float rate; - -/** creates the action with an inner action that has the amplitude property, and a duration time */ -+(id)actionWithAction:(CCAction*)action duration:(ccTime)d; -/** initializes the action with an inner action that has the amplitude property, and a duration time */ --(id)initWithAction:(CCAction*)action duration:(ccTime)d; - -@end - -//////////////////////////////////////////////////////////// - -/** CCDeccelAmplitude action */ -@interface CCDeccelAmplitude : CCActionInterval -{ - float rate; - CCActionInterval *other; -} - -/** amplitude rate */ -@property (nonatomic,readwrite) float rate; - -/** creates the action with an inner action that has the amplitude property, and a duration time */ -+(id)actionWithAction:(CCAction*)action duration:(ccTime)d; -/** initializes the action with an inner action that has the amplitude property, and a duration time */ --(id)initWithAction:(CCAction*)action duration:(ccTime)d; - -@end - -//////////////////////////////////////////////////////////// - -/** CCStopGrid action. - Don't call this action if another grid action is active. - Call if you want to remove the the grid effect. Example: - [Sequence actions:[Lens ...], [StopGrid action], nil]; - */ -@interface CCStopGrid : CCActionInstant -{ -} -@end - -//////////////////////////////////////////////////////////// - -/** CCReuseGrid action */ -@interface CCReuseGrid : CCActionInstant -{ - int t; -} -/** creates an action with the number of times that the current grid will be reused */ -+(id) actionWithTimes: (int) times; -/** initializes an action with the number of times that the current grid will be reused */ --(id) initWithTimes: (int) times; -@end diff --git a/Littlest/libs/cocos2d/CCActionGrid.m b/Littlest/libs/cocos2d/CCActionGrid.m deleted file mode 100644 index b2d8f98..0000000 --- a/Littlest/libs/cocos2d/CCActionGrid.m +++ /dev/null @@ -1,386 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2009 On-Core - * - * 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 "CCActionGrid.h" -#import "CCDirector.h" - -#pragma mark - -#pragma mark GridAction - -@implementation CCGridAction - -@synthesize gridSize = gridSize_; - -+(id) actionWithSize:(ccGridSize)size duration:(ccTime)d -{ - return [[[self alloc] initWithSize:size duration:d ] autorelease]; -} - --(id) initWithSize:(ccGridSize)gSize duration:(ccTime)d -{ - if ( (self = [super initWithDuration:d]) ) - { - gridSize_ = gSize; - } - - return self; -} - --(void)startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - - CCGridBase *newgrid = [self grid]; - - CCNode *t = (CCNode*) target_; - CCGridBase *targetGrid = [t grid]; - - if ( targetGrid && targetGrid.reuseGrid > 0 ) - { - if ( targetGrid.active && targetGrid.gridSize.x == gridSize_.x && targetGrid.gridSize.y == gridSize_.y && [targetGrid isKindOfClass:[newgrid class]] ) - [targetGrid reuse]; - else - [NSException raise:@"GridBase" format:@"Cannot reuse grid"]; - } - else - { - if ( targetGrid && targetGrid.active ) - targetGrid.active = NO; - - t.grid = newgrid; - t.grid.active = YES; - } -} - --(CCGridBase *)grid -{ - [NSException raise:@"GridBase" format:@"Abstract class needs implementation"]; - return nil; -} - -- (CCActionInterval*) reverse -{ - return [CCReverseTime actionWithAction:self]; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCGridAction *copy = [[[self class] allocWithZone:zone] initWithSize:gridSize_ duration:duration_]; - return copy; -} -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark Grid3DAction - -@implementation CCGrid3DAction - --(CCGridBase *)grid -{ - return [CCGrid3D gridWithSize:gridSize_]; -} - --(ccVertex3F)vertex:(ccGridSize)pos -{ - CCGrid3D *g = (CCGrid3D *)[target_ grid]; - return [g vertex:pos]; -} - --(ccVertex3F)originalVertex:(ccGridSize)pos -{ - CCGrid3D *g = (CCGrid3D *)[target_ grid]; - return [g originalVertex:pos]; -} - --(void)setVertex:(ccGridSize)pos vertex:(ccVertex3F)vertex -{ - CCGrid3D *g = (CCGrid3D *)[target_ grid]; - return [g setVertex:pos vertex:vertex]; -} -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark TiledGrid3DAction - -@implementation CCTiledGrid3DAction - --(CCGridBase *)grid -{ - return [CCTiledGrid3D gridWithSize:gridSize_]; -} - --(ccQuad3)tile:(ccGridSize)pos -{ - CCTiledGrid3D *g = (CCTiledGrid3D *)[target_ grid]; - return [g tile:pos]; -} - --(ccQuad3)originalTile:(ccGridSize)pos -{ - CCTiledGrid3D *g = (CCTiledGrid3D *)[target_ grid]; - return [g originalTile:pos]; -} - --(void)setTile:(ccGridSize)pos coords:(ccQuad3)coords -{ - CCTiledGrid3D *g = (CCTiledGrid3D *)[target_ grid]; - [g setTile:pos coords:coords]; -} - -@end - -//////////////////////////////////////////////////////////// - -@interface CCActionInterval (Amplitude) --(void)setAmplitudeRate:(CGFloat)amp; --(CGFloat)getAmplitudeRate; -@end - -@implementation CCActionInterval (Amplitude) --(void)setAmplitudeRate:(CGFloat)amp -{ - [NSException raise:@"IntervalAction (Amplitude)" format:@"Abstract class needs implementation"]; -} - --(CGFloat)getAmplitudeRate -{ - [NSException raise:@"IntervalAction (Amplitude)" format:@"Abstract class needs implementation"]; - return 0; -} -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark AccelDeccelAmplitude - -@implementation CCAccelDeccelAmplitude - -@synthesize rate; - -+(id)actionWithAction:(CCAction*)action duration:(ccTime)d -{ - return [[[self alloc] initWithAction:action duration:d ] autorelease]; -} - --(id)initWithAction:(CCAction *)action duration:(ccTime)d -{ - if ( (self = [super initWithDuration:d]) ) - { - rate = 1.0f; - other = [action retain]; - } - - return self; -} - --(void)dealloc -{ - [other release]; - [super dealloc]; -} - --(void)startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - [other startWithTarget:target_]; -} - --(void) update: (ccTime) time -{ - float f = time*2; - - if (f > 1) - { - f -= 1; - f = 1 - f; - } - - [other setAmplitudeRate:powf(f, rate)]; - [other update:time]; -} - -- (CCActionInterval*) reverse -{ - return [CCAccelDeccelAmplitude actionWithAction:[other reverse] duration:duration_]; -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark AccelAmplitude - -@implementation CCAccelAmplitude - -@synthesize rate; - -+(id)actionWithAction:(CCAction*)action duration:(ccTime)d -{ - return [[[self alloc] initWithAction:action duration:d ] autorelease]; -} - --(id)initWithAction:(CCAction *)action duration:(ccTime)d -{ - if ( (self = [super initWithDuration:d]) ) - { - rate = 1.0f; - other = [action retain]; - } - - return self; -} - --(void)dealloc -{ - [other release]; - [super dealloc]; -} - --(void)startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - [other startWithTarget:target_]; -} - --(void) update: (ccTime) time -{ - [other setAmplitudeRate:powf(time, rate)]; - [other update:time]; -} - -- (CCActionInterval*) reverse -{ - return [CCAccelAmplitude actionWithAction:[other reverse] duration:self.duration]; -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark DeccelAmplitude - -@implementation CCDeccelAmplitude - -@synthesize rate; - -+(id)actionWithAction:(CCAction*)action duration:(ccTime)d -{ - return [[[self alloc] initWithAction:action duration:d ] autorelease]; -} - --(id)initWithAction:(CCAction *)action duration:(ccTime)d -{ - if ( (self = [super initWithDuration:d]) ) - { - rate = 1.0f; - other = [action retain]; - } - - return self; -} - --(void)dealloc -{ - [other release]; - [super dealloc]; -} - --(void)startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - [other startWithTarget:target_]; -} - --(void) update: (ccTime) time -{ - [other setAmplitudeRate:powf((1-time), rate)]; - [other update:time]; -} - -- (CCActionInterval*) reverse -{ - return [CCDeccelAmplitude actionWithAction:[other reverse] duration:self.duration]; -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark StopGrid - -@implementation CCStopGrid - --(void)startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - - if ( [[self target] grid] && [[[self target] grid] active] ) { - [[[self target] grid] setActive: NO]; - -// [[self target] setGrid: nil]; - } -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark ReuseGrid - -@implementation CCReuseGrid - -+(id)actionWithTimes:(int)times -{ - return [[[self alloc] initWithTimes:times ] autorelease]; -} - --(id)initWithTimes:(int)times -{ - if ( (self = [super init]) ) - t = times; - - return self; -} - --(void)startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - - CCNode *myTarget = (CCNode*) [self target]; - if ( myTarget.grid && myTarget.grid.active ) - myTarget.grid.reuseGrid += t; -} - -@end diff --git a/Littlest/libs/cocos2d/CCActionGrid3D.h b/Littlest/libs/cocos2d/CCActionGrid3D.h deleted file mode 100644 index a8003f4..0000000 --- a/Littlest/libs/cocos2d/CCActionGrid3D.h +++ /dev/null @@ -1,208 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2009 On-Core - * - * 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 "CCActionGrid.h" - -/** CCWaves3D action */ -@interface CCWaves3D : CCGrid3DAction -{ - int waves; - float amplitude; - float amplitudeRate; -} - -/** amplitude of the wave */ -@property (nonatomic,readwrite) float amplitude; -/** amplitude rate of the wave */ -@property (nonatomic,readwrite) float amplitudeRate; - -+(id)actionWithWaves:(int)wav amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d; --(id)initWithWaves:(int)wav amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d; - -@end - -//////////////////////////////////////////////////////////// - -/** CCFlipX3D action */ -@interface CCFlipX3D : CCGrid3DAction -{ -} - -/** creates the action with duration */ -+(id) actionWithDuration:(ccTime)d; -/** initizlies the action with duration */ --(id) initWithDuration:(ccTime)d; - -@end - -//////////////////////////////////////////////////////////// - -/** CCFlipY3D action */ -@interface CCFlipY3D : CCFlipX3D -{ -} - -@end - -//////////////////////////////////////////////////////////// - -/** CCLens3D action */ -@interface CCLens3D : CCGrid3DAction -{ - CGPoint position_; - CGPoint positionInPixels_; - float radius_; - float lensEffect_; - BOOL dirty_; -} - -/** lens effect. Defaults to 0.7 - 0 means no effect, 1 is very strong effect */ -@property (nonatomic,readwrite) float lensEffect; -/** lens center position in Points */ -@property (nonatomic,readwrite) CGPoint position; - -/** creates the action with center position in Points, radius, a grid size and duration */ -+(id)actionWithPosition:(CGPoint)pos radius:(float)r grid:(ccGridSize)gridSize duration:(ccTime)d; -/** initializes the action with center position in Points, radius, a grid size and duration */ --(id)initWithPosition:(CGPoint)pos radius:(float)r grid:(ccGridSize)gridSize duration:(ccTime)d; - -@end - -//////////////////////////////////////////////////////////// - -/** CCRipple3D action */ -@interface CCRipple3D : CCGrid3DAction -{ - CGPoint position_; - CGPoint positionInPixels_; - float radius_; - int waves_; - float amplitude_; - float amplitudeRate_; -} - -/** center position in Points */ -@property (nonatomic,readwrite) CGPoint position; -/** amplitude */ -@property (nonatomic,readwrite) float amplitude; -/** amplitude rate */ -@property (nonatomic,readwrite) float amplitudeRate; - -/** creates the action with a position in points, radius, number of waves, amplitude, a grid size and duration */ -+(id)actionWithPosition:(CGPoint)pos radius:(float)r waves:(int)wav amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d; -/** initializes the action with a position in points, radius, number of waves, amplitude, a grid size and duration */ --(id)initWithPosition:(CGPoint)pos radius:(float)r waves:(int)wav amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d; - -@end - -//////////////////////////////////////////////////////////// - -/** CCShaky3D action */ -@interface CCShaky3D : CCGrid3DAction -{ - int randrange; - BOOL shakeZ; -} - -/** creates the action with a range, shake Z vertices, a grid and duration */ -+(id)actionWithRange:(int)range shakeZ:(BOOL)shakeZ grid:(ccGridSize)gridSize duration:(ccTime)d; -/** initializes the action with a range, shake Z vertices, a grid and duration */ --(id)initWithRange:(int)range shakeZ:(BOOL)shakeZ grid:(ccGridSize)gridSize duration:(ccTime)d; - -@end - -//////////////////////////////////////////////////////////// - -/** CCLiquid action */ -@interface CCLiquid : CCGrid3DAction -{ - int waves; - float amplitude; - float amplitudeRate; - -} - -/** amplitude */ -@property (nonatomic,readwrite) float amplitude; -/** amplitude rate */ -@property (nonatomic,readwrite) float amplitudeRate; - -/** creates the action with amplitude, a grid and duration */ -+(id)actionWithWaves:(int)wav amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d; -/** initializes the action with amplitude, a grid and duration */ --(id)initWithWaves:(int)wav amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d; - -@end - -//////////////////////////////////////////////////////////// - -/** CCWaves action */ -@interface CCWaves : CCGrid3DAction -{ - int waves; - float amplitude; - float amplitudeRate; - BOOL vertical; - BOOL horizontal; -} - -/** amplitude */ -@property (nonatomic,readwrite) float amplitude; -/** amplitude rate */ -@property (nonatomic,readwrite) float amplitudeRate; - -/** initializes the action with amplitude, horizontal sin, vertical sin, a grid and duration */ -+(id)actionWithWaves:(int)wav amplitude:(float)amp horizontal:(BOOL)h vertical:(BOOL)v grid:(ccGridSize)gridSize duration:(ccTime)d; -/** creates the action with amplitude, horizontal sin, vertical sin, a grid and duration */ --(id)initWithWaves:(int)wav amplitude:(float)amp horizontal:(BOOL)h vertical:(BOOL)v grid:(ccGridSize)gridSize duration:(ccTime)d; - -@end - -//////////////////////////////////////////////////////////// - -/** CCTwirl action */ -@interface CCTwirl : CCGrid3DAction -{ - CGPoint position_; - CGPoint positionInPixels_; - int twirls_; - float amplitude_; - float amplitudeRate_; -} - -/** twirl center */ -@property (nonatomic,readwrite) CGPoint position; -/** amplitude */ -@property (nonatomic,readwrite) float amplitude; -/** amplitude rate */ -@property (nonatomic,readwrite) float amplitudeRate; - -/** creates the action with center position, number of twirls, amplitude, a grid size and duration */ -+(id)actionWithPosition:(CGPoint)pos twirls:(int)t amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d; -/** initializes the action with center position, number of twirls, amplitude, a grid size and duration */ --(id)initWithPosition:(CGPoint)pos twirls:(int)t amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d; - -@end diff --git a/Littlest/libs/cocos2d/CCActionGrid3D.m b/Littlest/libs/cocos2d/CCActionGrid3D.m deleted file mode 100644 index 1d4a783..0000000 --- a/Littlest/libs/cocos2d/CCActionGrid3D.m +++ /dev/null @@ -1,659 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2009 On-Core - * - * 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 "CCActionGrid3D.h" -#import "ccMacros.h" -#import "Support/CGPointExtension.h" - -#pragma mark - -#pragma mark Waves3D - -@implementation CCWaves3D - -@synthesize amplitude; -@synthesize amplitudeRate; - -+(id)actionWithWaves:(int)wav amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d -{ - return [[[self alloc] initWithWaves:wav amplitude:amp grid:gridSize duration:d] autorelease]; -} - --(id)initWithWaves:(int)wav amplitude:(float)amp grid:(ccGridSize)gSize duration:(ccTime)d -{ - if ( (self = [super initWithSize:gSize duration:d]) ) - { - waves = wav; - amplitude = amp; - amplitudeRate = 1.0f; - } - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCGridAction *copy = [[[self class] allocWithZone:zone] initWithWaves:waves amplitude:amplitude grid:gridSize_ duration:duration_]; - return copy; -} - - --(void)update:(ccTime)time -{ - int i, j; - - for( i = 0; i < (gridSize_.x+1); i++ ) - { - for( j = 0; j < (gridSize_.y+1); j++ ) - { - ccVertex3F v = [self originalVertex:ccg(i,j)]; - v.z += (sinf((CGFloat)M_PI*time*waves*2 + (v.y+v.x) * .01f) * amplitude * amplitudeRate); - [self setVertex:ccg(i,j) vertex:v]; - } - } -} -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark FlipX3D - -@implementation CCFlipX3D - -+(id) actionWithDuration:(ccTime)d -{ - return [[[self alloc] initWithSize:ccg(1,1) duration:d] autorelease]; -} - --(id) initWithDuration:(ccTime)d -{ - return [super initWithSize:ccg(1,1) duration:d]; -} - --(id)initWithSize:(ccGridSize)gSize duration:(ccTime)d -{ - if ( gSize.x != 1 || gSize.y != 1 ) - { - [NSException raise:@"FlipX3D" format:@"Grid size must be (1,1)"]; - } - - return [super initWithSize:gSize duration:d]; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCGridAction *copy = [[[self class] allocWithZone:zone] initWithSize:gridSize_ duration:duration_]; - return copy; -} - - --(void)update:(ccTime)time -{ - CGFloat angle = (CGFloat)M_PI * time; // 180 degrees - CGFloat mz = sinf( angle ); - angle = angle / 2.0f; // x calculates degrees from 0 to 90 - CGFloat mx = cosf( angle ); - - ccVertex3F v0, v1, v, diff; - - v0 = [self originalVertex:ccg(1,1)]; - v1 = [self originalVertex:ccg(0,0)]; - - CGFloat x0 = v0.x; - CGFloat x1 = v1.x; - CGFloat x; - ccGridSize a, b, c, d; - - if ( x0 > x1 ) - { - // Normal Grid - a = ccg(0,0); - b = ccg(0,1); - c = ccg(1,0); - d = ccg(1,1); - x = x0; - } - else - { - // Reversed Grid - c = ccg(0,0); - d = ccg(0,1); - a = ccg(1,0); - b = ccg(1,1); - x = x1; - } - - diff.x = ( x - x * mx ); - diff.z = fabsf( floorf( (x * mz) / 4.0f ) ); - -// bottom-left - v = [self originalVertex:a]; - v.x = diff.x; - v.z += diff.z; - [self setVertex:a vertex:v]; - -// upper-left - v = [self originalVertex:b]; - v.x = diff.x; - v.z += diff.z; - [self setVertex:b vertex:v]; - -// bottom-right - v = [self originalVertex:c]; - v.x -= diff.x; - v.z -= diff.z; - [self setVertex:c vertex:v]; - -// upper-right - v = [self originalVertex:d]; - v.x -= diff.x; - v.z -= diff.z; - [self setVertex:d vertex:v]; -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark FlipY3D - -@implementation CCFlipY3D - --(void)update:(ccTime)time -{ - CGFloat angle = (CGFloat)M_PI * time; // 180 degrees - CGFloat mz = sinf( angle ); - angle = angle / 2.0f; // x calculates degrees from 0 to 90 - CGFloat my = cosf( angle ); - - ccVertex3F v0, v1, v, diff; - - v0 = [self originalVertex:ccg(1,1)]; - v1 = [self originalVertex:ccg(0,0)]; - - CGFloat y0 = v0.y; - CGFloat y1 = v1.y; - CGFloat y; - ccGridSize a, b, c, d; - - if ( y0 > y1 ) - { - // Normal Grid - a = ccg(0,0); - b = ccg(0,1); - c = ccg(1,0); - d = ccg(1,1); - y = y0; - } - else - { - // Reversed Grid - b = ccg(0,0); - a = ccg(0,1); - d = ccg(1,0); - c = ccg(1,1); - y = y1; - } - - diff.y = y - y * my; - diff.z = fabsf( floorf( (y * mz) / 4.0f ) ); - - // bottom-left - v = [self originalVertex:a]; - v.y = diff.y; - v.z += diff.z; - [self setVertex:a vertex:v]; - - // upper-left - v = [self originalVertex:b]; - v.y -= diff.y; - v.z -= diff.z; - [self setVertex:b vertex:v]; - - // bottom-right - v = [self originalVertex:c]; - v.y = diff.y; - v.z += diff.z; - [self setVertex:c vertex:v]; - - // upper-right - v = [self originalVertex:d]; - v.y -= diff.y; - v.z -= diff.z; - [self setVertex:d vertex:v]; -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark Lens3D - -@implementation CCLens3D - -@synthesize lensEffect=lensEffect_; - -+(id)actionWithPosition:(CGPoint)pos radius:(float)r grid:(ccGridSize)gridSize duration:(ccTime)d -{ - return [[[self alloc] initWithPosition:pos radius:r grid:gridSize duration:d] autorelease]; -} - --(id)initWithPosition:(CGPoint)pos radius:(float)r grid:(ccGridSize)gSize duration:(ccTime)d -{ - if ( (self = [super initWithSize:gSize duration:d]) ) - { - position_ = ccp(-1,-1); - self.position = pos; - radius_ = r; - lensEffect_ = 0.7f; - dirty_ = YES; - } - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCGridAction *copy = [[[self class] allocWithZone:zone] initWithPosition:position_ radius:radius_ grid:gridSize_ duration:duration_]; - return copy; -} - --(void) setPosition:(CGPoint)pos -{ - if( ! CGPointEqualToPoint(pos, position_) ) { - position_ = pos; - positionInPixels_.x = pos.x * CC_CONTENT_SCALE_FACTOR(); - positionInPixels_.y = pos.y * CC_CONTENT_SCALE_FACTOR(); - - dirty_ = YES; - } -} - --(CGPoint) position -{ - return position_; -} - --(void)update:(ccTime)time -{ - if ( dirty_ ) - { - int i, j; - - for( i = 0; i < gridSize_.x+1; i++ ) - { - for( j = 0; j < gridSize_.y+1; j++ ) - { - ccVertex3F v = [self originalVertex:ccg(i,j)]; - CGPoint vect = ccpSub(positionInPixels_, ccp(v.x,v.y)); - CGFloat r = ccpLength(vect); - - if ( r < radius_ ) - { - r = radius_ - r; - CGFloat pre_log = r / radius_; - if ( pre_log == 0 ) pre_log = 0.001f; - float l = logf(pre_log) * lensEffect_; - float new_r = expf( l ) * radius_; - - if ( ccpLength(vect) > 0 ) - { - vect = ccpNormalize(vect); - CGPoint new_vect = ccpMult(vect, new_r); - v.z += ccpLength(new_vect) * lensEffect_; - } - } - - [self setVertex:ccg(i,j) vertex:v]; - } - } - - dirty_ = NO; - } -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark Ripple3D - -@implementation CCRipple3D - -@synthesize amplitude = amplitude_; -@synthesize amplitudeRate = amplitudeRate_; - -+(id)actionWithPosition:(CGPoint)pos radius:(float)r waves:(int)wav amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d -{ - return [[[self alloc] initWithPosition:pos radius:r waves:wav amplitude:amp grid:gridSize duration:d] autorelease]; -} - --(id)initWithPosition:(CGPoint)pos radius:(float)r waves:(int)wav amplitude:(float)amp grid:(ccGridSize)gSize duration:(ccTime)d -{ - if ( (self = [super initWithSize:gSize duration:d]) ) - { - self.position = pos; - radius_ = r; - waves_ = wav; - amplitude_ = amp; - amplitudeRate_ = 1.0f; - } - - return self; -} - --(CGPoint) position -{ - return position_; -} - --(void) setPosition:(CGPoint)pos -{ - position_ = pos; - positionInPixels_.x = pos.x * CC_CONTENT_SCALE_FACTOR(); - positionInPixels_.y = pos.y * CC_CONTENT_SCALE_FACTOR(); -} - --(id) copyWithZone: (NSZone*) zone -{ - CCGridAction *copy = [[[self class] allocWithZone:zone] initWithPosition:position_ radius:radius_ waves:waves_ amplitude:amplitude_ grid:gridSize_ duration:duration_]; - return copy; -} - - --(void)update:(ccTime)time -{ - int i, j; - - for( i = 0; i < (gridSize_.x+1); i++ ) - { - for( j = 0; j < (gridSize_.y+1); j++ ) - { - ccVertex3F v = [self originalVertex:ccg(i,j)]; - CGPoint vect = ccpSub(positionInPixels_, ccp(v.x,v.y)); - CGFloat r = ccpLength(vect); - - if ( r < radius_ ) - { - r = radius_ - r; - CGFloat rate = powf( r / radius_, 2); - v.z += (sinf( time*(CGFloat)M_PI*waves_*2 + r * 0.1f) * amplitude_ * amplitudeRate_ * rate ); - } - - [self setVertex:ccg(i,j) vertex:v]; - } - } -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark Shaky3D - -@implementation CCShaky3D - -+(id)actionWithRange:(int)range shakeZ:(BOOL)sz grid:(ccGridSize)gridSize duration:(ccTime)d -{ - return [[[self alloc] initWithRange:range shakeZ:sz grid:gridSize duration:d] autorelease]; -} - --(id)initWithRange:(int)range shakeZ:(BOOL)sz grid:(ccGridSize)gSize duration:(ccTime)d -{ - if ( (self = [super initWithSize:gSize duration:d]) ) - { - randrange = range; - shakeZ = sz; - } - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCGridAction *copy = [[[self class] allocWithZone:zone] initWithRange:randrange shakeZ:shakeZ grid:gridSize_ duration:duration_]; - return copy; -} - --(void)update:(ccTime)time -{ - int i, j; - - for( i = 0; i < (gridSize_.x+1); i++ ) - { - for( j = 0; j < (gridSize_.y+1); j++ ) - { - ccVertex3F v = [self originalVertex:ccg(i,j)]; - v.x += ( rand() % (randrange*2) ) - randrange; - v.y += ( rand() % (randrange*2) ) - randrange; - if( shakeZ ) - v.z += ( rand() % (randrange*2) ) - randrange; - - [self setVertex:ccg(i,j) vertex:v]; - } - } -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark Liquid - -@implementation CCLiquid - -@synthesize amplitude; -@synthesize amplitudeRate; - -+(id)actionWithWaves:(int)wav amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d -{ - return [[[self alloc] initWithWaves:wav amplitude:amp grid:gridSize duration:d] autorelease]; -} - --(id)initWithWaves:(int)wav amplitude:(float)amp grid:(ccGridSize)gSize duration:(ccTime)d -{ - if ( (self = [super initWithSize:gSize duration:d]) ) - { - waves = wav; - amplitude = amp; - amplitudeRate = 1.0f; - } - - return self; -} - --(void)update:(ccTime)time -{ - int i, j; - - for( i = 1; i < gridSize_.x; i++ ) - { - for( j = 1; j < gridSize_.y; j++ ) - { - ccVertex3F v = [self originalVertex:ccg(i,j)]; - v.x = (v.x + (sinf(time*(CGFloat)M_PI*waves*2 + v.x * .01f) * amplitude * amplitudeRate)); - v.y = (v.y + (sinf(time*(CGFloat)M_PI*waves*2 + v.y * .01f) * amplitude * amplitudeRate)); - [self setVertex:ccg(i,j) vertex:v]; - } - } -} - --(id) copyWithZone: (NSZone*) zone -{ - CCGridAction *copy = [[[self class] allocWithZone:zone] initWithWaves:waves amplitude:amplitude grid:gridSize_ duration:duration_]; - return copy; -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark Waves - -@implementation CCWaves - -@synthesize amplitude; -@synthesize amplitudeRate; - -+(id)actionWithWaves:(int)wav amplitude:(float)amp horizontal:(BOOL)h vertical:(BOOL)v grid:(ccGridSize)gridSize duration:(ccTime)d -{ - return [[[self alloc] initWithWaves:wav amplitude:amp horizontal:h vertical:v grid:gridSize duration:d] autorelease]; -} - --(id)initWithWaves:(int)wav amplitude:(float)amp horizontal:(BOOL)h vertical:(BOOL)v grid:(ccGridSize)gSize duration:(ccTime)d -{ - if ( (self = [super initWithSize:gSize duration:d]) ) - { - waves = wav; - amplitude = amp; - amplitudeRate = 1.0f; - horizontal = h; - vertical = v; - } - - return self; -} - --(void)update:(ccTime)time -{ - int i, j; - - for( i = 0; i < (gridSize_.x+1); i++ ) - { - for( j = 0; j < (gridSize_.y+1); j++ ) - { - ccVertex3F v = [self originalVertex:ccg(i,j)]; - - if ( vertical ) - v.x = (v.x + (sinf(time*(CGFloat)M_PI*waves*2 + v.y * .01f) * amplitude * amplitudeRate)); - - if ( horizontal ) - v.y = (v.y + (sinf(time*(CGFloat)M_PI*waves*2 + v.x * .01f) * amplitude * amplitudeRate)); - - [self setVertex:ccg(i,j) vertex:v]; - } - } -} - --(id) copyWithZone: (NSZone*) zone -{ - CCGridAction *copy = [[[self class] allocWithZone:zone] initWithWaves:waves amplitude:amplitude horizontal:horizontal vertical:vertical grid:gridSize_ duration:duration_]; - return copy; -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark Twirl - -@implementation CCTwirl - -@synthesize amplitude = amplitude_; -@synthesize amplitudeRate = amplitudeRate_; - -+(id)actionWithPosition:(CGPoint)pos twirls:(int)t amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d -{ - return [[[self alloc] initWithPosition:pos twirls:t amplitude:amp grid:gridSize duration:d] autorelease]; -} - --(id)initWithPosition:(CGPoint)pos twirls:(int)t amplitude:(float)amp grid:(ccGridSize)gSize duration:(ccTime)d -{ - if ( (self = [super initWithSize:gSize duration:d]) ) - { - self.position = pos; - twirls_ = t; - amplitude_ = amp; - amplitudeRate_ = 1.0f; - } - - return self; -} - --(void) setPosition:(CGPoint)pos -{ - position_ = pos; - positionInPixels_.x = pos.x * CC_CONTENT_SCALE_FACTOR(); - positionInPixels_.y = pos.y * CC_CONTENT_SCALE_FACTOR(); -} - --(CGPoint) position -{ - return position_; -} - --(void)update:(ccTime)time -{ - int i, j; - CGPoint c = positionInPixels_; - - for( i = 0; i < (gridSize_.x+1); i++ ) - { - for( j = 0; j < (gridSize_.y+1); j++ ) - { - ccVertex3F v = [self originalVertex:ccg(i,j)]; - - CGPoint avg = ccp(i-(gridSize_.x/2.0f), j-(gridSize_.y/2.0f)); - CGFloat r = ccpLength( avg ); - - CGFloat amp = 0.1f * amplitude_ * amplitudeRate_; - CGFloat a = r * cosf( (CGFloat)M_PI/2.0f + time * (CGFloat)M_PI * twirls_ * 2 ) * amp; - - float cosA = cosf(a); - float sinA = sinf(a); - - CGPoint d = { - sinA * (v.y-c.y) + cosA * (v.x-c.x), - cosA * (v.y-c.y) - sinA * (v.x-c.x) - }; - - v.x = c.x + d.x; - v.y = c.y + d.y; - - [self setVertex:ccg(i,j) vertex:v]; - } - } -} - --(id) copyWithZone: (NSZone*) zone -{ - CCGridAction *copy = [[[self class] allocWithZone:zone] initWithPosition:position_ - twirls:twirls_ - amplitude:amplitude_ - grid:gridSize_ - duration:duration_]; - return copy; -} - - -@end diff --git a/Littlest/libs/cocos2d/CCActionInstant.h b/Littlest/libs/cocos2d/CCActionInstant.h deleted file mode 100644 index 40eb15f..0000000 --- a/Littlest/libs/cocos2d/CCActionInstant.h +++ /dev/null @@ -1,197 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 "CCAction.h" - -/** Instant actions are immediate actions. They don't have a duration like - the CCIntervalAction actions. -*/ -@interface CCActionInstant : CCFiniteTimeAction -{ -} -@end - -/** Show the node - */ - @interface CCShow : CCActionInstant -{ -} -@end - -/** Hide the node - */ -@interface CCHide : CCActionInstant -{ -} -@end - -/** Toggles the visibility of a node - */ -@interface CCToggleVisibility : CCActionInstant -{ -} -@end - -/** Flips the sprite horizontally - @since v0.99.0 - */ -@interface CCFlipX : CCActionInstant -{ - BOOL flipX; -} -+(id) actionWithFlipX:(BOOL)x; --(id) initWithFlipX:(BOOL)x; -@end - -/** Flips the sprite vertically - @since v0.99.0 - */ -@interface CCFlipY : CCActionInstant -{ - BOOL flipY; -} -+(id) actionWithFlipY:(BOOL)y; --(id) initWithFlipY:(BOOL)y; -@end - -/** Places the node in a certain position - */ -@interface CCPlace : CCActionInstant -{ - CGPoint position; -} -/** creates a Place action with a position */ -+(id) actionWithPosition: (CGPoint) pos; -/** Initializes a Place action with a position */ --(id) initWithPosition: (CGPoint) pos; -@end - -/** Calls a 'callback' - */ -@interface CCCallFunc : CCActionInstant -{ - id targetCallback_; - SEL selector_; -} -/** creates the action with the callback */ -+(id) actionWithTarget: (id) t selector:(SEL) s; -/** initializes the action with the callback */ --(id) initWithTarget: (id) t selector:(SEL) s; -/** exeuctes the callback */ --(void) execute; -@end - -/** Calls a 'callback' with the node as the first argument. - N means Node - */ -@interface CCCallFuncN : CCCallFunc -{ -} -@end - -typedef void (*CC_CALLBACK_ND)(id, SEL, id, void *); -/** 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. - */ -@interface CCCallFuncND : CCCallFuncN -{ - void *data_; - CC_CALLBACK_ND callbackMethod_; -} - -/** Invocation object that has the target#selector and the parameters */ -@property (nonatomic,readwrite) CC_CALLBACK_ND callbackMethod; - -/** creates the action with the callback and the data to pass as an argument */ -+(id) actionWithTarget: (id) t selector:(SEL) s data:(void*)d; -/** initializes the action with the callback and the data to pass as an argument */ --(id) initWithTarget:(id) t selector:(SEL) s data:(void*) d; -@end - -/** Calls a 'callback' with an object as the first argument. - O means Object. - @since v0.99.5 - */ -@interface CCCallFuncO : CCCallFunc -{ - id object_; -} -/** creates the action with the callback and the object to pass as an argument */ -+(id) actionWithTarget: (id) t selector:(SEL) s object:(id)object; -/** initializes the action with the callback and the object to pass as an argument */ --(id) initWithTarget:(id) t selector:(SEL) s object:(id)object; - -@end - -#pragma mark Blocks Support - -#if NS_BLOCKS_AVAILABLE - -/** Executes a callback using a block. - */ -@interface CCCallBlock : CCActionInstant -{ - void (^block_)(); -} - -/** creates the action with the specified block, to be used as a callback. - The block will be "copied". - */ -+(id) actionWithBlock:(void(^)())block; - -/** initialized the action with the specified block, to be used as a callback. - The block will be "copied". - */ --(id) initWithBlock:(void(^)())block; - -/** executes the callback */ --(void) execute; -@end - -@class CCNode; - -/** Executes a callback using a block with a single CCNode parameter. - */ -@interface CCCallBlockN : CCActionInstant -{ - void (^block_)(CCNode *); -} - -/** creates the action with the specified block, to be used as a callback. - The block will be "copied". - */ -+(id) actionWithBlock:(void(^)(CCNode *node))block; - -/** initialized the action with the specified block, to be used as a callback. - The block will be "copied". - */ --(id) initWithBlock:(void(^)(CCNode *node))block; - -/** executes the callback */ --(void) execute; -@end - -#endif diff --git a/Littlest/libs/cocos2d/CCActionInstant.m b/Littlest/libs/cocos2d/CCActionInstant.m deleted file mode 100644 index 2b9072c..0000000 --- a/Littlest/libs/cocos2d/CCActionInstant.m +++ /dev/null @@ -1,472 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 "CCBlockSupport.h" -#import "CCActionInstant.h" -#import "CCNode.h" -#import "CCSprite.h" - - -// -// InstantAction -// -#pragma mark CCActionInstant - -@implementation CCActionInstant - --(id) init -{ - if( (self=[super init]) ) - duration_ = 0; - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCActionInstant *copy = [[[self class] allocWithZone: zone] init]; - return copy; -} - -- (BOOL) isDone -{ - return YES; -} - --(void) step: (ccTime) dt -{ - [self update: 1]; -} - --(void) update: (ccTime) t -{ - // ignore -} - --(CCFiniteTimeAction*) reverse -{ - return [[self copy] autorelease]; -} -@end - -// -// Show -// -#pragma mark CCShow - -@implementation CCShow --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - ((CCNode *)target_).visible = YES; -} - --(CCFiniteTimeAction*) reverse -{ - return [CCHide action]; -} -@end - -// -// Hide -// -#pragma mark CCHide - -@implementation CCHide --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - ((CCNode *)target_).visible = NO; -} - --(CCFiniteTimeAction*) reverse -{ - return [CCShow action]; -} -@end - -// -// ToggleVisibility -// -#pragma mark CCToggleVisibility - -@implementation CCToggleVisibility --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - ((CCNode *)target_).visible = !((CCNode *)target_).visible; -} -@end - -// -// FlipX -// -#pragma mark CCFlipX - -@implementation CCFlipX -+(id) actionWithFlipX:(BOOL)x -{ - return [[[self alloc] initWithFlipX:x] autorelease]; -} - --(id) initWithFlipX:(BOOL)x -{ - if(( self=[super init])) - flipX = x; - - return self; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - [(CCSprite*)aTarget setFlipX:flipX]; -} - --(CCFiniteTimeAction*) reverse -{ - return [CCFlipX actionWithFlipX:!flipX]; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCActionInstant *copy = [[[self class] allocWithZone: zone] initWithFlipX:flipX]; - return copy; -} -@end - -// -// FlipY -// -#pragma mark CCFlipY - -@implementation CCFlipY -+(id) actionWithFlipY:(BOOL)y -{ - return [[[self alloc] initWithFlipY:y] autorelease]; -} - --(id) initWithFlipY:(BOOL)y -{ - if(( self=[super init])) - flipY = y; - - return self; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - [(CCSprite*)aTarget setFlipY:flipY]; -} - --(CCFiniteTimeAction*) reverse -{ - return [CCFlipY actionWithFlipY:!flipY]; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCActionInstant *copy = [[[self class] allocWithZone: zone] initWithFlipY:flipY]; - return copy; -} -@end - - -// -// Place -// -#pragma mark CCPlace - -@implementation CCPlace -+(id) actionWithPosition: (CGPoint) pos -{ - return [[[self alloc]initWithPosition:pos]autorelease]; -} - --(id) initWithPosition: (CGPoint) pos -{ - if( (self=[super init]) ) - position = pos; - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCActionInstant *copy = [[[self class] allocWithZone: zone] initWithPosition: position]; - return copy; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - ((CCNode *)target_).position = position; -} - -@end - -// -// CallFunc -// -#pragma mark CCCallFunc - -@implementation CCCallFunc -+(id) actionWithTarget: (id) t selector:(SEL) s -{ - return [[[self alloc] initWithTarget: t selector: s] autorelease]; -} - --(id) initWithTarget: (id) t selector:(SEL) s -{ - if( (self=[super init]) ) { - targetCallback_ = [t retain]; - selector_ = s; - } - return self; -} - --(NSString*) description -{ - return [NSString stringWithFormat:@"<%@ = %08X | Tag = %i | target = %@ | selector = %@>", - [self class], - self, - tag_, - [targetCallback_ class], - NSStringFromSelector(selector_) - ]; -} - --(void) dealloc -{ - [targetCallback_ release]; - [super dealloc]; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCActionInstant *copy = [[[self class] allocWithZone: zone] initWithTarget:targetCallback_ selector:selector_]; - return copy; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - [self execute]; -} - --(void) execute -{ - [targetCallback_ performSelector:selector_]; -} -@end - -// -// CallFuncN -// -#pragma mark CCCallFuncN - -@implementation CCCallFuncN - --(void) execute -{ - [targetCallback_ performSelector:selector_ withObject:target_]; -} -@end - -// -// CallFuncND -// -#pragma mark CCCallFuncND - -@implementation CCCallFuncND - -@synthesize callbackMethod = callbackMethod_; - -+(id) actionWithTarget:(id)t selector:(SEL)s data:(void*)d -{ - return [[[self alloc] initWithTarget:t selector:s data:d] autorelease]; -} - --(id) initWithTarget:(id)t selector:(SEL)s data:(void*)d -{ - if( (self=[super initWithTarget:t selector:s]) ) { - data_ = d; - -#if COCOS2D_DEBUG - NSMethodSignature * sig = [t methodSignatureForSelector:s]; // added - NSAssert(sig !=0 , @"Signature not found for selector - does it have the following form? -(void)name:(id)sender data:(void*)data"); -#endif - callbackMethod_ = (CC_CALLBACK_ND) [t methodForSelector:s]; - } - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCActionInstant *copy = [[[self class] allocWithZone: zone] initWithTarget:targetCallback_ selector:selector_ data:data_]; - return copy; -} - --(void) dealloc -{ - // nothing to dealloc really. Everything is dealloc on super (CCCallFuncN) - [super dealloc]; -} - --(void) execute -{ - callbackMethod_(targetCallback_,selector_,target_, data_); -} -@end - -@implementation CCCallFuncO - -+(id) actionWithTarget: (id) t selector:(SEL) s object:(id)object -{ - return [[[self alloc] initWithTarget:t selector:s object:object] autorelease]; -} - --(id) initWithTarget:(id) t selector:(SEL) s object:(id)object -{ - if( (self=[super initWithTarget:t selector:s] ) ) - object_ = [object retain]; - - return self; -} - -- (void) dealloc -{ - [object_ release]; - [super dealloc]; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCActionInstant *copy = [[[self class] allocWithZone: zone] initWithTarget:targetCallback_ selector:selector_ object:object_]; - return copy; -} - - --(void) execute -{ - [targetCallback_ performSelector:selector_ withObject:object_]; -} - -@end - - -#pragma mark - -#pragma mark Blocks - -#if NS_BLOCKS_AVAILABLE - -#pragma mark CCCallBlock - -@implementation CCCallBlock - -+(id) actionWithBlock:(void(^)())block -{ - return [[[self alloc] initWithBlock:block] autorelease]; -} - --(id) initWithBlock:(void(^)())block -{ - if ((self = [super init])) - block_ = [block copy]; - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCActionInstant *copy = [[[self class] allocWithZone: zone] initWithBlock:block_]; - return copy; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - [self execute]; -} - --(void) execute -{ - block_(); -} - --(void) dealloc -{ - [block_ release]; - [super dealloc]; -} - -@end - -#pragma mark CCCallBlockN - -@implementation CCCallBlockN - -+(id) actionWithBlock:(void(^)(CCNode *node))block -{ - return [[[self alloc] initWithBlock:block] autorelease]; -} - --(id) initWithBlock:(void(^)(CCNode *node))block -{ - if ((self = [super init])) - block_ = [block copy]; - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCActionInstant *copy = [[[self class] allocWithZone: zone] initWithBlock:block_]; - return copy; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - [self execute]; -} - --(void) execute -{ - block_(target_); -} - --(void) dealloc -{ - [block_ release]; - [super dealloc]; -} - -@end - - -#endif // NS_BLOCKS_AVAILABLE diff --git a/Littlest/libs/cocos2d/CCActionInterval.h b/Littlest/libs/cocos2d/CCActionInterval.h deleted file mode 100644 index aeef12c..0000000 --- a/Littlest/libs/cocos2d/CCActionInterval.h +++ /dev/null @@ -1,388 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 "CCNode.h" -#import "CCAction.h" -#import "CCProtocols.h" - -#include - -/** 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], nil]; -*/ -@interface CCActionInterval: CCFiniteTimeAction -{ - ccTime elapsed_; - BOOL firstTick_; -} - -/** how many seconds had elapsed since the actions started to run. */ -@property (nonatomic,readonly) ccTime elapsed; - -/** creates the action */ -+(id) actionWithDuration: (ccTime) d; -/** initializes the action */ --(id) initWithDuration: (ccTime) d; -/** returns YES if the action has finished */ --(BOOL) isDone; -/** returns a reversed action */ -- (CCActionInterval*) reverse; -@end - -/** Runs actions sequentially, one after another - */ -@interface CCSequence : CCActionInterval -{ - CCFiniteTimeAction *actions[2]; - ccTime split; - int last; -} -/** helper contructor to create an array of sequenceable actions */ -+(id) actions: (CCFiniteTimeAction*) action1, ... NS_REQUIRES_NIL_TERMINATION; -/** creates the action */ -+(id) actionOne:(CCFiniteTimeAction*)actionOne two:(CCFiniteTimeAction*)actionTwo; -/** initializes the action */ --(id) initOne:(CCFiniteTimeAction*)actionOne two:(CCFiniteTimeAction*)actionTwo; -@end - - -/** Repeats an action a number of times. - * To repeat an action forever use the CCRepeatForever action. - */ -@interface CCRepeat : CCActionInterval -{ - unsigned int times_; - unsigned int total_; - CCFiniteTimeAction *other_; -} - -/** Inner action. It will be copied */ -@property (nonatomic,copy) CCFiniteTimeAction *action; - -/** creates a CCRepeat action. Times is an unsigned integer between 1 and pow(2,30) */ -+(id) actionWithAction:(CCFiniteTimeAction*)action times: (unsigned int)times; -/** initializes a CCRepeat action. Times is an unsigned integer between 1 and pow(2,30) */ --(id) initWithAction:(CCFiniteTimeAction*)action times: (unsigned int)times; -@end - -/** Spawn a new action immediately - */ -@interface CCSpawn : CCActionInterval -{ - CCFiniteTimeAction *one; - CCFiniteTimeAction *two; -} -/** helper constructor to create an array of spawned actions */ -+(id) actions: (CCFiniteTimeAction*) action1, ... NS_REQUIRES_NIL_TERMINATION; -/** creates the Spawn action */ -+(id) actionOne: (CCFiniteTimeAction*) one two:(CCFiniteTimeAction*) two; -/** initializes the Spawn action with the 2 actions to spawn */ --(id) initOne: (CCFiniteTimeAction*) one two:(CCFiniteTimeAction*) two; -@end - -/** Rotates a CCNode object to a certain angle by modifying it's - rotation attribute. - The direction will be decided by the shortest angle. -*/ -@interface CCRotateTo : CCActionInterval -{ - float dstAngle; - float startAngle; - float diffAngle; -} -/** creates the action */ -+(id) actionWithDuration:(ccTime)duration angle:(float)angle; -/** initializes the action */ --(id) initWithDuration:(ccTime)duration angle:(float)angle; -@end - -/** Rotates a CCNode object clockwise a number of degrees by modiying it's rotation attribute. -*/ -@interface CCRotateBy : CCActionInterval -{ - float angle; - float startAngle; -} -/** creates the action */ -+(id) actionWithDuration:(ccTime)duration angle:(float)deltaAngle; -/** initializes the action */ --(id) initWithDuration:(ccTime)duration angle:(float)deltaAngle; -@end - -/** Moves a CCNode object to the position x,y. x and y are absolute coordinates by modifying it's position attribute. -*/ -@interface CCMoveTo : CCActionInterval -{ - CGPoint endPosition; - CGPoint startPosition; - CGPoint delta; -} -/** creates the action */ -+(id) actionWithDuration:(ccTime)duration position:(CGPoint)position; -/** initializes the action */ --(id) initWithDuration:(ccTime)duration position:(CGPoint)position; -@end - -/** Moves a CCNode object x,y pixels by modifying it's position attribute. - x and y are relative to the position of the object. - Duration is is seconds. -*/ -@interface CCMoveBy : CCMoveTo -{ -} -/** creates the action */ -+(id) actionWithDuration: (ccTime)duration position:(CGPoint)deltaPosition; -/** initializes the action */ --(id) initWithDuration: (ccTime)duration position:(CGPoint)deltaPosition; -@end - -/** Moves a CCNode object simulating a parabolic jump movement by modifying it's position attribute. -*/ - @interface CCJumpBy : CCActionInterval -{ - CGPoint startPosition; - CGPoint delta; - ccTime height; - int jumps; -} -/** creates the action */ -+(id) actionWithDuration: (ccTime)duration position:(CGPoint)position height:(ccTime)height jumps:(int)jumps; -/** initializes the action */ --(id) initWithDuration: (ccTime)duration position:(CGPoint)position height:(ccTime)height jumps:(int)jumps; -@end - -/** Moves a CCNode object to a parabolic position simulating a jump movement by modifying it's position attribute. -*/ - @interface CCJumpTo : CCJumpBy -{ -} -@end - -/** bezier configuration structure - */ -typedef struct _ccBezierConfig { - //! end position of the bezier - CGPoint endPosition; - //! Bezier control point 1 - CGPoint controlPoint_1; - //! Bezier control point 2 - CGPoint controlPoint_2; -} ccBezierConfig; - -/** An action that moves the target with a cubic Bezier curve by a certain distance. - */ -@interface CCBezierBy : CCActionInterval -{ - ccBezierConfig config; - CGPoint startPosition; -} - -/** creates the action with a duration and a bezier configuration */ -+(id) actionWithDuration: (ccTime) t bezier:(ccBezierConfig) c; - -/** initializes the action with a duration and a bezier configuration */ --(id) initWithDuration: (ccTime) t bezier:(ccBezierConfig) c; -@end - -/** An action that moves the target with a cubic Bezier curve to a destination point. - @since v0.8.2 - */ -@interface CCBezierTo : CCBezierBy -{ -} -@end - -/** Scales a CCNode object to a zoom factor by modifying it's scale attribute. - @warning This action doesn't support "reverse" - */ -@interface CCScaleTo : CCActionInterval -{ - float scaleX; - float scaleY; - float startScaleX; - float startScaleY; - float endScaleX; - float endScaleY; - float deltaX; - float deltaY; -} -/** creates the action with the same scale factor for X and Y */ -+(id) actionWithDuration: (ccTime)duration scale:(float) s; -/** initializes the action with the same scale factor for X and Y */ --(id) initWithDuration: (ccTime)duration scale:(float) s; -/** creates the action with and X factor and a Y factor */ -+(id) actionWithDuration: (ccTime)duration scaleX:(float) sx scaleY:(float)sy; -/** initializes the action with and X factor and a Y factor */ --(id) initWithDuration: (ccTime)duration scaleX:(float) sx scaleY:(float)sy; -@end - -/** Scales a CCNode object a zoom factor by modifying it's scale attribute. -*/ -@interface CCScaleBy : CCScaleTo -{ -} -@end - -/** Blinks a CCNode object by modifying it's visible attribute -*/ -@interface CCBlink : CCActionInterval -{ - int times; -} -/** creates the action */ -+(id) actionWithDuration: (ccTime)duration blinks:(unsigned int)blinks; -/** initilizes the action */ --(id) initWithDuration: (ccTime)duration blinks:(unsigned int)blinks; -@end - -/** Fades In an object that implements the CCRGBAProtocol protocol. It modifies the opacity from 0 to 255. - The "reverse" of this action is FadeOut - */ -@interface CCFadeIn : CCActionInterval -{ -} -@end - -/** Fades Out an object that implements the CCRGBAProtocol protocol. It modifies the opacity from 255 to 0. - The "reverse" of this action is FadeIn -*/ -@interface CCFadeOut : CCActionInterval -{ -} -@end - -/** 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" - */ -@interface CCFadeTo : CCActionInterval -{ - GLubyte toOpacity; - GLubyte fromOpacity; -} -/** creates an action with duration and opactiy */ -+(id) actionWithDuration:(ccTime)duration opacity:(GLubyte)opactiy; -/** initializes the action with duration and opacity */ --(id) initWithDuration:(ccTime)duration opacity:(GLubyte)opacity; -@end - -/** 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 -*/ -@interface CCTintTo : CCActionInterval -{ - ccColor3B to; - ccColor3B from; -} -/** creates an action with duration and color */ -+(id) actionWithDuration:(ccTime)duration red:(GLubyte)red green:(GLubyte)green blue:(GLubyte)blue; -/** initializes the action with duration and color */ --(id) initWithDuration:(ccTime)duration red:(GLubyte)red green:(GLubyte)green blue:(GLubyte)blue; -@end - -/** Tints a CCNode that implements the CCNodeRGB protocol from current tint to a custom one. - @since v0.7.2 - */ -@interface CCTintBy : CCActionInterval -{ - GLshort deltaR, deltaG, deltaB; - GLshort fromR, fromG, fromB; -} -/** creates an action with duration and color */ -+(id) actionWithDuration:(ccTime)duration red:(GLshort)deltaRed green:(GLshort)deltaGreen blue:(GLshort)deltaBlue; -/** initializes the action with duration and color */ --(id) initWithDuration:(ccTime)duration red:(GLshort)deltaRed green:(GLshort)deltaGreen blue:(GLshort)deltaBlue; -@end - -/** Delays the action a certain amount of seconds -*/ -@interface CCDelayTime : CCActionInterval -{ -} -@end - -/** 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. -*/ -@interface CCReverseTime : CCActionInterval -{ - CCFiniteTimeAction * other; -} -/** creates the action */ -+(id) actionWithAction: (CCFiniteTimeAction*) action; -/** initializes the action */ --(id) initWithAction: (CCFiniteTimeAction*) action; -@end - - -@class CCAnimation; -@class CCTexture2D; -/** Animates a sprite given the name of an Animation */ -@interface CCAnimate : CCActionInterval -{ - CCAnimation *animation_; - id origFrame; - BOOL restoreOriginalFrame; -} -/** animation used for the animage */ -@property (readwrite,nonatomic,retain) CCAnimation * animation; - -/** creates the action with an Animation and will restore the original frame when the animation is over */ -+(id) actionWithAnimation:(CCAnimation*) a; -/** initializes the action with an Animation and will restore the original frame when the animtion is over */ --(id) initWithAnimation:(CCAnimation*) a; -/** creates the action with an Animation */ -+(id) actionWithAnimation:(CCAnimation*) a restoreOriginalFrame:(BOOL)b; -/** initializes the action with an Animation */ --(id) initWithAnimation:(CCAnimation*) a restoreOriginalFrame:(BOOL)b; -/** creates an action with a duration, animation and depending of the restoreOriginalFrame, it will restore the original frame or not. - The 'delay' parameter of the animation will be overrided by the duration parameter. - @since v0.99.0 - */ -+(id) actionWithDuration:(ccTime)duration animation:(CCAnimation*)animation restoreOriginalFrame:(BOOL)b; -/** initializes an action with a duration, animation and depending of the restoreOriginalFrame, it will restore the original frame or not. - The 'delay' parameter of the animation will be overrided by the duration parameter. - @since v0.99.0 - */ --(id) initWithDuration:(ccTime)duration animation:(CCAnimation*)animation restoreOriginalFrame:(BOOL)b; -@end diff --git a/Littlest/libs/cocos2d/CCActionInterval.m b/Littlest/libs/cocos2d/CCActionInterval.m deleted file mode 100644 index 5777eb5..0000000 --- a/Littlest/libs/cocos2d/CCActionInterval.m +++ /dev/null @@ -1,1215 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 "CCActionInterval.h" -#import "CCSprite.h" -#import "CCSpriteFrame.h" -#import "CCAnimation.h" -#import "CCNode.h" -#import "Support/CGPointExtension.h" - -// -// IntervalAction -// -#pragma mark - -#pragma mark IntervalAction -@implementation CCActionInterval - -@synthesize elapsed = elapsed_; - --(id) init -{ - NSAssert(NO, @"IntervalActionInit: Init not supported. Use InitWithDuration"); - [self release]; - return nil; -} - -+(id) actionWithDuration: (ccTime) d -{ - return [[[self alloc] initWithDuration:d ] autorelease]; -} - --(id) initWithDuration: (ccTime) d -{ - if( (self=[super init]) ) { - duration_ = d; - - // prevent division by 0 - // This comparison could be in step:, but it might decrease the performance - // by 3% in heavy based action games. - if( duration_ == 0 ) - duration_ = FLT_EPSILON; - elapsed_ = 0; - firstTick_ = YES; - } - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone: zone] initWithDuration: [self duration] ]; - return copy; -} - -- (BOOL) isDone -{ - return (elapsed_ >= duration_); -} - --(void) step: (ccTime) dt -{ - if( firstTick_ ) { - firstTick_ = NO; - elapsed_ = 0; - } else - elapsed_ += dt; - - [self update: MIN(1, elapsed_/duration_)]; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - elapsed_ = 0.0f; - firstTick_ = YES; -} - -- (CCActionInterval*) reverse -{ - NSAssert(NO, @"CCIntervalAction: reverse not implemented."); - return nil; -} -@end - -// -// Sequence -// -#pragma mark - -#pragma mark Sequence -@implementation CCSequence -+(id) actionOne: (CCFiniteTimeAction*) one two: (CCFiniteTimeAction*) two -{ - return [[[self alloc] initOne:one two:two ] autorelease]; -} - -+(id) actions: (CCFiniteTimeAction*) action1, ... -{ - va_list params; - va_start(params,action1); - - CCFiniteTimeAction *now; - CCFiniteTimeAction *prev = action1; - - while( action1 ) { - now = va_arg(params,CCFiniteTimeAction*); - if ( now ) - prev = [self actionOne: prev two: now]; - else - break; - } - va_end(params); - return prev; -} - --(id) initOne: (CCFiniteTimeAction*) one_ two: (CCFiniteTimeAction*) two_ -{ - NSAssert( one_!=nil, @"Sequence: argument one must be non-nil"); - NSAssert( two_!=nil, @"Sequence: argument two must be non-nil"); - - CCFiniteTimeAction *one = one_; - CCFiniteTimeAction *two = two_; - - ccTime d = [one duration] + [two duration]; - [super initWithDuration: d]; - - actions[0] = [one retain]; - actions[1] = [two retain]; - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone:zone] initOne:[[actions[0] copy] autorelease] two:[[actions[1] copy] autorelease] ]; - return copy; -} - --(void) dealloc -{ - [actions[0] release]; - [actions[1] release]; - [super dealloc]; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - split = [actions[0] duration] / duration_; - last = -1; -} - --(void) stop -{ - [actions[0] stop]; - [actions[1] stop]; - [super stop]; -} - --(void) update: (ccTime) t -{ - int found = 0; - ccTime new_t = 0.0f; - - if( t >= split ) { - found = 1; - if ( split == 1 ) - new_t = 1; - else - new_t = (t-split) / (1 - split ); - } else { - found = 0; - if( split != 0 ) - new_t = t / split; - else - new_t = 1; - } - - if (last == -1 && found==1) { - [actions[0] startWithTarget:target_]; - [actions[0] update:1.0f]; - [actions[0] stop]; - } - - if (last != found ) { - if( last != -1 ) { - [actions[last] update: 1.0f]; - [actions[last] stop]; - } - [actions[found] startWithTarget:target_]; - } - [actions[found] update: new_t]; - last = found; -} - -- (CCActionInterval *) reverse -{ - return [[self class] actionOne: [actions[1] reverse] two: [actions[0] reverse ] ]; -} -@end - -// -// Repeat -// -#pragma mark - -#pragma mark CCRepeat -@implementation CCRepeat -+(id) actionWithAction:(CCFiniteTimeAction*)action times:(unsigned int)times -{ - return [[[self alloc] initWithAction:action times:times] autorelease]; -} - --(id) initWithAction:(CCFiniteTimeAction*)action times:(unsigned int)times -{ - ccTime d = [action duration] * times; - - if( (self=[super initWithDuration: d ]) ) { - times_ = times; - other_ = [action retain]; - - total_ = 0; - } - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone:zone] initWithAction:[[other_ copy] autorelease] times:times_]; - return copy; -} - --(void) dealloc -{ - [other_ release]; - [super dealloc]; -} - --(void) startWithTarget:(id)aTarget -{ - total_ = 0; - [super startWithTarget:aTarget]; - [other_ startWithTarget:aTarget]; -} - --(void) stop -{ - [other_ stop]; - [super stop]; -} - - -// issue #80. Instead of hooking step:, hook update: since it can be called by any -// container action like Repeat, Sequence, AccelDeccel, etc.. --(void) update:(ccTime) dt -{ - ccTime t = dt * times_; - if( t > total_+1 ) { - [other_ update:1.0f]; - total_++; - [other_ stop]; - [other_ startWithTarget:target_]; - - // repeat is over ? - if( total_== times_ ) - // so, set it in the original position - [other_ update:0]; - else { - // no ? start next repeat with the right update - // to prevent jerk (issue #390) - [other_ update: t-total_]; - } - - } else { - - float r = fmodf(t, 1.0f); - - // fix last repeat position - // else it could be 0. - if( dt== 1.0f) { - r = 1.0f; - total_++; // this is the added line - } - [other_ update: MIN(r,1)]; - } -} - --(BOOL) isDone -{ - return ( total_ == times_ ); -} - -- (CCActionInterval *) reverse -{ - return [[self class] actionWithAction:[other_ reverse] times:times_]; -} - -@synthesize action=other_; -@end - -// -// Spawn -// -#pragma mark - -#pragma mark Spawn - -@implementation CCSpawn -+(id) actions: (CCFiniteTimeAction*) action1, ... -{ - va_list params; - va_start(params,action1); - - CCFiniteTimeAction *now; - CCFiniteTimeAction *prev = action1; - - while( action1 ) { - now = va_arg(params,CCFiniteTimeAction*); - if ( now ) - prev = [self actionOne: prev two: now]; - else - break; - } - va_end(params); - return prev; -} - -+(id) actionOne: (CCFiniteTimeAction*) one two: (CCFiniteTimeAction*) two -{ - return [[[self alloc] initOne:one two:two ] autorelease]; -} - --(id) initOne: (CCFiniteTimeAction*) one_ two: (CCFiniteTimeAction*) two_ -{ - NSAssert( one_!=nil, @"Spawn: argument one must be non-nil"); - NSAssert( two_!=nil, @"Spawn: argument two must be non-nil"); - - ccTime d1 = [one_ duration]; - ccTime d2 = [two_ duration]; - - [super initWithDuration: fmaxf(d1,d2)]; - - one = one_; - two = two_; - - if( d1 > d2 ) - two = [CCSequence actionOne: two_ two:[CCDelayTime actionWithDuration: (d1-d2)] ]; - else if( d1 < d2) - one = [CCSequence actionOne: one_ two: [CCDelayTime actionWithDuration: (d2-d1)] ]; - - [one retain]; - [two retain]; - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone: zone] initOne: [[one copy] autorelease] two: [[two copy] autorelease] ]; - return copy; -} - --(void) dealloc -{ - [one release]; - [two release]; - [super dealloc]; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - [one startWithTarget:target_]; - [two startWithTarget:target_]; -} - --(void) stop -{ - [one stop]; - [two stop]; - [super stop]; -} - --(void) update: (ccTime) t -{ - [one update:t]; - [two update:t]; -} - -- (CCActionInterval *) reverse -{ - return [[self class] actionOne: [one reverse] two: [two reverse ] ]; -} -@end - -// -// RotateTo -// -#pragma mark - -#pragma mark RotateTo - -@implementation CCRotateTo -+(id) actionWithDuration: (ccTime) t angle:(float) a -{ - return [[[self alloc] initWithDuration:t angle:a ] autorelease]; -} - --(id) initWithDuration: (ccTime) t angle:(float) a -{ - if( (self=[super initWithDuration: t]) ) - dstAngle = a; - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone: zone] initWithDuration:[self duration] angle: dstAngle]; - return copy; -} - --(void) startWithTarget:(CCNode *)aTarget -{ - [super startWithTarget:aTarget]; - - startAngle = [target_ rotation]; - if (startAngle > 0) - startAngle = fmodf(startAngle, 360.0f); - else - startAngle = fmodf(startAngle, -360.0f); - - diffAngle = dstAngle - startAngle; - if (diffAngle > 180) - diffAngle -= 360; - if (diffAngle < -180) - diffAngle += 360; -} --(void) update: (ccTime) t -{ - [target_ setRotation: startAngle + diffAngle * t]; -} -@end - - -// -// RotateBy -// -#pragma mark - -#pragma mark RotateBy - -@implementation CCRotateBy -+(id) actionWithDuration: (ccTime) t angle:(float) a -{ - return [[[self alloc] initWithDuration:t angle:a ] autorelease]; -} - --(id) initWithDuration: (ccTime) t angle:(float) a -{ - if( (self=[super initWithDuration: t]) ) - angle = a; - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone: zone] initWithDuration: [self duration] angle: angle]; - return copy; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - startAngle = [target_ rotation]; -} - --(void) update: (ccTime) t -{ - // XXX: shall I add % 360 - [target_ setRotation: (startAngle + angle * t )]; -} - --(CCActionInterval*) reverse -{ - return [[self class] actionWithDuration:duration_ angle:-angle]; -} - -@end - -// -// MoveTo -// -#pragma mark - -#pragma mark MoveTo - -@implementation CCMoveTo -+(id) actionWithDuration: (ccTime) t position: (CGPoint) p -{ - return [[[self alloc] initWithDuration:t position:p ] autorelease]; -} - --(id) initWithDuration: (ccTime) t position: (CGPoint) p -{ - if( (self=[super initWithDuration: t]) ) - endPosition = p; - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone: zone] initWithDuration: [self duration] position: endPosition]; - return copy; -} - --(void) startWithTarget:(CCNode *)aTarget -{ - [super startWithTarget:aTarget]; - startPosition = [(CCNode*)target_ position]; - delta = ccpSub( endPosition, startPosition ); -} - --(void) update: (ccTime) t -{ - [target_ setPosition: ccp( (startPosition.x + delta.x * t ), (startPosition.y + delta.y * t ) )]; -} -@end - -// -// MoveBy -// -#pragma mark - -#pragma mark MoveBy - -@implementation CCMoveBy -+(id) actionWithDuration: (ccTime) t position: (CGPoint) p -{ - return [[[self alloc] initWithDuration:t position:p ] autorelease]; -} - --(id) initWithDuration: (ccTime) t position: (CGPoint) p -{ - if( (self=[super initWithDuration: t]) ) - delta = p; - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone: zone] initWithDuration: [self duration] position: delta]; - return copy; -} - --(void) startWithTarget:(CCNode *)aTarget -{ - CGPoint dTmp = delta; - [super startWithTarget:aTarget]; - delta = dTmp; -} - --(CCActionInterval*) reverse -{ - return [[self class] actionWithDuration:duration_ position:ccp( -delta.x, -delta.y)]; -} -@end - -// -// JumpBy -// -#pragma mark - -#pragma mark JumpBy - -@implementation CCJumpBy -+(id) actionWithDuration: (ccTime) t position: (CGPoint) pos height: (ccTime) h jumps:(int)j -{ - return [[[self alloc] initWithDuration: t position: pos height: h jumps:j] autorelease]; -} - --(id) initWithDuration: (ccTime) t position: (CGPoint) pos height: (ccTime) h jumps:(int)j -{ - if( (self=[super initWithDuration:t]) ) { - delta = pos; - height = h; - jumps = j; - } - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone: zone] initWithDuration: [self duration] position: delta height:height jumps:jumps]; - return copy; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - startPosition = [(CCNode*)target_ position]; -} - --(void) update: (ccTime) t -{ - // Sin jump. Less realistic -// ccTime y = height * fabsf( sinf(t * (CGFloat)M_PI * jumps ) ); -// y += delta.y * t; -// ccTime x = delta.x * t; -// [target setPosition: ccp( startPosition.x + x, startPosition.y + y )]; - - // parabolic jump (since v0.8.2) - ccTime frac = fmodf( t * jumps, 1.0f ); - ccTime y = height * 4 * frac * (1 - frac); - y += delta.y * t; - ccTime x = delta.x * t; - [target_ setPosition: ccp( startPosition.x + x, startPosition.y + y )]; - -} - --(CCActionInterval*) reverse -{ - return [[self class] actionWithDuration:duration_ position: ccp(-delta.x,-delta.y) height: height jumps:jumps]; -} -@end - -// -// JumpTo -// -#pragma mark - -#pragma mark JumpTo - -@implementation CCJumpTo --(void) startWithTarget:(CCNode *)aTarget -{ - [super startWithTarget:aTarget]; - delta = ccp( delta.x - startPosition.x, delta.y - startPosition.y ); -} -@end - - -#pragma mark - -#pragma mark BezierBy - -// Bezier cubic formula: -// ((1 - t) + t)3 = 1 -// Expands to… -// (1 - t)3 + 3t(1-t)2 + 3t2(1 - t) + t3 = 1 -static inline float bezierat( float a, float b, float c, float d, ccTime t ) -{ - return (powf(1-t,3) * a + - 3*t*(powf(1-t,2))*b + - 3*powf(t,2)*(1-t)*c + - powf(t,3)*d ); -} - -// -// BezierBy -// -@implementation CCBezierBy -+(id) actionWithDuration: (ccTime) t bezier:(ccBezierConfig) c -{ - return [[[self alloc] initWithDuration:t bezier:c ] autorelease]; -} - --(id) initWithDuration: (ccTime) t bezier:(ccBezierConfig) c -{ - if( (self=[super initWithDuration: t]) ) { - config = c; - } - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone: zone] initWithDuration: [self duration] bezier: config]; - return copy; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - startPosition = [(CCNode*)target_ position]; -} - --(void) update: (ccTime) t -{ - float xa = 0; - float xb = config.controlPoint_1.x; - float xc = config.controlPoint_2.x; - float xd = config.endPosition.x; - - float ya = 0; - float yb = config.controlPoint_1.y; - float yc = config.controlPoint_2.y; - float yd = config.endPosition.y; - - float x = bezierat(xa, xb, xc, xd, t); - float y = bezierat(ya, yb, yc, yd, t); - [target_ setPosition: ccpAdd( startPosition, ccp(x,y))]; -} - -- (CCActionInterval*) reverse -{ - ccBezierConfig r; - - r.endPosition = ccpNeg(config.endPosition); - r.controlPoint_1 = ccpAdd(config.controlPoint_2, ccpNeg(config.endPosition)); - r.controlPoint_2 = ccpAdd(config.controlPoint_1, ccpNeg(config.endPosition)); - - CCBezierBy *action = [[self class] actionWithDuration:[self duration] bezier:r]; - return action; -} -@end - -// -// BezierTo -// -#pragma mark - -#pragma mark BezierTo -@implementation CCBezierTo --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - config.controlPoint_1 = ccpSub(config.controlPoint_1, startPosition); - config.controlPoint_2 = ccpSub(config.controlPoint_2, startPosition); - config.endPosition = ccpSub(config.endPosition, startPosition); -} -@end - - -// -// ScaleTo -// -#pragma mark - -#pragma mark ScaleTo -@implementation CCScaleTo -+(id) actionWithDuration: (ccTime) t scale:(float) s -{ - return [[[self alloc] initWithDuration: t scale:s] autorelease]; -} - --(id) initWithDuration: (ccTime) t scale:(float) s -{ - if( (self=[super initWithDuration: t]) ) { - endScaleX = s; - endScaleY = s; - } - return self; -} - -+(id) actionWithDuration: (ccTime) t scaleX:(float)sx scaleY:(float)sy -{ - return [[[self alloc] initWithDuration: t scaleX:sx scaleY:sy] autorelease]; -} - --(id) initWithDuration: (ccTime) t scaleX:(float)sx scaleY:(float)sy -{ - if( (self=[super initWithDuration: t]) ) { - endScaleX = sx; - endScaleY = sy; - } - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone: zone] initWithDuration: [self duration] scaleX:endScaleX scaleY:endScaleY]; - return copy; -} - --(void) startWithTarget:(CCNode *)aTarget -{ - [super startWithTarget:aTarget]; - startScaleX = [target_ scaleX]; - startScaleY = [target_ scaleY]; - deltaX = endScaleX - startScaleX; - deltaY = endScaleY - startScaleY; -} - --(void) update: (ccTime) t -{ - [target_ setScaleX: (startScaleX + deltaX * t ) ]; - [target_ setScaleY: (startScaleY + deltaY * t ) ]; -} -@end - -// -// ScaleBy -// -#pragma mark - -#pragma mark ScaleBy -@implementation CCScaleBy --(void) startWithTarget:(CCNode *)aTarget -{ - [super startWithTarget:aTarget]; - deltaX = startScaleX * endScaleX - startScaleX; - deltaY = startScaleY * endScaleY - startScaleY; -} - --(CCActionInterval*) reverse -{ - return [[self class] actionWithDuration:duration_ scaleX: 1/endScaleX scaleY:1/endScaleY]; -} -@end - -// -// Blink -// -#pragma mark - -#pragma mark Blink -@implementation CCBlink -+(id) actionWithDuration: (ccTime) t blinks: (unsigned int) b -{ - return [[[ self alloc] initWithDuration: t blinks: b] autorelease]; -} - --(id) initWithDuration: (ccTime) t blinks: (unsigned int) b -{ - if( (self=[super initWithDuration: t] ) ) - times = b; - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone: zone] initWithDuration: [self duration] blinks: times]; - return copy; -} - --(void) update: (ccTime) t -{ - if( ! [self isDone] ) { - ccTime slice = 1.0f / times; - ccTime m = fmodf(t, slice); - [target_ setVisible: (m > slice/2) ? YES : NO]; - } -} - --(CCActionInterval*) reverse -{ - // return 'self' - return [[self class] actionWithDuration:duration_ blinks: times]; -} -@end - -// -// FadeIn -// -#pragma mark - -#pragma mark FadeIn -@implementation CCFadeIn --(void) update: (ccTime) t -{ - [(id) target_ setOpacity: 255 *t]; -} - --(CCActionInterval*) reverse -{ - return [CCFadeOut actionWithDuration:duration_]; -} -@end - -// -// FadeOut -// -#pragma mark - -#pragma mark FadeOut -@implementation CCFadeOut --(void) update: (ccTime) t -{ - [(id) target_ setOpacity: 255 *(1-t)]; -} - --(CCActionInterval*) reverse -{ - return [CCFadeIn actionWithDuration:duration_]; -} -@end - -// -// FadeTo -// -#pragma mark - -#pragma mark FadeTo -@implementation CCFadeTo -+(id) actionWithDuration: (ccTime) t opacity: (GLubyte) o -{ - return [[[ self alloc] initWithDuration: t opacity: o] autorelease]; -} - --(id) initWithDuration: (ccTime) t opacity: (GLubyte) o -{ - if( (self=[super initWithDuration: t] ) ) - toOpacity = o; - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone: zone] initWithDuration: [self duration] opacity: toOpacity]; - return copy; -} - --(void) startWithTarget:(CCNode *)aTarget -{ - [super startWithTarget:aTarget]; - fromOpacity = [(id)target_ opacity]; -} - --(void) update: (ccTime) t -{ - [(id)target_ setOpacity: fromOpacity + ( toOpacity - fromOpacity ) * t]; -} -@end - -// -// TintTo -// -#pragma mark - -#pragma mark TintTo -@implementation CCTintTo -+(id) actionWithDuration:(ccTime)t red:(GLubyte)r green:(GLubyte)g blue:(GLubyte)b -{ - return [[(CCTintTo*)[ self alloc] initWithDuration:t red:r green:g blue:b] autorelease]; -} - --(id) initWithDuration: (ccTime) t red:(GLubyte)r green:(GLubyte)g blue:(GLubyte)b -{ - if( (self=[super initWithDuration: t] ) ) - to = ccc3(r,g,b); - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [(CCTintTo*)[[self class] allocWithZone: zone] initWithDuration: [self duration] red:to.r green:to.g blue:to.b]; - return copy; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - - id tn = (id) target_; - from = [tn color]; -} - --(void) update: (ccTime) t -{ - id tn = (id) target_; - [tn setColor:ccc3(from.r + (to.r - from.r) * t, from.g + (to.g - from.g) * t, from.b + (to.b - from.b) * t)]; -} -@end - -// -// TintBy -// -#pragma mark - -#pragma mark TintBy -@implementation CCTintBy -+(id) actionWithDuration:(ccTime)t red:(GLshort)r green:(GLshort)g blue:(GLshort)b -{ - return [[(CCTintBy*)[ self alloc] initWithDuration:t red:r green:g blue:b] autorelease]; -} - --(id) initWithDuration:(ccTime)t red:(GLshort)r green:(GLshort)g blue:(GLshort)b -{ - if( (self=[super initWithDuration: t] ) ) { - deltaR = r; - deltaG = g; - deltaB = b; - } - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - return[(CCTintBy*)[[self class] allocWithZone: zone] initWithDuration: [self duration] red:deltaR green:deltaG blue:deltaB]; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - - id tn = (id) target_; - ccColor3B color = [tn color]; - fromR = color.r; - fromG = color.g; - fromB = color.b; -} - --(void) update: (ccTime) t -{ - id tn = (id) target_; - [tn setColor:ccc3( fromR + deltaR * t, fromG + deltaG * t, fromB + deltaB * t)]; -} - -- (CCActionInterval*) reverse -{ - return [CCTintBy actionWithDuration:duration_ red:-deltaR green:-deltaG blue:-deltaB]; -} -@end - -// -// DelayTime -// -#pragma mark - -#pragma mark DelayTime -@implementation CCDelayTime --(void) update: (ccTime) t -{ - return; -} - --(id)reverse -{ - return [[self class] actionWithDuration:duration_]; -} -@end - -// -// ReverseTime -// -#pragma mark - -#pragma mark ReverseTime -@implementation CCReverseTime -+(id) actionWithAction: (CCFiniteTimeAction*) action -{ - // casting to prevent warnings - CCReverseTime *a = [super alloc]; - return [[a initWithAction:action] autorelease]; -} - --(id) initWithAction: (CCFiniteTimeAction*) action -{ - if( (self=[super initWithDuration: [action duration]]) ) - other = [action retain]; - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - return [[[self class] allocWithZone: zone] initWithAction:[[other copy] autorelease] ]; -} - --(void) dealloc -{ - [other release]; - [super dealloc]; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - [other startWithTarget:target_]; -} - --(void) stop -{ - [other stop]; - [super stop]; -} - --(void) update:(ccTime)t -{ - [other update:1-t]; -} - --(CCActionInterval*) reverse -{ - return [[other copy] autorelease]; -} -@end - -// -// Animate -// - -#pragma mark - -#pragma mark Animate -@implementation CCAnimate - -@synthesize animation = animation_; - -+(id) actionWithAnimation: (CCAnimation*)anim -{ - return [[[self alloc] initWithAnimation:anim restoreOriginalFrame:YES] autorelease]; -} - -+(id) actionWithAnimation: (CCAnimation*)anim restoreOriginalFrame:(BOOL)b -{ - return [[[self alloc] initWithAnimation:anim restoreOriginalFrame:b] autorelease]; -} - -+(id) actionWithDuration:(ccTime)duration animation: (CCAnimation*)anim restoreOriginalFrame:(BOOL)b -{ - return [[[self alloc] initWithDuration:duration animation:anim restoreOriginalFrame:b] autorelease]; -} - --(id) initWithAnimation: (CCAnimation*)anim -{ - NSAssert( anim!=nil, @"Animate: argument Animation must be non-nil"); - return [self initWithAnimation:anim restoreOriginalFrame:YES]; -} - --(id) initWithAnimation: (CCAnimation*)anim restoreOriginalFrame:(BOOL) b -{ - NSAssert( anim!=nil, @"Animate: argument Animation must be non-nil"); - - if( (self=[super initWithDuration: [[anim frames] count] * [anim delay]]) ) { - - restoreOriginalFrame = b; - self.animation = anim; - origFrame = nil; - } - return self; -} - --(id) initWithDuration:(ccTime)aDuration animation: (CCAnimation*)anim restoreOriginalFrame:(BOOL) b -{ - NSAssert( anim!=nil, @"Animate: argument Animation must be non-nil"); - - if( (self=[super initWithDuration:aDuration] ) ) { - - restoreOriginalFrame = b; - self.animation = anim; - origFrame = nil; - } - return self; -} - - --(id) copyWithZone: (NSZone*) zone -{ - return [[[self class] allocWithZone: zone] initWithDuration:duration_ animation:animation_ restoreOriginalFrame:restoreOriginalFrame]; -} - --(void) dealloc -{ - [animation_ release]; - [origFrame release]; - [super dealloc]; -} - --(void) startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - CCSprite *sprite = target_; - - [origFrame release]; - - if( restoreOriginalFrame ) - origFrame = [[sprite displayedFrame] retain]; -} - --(void) stop -{ - if( restoreOriginalFrame ) { - CCSprite *sprite = target_; - [sprite setDisplayFrame:origFrame]; - } - - [super stop]; -} - --(void) update: (ccTime) t -{ - NSArray *frames = [animation_ frames]; - NSUInteger numberOfFrames = [frames count]; - - NSUInteger idx = t * numberOfFrames; - - if( idx >= numberOfFrames ) - idx = numberOfFrames -1; - - CCSprite *sprite = target_; - if (! [sprite isFrameDisplayed: [frames objectAtIndex: idx]] ) - [sprite setDisplayFrame: [frames objectAtIndex:idx]]; -} - -- (CCActionInterval *) reverse -{ - NSArray *oldArray = [animation_ frames]; - NSMutableArray *newArray = [NSMutableArray arrayWithCapacity:[oldArray count]]; - NSEnumerator *enumerator = [oldArray reverseObjectEnumerator]; - for (id element in enumerator) - [newArray addObject:[[element copy] autorelease]]; - - CCAnimation *newAnim = [CCAnimation animationWithFrames:newArray delay:animation_.delay]; - return [[self class] actionWithDuration:duration_ animation:newAnim restoreOriginalFrame:restoreOriginalFrame]; -} - -@end diff --git a/Littlest/libs/cocos2d/CCActionManager.h b/Littlest/libs/cocos2d/CCActionManager.h deleted file mode 100644 index 168d601..0000000 --- a/Littlest/libs/cocos2d/CCActionManager.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * Copyright (c) 2009 Valentin Milea - * - * 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 "CCAction.h" -#import "Support/ccCArray.h" -#import "Support/uthash.h" - -typedef struct _hashElement -{ - struct ccArray *actions; - id target; - unsigned int actionIndex; - CCAction *currentAction; - BOOL currentActionSalvaged; - BOOL paused; - UT_hash_handle hh; -} tHashElement; - - -/** 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 - */ -@interface CCActionManager : NSObject -{ - tHashElement *targets; - tHashElement *currentTarget; - BOOL currentTargetSalvaged; -} - -/** returns a shared instance of the CCActionManager */ -+ (CCActionManager *)sharedManager; - -/** purges the shared action manager. It releases the retained instance. - @since v0.99.0 - */ -+(void)purgeSharedManager; - -// 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 paused, 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*) action target:(id)target paused:(BOOL)paused; -/** Removes all actions from all the targers. - */ --(void) removeAllActions; - -/** Removes all actions from a certain target. - All the actions that belongs to the target will be removed. - */ --(void) removeAllActionsFromTarget:(id)target; -/** Removes an action given an action reference. - */ --(void) removeAction: (CCAction*) action; -/** Removes an action given its tag and the target */ --(void) removeActionByTag:(int)tag target:(id)target; -/** Gets an action given its tag an a target - @return the Action the with the given tag - */ --(CCAction*) getActionByTag:(int) tag target:(id)target; -/** 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. - */ --(int) numberOfRunningActionsInTarget:(id)target; - -/** Pauses the target: all running actions and newly added actions will be paused. - */ --(void) pauseTarget:(id)target; -/** Resumes the target. All queued actions will be resumed. - */ --(void) resumeTarget:(id)target; - -@end - diff --git a/Littlest/libs/cocos2d/CCActionManager.m b/Littlest/libs/cocos2d/CCActionManager.m deleted file mode 100644 index ed67021..0000000 --- a/Littlest/libs/cocos2d/CCActionManager.m +++ /dev/null @@ -1,344 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * Copyright (c) 2009 Valentin Milea - * - * 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 "CCActionManager.h" -#import "CCScheduler.h" -#import "ccMacros.h" - - -// -// singleton stuff -// -static CCActionManager *sharedManager_ = nil; - -@interface CCActionManager (Private) --(void) removeActionAtIndex:(NSUInteger)index hashElement:(tHashElement*)element; --(void) deleteHashElement:(tHashElement*)element; --(void) actionAllocWithHashElement:(tHashElement*)element; -@end - - -@implementation CCActionManager - -#pragma mark ActionManager - init -+ (CCActionManager *)sharedManager -{ - if (!sharedManager_) - sharedManager_ = [[self alloc] init]; - - return sharedManager_; -} - -+(id)alloc -{ - NSAssert(sharedManager_ == nil, @"Attempted to allocate a second instance of a singleton."); - return [super alloc]; -} - -+(void)purgeSharedManager -{ - [[CCScheduler sharedScheduler] unscheduleUpdateForTarget:self]; - [sharedManager_ release]; - sharedManager_ = nil; -} - --(id) init -{ - if ((self=[super init]) ) { - [[CCScheduler sharedScheduler] scheduleUpdateForTarget:self priority:0 paused:NO]; - targets = NULL; - } - - return self; -} - -- (void) dealloc -{ - CCLOGINFO( @"cocos2d: deallocing %@", self); - - [self removeAllActions]; - - sharedManager_ = nil; - - [super dealloc]; -} - -#pragma mark ActionManager - Private - --(void) deleteHashElement:(tHashElement*)element -{ - ccArrayFree(element->actions); - HASH_DEL(targets, element); -// CCLOG(@"cocos2d: ---- buckets: %d/%d - %@", targets->entries, targets->size, element->target); - [element->target release]; - free(element); -} - --(void) actionAllocWithHashElement:(tHashElement*)element -{ - // 4 actions per Node by default - if( element->actions == nil ) - element->actions = ccArrayNew(4); - else if( element->actions->num == element->actions->max ) - ccArrayDoubleCapacity(element->actions); -} - --(void) removeActionAtIndex:(NSUInteger)index hashElement:(tHashElement*)element -{ - id action = element->actions->arr[index]; - - if( action == element->currentAction && !element->currentActionSalvaged ) { - [element->currentAction retain]; - element->currentActionSalvaged = YES; - } - - ccArrayRemoveObjectAtIndex(element->actions, index); - - // update actionIndex in case we are in tick:, looping over the actions - if( element->actionIndex >= index ) - element->actionIndex--; - - if( element->actions->num == 0 ) { - if( currentTarget == element ) - currentTargetSalvaged = YES; - else - [self deleteHashElement: element]; - } -} - -#pragma mark ActionManager - Pause / Resume - --(void) pauseTarget:(id)target -{ - tHashElement *element = NULL; - HASH_FIND_INT(targets, &target, element); - if( element ) - element->paused = YES; -// else -// CCLOG(@"cocos2d: pauseAllActions: Target not found"); -} - --(void) resumeTarget:(id)target -{ - tHashElement *element = NULL; - HASH_FIND_INT(targets, &target, element); - if( element ) - element->paused = NO; -// else -// CCLOG(@"cocos2d: resumeAllActions: Target not found"); -} - -#pragma mark ActionManager - run - --(void) addAction:(CCAction*)action target:(id)target paused:(BOOL)paused -{ - NSAssert( action != nil, @"Argument action must be non-nil"); - NSAssert( target != nil, @"Argument target must be non-nil"); - - tHashElement *element = NULL; - HASH_FIND_INT(targets, &target, element); - if( ! element ) { - element = calloc( sizeof( *element ), 1 ); - element->paused = paused; - element->target = [target retain]; - HASH_ADD_INT(targets, target, element); -// CCLOG(@"cocos2d: ---- buckets: %d/%d - %@", targets->entries, targets->size, element->target); - - } - - [self actionAllocWithHashElement:element]; - - NSAssert( !ccArrayContainsObject(element->actions, action), @"runAction: Action already running"); - ccArrayAppendObject(element->actions, action); - - [action startWithTarget:target]; -} - -#pragma mark ActionManager - remove - --(void) removeAllActions -{ - for(tHashElement *element=targets; element != NULL; ) { - id target = element->target; - element = element->hh.next; - [self removeAllActionsFromTarget:target]; - } -} --(void) removeAllActionsFromTarget:(id)target -{ - // explicit nil handling - if( target == nil ) - return; - - tHashElement *element = NULL; - HASH_FIND_INT(targets, &target, element); - if( element ) { - if( ccArrayContainsObject(element->actions, element->currentAction) && !element->currentActionSalvaged ) { - [element->currentAction retain]; - element->currentActionSalvaged = YES; - } - ccArrayRemoveAllObjects(element->actions); - if( currentTarget == element ) - currentTargetSalvaged = YES; - else - [self deleteHashElement:element]; - } -// else { -// CCLOG(@"cocos2d: removeAllActionsFromTarget: Target not found"); -// } -} - --(void) removeAction: (CCAction*) action -{ - // explicit nil handling - if (action == nil) - return; - - tHashElement *element = NULL; - id target = [action originalTarget]; - HASH_FIND_INT(targets, &target, element ); - if( element ) { - NSUInteger i = ccArrayGetIndexOfObject(element->actions, action); - if( i != NSNotFound ) - [self removeActionAtIndex:i hashElement:element]; - } -// else { -// CCLOG(@"cocos2d: removeAction: Target not found"); -// } -} - --(void) removeActionByTag:(int) aTag target:(id)target -{ - NSAssert( aTag != kCCActionTagInvalid, @"Invalid tag"); - NSAssert( target != nil, @"Target should be ! nil"); - - tHashElement *element = NULL; - HASH_FIND_INT(targets, &target, element); - - if( element ) { - NSUInteger limit = element->actions->num; - for( NSUInteger i = 0; i < limit; i++) { - CCAction *a = element->actions->arr[i]; - - if( a.tag == aTag && [a originalTarget]==target) - return [self removeActionAtIndex:i hashElement:element]; - } -// CCLOG(@"cocos2d: removeActionByTag: Action not found!"); - } -// else { -// CCLOG(@"cocos2d: removeActionByTag: Target not found!"); -// } -} - -#pragma mark ActionManager - get - --(CCAction*) getActionByTag:(int)aTag target:(id)target -{ - NSAssert( aTag != kCCActionTagInvalid, @"Invalid tag"); - - tHashElement *element = NULL; - HASH_FIND_INT(targets, &target, element); - - if( element ) { - if( element->actions != nil ) { - NSUInteger limit = element->actions->num; - for( NSUInteger i = 0; i < limit; i++) { - CCAction *a = element->actions->arr[i]; - - if( a.tag == aTag ) - return a; - } - } -// CCLOG(@"cocos2d: getActionByTag: Action not found"); - } -// else { -// CCLOG(@"cocos2d: getActionByTag: Target not found"); -// } - return nil; -} - --(int) numberOfRunningActionsInTarget:(id) target -{ - tHashElement *element = NULL; - HASH_FIND_INT(targets, &target, element); - if( element ) - return element->actions ? element->actions->num : 0; - -// CCLOG(@"cocos2d: numberOfRunningActionsInTarget: Target not found"); - return 0; -} - -#pragma mark ActionManager - main loop - --(void) update: (ccTime) dt -{ - for(tHashElement *elt = targets; elt != NULL; ) { - - currentTarget = elt; - currentTargetSalvaged = NO; - - if( ! currentTarget->paused ) { - - // The 'actions' ccArray may change while inside this loop. - for( currentTarget->actionIndex = 0; currentTarget->actionIndex < currentTarget->actions->num; currentTarget->actionIndex++) { - currentTarget->currentAction = currentTarget->actions->arr[currentTarget->actionIndex]; - currentTarget->currentActionSalvaged = NO; - - [currentTarget->currentAction step: dt]; - - if( currentTarget->currentActionSalvaged ) { - // The currentAction told the node to remove it. To prevent the action from - // accidentally deallocating itself before finishing its step, we retained - // it. Now that step is done, it's safe to release it. - [currentTarget->currentAction release]; - - } else if( [currentTarget->currentAction isDone] ) { - [currentTarget->currentAction stop]; - - CCAction *a = currentTarget->currentAction; - // Make currentAction nil to prevent removeAction from salvaging it. - currentTarget->currentAction = nil; - [self removeAction:a]; - } - - currentTarget->currentAction = nil; - } - } - - // elt, at this moment, is still valid - // so it is safe to ask this here (issue #490) - elt = elt->hh.next; - - // only delete currentTarget if no actions were scheduled during the cycle (issue #481) - if( currentTargetSalvaged && currentTarget->actions->num == 0 ) - [self deleteHashElement:currentTarget]; - } - - // issue #635 - currentTarget = nil; -} -@end diff --git a/Littlest/libs/cocos2d/CCActionPageTurn3D.h b/Littlest/libs/cocos2d/CCActionPageTurn3D.h deleted file mode 100644 index 39eb31d..0000000 --- a/Littlest/libs/cocos2d/CCActionPageTurn3D.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2009 Sindesso Pty Ltd http://www.sindesso.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. - * - */ - - -#import "CCActionGrid3D.h" - -/** - * 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 - */ -@interface CCPageTurn3D : CCGrid3DAction -{ -} - -@end diff --git a/Littlest/libs/cocos2d/CCActionPageTurn3D.m b/Littlest/libs/cocos2d/CCActionPageTurn3D.m deleted file mode 100644 index ee59500..0000000 --- a/Littlest/libs/cocos2d/CCActionPageTurn3D.m +++ /dev/null @@ -1,86 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2009 Sindesso Pty Ltd http://www.sindesso.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. - * - */ - -#import "CCActionPageTurn3D.h" - -@implementation CCPageTurn3D - -/* - * Update each tick - * Time is the percentage of the way through the duration - */ --(void)update:(ccTime)time -{ - float tt = MAX( 0, time - 0.25f ); - float deltaAy = ( tt * tt * 500); - float ay = -100 - deltaAy; - - float deltaTheta = - (float) M_PI_2 * sqrtf( time) ; - float theta = /*0.01f*/ + (float) M_PI_2 +deltaTheta; - - float sinTheta = sinf(theta); - float cosTheta = cosf(theta); - - for( int i = 0; i <=gridSize_.x; i++ ) - { - for( int j = 0; j <= gridSize_.y; j++ ) - { - // Get original vertex - ccVertex3F p = [self originalVertex:ccg(i,j)]; - - float R = sqrtf(p.x*p.x + (p.y - ay) * (p.y - ay)); - float r = R * sinTheta; - float alpha = asinf( p.x / R ); - float beta = alpha / sinTheta; - float cosBeta = cosf( beta ); - - // If beta > PI then we've wrapped around the cone - // Reduce the radius to stop these points interfering with others - if( beta <= M_PI) - p.x = ( r * sinf(beta)); - else - { - // Force X = 0 to stop wrapped - // points - p.x = 0; - } - - p.y = ( R + ay - ( r*(1 - cosBeta)*sinTheta)); - - // We scale z here to avoid the animation being - // too much bigger than the screen due to perspectve transform - p.z = (r * ( 1 - cosBeta ) * cosTheta) / 7; // "100" didn't work for - - // Stop z coord from dropping beneath underlying page in a transition - // issue #751 - if( p.z<0.5f ) - p.z = 0.5f; - - // Set new coords - [self setVertex:ccg(i,j) vertex:p]; - } - } -} -@end diff --git a/Littlest/libs/cocos2d/CCActionProgressTimer.h b/Littlest/libs/cocos2d/CCActionProgressTimer.h deleted file mode 100644 index 500631b..0000000 --- a/Littlest/libs/cocos2d/CCActionProgressTimer.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (C) 2010 Lam Pham - * - * 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 -#import "CCProgressTimer.h" -#import "CCActionInterval.h" - -/** - Progress to percentage -@since v0.99.1 -*/ -@interface CCProgressTo : CCActionInterval -{ - float to_; - float from_; -} -/** Creates and initializes with a duration and a percent */ -+(id) actionWithDuration:(ccTime)duration percent:(float)percent; -/** Initializes with a duration and a percent */ --(id) initWithDuration:(ccTime)duration percent:(float)percent; -@end - -/** - Progress from a percentage to another percentage - @since v0.99.1 - */ -@interface CCProgressFromTo : CCActionInterval -{ - float to_; - float from_; -} -/** Creates and initializes the action with a duration, a "from" percentage and a "to" percentage */ -+(id) actionWithDuration:(ccTime)duration from:(float)fromPercentage to:(float) toPercentage; -/** Initializes the action with a duration, a "from" percentage and a "to" percentage */ --(id) initWithDuration:(ccTime)duration from:(float)fromPercentage to:(float) toPercentage; -@end diff --git a/Littlest/libs/cocos2d/CCActionProgressTimer.m b/Littlest/libs/cocos2d/CCActionProgressTimer.m deleted file mode 100644 index c242570..0000000 --- a/Littlest/libs/cocos2d/CCActionProgressTimer.m +++ /dev/null @@ -1,103 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (C) 2010 Lam Pham - * - * 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 "CCActionProgressTimer.h" - -#define kProgressTimerCast CCProgressTimer* - -@implementation CCProgressTo -+(id) actionWithDuration: (ccTime) t percent: (float) v -{ - return [[[ self alloc] initWithDuration: t percent: v] autorelease]; -} - --(id) initWithDuration: (ccTime) t percent: (float) v -{ - if( (self=[super initWithDuration: t] ) ) - to_ = v; - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone: zone] initWithDuration:duration_ percent:to_]; - return copy; -} - --(void) startWithTarget:(id) aTarget; -{ - [super startWithTarget:aTarget]; - from_ = [(kProgressTimerCast)target_ percentage]; - - // XXX: Is this correct ? - // Adding it to support CCRepeat - if( from_ == 100) - from_ = 0; -} - --(void) update: (ccTime) t -{ - [(kProgressTimerCast)target_ setPercentage: from_ + ( to_ - from_ ) * t]; -} -@end - -@implementation CCProgressFromTo -+(id) actionWithDuration: (ccTime) t from:(float)fromPercentage to:(float) toPercentage -{ - return [[[self alloc] initWithDuration: t from: fromPercentage to: toPercentage] autorelease]; -} - --(id) initWithDuration: (ccTime) t from:(float)fromPercentage to:(float) toPercentage -{ - if( (self=[super initWithDuration: t] ) ){ - to_ = toPercentage; - from_ = fromPercentage; - } - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCAction *copy = [[[self class] allocWithZone: zone] initWithDuration:duration_ from:from_ to:to_]; - return copy; -} - -- (CCActionInterval *) reverse -{ - return [[self class] actionWithDuration:duration_ from:to_ to:from_]; -} - --(void) startWithTarget:(id) aTarget; -{ - [super startWithTarget:aTarget]; -} - --(void) update: (ccTime) t -{ - [(kProgressTimerCast)target_ setPercentage: from_ + ( to_ - from_ ) * t]; -} -@end diff --git a/Littlest/libs/cocos2d/CCActionTiledGrid.h b/Littlest/libs/cocos2d/CCActionTiledGrid.h deleted file mode 100644 index 5d88b16..0000000 --- a/Littlest/libs/cocos2d/CCActionTiledGrid.h +++ /dev/null @@ -1,211 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2009 On-Core - * - * 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 "CCActionGrid.h" - -/** CCShakyTiles3D action */ -@interface CCShakyTiles3D : CCTiledGrid3DAction -{ - int randrange; - BOOL shakeZ; -} - -/** creates the action with a range, whether or not to shake Z vertices, a grid size, and duration */ -+(id)actionWithRange:(int)range shakeZ:(BOOL)shakeZ grid:(ccGridSize)gridSize duration:(ccTime)d; -/** initializes the action with a range, whether or not to shake Z vertices, a grid size, and duration */ --(id)initWithRange:(int)range shakeZ:(BOOL)shakeZ grid:(ccGridSize)gridSize duration:(ccTime)d; - -@end - -//////////////////////////////////////////////////////////// - -/** CCShatteredTiles3D action */ -@interface CCShatteredTiles3D : CCTiledGrid3DAction -{ - int randrange; - BOOL once; - BOOL shatterZ; -} - -/** creates the action with a range, whether of not to shatter Z vertices, a grid size and duration */ -+(id)actionWithRange:(int)range shatterZ:(BOOL)shatterZ grid:(ccGridSize)gridSize duration:(ccTime)d; -/** initializes the action with a range, whether or not to shatter Z vertices, a grid size and duration */ --(id)initWithRange:(int)range shatterZ:(BOOL)shatterZ grid:(ccGridSize)gridSize duration:(ccTime)d; - -@end - -//////////////////////////////////////////////////////////// - -/** CCShuffleTiles action - Shuffle the tiles in random order - */ -@interface CCShuffleTiles : CCTiledGrid3DAction -{ - int seed; - int tilesCount; - int *tilesOrder; - void *tiles; -} - -/** creates the action with a random seed, the grid size and the duration */ -+(id)actionWithSeed:(int)s grid:(ccGridSize)gridSize duration:(ccTime)d; -/** initializes the action with a random seed, the grid size and the duration */ --(id)initWithSeed:(int)s grid:(ccGridSize)gridSize duration:(ccTime)d; - -@end - -//////////////////////////////////////////////////////////// - -/** CCFadeOutTRTiles action - Fades out the tiles in a Top-Right direction - */ -@interface CCFadeOutTRTiles : CCTiledGrid3DAction -{ -} -@end - -//////////////////////////////////////////////////////////// - -/** CCFadeOutBLTiles action. - Fades out the tiles in a Bottom-Left direction - */ -@interface CCFadeOutBLTiles : CCFadeOutTRTiles -{ -} -@end - -//////////////////////////////////////////////////////////// - -/** CCFadeOutUpTiles action. - Fades out the tiles in upwards direction - */ -@interface CCFadeOutUpTiles : CCFadeOutTRTiles -{ -} -@end - -//////////////////////////////////////////////////////////// - -/** CCFadeOutDownTiles action. - Fades out the tiles in downwards direction - */ -@interface CCFadeOutDownTiles : CCFadeOutUpTiles -{ -} -@end - -//////////////////////////////////////////////////////////// - -/** CCTurnOffTiles action. - Turn off the files in random order - */ -@interface CCTurnOffTiles : CCTiledGrid3DAction -{ - int seed; - int tilesCount; - int *tilesOrder; -} - -/** creates the action with a random seed, the grid size and the duration */ -+(id)actionWithSeed:(int)s grid:(ccGridSize)gridSize duration:(ccTime)d; -/** initializes the action with a random seed, the grid size and the duration */ --(id)initWithSeed:(int)s grid:(ccGridSize)gridSize duration:(ccTime)d; -@end - -//////////////////////////////////////////////////////////// - -/** CCWavesTiles3D action. */ -@interface CCWavesTiles3D : CCTiledGrid3DAction -{ - int waves; - float amplitude; - float amplitudeRate; -} - -/** waves amplitude */ -@property (nonatomic,readwrite) float amplitude; -/** waves amplitude rate */ -@property (nonatomic,readwrite) float amplitudeRate; - -/** creates the action with a number of waves, the waves amplitude, the grid size and the duration */ -+(id)actionWithWaves:(int)wav amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d; -/** initializes the action with a number of waves, the waves amplitude, the grid size and the duration */ --(id)initWithWaves:(int)wav amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d; - -@end - -//////////////////////////////////////////////////////////// - -/** CCJumpTiles3D action. - A sin function is executed to move the tiles across the Z axis - */ -@interface CCJumpTiles3D : CCTiledGrid3DAction -{ - int jumps; - float amplitude; - float amplitudeRate; -} - -/** amplitude of the sin*/ -@property (nonatomic,readwrite) float amplitude; -/** amplitude rate */ -@property (nonatomic,readwrite) float amplitudeRate; - -/** creates the action with the number of jumps, the sin amplitude, the grid size and the duration */ -+(id)actionWithJumps:(int)j amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d; -/** initializes the action with the number of jumps, the sin amplitude, the grid size and the duration */ --(id)initWithJumps:(int)j amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d; - -@end - -//////////////////////////////////////////////////////////// - -/** CCSplitRows action */ -@interface CCSplitRows : CCTiledGrid3DAction -{ - int rows; - CGSize winSize; -} -/** creates the action with the number of rows to split and the duration */ -+(id)actionWithRows:(int)rows duration:(ccTime)duration; -/** initializes the action with the number of rows to split and the duration */ --(id)initWithRows:(int)rows duration:(ccTime)duration; - -@end - -//////////////////////////////////////////////////////////// - -/** CCSplitCols action */ -@interface CCSplitCols : CCTiledGrid3DAction -{ - int cols; - CGSize winSize; -} -/** creates the action with the number of columns to split and the duration */ -+(id)actionWithCols:(int)cols duration:(ccTime)duration; -/** initializes the action with the number of columns to split and the duration */ --(id)initWithCols:(int)cols duration:(ccTime)duration; - -@end diff --git a/Littlest/libs/cocos2d/CCActionTiledGrid.m b/Littlest/libs/cocos2d/CCActionTiledGrid.m deleted file mode 100644 index 4513866..0000000 --- a/Littlest/libs/cocos2d/CCActionTiledGrid.m +++ /dev/null @@ -1,768 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2009 On-Core - * - * 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 "CCActionTiledGrid.h" -#import "CCDirector.h" -#import "ccMacros.h" -#import "Support/CGPointExtension.h" - -typedef struct -{ - CGPoint position; - CGPoint startPosition; - ccGridSize delta; -} Tile; - -#pragma mark - -#pragma mark ShakyTiles3D - -@implementation CCShakyTiles3D - -+(id)actionWithRange:(int)range shakeZ:(BOOL)shakeZ grid:(ccGridSize)gridSize duration:(ccTime)d -{ - return [[[self alloc] initWithRange:range shakeZ:shakeZ grid:gridSize duration:d] autorelease]; -} - --(id)initWithRange:(int)range shakeZ:(BOOL)sz grid:(ccGridSize)gSize duration:(ccTime)d -{ - if ( (self = [super initWithSize:gSize duration:d]) ) - { - randrange = range; - shakeZ = sz; - } - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCGridAction *copy = [[[self class] allocWithZone:zone] initWithRange:randrange shakeZ:shakeZ grid:gridSize_ duration:duration_]; - return copy; -} - - --(void)update:(ccTime)time -{ - int i, j; - - for( i = 0; i < gridSize_.x; i++ ) - { - for( j = 0; j < gridSize_.y; j++ ) - { - ccQuad3 coords = [self originalTile:ccg(i,j)]; - - // X - coords.bl.x += ( rand() % (randrange*2) ) - randrange; - coords.br.x += ( rand() % (randrange*2) ) - randrange; - coords.tl.x += ( rand() % (randrange*2) ) - randrange; - coords.tr.x += ( rand() % (randrange*2) ) - randrange; - - // Y - coords.bl.y += ( rand() % (randrange*2) ) - randrange; - coords.br.y += ( rand() % (randrange*2) ) - randrange; - coords.tl.y += ( rand() % (randrange*2) ) - randrange; - coords.tr.y += ( rand() % (randrange*2) ) - randrange; - - if( shakeZ ) { - coords.bl.z += ( rand() % (randrange*2) ) - randrange; - coords.br.z += ( rand() % (randrange*2) ) - randrange; - coords.tl.z += ( rand() % (randrange*2) ) - randrange; - coords.tr.z += ( rand() % (randrange*2) ) - randrange; - } - - [self setTile:ccg(i,j) coords:coords]; - } - } -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark CCShatteredTiles3D - -@implementation CCShatteredTiles3D - -+(id)actionWithRange:(int)range shatterZ:(BOOL)sz grid:(ccGridSize)gridSize duration:(ccTime)d -{ - return [[[self alloc] initWithRange:range shatterZ:sz grid:gridSize duration:d] autorelease]; -} - --(id)initWithRange:(int)range shatterZ:(BOOL)sz grid:(ccGridSize)gSize duration:(ccTime)d -{ - if ( (self = [super initWithSize:gSize duration:d]) ) - { - once = NO; - randrange = range; - shatterZ = sz; - } - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCGridAction *copy = [[[self class] allocWithZone:zone] initWithRange:randrange shatterZ:shatterZ grid:gridSize_ duration:duration_]; - return copy; -} - - --(void)update:(ccTime)time -{ - int i, j; - - if ( once == NO ) - { - for( i = 0; i < gridSize_.x; i++ ) - { - for( j = 0; j < gridSize_.y; j++ ) - { - ccQuad3 coords = [self originalTile:ccg(i,j)]; - - // X - coords.bl.x += ( rand() % (randrange*2) ) - randrange; - coords.br.x += ( rand() % (randrange*2) ) - randrange; - coords.tl.x += ( rand() % (randrange*2) ) - randrange; - coords.tr.x += ( rand() % (randrange*2) ) - randrange; - - // Y - coords.bl.y += ( rand() % (randrange*2) ) - randrange; - coords.br.y += ( rand() % (randrange*2) ) - randrange; - coords.tl.y += ( rand() % (randrange*2) ) - randrange; - coords.tr.y += ( rand() % (randrange*2) ) - randrange; - - if( shatterZ ) { - coords.bl.z += ( rand() % (randrange*2) ) - randrange; - coords.br.z += ( rand() % (randrange*2) ) - randrange; - coords.tl.z += ( rand() % (randrange*2) ) - randrange; - coords.tr.z += ( rand() % (randrange*2) ) - randrange; - } - - [self setTile:ccg(i,j) coords:coords]; - } - } - - once = YES; - } -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark CCShuffleTiles - -@implementation CCShuffleTiles - -+(id)actionWithSeed:(int)s grid:(ccGridSize)gridSize duration:(ccTime)d -{ - return [[[self alloc] initWithSeed:s grid:gridSize duration:d] autorelease]; -} - --(id)initWithSeed:(int)s grid:(ccGridSize)gSize duration:(ccTime)d -{ - if ( (self = [super initWithSize:gSize duration:d]) ) - { - seed = s; - tilesOrder = nil; - tiles = nil; - } - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCGridAction *copy = [[[self class] allocWithZone:zone] initWithSeed:seed grid:gridSize_ duration:duration_]; - return copy; -} - - --(void)dealloc -{ - if ( tilesOrder ) free(tilesOrder); - if ( tiles ) free(tiles); - [super dealloc]; -} - --(void)shuffle:(int*)array count:(int)len -{ - int i; - for( i = len - 1; i >= 0; i-- ) - { - int j = rand() % (i+1); - int v = array[i]; - array[i] = array[j]; - array[j] = v; - } -} - --(ccGridSize)getDelta:(ccGridSize)pos -{ - CGPoint pos2; - - int idx = pos.x * gridSize_.y + pos.y; - - pos2.x = tilesOrder[idx] / (int)gridSize_.y; - pos2.y = tilesOrder[idx] % (int)gridSize_.y; - - return ccg(pos2.x - pos.x, pos2.y - pos.y); -} - --(void)placeTile:(ccGridSize)pos tile:(Tile)t -{ - ccQuad3 coords = [self originalTile:pos]; - - CGPoint step = [[target_ grid] step]; - coords.bl.x += (int)(t.position.x * step.x); - coords.bl.y += (int)(t.position.y * step.y); - - coords.br.x += (int)(t.position.x * step.x); - coords.br.y += (int)(t.position.y * step.y); - - coords.tl.x += (int)(t.position.x * step.x); - coords.tl.y += (int)(t.position.y * step.y); - - coords.tr.x += (int)(t.position.x * step.x); - coords.tr.y += (int)(t.position.y * step.y); - - [self setTile:pos coords:coords]; -} - --(void)startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - - if ( seed != -1 ) - srand(seed); - - tilesCount = gridSize_.x * gridSize_.y; - tilesOrder = (int*)malloc(tilesCount*sizeof(int)); - int i, j; - - for( i = 0; i < tilesCount; i++ ) - tilesOrder[i] = i; - - [self shuffle:tilesOrder count:tilesCount]; - - tiles = malloc(tilesCount*sizeof(Tile)); - Tile *tileArray = (Tile*)tiles; - - for( i = 0; i < gridSize_.x; i++ ) - { - for( j = 0; j < gridSize_.y; j++ ) - { - tileArray->position = ccp(i,j); - tileArray->startPosition = ccp(i,j); - tileArray->delta = [self getDelta:ccg(i,j)]; - tileArray++; - } - } -} - --(void)update:(ccTime)time -{ - int i, j; - - Tile *tileArray = (Tile*)tiles; - - for( i = 0; i < gridSize_.x; i++ ) - { - for( j = 0; j < gridSize_.y; j++ ) - { - tileArray->position = ccpMult( ccp(tileArray->delta.x, tileArray->delta.y), time); - [self placeTile:ccg(i,j) tile:*tileArray]; - tileArray++; - } - } -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark CCFadeOutTRTiles - -@implementation CCFadeOutTRTiles - --(float)testFunc:(ccGridSize)pos time:(ccTime)time -{ - CGPoint n = ccpMult( ccp(gridSize_.x,gridSize_.y), time); - if ( (n.x+n.y) == 0.0f ) - return 1.0f; - - return powf( (pos.x+pos.y) / (n.x+n.y), 6 ); -} - --(void)turnOnTile:(ccGridSize)pos -{ - [self setTile:pos coords:[self originalTile:pos]]; -} - --(void)turnOffTile:(ccGridSize)pos -{ - ccQuad3 coords; - bzero(&coords, sizeof(ccQuad3)); - [self setTile:pos coords:coords]; -} - --(void)transformTile:(ccGridSize)pos distance:(float)distance -{ - ccQuad3 coords = [self originalTile:pos]; - CGPoint step = [[target_ grid] step]; - - coords.bl.x += (step.x / 2) * (1.0f - distance); - coords.bl.y += (step.y / 2) * (1.0f - distance); - - coords.br.x -= (step.x / 2) * (1.0f - distance); - coords.br.y += (step.y / 2) * (1.0f - distance); - - coords.tl.x += (step.x / 2) * (1.0f - distance); - coords.tl.y -= (step.y / 2) * (1.0f - distance); - - coords.tr.x -= (step.x / 2) * (1.0f - distance); - coords.tr.y -= (step.y / 2) * (1.0f - distance); - - [self setTile:pos coords:coords]; -} - --(void)update:(ccTime)time -{ - int i, j; - - for( i = 0; i < gridSize_.x; i++ ) - { - for( j = 0; j < gridSize_.y; j++ ) - { - float distance = [self testFunc:ccg(i,j) time:time]; - if ( distance == 0 ) - [self turnOffTile:ccg(i,j)]; - else if ( distance < 1 ) - [self transformTile:ccg(i,j) distance:distance]; - else - [self turnOnTile:ccg(i,j)]; - } - } -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark CCFadeOutBLTiles - -@implementation CCFadeOutBLTiles - --(float)testFunc:(ccGridSize)pos time:(ccTime)time -{ - CGPoint n = ccpMult(ccp(gridSize_.x, gridSize_.y), (1.0f-time)); - if ( (pos.x+pos.y) == 0 ) - return 1.0f; - - return powf( (n.x+n.y) / (pos.x+pos.y), 6 ); -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark CCFadeOutUpTiles - -@implementation CCFadeOutUpTiles - --(float)testFunc:(ccGridSize)pos time:(ccTime)time -{ - CGPoint n = ccpMult(ccp(gridSize_.x, gridSize_.y), time); - if ( n.y == 0 ) - return 1.0f; - - return powf( pos.y / n.y, 6 ); -} - --(void)transformTile:(ccGridSize)pos distance:(float)distance -{ - ccQuad3 coords = [self originalTile:pos]; - CGPoint step = [[target_ grid] step]; - - coords.bl.y += (step.y / 2) * (1.0f - distance); - coords.br.y += (step.y / 2) * (1.0f - distance); - coords.tl.y -= (step.y / 2) * (1.0f - distance); - coords.tr.y -= (step.y / 2) * (1.0f - distance); - - [self setTile:pos coords:coords]; -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark CCFadeOutDownTiles - -@implementation CCFadeOutDownTiles - --(float)testFunc:(ccGridSize)pos time:(ccTime)time -{ - CGPoint n = ccpMult(ccp(gridSize_.x,gridSize_.y), (1.0f - time)); - if ( pos.y == 0 ) - return 1.0f; - - return powf( n.y / pos.y, 6 ); -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark TurnOffTiles - -@implementation CCTurnOffTiles - -+(id)actionWithSeed:(int)s grid:(ccGridSize)gridSize duration:(ccTime)d -{ - return [[[self alloc] initWithSeed:s grid:gridSize duration:d] autorelease]; -} - --(id)initWithSeed:(int)s grid:(ccGridSize)gSize duration:(ccTime)d -{ - if ( (self = [super initWithSize:gSize duration:d]) ) - { - seed = s; - tilesOrder = nil; - } - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCGridAction *copy = [[[self class] allocWithZone:zone] initWithSeed:seed grid:gridSize_ duration:duration_]; - return copy; -} - --(void)dealloc -{ - if ( tilesOrder ) free(tilesOrder); - [super dealloc]; -} - --(void)shuffle:(int*)array count:(int)len -{ - int i; - for( i = len - 1; i >= 0; i-- ) - { - int j = rand() % (i+1); - int v = array[i]; - array[i] = array[j]; - array[j] = v; - } -} - --(void)turnOnTile:(ccGridSize)pos -{ - [self setTile:pos coords:[self originalTile:pos]]; -} - --(void)turnOffTile:(ccGridSize)pos -{ - ccQuad3 coords; - - bzero(&coords, sizeof(ccQuad3)); - [self setTile:pos coords:coords]; -} - --(void)startWithTarget:(id)aTarget -{ - int i; - - [super startWithTarget:aTarget]; - - if ( seed != -1 ) - srand(seed); - - tilesCount = gridSize_.x * gridSize_.y; - tilesOrder = (int*)malloc(tilesCount*sizeof(int)); - - for( i = 0; i < tilesCount; i++ ) - tilesOrder[i] = i; - - [self shuffle:tilesOrder count:tilesCount]; -} - --(void)update:(ccTime)time -{ - int i, l, t; - - l = (int)(time * (float)tilesCount); - - for( i = 0; i < tilesCount; i++ ) - { - t = tilesOrder[i]; - ccGridSize tilePos = ccg( t / gridSize_.y, t % gridSize_.y ); - - if ( i < l ) - [self turnOffTile:tilePos]; - else - [self turnOnTile:tilePos]; - } -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark CCWavesTiles3D - -@implementation CCWavesTiles3D - -@synthesize amplitude; -@synthesize amplitudeRate; - -+(id)actionWithWaves:(int)wav amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d -{ - return [[[self alloc] initWithWaves:wav amplitude:amp grid:gridSize duration:d] autorelease]; -} - --(id)initWithWaves:(int)wav amplitude:(float)amp grid:(ccGridSize)gSize duration:(ccTime)d -{ - if ( (self = [super initWithSize:gSize duration:d]) ) - { - waves = wav; - amplitude = amp; - amplitudeRate = 1.0f; - } - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCGridAction *copy = [[[self class] allocWithZone:zone] initWithWaves:waves amplitude:amplitude grid:gridSize_ duration:duration_]; - return copy; -} - - --(void)update:(ccTime)time -{ - int i, j; - - for( i = 0; i < gridSize_.x; i++ ) - { - for( j = 0; j < gridSize_.y; j++ ) - { - ccQuad3 coords = [self originalTile:ccg(i,j)]; - - coords.bl.z = (sinf(time*(CGFloat)M_PI*waves*2 + (coords.bl.y+coords.bl.x) * .01f) * amplitude * amplitudeRate ); - coords.br.z = coords.bl.z; - coords.tl.z = coords.bl.z; - coords.tr.z = coords.bl.z; - - [self setTile:ccg(i,j) coords:coords]; - } - } -} -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark CCJumpTiles3D - -@implementation CCJumpTiles3D - -@synthesize amplitude; -@synthesize amplitudeRate; - -+(id)actionWithJumps:(int)j amplitude:(float)amp grid:(ccGridSize)gridSize duration:(ccTime)d -{ - return [[[self alloc] initWithJumps:j amplitude:amp grid:gridSize duration:d] autorelease]; -} - --(id)initWithJumps:(int)j amplitude:(float)amp grid:(ccGridSize)gSize duration:(ccTime)d -{ - if ( (self = [super initWithSize:gSize duration:d]) ) - { - jumps = j; - amplitude = amp; - amplitudeRate = 1.0f; - } - - return self; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCGridAction *copy = [[[self class] allocWithZone:zone] initWithJumps:jumps amplitude:amplitude grid:gridSize_ duration:duration_]; - return copy; -} - - --(void)update:(ccTime)time -{ - int i, j; - - float sinz = (sinf((CGFloat)M_PI*time*jumps*2) * amplitude * amplitudeRate ); - float sinz2 = (sinf((CGFloat)M_PI*(time*jumps*2 + 1)) * amplitude * amplitudeRate ); - - for( i = 0; i < gridSize_.x; i++ ) - { - for( j = 0; j < gridSize_.y; j++ ) - { - ccQuad3 coords = [self originalTile:ccg(i,j)]; - - if ( ((i+j) % 2) == 0 ) - { - coords.bl.z += sinz; - coords.br.z += sinz; - coords.tl.z += sinz; - coords.tr.z += sinz; - } - else - { - coords.bl.z += sinz2; - coords.br.z += sinz2; - coords.tl.z += sinz2; - coords.tr.z += sinz2; - } - - [self setTile:ccg(i,j) coords:coords]; - } - } -} -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark SplitRows - -@implementation CCSplitRows - -+(id)actionWithRows:(int)r duration:(ccTime)d -{ - return [[[self alloc] initWithRows:r duration:d] autorelease]; -} - --(id)initWithRows:(int)r duration:(ccTime)d -{ - rows = r; - return [super initWithSize:ccg(1,r) duration:d]; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCGridAction *copy = [[[self class] allocWithZone:zone] initWithRows:rows duration:duration_]; - return copy; -} - --(void)startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - winSize = [[CCDirector sharedDirector] winSizeInPixels]; -} - --(void)update:(ccTime)time -{ - int j; - - for( j = 0; j < gridSize_.y; j++ ) - { - ccQuad3 coords = [self originalTile:ccg(0,j)]; - float direction = 1; - - if ( (j % 2 ) == 0 ) - direction = -1; - - coords.bl.x += direction * winSize.width * time; - coords.br.x += direction * winSize.width * time; - coords.tl.x += direction * winSize.width * time; - coords.tr.x += direction * winSize.width * time; - - [self setTile:ccg(0,j) coords:coords]; - } -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark CCSplitCols - -@implementation CCSplitCols - -+(id)actionWithCols:(int)c duration:(ccTime)d -{ - return [[[self alloc] initWithCols:c duration:d] autorelease]; -} - --(id)initWithCols:(int)c duration:(ccTime)d -{ - cols = c; - return [super initWithSize:ccg(c,1) duration:d]; -} - --(id) copyWithZone: (NSZone*) zone -{ - CCGridAction *copy = [[[self class] allocWithZone:zone] initWithCols:cols duration:duration_]; - return copy; -} - --(void)startWithTarget:(id)aTarget -{ - [super startWithTarget:aTarget]; - winSize = [[CCDirector sharedDirector] winSizeInPixels]; -} - --(void)update:(ccTime)time -{ - int i; - - for( i = 0; i < gridSize_.x; i++ ) - { - ccQuad3 coords = [self originalTile:ccg(i,0)]; - float direction = 1; - - if ( (i % 2 ) == 0 ) - direction = -1; - - coords.bl.y += direction * winSize.height * time; - coords.br.y += direction * winSize.height * time; - coords.tl.y += direction * winSize.height * time; - coords.tr.y += direction * winSize.height * time; - - [self setTile:ccg(i,0) coords:coords]; - } -} - -@end diff --git a/Littlest/libs/cocos2d/CCActionTween.h b/Littlest/libs/cocos2d/CCActionTween.h deleted file mode 100644 index 69fdea5..0000000 --- a/Littlest/libs/cocos2d/CCActionTween.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright 2009 lhunath (Maarten Billemont) - * - * 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 -#import "CCActionInterval.h" - -/** 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 senconds, then: - - id modifyWidth = [CCActionTween actionWithDuration:2 key:@"width" from:200 to:300]; - [target runAction:modifyWidth]; - - - Another example: CCScaleTo action could be rewriten 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 - */ -@interface CCActionTween : CCActionInterval -{ - NSString *key_; - - float from_, to_; - float delta_; -} - -/** creates an initializes the action with the property name (key), and the from and to parameters. */ -+ (id)actionWithDuration:(ccTime)aDuration key:(NSString *)key from:(float)from to:(float)to; - -/** initializes the action with the property name (key), and the from and to parameters. */ -- (id)initWithDuration:(ccTime)aDuration key:(NSString *)key from:(float)from to:(float)to; - -@end diff --git a/Littlest/libs/cocos2d/CCActionTween.m b/Littlest/libs/cocos2d/CCActionTween.m deleted file mode 100644 index 95ae572..0000000 --- a/Littlest/libs/cocos2d/CCActionTween.m +++ /dev/null @@ -1,72 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright 2009 lhunath (Maarten Billemont) - * - * 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 "CCActionTween.h" - - -@implementation CCActionTween - -+ (id)actionWithDuration:(ccTime)aDuration key:(NSString *)aKey from:(float)aFrom to:(float)aTo { - - return [[[[self class] alloc] initWithDuration:aDuration key:aKey from:aFrom to:aTo] autorelease]; -} - -- (id)initWithDuration:(ccTime)aDuration key:(NSString *)key from:(float)from to:(float)to { - - if ((self = [super initWithDuration:aDuration])) { - - key_ = [key copy]; - to_ = to; - from_ = from; - - } - - return self; -} - -- (void) dealloc -{ - [key_ release]; - [super dealloc]; -} - -- (void)startWithTarget:aTarget -{ - [super startWithTarget:aTarget]; - delta_ = to_ - from_; -} - -- (void) update:(ccTime) dt -{ - [target_ setValue:[NSNumber numberWithFloat:to_ - delta_ * (1 - dt)] forKey:key_]; -} - -- (CCActionInterval *) reverse -{ - return [[self class] actionWithDuration:duration_ key:key_ from:to_ to:from_]; -} - - -@end diff --git a/Littlest/libs/cocos2d/CCAnimation.h b/Littlest/libs/cocos2d/CCAnimation.h deleted file mode 100644 index 1ccfcce..0000000 --- a/Littlest/libs/cocos2d/CCAnimation.h +++ /dev/null @@ -1,135 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED -#import -#endif // IPHONE - -@class CCSpriteFrame; -@class CCTexture2D; - -/** A CCAnimation object is used to perform animations on the CCSprite objects. - - The CCAnimation object contains CCSpriteFrame 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]]; - - */ -@interface CCAnimation : NSObject -{ - NSString *name_; - float delay_; - NSMutableArray *frames_; -} - -/** name of the animation */ -@property (nonatomic,readwrite,retain) NSString *name; -/** delay between frames in seconds. */ -@property (nonatomic,readwrite,assign) float delay; -/** array of frames */ -@property (nonatomic,readwrite,retain) NSMutableArray *frames; - -/** Creates an animation - @since v0.99.5 - */ -+(id) animation; - -/** Creates an animation with frames. - @since v0.99.5 - */ -+(id) animationWithFrames:(NSArray*)frames; - -/* Creates an animation with frames and a delay between frames. - @since v0.99.5 - */ -+(id) animationWithFrames:(NSArray*)frames delay:(float)delay; - -/** Creates a CCAnimation with a name - @since v0.99.3 - @deprecated Will be removed in 1.0.1. Use "animation" instead. - */ -+(id) animationWithName:(NSString*)name DEPRECATED_ATTRIBUTE; - -/** Creates a CCAnimation with a name and frames - @since v0.99.3 - @deprecated Will be removed in 1.0.1. Use "animationWithFrames" instead. - */ -+(id) animationWithName:(NSString*)name frames:(NSArray*)frames DEPRECATED_ATTRIBUTE; - -/** Creates a CCAnimation with a name and delay between frames. */ -+(id) animationWithName:(NSString*)name delay:(float)delay DEPRECATED_ATTRIBUTE; - -/** Creates a CCAnimation with a name, delay and an array of CCSpriteFrames. */ -+(id) animationWithName:(NSString*)name delay:(float)delay frames:(NSArray*)frames DEPRECATED_ATTRIBUTE; - - -/** Initializes a CCAnimation with frames. - @since v0.99.5 -*/ --(id) initWithFrames:(NSArray*)frames; - -/** Initializes a CCAnimation with frames and a delay between frames - @since v0.99.5 - */ --(id) initWithFrames:(NSArray *)frames delay:(float)delay; - -/** Initializes a CCAnimation with a name - @since v0.99.3 - @deprecated Will be removed in 1.0.1. Use "init" instead. - */ --(id) initWithName:(NSString*)name DEPRECATED_ATTRIBUTE; - -/** Initializes a CCAnimation with a name and frames - @since v0.99.3 - @deprecated Will be removed in 1.0.1. Use "initWithFrames" instead. - */ --(id) initWithName:(NSString*)name frames:(NSArray*)frames DEPRECATED_ATTRIBUTE; - -/** Initializes a CCAnimation with a name and delay between frames. - @deprecated Will be removed in 1.0.1. Use "initWithFrames:nil delay:delay" instead. -*/ --(id) initWithName:(NSString*)name delay:(float)delay DEPRECATED_ATTRIBUTE; - -/** Initializes a CCAnimation with a name, delay and an array of CCSpriteFrames. - @deprecated Will be removed in 1.0.1. Use "initWithFrames:frames delay:delay" instead. -*/ --(id) initWithName:(NSString*)name delay:(float)delay frames:(NSArray*)frames DEPRECATED_ATTRIBUTE; - -/** Adds a frame to a CCAnimation. */ --(void) addFrame:(CCSpriteFrame*)frame; - -/** Adds a frame with an image filename. Internally it will create a CCSpriteFrame and it will add it. - Added to facilitate the migration from v0.8 to v0.9. - */ --(void) addFrameWithFilename:(NSString*)filename; - -/** Adds a frame with a texture and a rect. Internally it will create a CCSpriteFrame and it will add it. - Added to facilitate the migration from v0.8 to v0.9. - */ --(void) addFrameWithTexture:(CCTexture2D*)texture rect:(CGRect)rect; - -@end diff --git a/Littlest/libs/cocos2d/CCAnimation.m b/Littlest/libs/cocos2d/CCAnimation.m deleted file mode 100644 index bb8480c..0000000 --- a/Littlest/libs/cocos2d/CCAnimation.m +++ /dev/null @@ -1,152 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 "ccMacros.h" -#import "CCAnimation.h" -#import "CCSpriteFrame.h" -#import "CCTexture2D.h" -#import "CCTextureCache.h" - -@implementation CCAnimation -@synthesize name = name_, delay = delay_, frames = frames_; - -+(id) animation -{ - return [[[self alloc] init] autorelease]; -} - -+(id) animationWithFrames:(NSArray*)frames -{ - return [[[self alloc] initWithFrames:frames] autorelease]; -} - -+(id) animationWithFrames:(NSArray*)frames delay:(float)delay -{ - return [[[self alloc] initWithFrames:frames delay:delay] autorelease]; -} - -+(id) animationWithName:(NSString*)name -{ - return [[[self alloc] initWithName:name] autorelease]; -} - -+(id) animationWithName:(NSString*)name frames:(NSArray*)frames -{ - return [[[self alloc] initWithName:name frames:frames] autorelease]; -} - -+(id) animationWithName:(NSString*)aname delay:(float)d frames:(NSArray*)array -{ - return [[[self alloc] initWithName:aname delay:d frames:array] autorelease]; -} - -+(id) animationWithName:(NSString*)aname delay:(float)d -{ - return [[[self alloc] initWithName:aname delay:d] autorelease]; -} - --(id) init -{ - return [self initWithFrames:nil delay:0]; -} - --(id) initWithFrames:(NSArray*)frames -{ - return [self initWithFrames:frames delay:0]; -} - --(id) initWithFrames:(NSArray*)array delay:(float)delay -{ - if( (self=[super init]) ) { - - delay_ = delay; - self.frames = [NSMutableArray arrayWithArray:array]; - } - return self; -} - --(id) initWithName:(NSString*)name -{ - return [self initWithName:name delay:0 frames:nil]; -} - --(id) initWithName:(NSString*)name frames:(NSArray*)frames -{ - return [self initWithName:name delay:0 frames:frames]; -} - --(id) initWithName:(NSString*)t delay:(float)d -{ - return [self initWithName:t delay:d frames:nil]; -} - --(id) initWithName:(NSString*)name delay:(float)delay frames:(NSArray*)array -{ - if( (self=[super init]) ) { - - delay_ = delay; - self.name = name; - self.frames = [NSMutableArray arrayWithArray:array]; - } - return self; -} - -- (NSString*) description -{ - return [NSString stringWithFormat:@"<%@ = %08X | frames=%d, delay:%f>", [self class], self, - [frames_ count], - delay_ - ]; -} - --(void) dealloc -{ - CCLOGINFO( @"cocos2d: deallocing %@",self); - [name_ release]; - [frames_ release]; - [super dealloc]; -} - --(void) addFrame:(CCSpriteFrame*)frame -{ - [frames_ addObject:frame]; -} - --(void) addFrameWithFilename:(NSString*)filename -{ - CCTexture2D *texture = [[CCTextureCache sharedTextureCache] addImage:filename]; - CGRect rect = CGRectZero; - rect.size = texture.contentSize; - CCSpriteFrame *frame = [CCSpriteFrame frameWithTexture:texture rect:rect]; - [frames_ addObject:frame]; -} - --(void) addFrameWithTexture:(CCTexture2D*)texture rect:(CGRect)rect -{ - CCSpriteFrame *frame = [CCSpriteFrame frameWithTexture:texture rect:rect]; - [frames_ addObject:frame]; -} - -@end diff --git a/Littlest/libs/cocos2d/CCAnimationCache.h b/Littlest/libs/cocos2d/CCAnimationCache.h deleted file mode 100644 index 3a9b8ae..0000000 --- a/Littlest/libs/cocos2d/CCAnimationCache.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2010 Ricardo Quesada - * - * 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 - -@class CCAnimation; - -/** 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 - */ -@interface CCAnimationCache : NSObject -{ - NSMutableDictionary *animations_; -} - -/** Retruns ths shared instance of the Animation cache */ -+ (CCAnimationCache *) sharedAnimationCache; - -/** Purges the cache. It releases all the CCAnimation objects and the shared instance. - */ -+(void)purgeSharedAnimationCache; - -/** Adds a CCAnimation with a name. - */ --(void) addAnimation:(CCAnimation*)animation name:(NSString*)name; - -/** Deletes a CCAnimation from the cache. - */ --(void) removeAnimationByName:(NSString*)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. - */ --(CCAnimation*) animationByName:(NSString*)name; - -@end diff --git a/Littlest/libs/cocos2d/CCAnimationCache.m b/Littlest/libs/cocos2d/CCAnimationCache.m deleted file mode 100644 index 003bc63..0000000 --- a/Littlest/libs/cocos2d/CCAnimationCache.m +++ /dev/null @@ -1,100 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2010 Ricardo Quesada - * - * 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 "ccMacros.h" -#import "CCAnimationCache.h" -#import "CCAnimation.h" -#import "CCSprite.h" - - -@implementation CCAnimationCache - -#pragma mark CCAnimationCache - Alloc, Init & Dealloc - -static CCAnimationCache *sharedAnimationCache_=nil; - -+ (CCAnimationCache *)sharedAnimationCache -{ - if (!sharedAnimationCache_) - sharedAnimationCache_ = [[CCAnimationCache alloc] init]; - - return sharedAnimationCache_; -} - -+(id)alloc -{ - NSAssert(sharedAnimationCache_ == nil, @"Attempted to allocate a second instance of a singleton."); - return [super alloc]; -} - -+(void)purgeSharedAnimationCache -{ - [sharedAnimationCache_ release]; - sharedAnimationCache_ = nil; -} - --(id) init -{ - if( (self=[super init]) ) { - animations_ = [[NSMutableDictionary alloc] initWithCapacity: 20]; - } - - return self; -} - -- (NSString*) description -{ - return [NSString stringWithFormat:@"<%@ = %08X | num of animations = %i>", [self class], self, [animations_ count]]; -} - --(void) dealloc -{ - CCLOGINFO(@"cocos2d: deallocing %@", self); - - [animations_ release]; - [super dealloc]; -} - -#pragma mark CCAnimationCache - load/get/del - --(void) addAnimation:(CCAnimation*)animation name:(NSString*)name -{ - [animations_ setObject:animation forKey:name]; -} - --(void) removeAnimationByName:(NSString*)name -{ - if( ! name ) - return; - - [animations_ removeObjectForKey:name]; -} - --(CCAnimation*) animationByName:(NSString*)name -{ - return [animations_ objectForKey:name]; -} - -@end diff --git a/Littlest/libs/cocos2d/CCAtlasNode.h b/Littlest/libs/cocos2d/CCAtlasNode.h deleted file mode 100644 index 145586f..0000000 --- a/Littlest/libs/cocos2d/CCAtlasNode.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 "CCTextureAtlas.h" -#import "CCNode.h" -#import "CCProtocols.h" - -/** 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 - */ -@interface CCAtlasNode : CCNode -{ - // texture atlas - CCTextureAtlas *textureAtlas_; - - // chars per row - int itemsPerRow_; - // chars per column - int itemsPerColumn_; - - // width of each char - int itemWidth_; - // height of each char - int itemHeight_; - - // blend function - ccBlendFunc blendFunc_; - - // texture RGBA. - GLubyte opacity_; - ccColor3B color_; - ccColor3B colorUnmodified_; - BOOL opacityModifyRGB_; -} - -/** conforms to CCTextureProtocol protocol */ -@property (nonatomic,readwrite,retain) CCTextureAtlas *textureAtlas; - -/** conforms to CCTextureProtocol protocol */ -@property (nonatomic,readwrite) ccBlendFunc blendFunc; - -/** conforms to CCRGBAProtocol protocol */ -@property (nonatomic,readwrite) GLubyte opacity; -/** conforms to CCRGBAProtocol protocol */ -@property (nonatomic,readwrite) ccColor3B color; - - -/** creates a CCAtlasNode with an Atlas file the width and height of each item measured in points and the quantity of items to render*/ -+(id) atlasWithTileFile:(NSString*)tile tileWidth:(int)w tileHeight:(int)h itemsToRender: (int) c; - -/** initializes an CCAtlasNode with an Atlas file the width and height of each item measured in points and the quantity of items to render*/ --(id) initWithTileFile:(NSString*)tile tileWidth:(int)w tileHeight:(int)h itemsToRender: (int) c; - -/** updates the Atlas (indexed vertex array). - * Shall be overriden in subclasses - */ --(void) updateAtlasValues; -@end diff --git a/Littlest/libs/cocos2d/CCAtlasNode.m b/Littlest/libs/cocos2d/CCAtlasNode.m deleted file mode 100644 index 840fead..0000000 --- a/Littlest/libs/cocos2d/CCAtlasNode.m +++ /dev/null @@ -1,205 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 "CCAtlasNode.h" -#import "ccMacros.h" - - -@interface CCAtlasNode () --(void) calculateMaxItems; --(void) updateBlendFunc; --(void) updateOpacityModifyRGB; -@end - -@implementation CCAtlasNode - -@synthesize textureAtlas = textureAtlas_; -@synthesize blendFunc = blendFunc_; - -#pragma mark CCAtlasNode - Creation & Init -+(id) atlasWithTileFile:(NSString*)tile tileWidth:(int)w tileHeight:(int)h itemsToRender: (int) c -{ - return [[[self alloc] initWithTileFile:tile tileWidth:w tileHeight:h itemsToRender:c] autorelease]; -} - --(id) initWithTileFile:(NSString*)tile tileWidth:(int)w tileHeight:(int)h itemsToRender: (int) c -{ - if( (self=[super init]) ) { - - itemWidth_ = w * CC_CONTENT_SCALE_FACTOR(); - itemHeight_ = h * CC_CONTENT_SCALE_FACTOR(); - - opacity_ = 255; - color_ = colorUnmodified_ = ccWHITE; - opacityModifyRGB_ = YES; - - blendFunc_.src = CC_BLEND_SRC; - blendFunc_.dst = CC_BLEND_DST; - - // double retain to avoid the autorelease pool - // also, using: self.textureAtlas supports re-initialization without leaking - self.textureAtlas = [[CCTextureAtlas alloc] initWithFile:tile capacity:c]; - [textureAtlas_ release]; - - if( ! textureAtlas_ ) { - CCLOG(@"cocos2d: Could not initialize CCAtlasNode. Invalid Texture"); - [self release]; - return nil; - } - - [self updateBlendFunc]; - [self updateOpacityModifyRGB]; - - [self calculateMaxItems]; - - } - return self; -} - --(void) dealloc -{ - [textureAtlas_ release]; - - [super dealloc]; -} - -#pragma mark CCAtlasNode - Atlas generation - --(void) calculateMaxItems -{ - CGSize s = [[textureAtlas_ texture] contentSizeInPixels]; - itemsPerColumn_ = s.height / itemHeight_; - itemsPerRow_ = s.width / itemWidth_; -} - --(void) updateAtlasValues -{ - [NSException raise:@"CCAtlasNode:Abstract" format:@"updateAtlasValue not overriden"]; -} - -#pragma mark CCAtlasNode - draw -- (void) draw -{ - // Default GL states: GL_TEXTURE_2D, GL_VERTEX_ARRAY, GL_COLOR_ARRAY, GL_TEXTURE_COORD_ARRAY - // Needed states: GL_TEXTURE_2D, GL_VERTEX_ARRAY, GL_TEXTURE_COORD_ARRAY - // Unneeded states: GL_COLOR_ARRAY - glDisableClientState(GL_COLOR_ARRAY); - - glColor4ub( color_.r, color_.g, color_.b, opacity_); - - BOOL newBlend = blendFunc_.src != CC_BLEND_SRC || blendFunc_.dst != CC_BLEND_DST; - if( newBlend ) - glBlendFunc( blendFunc_.src, blendFunc_.dst ); - - [textureAtlas_ drawQuads]; - - if( newBlend ) - glBlendFunc(CC_BLEND_SRC, CC_BLEND_DST); - - // is this chepear than saving/restoring color state ? - // XXX: There is no need to restore the color to (255,255,255,255). Objects should use the color - // XXX: that they need -// glColor4ub( 255, 255, 255, 255); - - // restore default GL state - glEnableClientState(GL_COLOR_ARRAY); - -} - -#pragma mark CCAtlasNode - RGBA protocol - -- (ccColor3B) color -{ - if(opacityModifyRGB_) - return colorUnmodified_; - - return color_; -} - --(void) setColor:(ccColor3B)color3 -{ - color_ = colorUnmodified_ = color3; - - if( opacityModifyRGB_ ){ - color_.r = color3.r * opacity_/255; - color_.g = color3.g * opacity_/255; - color_.b = color3.b * opacity_/255; - } -} - --(GLubyte) opacity -{ - return opacity_; -} - --(void) setOpacity:(GLubyte) anOpacity -{ - opacity_ = anOpacity; - - // special opacity for premultiplied textures - if( opacityModifyRGB_ ) - [self setColor: colorUnmodified_]; -} - --(void) setOpacityModifyRGB:(BOOL)modify -{ - ccColor3B oldColor = self.color; - opacityModifyRGB_ = modify; - self.color = oldColor; -} - --(BOOL) doesOpacityModifyRGB -{ - return opacityModifyRGB_; -} - --(void) updateOpacityModifyRGB -{ - opacityModifyRGB_ = [textureAtlas_.texture hasPremultipliedAlpha]; -} - -#pragma mark CCAtlasNode - CocosNodeTexture protocol - --(void) updateBlendFunc -{ - if( ! [textureAtlas_.texture hasPremultipliedAlpha] ) { - blendFunc_.src = GL_SRC_ALPHA; - blendFunc_.dst = GL_ONE_MINUS_SRC_ALPHA; - } -} - --(void) setTexture:(CCTexture2D*)texture -{ - textureAtlas_.texture = texture; - [self updateBlendFunc]; - [self updateOpacityModifyRGB]; -} - --(CCTexture2D*) texture -{ - return textureAtlas_.texture; -} - -@end diff --git a/Littlest/libs/cocos2d/CCBlockSupport.h b/Littlest/libs/cocos2d/CCBlockSupport.h deleted file mode 100644 index 339d5aa..0000000 --- a/Littlest/libs/cocos2d/CCBlockSupport.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2010 Stuart Carnie - * - * 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 - -/** @file - cocos2d blocks support - */ - -// To comply with Apple Objective C runtime (this is defined in NSObjCRuntime.h) -#if !defined(NS_BLOCKS_AVAILABLE) - #if __BLOCKS__ - #define NS_BLOCKS_AVAILABLE 1 - #else - #define NS_BLOCKS_AVAILABLE 0 - #endif -#endif - -#if NS_BLOCKS_AVAILABLE - -@interface NSObject(CCBlocksAdditions) - -- (void)ccCallbackBlock; -- (void)ccCallbackBlockWithSender:(id)sender; - -@end - -#endif // NS_BLOCKS_AVAILABLE diff --git a/Littlest/libs/cocos2d/CCBlockSupport.m b/Littlest/libs/cocos2d/CCBlockSupport.m deleted file mode 100644 index 9ac99b3..0000000 --- a/Littlest/libs/cocos2d/CCBlockSupport.m +++ /dev/null @@ -1,46 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2010 Stuart Carnie - * - * 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 "CCBlockSupport.h" - -#if NS_BLOCKS_AVAILABLE - -@implementation NSObject(CCBlocksAdditions) - -- (void)ccCallbackBlock { - void (^block)(void) = (id)self; - block(); -} - -- (void)ccCallbackBlockWithSender:(id)sender { - void (^block)(id) = (id)self; - block(sender); -} - - -@end - -#endif diff --git a/Littlest/libs/cocos2d/CCCamera.h b/Littlest/libs/cocos2d/CCCamera.h deleted file mode 100644 index 387c854..0000000 --- a/Littlest/libs/cocos2d/CCCamera.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 "CCNode.h" - -/** - 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 effecs, use the action CCFollow or position/scale/rotate. - -*/ - -@interface CCCamera : NSObject -{ - float eyeX_; - float eyeY_; - float eyeZ_; - - float centerX_; - float centerY_; - float centerZ_; - - float upX_; - float upY_; - float upZ_; - - BOOL dirty_; -} - -/** whether of not the camera is dirty */ -@property (nonatomic,readwrite) BOOL dirty; - -/** returns the Z eye */ -+(float) getZEye; - -/** sets the camera in the defaul position */ --(void) restore; -/** Sets the camera using gluLookAt using its eye, center and up_vector */ --(void) locate; -/** sets the eye values in points */ --(void) setEyeX: (float)x eyeY:(float)y eyeZ:(float)z; -/** sets the center values in points */ --(void) setCenterX: (float)x centerY:(float)y centerZ:(float)z; -/** sets the up values */ --(void) setUpX: (float)x upY:(float)y upZ:(float)z; - -/** get the eye vector values in points */ --(void) eyeX:(float*)x eyeY:(float*)y eyeZ:(float*)z; -/** get the center vector values in points */ --(void) centerX:(float*)x centerY:(float*)y centerZ:(float*)z; -/** get the up vector values */ --(void) upX:(float*)x upY:(float*)y upZ:(float*)z; - - -@end diff --git a/Littlest/libs/cocos2d/CCCamera.m b/Littlest/libs/cocos2d/CCCamera.m deleted file mode 100644 index 3841ab3..0000000 --- a/Littlest/libs/cocos2d/CCCamera.m +++ /dev/null @@ -1,130 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 "Platforms/CCGL.h" -#import "CCCamera.h" -#import "ccMacros.h" -#import "CCDrawingPrimitives.h" - -@implementation CCCamera - -@synthesize dirty = dirty_; - --(id) init -{ - if( (self=[super init]) ) - [self restore]; - - return self; -} - -- (NSString*) description -{ - return [NSString stringWithFormat:@"<%@ = %08X | center = (%.2f,%.2f,%.2f)>", [self class], self, centerX_, centerY_, centerZ_]; -} - - -- (void) dealloc -{ - CCLOGINFO(@"cocos2d: deallocing %@", self); - [super dealloc]; -} - --(void) restore -{ - eyeX_ = eyeY_ = 0; - eyeZ_ = [CCCamera getZEye]; - - centerX_ = centerY_ = centerZ_ = 0; - - upX_ = 0.0f; - upY_ = 1.0f; - upZ_ = 0.0f; - - dirty_ = NO; -} - --(void) locate -{ - if( dirty_ ) - gluLookAt( eyeX_, eyeY_, eyeZ_, - centerX_, centerY_, centerZ_, - upX_, upY_, upZ_ - ); -} - -+(float) getZEye -{ - return FLT_EPSILON; -// CGSize s = [[CCDirector sharedDirector] displaySize]; -// return ( s.height / 1.1566f ); -} - --(void) setEyeX: (float)x eyeY:(float)y eyeZ:(float)z -{ - eyeX_ = x * CC_CONTENT_SCALE_FACTOR(); - eyeY_ = y * CC_CONTENT_SCALE_FACTOR(); - eyeZ_ = z * CC_CONTENT_SCALE_FACTOR(); - dirty_ = YES; -} - --(void) setCenterX: (float)x centerY:(float)y centerZ:(float)z -{ - centerX_ = x * CC_CONTENT_SCALE_FACTOR(); - centerY_ = y * CC_CONTENT_SCALE_FACTOR(); - centerZ_ = z * CC_CONTENT_SCALE_FACTOR(); - dirty_ = YES; -} - --(void) setUpX: (float)x upY:(float)y upZ:(float)z -{ - upX_ = x; - upY_ = y; - upZ_ = z; - dirty_ = YES; -} - --(void) eyeX: (float*)x eyeY:(float*)y eyeZ:(float*)z -{ - *x = eyeX_ / CC_CONTENT_SCALE_FACTOR(); - *y = eyeY_ / CC_CONTENT_SCALE_FACTOR(); - *z = eyeZ_ / CC_CONTENT_SCALE_FACTOR(); -} - --(void) centerX: (float*)x centerY:(float*)y centerZ:(float*)z -{ - *x = centerX_ / CC_CONTENT_SCALE_FACTOR(); - *y = centerY_ / CC_CONTENT_SCALE_FACTOR(); - *z = centerZ_ / CC_CONTENT_SCALE_FACTOR(); -} - --(void) upX: (float*)x upY:(float*)y upZ:(float*)z -{ - *x = upX_; - *y = upY_; - *z = upZ_; -} - -@end diff --git a/Littlest/libs/cocos2d/CCConfiguration.h b/Littlest/libs/cocos2d/CCConfiguration.h deleted file mode 100644 index 11bd120..0000000 --- a/Littlest/libs/cocos2d/CCConfiguration.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2010 Ricardo Quesada - * - * 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 - -#import "Platforms/CCGL.h" - -/** OS version definitions. Includes both iOS and Mac OS versions - */ -enum { - kCCiOSVersion_3_0 = 0x03000000, - kCCiOSVersion_3_1 = 0x03010000, - kCCiOSVersion_3_1_1 = 0x03010100, - kCCiOSVersion_3_1_2 = 0x03010200, - kCCiOSVersion_3_1_3 = 0x03010300, - kCCiOSVersion_3_2 = 0x03020000, - kCCiOSVersion_3_2_1 = 0x03020100, - kCCiOSVersion_4_0 = 0x04000000, - kCCiOSVersion_4_0_1 = 0x04000100, - kCCiOSVersion_4_1 = 0x04010000, - - kCCMacVersion_10_5 = 0x0a050000, - kCCMacVersion_10_6 = 0x0a060000, - kCCMacVersion_10_7 = 0x0a070000, -}; - -/** - CCConfiguration contains some openGL variables - @since v0.99.0 - */ -@interface CCConfiguration : NSObject { - - GLint maxTextureSize_; - GLint maxModelviewStackDepth_; - BOOL supportsPVRTC_; - BOOL supportsNPOT_; - BOOL supportsBGRA8888_; - BOOL supportsDiscardFramebuffer_; - unsigned int OSVersion_; - GLint maxSamplesAllowed_; -} - -/** OpenGL Max texture size. */ -@property (nonatomic, readonly) GLint maxTextureSize; - -/** OpenGL Max Modelview Stack Depth. */ -@property (nonatomic, readonly) GLint maxModelviewStackDepth; - -/** Whether or not the GPU supports NPOT (Non Power Of Two) textures. - NPOT textures have the following limitations: - - They can't have mipmaps - - They only accept GL_CLAMP_TO_EDGE in GL_TEXTURE_WRAP_{S,T} - - @since v0.99.2 - */ -@property (nonatomic, readonly) BOOL supportsNPOT; - -/** Whether or not PVR Texture Compressed is supported */ -@property (nonatomic, readonly) BOOL supportsPVRTC; - -/** Whether or not BGRA8888 textures are supported. - - @since v0.99.2 - */ -@property (nonatomic, readonly) BOOL supportsBGRA8888; - -/** Whether or not glDiscardFramebufferEXT is supported - - @since v0.99.2 - */ -@property (nonatomic, readonly) BOOL supportsDiscardFramebuffer; - -/** returns the OS version. - - On iOS devices it returns the firmware version. - - On Mac returns the OS version - - @since v0.99.5 - */ -@property (nonatomic, readonly) unsigned int OSVersion; - -/** returns a shared instance of the CCConfiguration */ -+(CCConfiguration *) sharedConfiguration; - -/** returns whether or not an OpenGL is supported */ -- (BOOL) checkForGLExtension:(NSString *)searchName; - - - -@end diff --git a/Littlest/libs/cocos2d/CCConfiguration.m b/Littlest/libs/cocos2d/CCConfiguration.m deleted file mode 100644 index e70bed1..0000000 --- a/Littlest/libs/cocos2d/CCConfiguration.m +++ /dev/null @@ -1,192 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2010 Ricardo Quesada - * - * 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 - -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED -#import // Needed for UIDevice -#endif - -#import "Platforms/CCGL.h" -#import "CCBlockSupport.h" -#import "CCConfiguration.h" -#import "ccMacros.h" -#import "ccConfig.h" -#import "Support/OpenGL_Internal.h" - -@implementation CCConfiguration - -@synthesize maxTextureSize = maxTextureSize_; -@synthesize supportsPVRTC = supportsPVRTC_; -@synthesize maxModelviewStackDepth = maxModelviewStackDepth_; -@synthesize supportsNPOT = supportsNPOT_; -@synthesize supportsBGRA8888 = supportsBGRA8888_; -@synthesize supportsDiscardFramebuffer = supportsDiscardFramebuffer_; -@synthesize OSVersion = OSVersion_; - -// -// singleton stuff -// -static CCConfiguration *_sharedConfiguration = nil; - -static char * glExtensions; - -+ (CCConfiguration *)sharedConfiguration -{ - if (!_sharedConfiguration) - _sharedConfiguration = [[self alloc] init]; - - return _sharedConfiguration; -} - -+(id)alloc -{ - NSAssert(_sharedConfiguration == nil, @"Attempted to allocate a second instance of a singleton."); - return [super alloc]; -} - - -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED -#elif defined(__MAC_OS_X_VERSION_MAX_ALLOWED) -- (NSString*)getMacVersion -{ - SInt32 versionMajor, versionMinor, versionBugFix; - Gestalt(gestaltSystemVersionMajor, &versionMajor); - Gestalt(gestaltSystemVersionMinor, &versionMinor); - Gestalt(gestaltSystemVersionBugFix, &versionBugFix); - - return [NSString stringWithFormat:@"%d.%d.%d", versionMajor, versionMinor, versionBugFix]; -} -#endif // __MAC_OS_X_VERSION_MAX_ALLOWED - --(id) init -{ - if( (self=[super init])) { - - // Obtain iOS version - OSVersion_ = 0; -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED - NSString *OSVer = [[UIDevice currentDevice] systemVersion]; -#elif defined(__MAC_OS_X_VERSION_MAX_ALLOWED) - NSString *OSVer = [self getMacVersion]; -#endif - NSArray *arr = [OSVer componentsSeparatedByString:@"."]; - int idx=0x01000000; - for( NSString *str in arr ) { - int value = [str intValue]; - OSVersion_ += value * idx; - idx = idx >> 8; - } - CCLOG(@"cocos2d: OS version: %@ (0x%08x)", OSVer, OSVersion_); - - CCLOG(@"cocos2d: GL_VENDOR: %s", glGetString(GL_VENDOR) ); - CCLOG(@"cocos2d: GL_RENDERER: %s", glGetString ( GL_RENDERER ) ); - CCLOG(@"cocos2d: GL_VERSION: %s", glGetString ( GL_VERSION ) ); - - glExtensions = (char*) glGetString(GL_EXTENSIONS); - - glGetIntegerv(GL_MAX_TEXTURE_SIZE, &maxTextureSize_); - glGetIntegerv(GL_MAX_MODELVIEW_STACK_DEPTH, &maxModelviewStackDepth_); -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED - if( OSVersion_ >= kCCiOSVersion_4_0 ) - glGetIntegerv(GL_MAX_SAMPLES_APPLE, &maxSamplesAllowed_); - else - maxSamplesAllowed_ = 0; -#elif defined(__MAC_OS_X_VERSION_MAX_ALLOWED) - glGetIntegerv(GL_MAX_SAMPLES, &maxSamplesAllowed_); -#endif - - supportsPVRTC_ = [self checkForGLExtension:@"GL_IMG_texture_compression_pvrtc"]; -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED - supportsNPOT_ = [self checkForGLExtension:@"GL_APPLE_texture_2D_limited_npot"]; -#elif defined(__MAC_OS_X_VERSION_MAX_ALLOWED) - supportsNPOT_ = [self checkForGLExtension:@"GL_ARB_texture_non_power_of_two"]; -#endif - // It seems that somewhere between firmware iOS 3.0 and 4.2 Apple renamed - // GL_IMG_... to GL_APPLE.... So we should check both names - -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED - BOOL bgra8a = [self checkForGLExtension:@"GL_IMG_texture_format_BGRA8888"]; - BOOL bgra8b = [self checkForGLExtension:@"GL_APPLE_texture_format_BGRA8888"]; - supportsBGRA8888_ = bgra8a | bgra8b; -#elif defined(__MAC_OS_X_VERSION_MAX_ALLOWED) - supportsBGRA8888_ = [self checkForGLExtension:@"GL_EXT_bgra"]; -#endif - - supportsDiscardFramebuffer_ = [self checkForGLExtension:@"GL_EXT_discard_framebuffer"]; - - CCLOG(@"cocos2d: GL_MAX_TEXTURE_SIZE: %d", maxTextureSize_); - CCLOG(@"cocos2d: GL_MAX_MODELVIEW_STACK_DEPTH: %d",maxModelviewStackDepth_); - CCLOG(@"cocos2d: GL_MAX_SAMPLES: %d", maxSamplesAllowed_); - CCLOG(@"cocos2d: GL supports PVRTC: %s", (supportsPVRTC_ ? "YES" : "NO") ); - CCLOG(@"cocos2d: GL supports BGRA8888 textures: %s", (supportsBGRA8888_ ? "YES" : "NO") ); - CCLOG(@"cocos2d: GL supports NPOT textures: %s", (supportsNPOT_ ? "YES" : "NO") ); - CCLOG(@"cocos2d: GL supports discard_framebuffer: %s", (supportsDiscardFramebuffer_ ? "YES" : "NO") ); - CCLOG(@"cocos2d: compiled with NPOT support: %s", -#if CC_TEXTURE_NPOT_SUPPORT - "YES" -#else - "NO" -#endif - ); - CCLOG(@"cocos2d: compiled with VBO support in TextureAtlas : %s", -#if CC_USES_VBO - "YES" -#else - "NO" -#endif - ); - - CCLOG(@"cocos2d: compiled with Affine Matrix transformation in CCNode : %s", -#if CC_NODE_TRANSFORM_USING_AFFINE_MATRIX - "YES" -#else - "NO" -#endif - ); - - CCLOG(@"cocos2d: compiled with Profiling Support: %s", -#if CC_ENABLE_PROFILERS - - "YES - *** Disable it when you finish profiling ***" -#else - "NO" -#endif - ); - - CHECK_GL_ERROR(); - } - - return self; -} - -- (BOOL) checkForGLExtension:(NSString *)searchName -{ - // For best results, extensionsNames should be stored in your renderer so that it does not - // need to be recreated on each invocation. - NSString *extensionsString = [NSString stringWithCString:glExtensions encoding: NSASCIIStringEncoding]; - NSArray *extensionsNames = [extensionsString componentsSeparatedByString:@" "]; - return [extensionsNames containsObject: searchName]; -} -@end diff --git a/Littlest/libs/cocos2d/CCDirector.h b/Littlest/libs/cocos2d/CCDirector.h deleted file mode 100644 index fd36364..0000000 --- a/Littlest/libs/cocos2d/CCDirector.h +++ /dev/null @@ -1,304 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 "ccConfig.h" -#import "ccTypes.h" - -// OpenGL related -#import "Platforms/CCGL.h" -#import "CCProtocols.h" - -/** @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, - - /// Detault projection is 3D projection - kCCDirectorProjectionDefault = kCCDirectorProjection3D, - - // backward compatibility stuff - CCDirectorProjection2D = kCCDirectorProjection2D, - CCDirectorProjection3D = kCCDirectorProjection3D, - CCDirectorProjectionCustom = kCCDirectorProjectionCustom, - -} ccDirectorProjection; - - -@class CCLabelAtlas; -@class CCScene; - -/**Class that creates and handle the main Window and manages how -and when to execute the Scenes. - - The CCDirector is also resposible for: - - initializing the OpenGL ES 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 Protrait) - - 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 -*/ -@interface CCDirector : NSObject -{ - CC_GLVIEW *openGLView_; - - // internal timer - NSTimeInterval animationInterval_; - NSTimeInterval oldAnimationInterval_; - - /* display FPS ? */ - BOOL displayFPS_; - - NSUInteger frames_; - ccTime accumDt_; - ccTime frameRate_; -#if CC_DIRECTOR_FAST_FPS - CCLabelAtlas *FPSLabel_; -#endif - - /* is the running scene paused */ - BOOL isPaused_; - - /* The running scene */ - CCScene *runningScene_; - - /* This object will be visited after the scene. Useful to hook a notification node */ - id notificationNode_; - - /* will be the next 'runningScene' in the next frame - nextScene is a weak reference. */ - CCScene *nextScene_; - - /* If YES, then "old" scene will receive the cleanup message */ - BOOL sendCleanupToScene_; - - /* scheduled scenes */ - NSMutableArray *scenesStack_; - - /* last time the main loop was updated */ - struct timeval lastUpdate_; - /* delta time since last tick to main loop */ - ccTime dt; - /* whether or not the next delta time will be zero */ - BOOL nextDeltaTimeZero_; - - /* projection used */ - ccDirectorProjection projection_; - - /* Projection protocol delegate */ - id projectionDelegate_; - - /* window size in points */ - CGSize winSizeInPoints_; - - /* window size in pixels */ - CGSize winSizeInPixels_; - - /* the cocos2d running thread */ - NSThread *runningThread_; - - // profiler -#if CC_ENABLE_PROFILERS - ccTime accumDtForProfiler_; -#endif -} - -/** returns the cocos2d thread. - If you want to run any cocos2d task, run it in this thread. - On iOS usually it is the main thread. - @since v0.99.5 - */ -@property (readonly, nonatomic ) NSThread *runningThread; -/** The current running Scene. Director can only run one Scene at the time */ -@property (nonatomic,readonly) CCScene* runningScene; -/** The FPS value */ -@property (nonatomic,readwrite, assign) NSTimeInterval animationInterval; -/** Whether or not to display the FPS on the bottom-left corner */ -@property (nonatomic,readwrite, assign) BOOL displayFPS; -/** The OpenGLView, where everything is rendered */ -@property (nonatomic,readwrite,retain) CC_GLVIEW *openGLView; -/** whether or not the next delta time will be zero */ -@property (nonatomic,readwrite,assign) BOOL nextDeltaTimeZero; -/** Whether or not the Director is paused */ -@property (nonatomic,readonly) BOOL isPaused; -/** Sets an OpenGL projection - @since v0.8.2 - */ -@property (nonatomic,readwrite) ccDirectorProjection projection; - -/** 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 - */ -@property (nonatomic, readonly) BOOL sendCleanupToScene; - -/** 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 - */ -@property (nonatomic, readwrite, retain) id notificationNode; - -/** This object will be called when the OpenGL projection is udpated and only when the kCCDirectorProjectionCustom projection is used. - @since v0.99.5 - */ -@property (nonatomic, readwrite, retain) id projectionDelegate; - -/** returns a shared instance of the director */ -+(CCDirector *)sharedDirector; - - - -// Window size - -/** returns the size of the OpenGL view in points. - It takes into account any possible rotation (device orientation) of the window - */ -- (CGSize) winSize; - -/** returns the size of the OpenGL view in pixels. - It takes into account any possible rotation (device orientation) of the window. - On Mac winSize and winSizeInPixels return the same value. - */ -- (CGSize) winSizeInPixels; -/** returns the display size of the OpenGL view in pixels. - It doesn't take into account any possible rotation of the window. - */ --(CGSize) displaySizeInPixels; -/** changes the projection size */ --(void) reshapeProjection:(CGSize)newWindowSize; - -/** converts a UIKit coordinate to an OpenGL coordinate - Useful to convert (multi) touchs coordinates to the current layout (portrait or landscape) - */ --(CGPoint) convertToGL: (CGPoint) p; -/** converts an OpenGL coordinate to a UIKit coordinate - Useful to convert node points to window points for calls such as glScissor - */ --(CGPoint) convertToUI:(CGPoint)p; - -/// XXX: missing description --(float) getZEye; - -// 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. - */ -- (void) runWithScene:(CCScene*) scene; - -/**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. - */ -- (void) pushScene:(CCScene*) scene; - -/**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; - -/** Replaces the running scene with a new one. The running scene is terminated. - * ONLY call it if there is a running scene. - */ --(void) replaceScene: (CCScene*) scene; - -/** 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; - -/** 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 consuption - */ --(void) pause; - -/** 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; - -/** Stops the animation. Nothing will be drawn. The main loop won't be triggered anymore. - If you wan't to pause your animation call [pause] instead. - */ --(void) stopAnimation; - -/** The main loop is triggered again. - Call this function only if [stopAnimation] was called earlier - @warning Dont' call this function to start the main loop. To run the main loop call runWithScene - */ --(void) startAnimation; - -/** Draw the scene. - This method is called every frame. Don't call it manually. - */ --(void) drawScene; - -// Memory Helper - -/** Removes all the cocos2d data that was cached automatically. - It will purge the CCTextureCache, CCBitmapFont cache. - IMPORTANT: The CCSpriteFrameCache won't be purged. If you want to purge it, you have to purge it manually. - @since v0.99.3 - */ --(void) purgeCachedData; - -// OpenGL Helper - -/** sets the OpenGL default values */ --(void) setGLDefaultValues; - -/** enables/disables OpenGL alpha blending */ -- (void) setAlphaBlending: (BOOL) on; -/** enables/disables OpenGL depth test */ -- (void) setDepthTest: (BOOL) on; - -// Profiler --(void) showProfilers; - -@end diff --git a/Littlest/libs/cocos2d/CCDirector.m b/Littlest/libs/cocos2d/CCDirector.m deleted file mode 100644 index 2fd25fe..0000000 --- a/Littlest/libs/cocos2d/CCDirector.m +++ /dev/null @@ -1,557 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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. - */ - - -/* Idea of decoupling Window from Director taken from OC3D project: http://code.google.com/p/oc3d/ - */ - -#import -#import - -// cocos2d imports -#import "CCDirector.h" -#import "CCScheduler.h" -#import "CCActionManager.h" -#import "CCTextureCache.h" -#import "CCAnimationCache.h" -#import "CCLabelAtlas.h" -#import "ccMacros.h" -#import "CCTransition.h" -#import "CCScene.h" -#import "CCSpriteFrameCache.h" -#import "CCTexture2D.h" -#import "CCLabelBMFont.h" -#import "CCLayer.h" - -// support imports -#import "Platforms/CCGL.h" -#import "Platforms/CCNS.h" - -#import "Support/OpenGL_Internal.h" -#import "Support/CGPointExtension.h" - -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED -#import "Platforms/iOS/CCDirectorIOS.h" -#define CC_DIRECTOR_DEFAULT CCDirectorTimer -#elif defined(__MAC_OS_X_VERSION_MAX_ALLOWED) -#import "Platforms/Mac/CCDirectorMac.h" -#define CC_DIRECTOR_DEFAULT CCDirectorDisplayLink -#endif - -#import "Support/CCProfiling.h" - -#define kDefaultFPS 60.0 // 60 frames per second - -extern NSString * cocos2dVersion(void); - - -@interface CCDirector (Private) --(void) setNextScene; -// shows the FPS in the screen --(void) showFPS; -// calculates delta time since last time it was called --(void) calculateDeltaTime; -@end - -@implementation CCDirector - -@synthesize animationInterval = animationInterval_; -@synthesize runningScene = runningScene_; -@synthesize displayFPS = displayFPS_; -@synthesize nextDeltaTimeZero = nextDeltaTimeZero_; -@synthesize isPaused = isPaused_; -@synthesize sendCleanupToScene = sendCleanupToScene_; -@synthesize runningThread = runningThread_; -@synthesize notificationNode = notificationNode_; -@synthesize projectionDelegate = projectionDelegate_; -// -// singleton stuff -// -static CCDirector *_sharedDirector = nil; - -+ (CCDirector *)sharedDirector -{ - if (!_sharedDirector) { - - // - // Default Director is TimerDirector - // - if( [ [CCDirector class] isEqual:[self class]] ) - _sharedDirector = [[CC_DIRECTOR_DEFAULT alloc] init]; - else - _sharedDirector = [[self alloc] init]; - } - - return _sharedDirector; -} - -+(id)alloc -{ - NSAssert(_sharedDirector == nil, @"Attempted to allocate a second instance of a singleton."); - return [super alloc]; -} - -- (id) init -{ - CCLOG(@"cocos2d: %@", cocos2dVersion() ); - - if( (self=[super init]) ) { - - CCLOG(@"cocos2d: Using Director Type:%@", [self class]); - - // scenes - runningScene_ = nil; - nextScene_ = nil; - - notificationNode_ = nil; - - oldAnimationInterval_ = animationInterval_ = 1.0 / kDefaultFPS; - scenesStack_ = [[NSMutableArray alloc] initWithCapacity:10]; - - // Set default projection (3D) - projection_ = kCCDirectorProjectionDefault; - - // projection delegate if "Custom" projection is used - projectionDelegate_ = nil; - - // FPS - displayFPS_ = NO; - frames_ = 0; - - // paused ? - isPaused_ = NO; - - // running thread - runningThread_ = nil; - - winSizeInPixels_ = winSizeInPoints_ = CGSizeZero; - } - - return self; -} - -- (void) dealloc -{ - CCLOGINFO(@"cocos2d: deallocing %@", self); - -#if CC_DIRECTOR_FAST_FPS - [FPSLabel_ release]; -#endif - [runningScene_ release]; - [notificationNode_ release]; - [scenesStack_ release]; - - [projectionDelegate_ release]; - - _sharedDirector = nil; - - [super dealloc]; -} - --(void) setGLDefaultValues -{ - // This method SHOULD be called only after openGLView_ was initialized - NSAssert( openGLView_, @"openGLView_ must be initialized"); - - [self setAlphaBlending: YES]; - [self setDepthTest: YES]; - [self setProjection: projection_]; - - // set other opengl default values - glClearColor(0.0f, 0.0f, 0.0f, 1.0f); - -#if CC_DIRECTOR_FAST_FPS - if (!FPSLabel_) { - CCTexture2DPixelFormat currentFormat = [CCTexture2D defaultAlphaPixelFormat]; - [CCTexture2D setDefaultAlphaPixelFormat:kCCTexture2DPixelFormat_RGBA4444]; - FPSLabel_ = [[CCLabelAtlas labelWithString:@"00.0" charMapFile:@"fps_images.png" itemWidth:16 itemHeight:24 startCharMap:'.'] retain]; - [CCTexture2D setDefaultAlphaPixelFormat:currentFormat]; - } -#endif // CC_DIRECTOR_FAST_FPS -} - -// -// Draw the Scene -// -- (void) drawScene -{ - // Override me -} - --(void) calculateDeltaTime -{ - struct timeval now; - - if( gettimeofday( &now, NULL) != 0 ) { - CCLOG(@"cocos2d: error in gettimeofday"); - dt = 0; - return; - } - - // new delta time - if( nextDeltaTimeZero_ ) { - dt = 0; - nextDeltaTimeZero_ = NO; - } else { - dt = (now.tv_sec - lastUpdate_.tv_sec) + (now.tv_usec - lastUpdate_.tv_usec) / 1000000.0f; - dt = MAX(0,dt); - } - - lastUpdate_ = now; -} - -#pragma mark Director - Memory Helper - --(void) purgeCachedData -{ - [CCLabelBMFont purgeCachedData]; - [[CCTextureCache sharedTextureCache] removeUnusedTextures]; -} - -#pragma mark Director - Scene OpenGL Helper - --(ccDirectorProjection) projection -{ - return projection_; -} - --(float) getZEye -{ - return ( winSizeInPixels_.height / 1.1566f ); -} - --(void) setProjection:(ccDirectorProjection)projection -{ - CCLOG(@"cocos2d: override me"); -} - -- (void) setAlphaBlending: (BOOL) on -{ - if (on) { - glEnable(GL_BLEND); - glBlendFunc(CC_BLEND_SRC, CC_BLEND_DST); - - } else - glDisable(GL_BLEND); -} - -- (void) setDepthTest: (BOOL) on -{ - if (on) { - ccglClearDepth(1.0f); - glEnable(GL_DEPTH_TEST); - glDepthFunc(GL_LEQUAL); - glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); - } else - glDisable( GL_DEPTH_TEST ); -} - -#pragma mark Director Integration with a UIKit view - --(CC_GLVIEW*) openGLView -{ - return openGLView_; -} - --(void) setOpenGLView:(CC_GLVIEW *)view -{ - NSAssert( view, @"OpenGLView must be non-nil"); - - if( view != openGLView_ ) { - [openGLView_ release]; - openGLView_ = [view retain]; - - // set size - winSizeInPixels_ = winSizeInPoints_ = CCNSSizeToCGSize( [view bounds].size ); - - [self setGLDefaultValues]; - } -} - -#pragma mark Director Scene Landscape - --(CGPoint)convertToGL:(CGPoint)uiPoint -{ - CCLOG(@"CCDirector#convertToGL: OVERRIDE ME."); - return CGPointZero; -} - --(CGPoint)convertToUI:(CGPoint)glPoint -{ - CCLOG(@"CCDirector#convertToUI: OVERRIDE ME."); - return CGPointZero; -} - --(CGSize)winSize -{ - return winSizeInPoints_; -} - --(CGSize)winSizeInPixels -{ - return winSizeInPixels_; -} - --(CGSize)displaySizeInPixels -{ - return winSizeInPixels_; -} - --(void) reshapeProjection:(CGSize)newWindowSize -{ - winSizeInPixels_ = winSizeInPoints_ = newWindowSize; - [self setProjection:projection_]; -} - -#pragma mark Director Scene Management - -- (void)runWithScene:(CCScene*) scene -{ - NSAssert( scene != nil, @"Argument must be non-nil"); - NSAssert( runningScene_ == nil, @"You can't run an scene if another Scene is running. Use replaceScene or pushScene instead"); - - [self pushScene:scene]; - [self startAnimation]; -} - --(void) replaceScene: (CCScene*) scene -{ - NSAssert( scene != nil, @"Argument must be non-nil"); - - NSUInteger index = [scenesStack_ count]; - - sendCleanupToScene_ = YES; - [scenesStack_ replaceObjectAtIndex:index-1 withObject:scene]; - nextScene_ = scene; // nextScene_ is a weak ref -} - -- (void) pushScene: (CCScene*) scene -{ - NSAssert( scene != nil, @"Argument must be non-nil"); - - sendCleanupToScene_ = NO; - - [scenesStack_ addObject: scene]; - nextScene_ = scene; // nextScene_ is a weak ref -} - --(void) popScene -{ - NSAssert( runningScene_ != nil, @"A running Scene is needed"); - - [scenesStack_ removeLastObject]; - NSUInteger c = [scenesStack_ count]; - - if( c == 0 ) - [self end]; - else { - sendCleanupToScene_ = YES; - nextScene_ = [scenesStack_ objectAtIndex:c-1]; - } -} - --(void) end -{ - [runningScene_ onExit]; - [runningScene_ cleanup]; - [runningScene_ release]; - - runningScene_ = nil; - nextScene_ = nil; - - // remove all objects, but don't release it. - // runWithScene might be executed after 'end'. - [scenesStack_ removeAllObjects]; - - [self stopAnimation]; - -#if CC_DIRECTOR_FAST_FPS - [FPSLabel_ release]; - FPSLabel_ = nil; -#endif - - [projectionDelegate_ release]; - projectionDelegate_ = nil; - - // Purge bitmap cache - [CCLabelBMFont purgeCachedData]; - - // Purge all managers - [CCAnimationCache purgeSharedAnimationCache]; - [CCSpriteFrameCache purgeSharedSpriteFrameCache]; - [CCScheduler purgeSharedScheduler]; - [CCActionManager purgeSharedManager]; - [CCTextureCache purgeSharedTextureCache]; - - - // OpenGL view - - // Since the director doesn't attach the openglview to the window - // it shouldn't remove it from the window too. -// [openGLView_ removeFromSuperview]; - - [openGLView_ release]; - openGLView_ = nil; -} - --(void) setNextScene -{ - Class transClass = [CCTransitionScene class]; - BOOL runningIsTransition = [runningScene_ isKindOfClass:transClass]; - BOOL newIsTransition = [nextScene_ isKindOfClass:transClass]; - - // If it is not a transition, call onExit/cleanup - if( ! newIsTransition ) { - [runningScene_ onExit]; - - // issue #709. the root node (scene) should receive the cleanup message too - // otherwise it might be leaked. - if( sendCleanupToScene_) - [runningScene_ cleanup]; - } - - [runningScene_ release]; - - runningScene_ = [nextScene_ retain]; - nextScene_ = nil; - - if( ! runningIsTransition ) { - [runningScene_ onEnter]; - [runningScene_ onEnterTransitionDidFinish]; - } -} - --(void) pause -{ - if( isPaused_ ) - return; - - oldAnimationInterval_ = animationInterval_; - - // when paused, don't consume CPU - [self setAnimationInterval:1/4.0]; - isPaused_ = YES; -} - --(void) resume -{ - if( ! isPaused_ ) - return; - - [self setAnimationInterval: oldAnimationInterval_]; - - if( gettimeofday( &lastUpdate_, NULL) != 0 ) { - CCLOG(@"cocos2d: Director: Error in gettimeofday"); - } - - isPaused_ = NO; - dt = 0; -} - -- (void)startAnimation -{ - CCLOG(@"cocos2d: Director#startAnimation. Override me"); -} - -- (void)stopAnimation -{ - CCLOG(@"cocos2d: Director#stopAnimation. Override me"); -} - -- (void)setAnimationInterval:(NSTimeInterval)interval -{ - CCLOG(@"cocos2d: Director#setAnimationInterval. Override me"); -} - -#if CC_DIRECTOR_FAST_FPS - -// display the FPS using a LabelAtlas -// updates the FPS every frame --(void) showFPS -{ - frames_++; - accumDt_ += dt; - - if ( accumDt_ > CC_DIRECTOR_FPS_INTERVAL) { - frameRate_ = frames_/accumDt_; - frames_ = 0; - accumDt_ = 0; - -// sprintf(format,"%.1f",frameRate); -// [FPSLabel setCString:format]; - - NSString *str = [[NSString alloc] initWithFormat:@"%.1f", frameRate_]; - [FPSLabel_ setString:str]; - [str release]; - } - - [FPSLabel_ draw]; -} -#else -// display the FPS using a manually generated Texture (very slow) -// updates the FPS 3 times per second aprox. --(void) showFPS -{ - frames_++; - accumDt_ += dt; - - if ( accumDt_ > CC_DIRECTOR_FPS_INTERVAL) { - frameRate_ = frames_/accumDt_; - frames_ = 0; - accumDt_ = 0; - } - - NSString *str = [NSString stringWithFormat:@"%.2f",frameRate_]; - CCTexture2D *texture = [[CCTexture2D alloc] initWithString:str dimensions:CGSizeMake(100,30) alignment:UITextAlignmentLeft fontName:@"Arial" fontSize:24]; - - // Default GL states: GL_TEXTURE_2D, GL_VERTEX_ARRAY, GL_COLOR_ARRAY, GL_TEXTURE_COORD_ARRAY - // Needed states: GL_TEXTURE_2D, GL_VERTEX_ARRAY, GL_TEXTURE_COORD_ARRAY - // Unneeded states: GL_COLOR_ARRAY - glDisableClientState(GL_COLOR_ARRAY); - - glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - - glColor4ub(224,224,244,200); - [texture drawAtPoint: ccp(5,2)]; - [texture release]; - - glBlendFunc(CC_BLEND_SRC, CC_BLEND_DST); - - // restore default GL state - glEnableClientState(GL_COLOR_ARRAY); -} -#endif - -- (void) showProfilers { -#if CC_ENABLE_PROFILERS - accumDtForProfiler_ += dt; - if (accumDtForProfiler_ > 1.0f) { - accumDtForProfiler_ = 0; - [[CCProfiler sharedProfiler] displayTimers]; - } -#endif // CC_ENABLE_PROFILERS -} - -@end - diff --git a/Littlest/libs/cocos2d/CCDrawingPrimitives.h b/Littlest/libs/cocos2d/CCDrawingPrimitives.h deleted file mode 100644 index 1dbd9a5..0000000 --- a/Littlest/libs/cocos2d/CCDrawingPrimitives.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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_DRAWING_PRIMITIVES_H -#define __CC_DRAWING_PRIMITIVES_H - -#import -#import - -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED -#import // for CGPoint -#endif - - -#ifdef __cplusplus -extern "C" { -#endif - -/** - @file - Drawing OpenGL ES primitives. - - ccDrawPoint - - ccDrawLine - - ccDrawPoly - - ccDrawCircle - - ccDrawQuadBezier - - ccDrawCubicBezier - - You can change the color, width and other property by calling the - glColor4ub(), glLineWitdh(), glPointSize(). - - @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. - */ - - -/** draws a point given x and y coordinate measured in points. */ -void ccDrawPoint( CGPoint point ); - -/** draws an array of points. - @since v0.7.2 - */ -void ccDrawPoints( const CGPoint *points, NSUInteger numberOfPoints ); - -/** draws a line given the origin and destination point measured in points. */ -void ccDrawLine( CGPoint origin, CGPoint destination ); - -/** draws a poligon given a pointer to CGPoint coordiantes and the number of vertices measured in points. - The polygon can be closed or open - */ -void ccDrawPoly( const CGPoint *vertices, NSUInteger numOfVertices, BOOL closePolygon ); - -/** draws a circle given the center, radius and number of segments measured in points */ -void ccDrawCircle( CGPoint center, float radius, float angle, NSUInteger segments, BOOL drawLineToCenter); - -/** draws a quad bezier path measured in points. - @since v0.8 - */ -void ccDrawQuadBezier(CGPoint origin, CGPoint control, CGPoint destination, NSUInteger segments); - -/** draws a cubic bezier path measured in points. - @since v0.8 - */ -void ccDrawCubicBezier(CGPoint origin, CGPoint control1, CGPoint control2, CGPoint destination, NSUInteger segments); - -#ifdef __cplusplus -} -#endif - -#endif // __CC_DRAWING_PRIMITIVES_H diff --git a/Littlest/libs/cocos2d/CCDrawingPrimitives.m b/Littlest/libs/cocos2d/CCDrawingPrimitives.m deleted file mode 100644 index 1e26a6f..0000000 --- a/Littlest/libs/cocos2d/CCDrawingPrimitives.m +++ /dev/null @@ -1,271 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 -#import -#import - -#import "CCDrawingPrimitives.h" -#import "ccTypes.h" -#import "ccMacros.h" -#import "Platforms/CCGL.h" - -void ccDrawPoint( CGPoint point ) -{ - ccVertex2F p = (ccVertex2F) {point.x * CC_CONTENT_SCALE_FACTOR(), point.y * CC_CONTENT_SCALE_FACTOR() }; - - // Default GL states: GL_TEXTURE_2D, GL_VERTEX_ARRAY, GL_COLOR_ARRAY, GL_TEXTURE_COORD_ARRAY - // Needed states: GL_VERTEX_ARRAY, - // Unneeded states: GL_TEXTURE_2D, GL_TEXTURE_COORD_ARRAY, GL_COLOR_ARRAY - glDisable(GL_TEXTURE_2D); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - glDisableClientState(GL_COLOR_ARRAY); - - glVertexPointer(2, GL_FLOAT, 0, &p); - glDrawArrays(GL_POINTS, 0, 1); - - // restore default state - glEnableClientState(GL_COLOR_ARRAY); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glEnable(GL_TEXTURE_2D); -} - -void ccDrawPoints( const CGPoint *points, NSUInteger numberOfPoints ) -{ - // Default GL states: GL_TEXTURE_2D, GL_VERTEX_ARRAY, GL_COLOR_ARRAY, GL_TEXTURE_COORD_ARRAY - // Needed states: GL_VERTEX_ARRAY, - // Unneeded states: GL_TEXTURE_2D, GL_TEXTURE_COORD_ARRAY, GL_COLOR_ARRAY - glDisable(GL_TEXTURE_2D); - glDisableClientState(GL_TEXTURE_COORD_ARRAY); - glDisableClientState(GL_COLOR_ARRAY); - - ccVertex2F newPoints[numberOfPoints]; - - // iPhone and 32-bit machines optimization - if( sizeof(CGPoint) == sizeof(ccVertex2F) ) { - - // points ? - if( CC_CONTENT_SCALE_FACTOR() != 1 ) { - for( NSUInteger i=0; i - -@class CCTexture2D; - -/** FBO class that grabs the the contents of the screen */ -@interface CCGrabber : NSObject -{ - GLuint fbo; - GLint oldFBO; -} - --(void)grab:(CCTexture2D*)texture; --(void)beforeRender:(CCTexture2D*)texture; --(void)afterRender:(CCTexture2D*)texture; - -@end diff --git a/Littlest/libs/cocos2d/CCGrabber.m b/Littlest/libs/cocos2d/CCGrabber.m deleted file mode 100644 index a259091..0000000 --- a/Littlest/libs/cocos2d/CCGrabber.m +++ /dev/null @@ -1,95 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2009 On-Core - * - * 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 "Platforms/CCGL.h" -#import "CCGrabber.h" -#import "ccMacros.h" -#import "CCTexture2D.h" -#import "Support/OpenGL_Internal.h" - -@implementation CCGrabber - --(id) init -{ - if(( self = [super init] )) { - // generate FBO - ccglGenFramebuffers(1, &fbo); - } - return self; -} - --(void)grab:(CCTexture2D*)texture -{ - glGetIntegerv(CC_GL_FRAMEBUFFER_BINDING, &oldFBO); - - // bind - ccglBindFramebuffer(CC_GL_FRAMEBUFFER, fbo); - - // associate texture with FBO - ccglFramebufferTexture2D(CC_GL_FRAMEBUFFER, CC_GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture.name, 0); - - // check if it worked (probably worth doing :) ) - GLuint status = ccglCheckFramebufferStatus(CC_GL_FRAMEBUFFER); - if (status != CC_GL_FRAMEBUFFER_COMPLETE) - [NSException raise:@"Frame Grabber" format:@"Could not attach texture to framebuffer"]; - - ccglBindFramebuffer(CC_GL_FRAMEBUFFER, oldFBO); -} - --(void)beforeRender:(CCTexture2D*)texture -{ - glGetIntegerv(CC_GL_FRAMEBUFFER_BINDING, &oldFBO); - ccglBindFramebuffer(CC_GL_FRAMEBUFFER, fbo); - - // BUG XXX: doesn't work with RGB565. - - - glClearColor(0,0,0,0); - - // BUG #631: To fix #631, uncomment the lines with #631 - // Warning: But it CCGrabber won't work with 2 effects at the same time -// glClearColor(0.0f,0.0f,0.0f,1.0f); // #631 - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); - -// glColorMask(TRUE, TRUE, TRUE, FALSE); // #631 - -} - --(void)afterRender:(CCTexture2D*)texture -{ - ccglBindFramebuffer(CC_GL_FRAMEBUFFER, oldFBO); -// glColorMask(TRUE, TRUE, TRUE, TRUE); // #631 -} - -- (void) dealloc -{ - CCLOGINFO(@"cocos2d: deallocing %@", self); - ccglDeleteFramebuffers(1, &fbo); - [super dealloc]; -} - -@end diff --git a/Littlest/libs/cocos2d/CCGrid.h b/Littlest/libs/cocos2d/CCGrid.h deleted file mode 100644 index e5e77e8..0000000 --- a/Littlest/libs/cocos2d/CCGrid.h +++ /dev/null @@ -1,121 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2009 On-Core - * - * 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 - -#import "CCNode.h" -#import "CCCamera.h" -#import "ccTypes.h" - -@class CCTexture2D; -@class CCGrabber; - -/** Base class for other - */ -@interface CCGridBase : NSObject -{ - BOOL active_; - int reuseGrid_; - ccGridSize gridSize_; - CCTexture2D *texture_; - CGPoint step_; - CCGrabber *grabber_; - BOOL isTextureFlipped_; -} - -/** wheter or not the grid is active */ -@property (nonatomic,readwrite) BOOL active; -/** number of times that the grid will be reused */ -@property (nonatomic,readwrite) int reuseGrid; -/** size of the grid */ -@property (nonatomic,readonly) ccGridSize gridSize; -/** pixels between the grids */ -@property (nonatomic,readwrite) CGPoint step; -/** texture used */ -@property (nonatomic, retain) CCTexture2D *texture; -/** grabber used */ -@property (nonatomic, retain) CCGrabber *grabber; -/** is texture flipped */ -@property (nonatomic, readwrite) BOOL isTextureFlipped; - -+(id) gridWithSize:(ccGridSize)gridSize texture:(CCTexture2D*)texture flippedTexture:(BOOL)flipped; -+(id) gridWithSize:(ccGridSize)gridSize; - --(id) initWithSize:(ccGridSize)gridSize texture:(CCTexture2D*)texture flippedTexture:(BOOL)flipped; --(id)initWithSize:(ccGridSize)gridSize; --(void)beforeDraw; --(void)afterDraw:(CCNode*)target; --(void)blit; --(void)reuse; - --(void)calculateVertexPoints; - -@end - -//////////////////////////////////////////////////////////// - -/** - CCGrid3D is a 3D grid implementation. Each vertex has 3 dimensions: x,y,z - */ -@interface CCGrid3D : CCGridBase -{ - GLvoid *texCoordinates; - GLvoid *vertices; - GLvoid *originalVertices; - GLushort *indices; -} - -/** returns the vertex at a given position */ --(ccVertex3F)vertex:(ccGridSize)pos; -/** returns the original (non-transformed) vertex at a given position */ --(ccVertex3F)originalVertex:(ccGridSize)pos; -/** sets a new vertex at a given position */ --(void)setVertex:(ccGridSize)pos vertex:(ccVertex3F)vertex; - -@end - -//////////////////////////////////////////////////////////// - -/** - CCTiledGrid3D is a 3D grid implementation. It differs from Grid3D in that - the tiles can be separated from the grid. -*/ -@interface CCTiledGrid3D : CCGridBase -{ - GLvoid *texCoordinates; - GLvoid *vertices; - GLvoid *originalVertices; - GLushort *indices; -} - -/** returns the tile at the given position */ --(ccQuad3)tile:(ccGridSize)pos; -/** returns the original tile (untransformed) at the given position */ --(ccQuad3)originalTile:(ccGridSize)pos; -/** sets a new tile */ --(void)setTile:(ccGridSize)pos coords:(ccQuad3)coords; - -@end diff --git a/Littlest/libs/cocos2d/CCGrid.m b/Littlest/libs/cocos2d/CCGrid.m deleted file mode 100644 index b63fbb8..0000000 --- a/Littlest/libs/cocos2d/CCGrid.m +++ /dev/null @@ -1,571 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2009 On-Core - * - * 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 - -#import "ccMacros.h" -#import "CCGrid.h" -#import "CCTexture2D.h" -#import "CCDirector.h" -#import "CCGrabber.h" - -#import "Platforms/CCGL.h" -#import "Support/CGPointExtension.h" -#import "Support/ccUtils.h" - -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED -#import "Platforms/iOS/CCDirectorIOS.h" -#endif // __IPHONE_OS_VERSION_MAX_ALLOWED - -#pragma mark - -#pragma mark CCGridBase - -@implementation CCGridBase - -@synthesize reuseGrid = reuseGrid_; -@synthesize texture = texture_; -@synthesize grabber = grabber_; -@synthesize gridSize = gridSize_; -@synthesize step = step_; - -+(id) gridWithSize:(ccGridSize)gridSize texture:(CCTexture2D*)texture flippedTexture:(BOOL)flipped -{ - return [[[self alloc] initWithSize:gridSize texture:texture flippedTexture:flipped] autorelease]; -} - -+(id) gridWithSize:(ccGridSize)gridSize -{ - return [[(CCGridBase*)[self alloc] initWithSize:gridSize] autorelease]; -} - --(id) initWithSize:(ccGridSize)gridSize texture:(CCTexture2D*)texture flippedTexture:(BOOL)flipped -{ - if( (self=[super init]) ) { - - active_ = NO; - reuseGrid_ = 0; - gridSize_ = gridSize; - - self.texture = texture; - isTextureFlipped_ = flipped; - - CGSize texSize = [texture_ contentSizeInPixels]; - step_.x = texSize.width / gridSize_.x; - step_.y = texSize.height / gridSize_.y; - - grabber_ = [[CCGrabber alloc] init]; - [grabber_ grab:texture_]; - - [self calculateVertexPoints]; - } - return self; -} - --(id)initWithSize:(ccGridSize)gSize -{ - CCDirector *director = [CCDirector sharedDirector]; - CGSize s = [director winSizeInPixels]; - - unsigned int POTWide = ccNextPOT(s.width); - unsigned int POTHigh = ccNextPOT(s.height); - -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED - EAGLView *glview = [[CCDirector sharedDirector] openGLView]; - NSString *pixelFormat = [glview pixelFormat]; - - CCTexture2DPixelFormat format = [pixelFormat isEqualToString: kEAGLColorFormatRGB565] ? kCCTexture2DPixelFormat_RGB565 : kCCTexture2DPixelFormat_RGBA8888; -#else - CCTexture2DPixelFormat format = kCCTexture2DPixelFormat_RGBA8888; -#endif - - void *data = calloc((int)(POTWide * POTHigh * 4), 1); - if( ! data ) { - CCLOG(@"cocos2d: CCGrid: not enough memory"); - [self release]; - return nil; - } - - CCTexture2D *texture = [[CCTexture2D alloc] initWithData:data pixelFormat:format pixelsWide:POTWide pixelsHigh:POTHigh contentSize:s]; - free( data ); - - if( ! texture ) { - CCLOG(@"cocos2d: CCGrid: error creating texture"); - [self release]; - return nil; - } - - self = [self initWithSize:gSize texture:texture flippedTexture:NO]; - - [texture release]; - - return self; -} -- (NSString*) description -{ - return [NSString stringWithFormat:@"<%@ = %08X | Dimensions = %ix%i>", [self class], self, gridSize_.x, gridSize_.y]; -} - -- (void) dealloc -{ - CCLOGINFO(@"cocos2d: deallocing %@", self); - - [self setActive: NO]; - - [texture_ release]; - [grabber_ release]; - [super dealloc]; -} - -// properties --(BOOL) active -{ - return active_; -} - --(void) setActive:(BOOL)active -{ - active_ = active; - if( ! active ) { - CCDirector *director = [CCDirector sharedDirector]; - ccDirectorProjection proj = [director projection]; - [director setProjection:proj]; - } -} - --(BOOL) isTextureFlipped -{ - return isTextureFlipped_; -} - --(void) setIsTextureFlipped:(BOOL)flipped -{ - if( isTextureFlipped_ != flipped ) { - isTextureFlipped_ = flipped; - [self calculateVertexPoints]; - } -} - -// This routine can be merged with Director -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED --(void)applyLandscape -{ - CCDirector *director = [CCDirector sharedDirector]; - - CGSize winSize = [director displaySizeInPixels]; - float w = winSize.width / 2; - float h = winSize.height / 2; - - ccDeviceOrientation orientation = [director deviceOrientation]; - - switch (orientation) { - case CCDeviceOrientationLandscapeLeft: - glTranslatef(w,h,0); - glRotatef(-90,0,0,1); - glTranslatef(-h,-w,0); - break; - case CCDeviceOrientationLandscapeRight: - glTranslatef(w,h,0); - glRotatef(90,0,0,1); - glTranslatef(-h,-w,0); - break; - case CCDeviceOrientationPortraitUpsideDown: - glTranslatef(w,h,0); - glRotatef(180,0,0,1); - glTranslatef(-w,-h,0); - break; - default: - break; - } -} -#endif - --(void)set2DProjection -{ - CGSize winSize = [[CCDirector sharedDirector] winSizeInPixels]; - - glLoadIdentity(); - glViewport(0, 0, winSize.width, winSize.height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - ccglOrtho(0, winSize.width, 0, winSize.height, -1024, 1024); - glMatrixMode(GL_MODELVIEW); -} - -// This routine can be merged with Director --(void)set3DProjection -{ - CCDirector *director = [CCDirector sharedDirector]; - - CGSize winSize = [director displaySizeInPixels]; - - glViewport(0, 0, winSize.width, winSize.height); - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - gluPerspective(60, (GLfloat)winSize.width/winSize.height, 0.5f, 1500.0f); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - gluLookAt( winSize.width/2, winSize.height/2, [director getZEye], - winSize.width/2, winSize.height/2, 0, - 0.0f, 1.0f, 0.0f - ); -} - --(void)beforeDraw -{ - [self set2DProjection]; - [grabber_ beforeRender:texture_]; -} - --(void)afterDraw:(CCNode *)target -{ - [grabber_ afterRender:texture_]; - - [self set3DProjection]; -#ifdef __IPHONE_OS_VERSION_MAX_ALLOWED - [self applyLandscape]; -#endif - - if( target.camera.dirty ) { - - CGPoint offset = [target anchorPointInPixels]; - - // - // XXX: Camera should be applied in the AnchorPoint - // - ccglTranslate(offset.x, offset.y, 0); - [target.camera locate]; - ccglTranslate(-offset.x, -offset.y, 0); - } - - glBindTexture(GL_TEXTURE_2D, texture_.name); - - [self blit]; -} - --(void)blit -{ - [NSException raise:@"GridBase" format:@"Abstract class needs implementation"]; -} - --(void)reuse -{ - [NSException raise:@"GridBase" format:@"Abstract class needs implementation"]; -} - --(void)calculateVertexPoints -{ - [NSException raise:@"GridBase" format:@"Abstract class needs implementation"]; -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark CCGrid3D -@implementation CCGrid3D - --(void)dealloc -{ - free(texCoordinates); - free(vertices); - free(indices); - free(originalVertices); - [super dealloc]; -} - --(void)blit -{ - int n = gridSize_.x * gridSize_.y; - - // Default GL states: GL_TEXTURE_2D, GL_VERTEX_ARRAY, GL_COLOR_ARRAY, GL_TEXTURE_COORD_ARRAY - // Needed states: GL_TEXTURE_2D, GL_VERTEX_ARRAY, GL_TEXTURE_COORD_ARRAY - // Unneeded states: GL_COLOR_ARRAY - glDisableClientState(GL_COLOR_ARRAY); - - glVertexPointer(3, GL_FLOAT, 0, vertices); - glTexCoordPointer(2, GL_FLOAT, 0, texCoordinates); - glDrawElements(GL_TRIANGLES, n*6, GL_UNSIGNED_SHORT, indices); - - // restore GL default state - glEnableClientState(GL_COLOR_ARRAY); -} - --(void)calculateVertexPoints -{ - float width = (float)texture_.pixelsWide; - float height = (float)texture_.pixelsHigh; - float imageH = texture_.contentSizeInPixels.height; - - int x, y, i; - - vertices = malloc((gridSize_.x+1)*(gridSize_.y+1)*sizeof(ccVertex3F)); - originalVertices = malloc((gridSize_.x+1)*(gridSize_.y+1)*sizeof(ccVertex3F)); - texCoordinates = malloc((gridSize_.x+1)*(gridSize_.y+1)*sizeof(CGPoint)); - indices = malloc(gridSize_.x*gridSize_.y*sizeof(GLushort)*6); - - float *vertArray = (float*)vertices; - float *texArray = (float*)texCoordinates; - GLushort *idxArray = (GLushort *)indices; - - for( x = 0; x < gridSize_.x; x++ ) - { - for( y = 0; y < gridSize_.y; y++ ) - { - int idx = (y * gridSize_.x) + x; - - float x1 = x * step_.x; - float x2 = x1 + step_.x; - float y1 = y * step_.y; - float y2 = y1 + step_.y; - - GLushort a = x * (gridSize_.y+1) + y; - GLushort b = (x+1) * (gridSize_.y+1) + y; - GLushort c = (x+1) * (gridSize_.y+1) + (y+1); - GLushort d = x * (gridSize_.y+1) + (y+1); - - GLushort tempidx[6] = { a, b, d, b, c, d }; - - memcpy(&idxArray[6*idx], tempidx, 6*sizeof(GLushort)); - - int l1[4] = { a*3, b*3, c*3, d*3 }; - ccVertex3F e = {x1,y1,0}; - ccVertex3F f = {x2,y1,0}; - ccVertex3F g = {x2,y2,0}; - ccVertex3F h = {x1,y2,0}; - - ccVertex3F l2[4] = { e, f, g, h }; - - int tex1[4] = { a*2, b*2, c*2, d*2 }; - CGPoint tex2[4] = { ccp(x1, y1), ccp(x2, y1), ccp(x2, y2), ccp(x1, y2) }; - - for( i = 0; i < 4; i++ ) - { - vertArray[ l1[i] ] = l2[i].x; - vertArray[ l1[i] + 1 ] = l2[i].y; - vertArray[ l1[i] + 2 ] = l2[i].z; - - texArray[ tex1[i] ] = tex2[i].x / width; - if( isTextureFlipped_ ) - texArray[ tex1[i] + 1 ] = (imageH - tex2[i].y) / height; - else - texArray[ tex1[i] + 1 ] = tex2[i].y / height; - } - } - } - - memcpy(originalVertices, vertices, (gridSize_.x+1)*(gridSize_.y+1)*sizeof(ccVertex3F)); -} - --(ccVertex3F)vertex:(ccGridSize)pos -{ - int index = (pos.x * (gridSize_.y+1) + pos.y) * 3; - float *vertArray = (float *)vertices; - - ccVertex3F vert = { vertArray[index], vertArray[index+1], vertArray[index+2] }; - - return vert; -} - --(ccVertex3F)originalVertex:(ccGridSize)pos -{ - int index = (pos.x * (gridSize_.y+1) + pos.y) * 3; - float *vertArray = (float *)originalVertices; - - ccVertex3F vert = { vertArray[index], vertArray[index+1], vertArray[index+2] }; - - return vert; -} - --(void)setVertex:(ccGridSize)pos vertex:(ccVertex3F)vertex -{ - int index = (pos.x * (gridSize_.y+1) + pos.y) * 3; - float *vertArray = (float *)vertices; - vertArray[index] = vertex.x; - vertArray[index+1] = vertex.y; - vertArray[index+2] = vertex.z; -} - --(void)reuse -{ - if ( reuseGrid_ > 0 ) - { - memcpy(originalVertices, vertices, (gridSize_.x+1)*(gridSize_.y+1)*sizeof(ccVertex3F)); - reuseGrid_--; - } -} - -@end - -//////////////////////////////////////////////////////////// - -#pragma mark - -#pragma mark CCTiledGrid3D - -@implementation CCTiledGrid3D - --(void)dealloc -{ - free(texCoordinates); - free(vertices); - free(indices); - free(originalVertices); - [super dealloc]; -} - --(void)blit -{ - int n = gridSize_.x * gridSize_.y; - - // Default GL states: GL_TEXTURE_2D, GL_VERTEX_ARRAY, GL_COLOR_ARRAY, GL_TEXTURE_COORD_ARRAY - // Needed states: GL_TEXTURE_2D, GL_VERTEX_ARRAY, GL_TEXTURE_COORD_ARRAY - // Unneeded states: GL_COLOR_ARRAY - glDisableClientState(GL_COLOR_ARRAY); - - glVertexPointer(3, GL_FLOAT, 0, vertices); - glTexCoordPointer(2, GL_FLOAT, 0, texCoordinates); - glDrawElements(GL_TRIANGLES, n*6, GL_UNSIGNED_SHORT, indices); - - // restore default GL state - glEnableClientState(GL_COLOR_ARRAY); -} - --(void)calculateVertexPoints -{ - float width = (float)texture_.pixelsWide; - float height = (float)texture_.pixelsHigh; - float imageH = texture_.contentSizeInPixels.height; - - int numQuads = gridSize_.x * gridSize_.y; - - vertices = malloc(numQuads*12*sizeof(GLfloat)); - originalVertices = malloc(numQuads*12*sizeof(GLfloat)); - texCoordinates = malloc(numQuads*8*sizeof(GLfloat)); - indices = malloc(numQuads*6*sizeof(GLushort)); - - float *vertArray = (float*)vertices; - float *texArray = (float*)texCoordinates; - GLushort *idxArray = (GLushort *)indices; - - int x, y; - - for( x = 0; x < gridSize_.x; x++ ) - { - for( y = 0; y < gridSize_.y; y++ ) - { - float x1 = x * step_.x; - float x2 = x1 + step_.x; - float y1 = y * step_.y; - float y2 = y1 + step_.y; - - *vertArray++ = x1; - *vertArray++ = y1; - *vertArray++ = 0; - *vertArray++ = x2; - *vertArray++ = y1; - *vertArray++ = 0; - *vertArray++ = x1; - *vertArray++ = y2; - *vertArray++ = 0; - *vertArray++ = x2; - *vertArray++ = y2; - *vertArray++ = 0; - - float newY1 = y1; - float newY2 = y2; - - if( isTextureFlipped_ ) { - newY1 = imageH - y1; - newY2 = imageH - y2; - } - - *texArray++ = x1 / width; - *texArray++ = newY1 / height; - *texArray++ = x2 / width; - *texArray++ = newY1 / height; - *texArray++ = x1 / width; - *texArray++ = newY2 / height; - *texArray++ = x2 / width; - *texArray++ = newY2 / height; - } - } - - for( x = 0; x < numQuads; x++) - { - idxArray[x*6+0] = x*4+0; - idxArray[x*6+1] = x*4+1; - idxArray[x*6+2] = x*4+2; - - idxArray[x*6+3] = x*4+1; - idxArray[x*6+4] = x*4+2; - idxArray[x*6+5] = x*4+3; - } - - memcpy(originalVertices, vertices, numQuads*12*sizeof(GLfloat)); -} - --(void)setTile:(ccGridSize)pos coords:(ccQuad3)coords -{ - int idx = (gridSize_.y * pos.x + pos.y) * 4 * 3; - float *vertArray = (float*)vertices; - memcpy(&vertArray[idx], &coords, sizeof(ccQuad3)); -} - --(ccQuad3)originalTile:(ccGridSize)pos -{ - int idx = (gridSize_.y * pos.x + pos.y) * 4 * 3; - float *vertArray = (float*)originalVertices; - - ccQuad3 ret; - memcpy(&ret, &vertArray[idx], sizeof(ccQuad3)); - - return ret; -} - --(ccQuad3)tile:(ccGridSize)pos -{ - int idx = (gridSize_.y * pos.x + pos.y) * 4 * 3; - float *vertArray = (float*)vertices; - - ccQuad3 ret; - memcpy(&ret, &vertArray[idx], sizeof(ccQuad3)); - - return ret; -} - --(void)reuse -{ - if ( reuseGrid_ > 0 ) - { - int numQuads = gridSize_.x * gridSize_.y; - - memcpy(originalVertices, vertices, numQuads*12*sizeof(GLfloat)); - reuseGrid_--; - } -} - -@end diff --git a/Littlest/libs/cocos2d/CCLabelAtlas.h b/Littlest/libs/cocos2d/CCLabelAtlas.h deleted file mode 100644 index d30fb38..0000000 --- a/Littlest/libs/cocos2d/CCLabelAtlas.h +++ /dev/null @@ -1,61 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 "CCAtlasNode.h" -#import "CCTextureAtlas.h" - -/** 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 CCBitmapFontAtlas. It supports variable width characters and it also has a nice editor. - */ -@interface CCLabelAtlas : CCAtlasNode -{ - // string to render - NSString *string_; - - // the first char in the charmap - char mapStartChar; -} - - -/** creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element in points and the starting char of the atlas */ -+(id) labelWithString:(NSString*) string charMapFile: (NSString*) charmapfile itemWidth:(int)w itemHeight:(int)h startCharMap:(char)c; - -/** creates the CCLabelAtlas with a string, a char map file(the atlas), the width and height of each element in points and the starting char of the atlas. - @deprecated Will be removed in 1.0.1. Use "labelWithString:" instead - */ -+(id) labelAtlasWithString:(NSString*) string charMapFile: (NSString*) charmapfile itemWidth:(int)w itemHeight:(int)h startCharMap:(char)c DEPRECATED_ATTRIBUTE; - -/** initializes the CCLabelAtlas with a string, a char map file(the atlas), the width and height in points of each element and the starting char of the atlas */ --(id) initWithString:(NSString*) string charMapFile: (NSString*) charmapfile itemWidth:(int)w itemHeight:(int)h startCharMap:(char)c; -@end diff --git a/Littlest/libs/cocos2d/CCLabelAtlas.m b/Littlest/libs/cocos2d/CCLabelAtlas.m deleted file mode 100644 index 98ba04e..0000000 --- a/Littlest/libs/cocos2d/CCLabelAtlas.m +++ /dev/null @@ -1,189 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 "ccConfig.h" -#import "ccMacros.h" -#import "CCDrawingPrimitives.h" -#import "CCLabelAtlas.h" -#import "Support/CGPointExtension.h" - - - -@implementation CCLabelAtlas - -#pragma mark CCLabelAtlas - Creation & Init -+(id) labelWithString:(NSString*)string charMapFile:(NSString*)charmapfile itemWidth:(int)w itemHeight:(int)h startCharMap:(char)c -{ - return [[[self alloc] initWithString:string charMapFile:charmapfile itemWidth:w itemHeight:h startCharMap:c] autorelease]; -} - -// XXX DEPRECATED. Remove it in 1.0.1 -+(id) labelAtlasWithString:(NSString*) string charMapFile: (NSString*) charmapfile itemWidth:(int)w itemHeight:(int)h startCharMap:(char)c -{ - return [self labelWithString:string charMapFile:charmapfile itemWidth:w itemHeight:h startCharMap:c]; -} - - --(id) initWithString:(NSString*) theString charMapFile: (NSString*) charmapfile itemWidth:(int)w itemHeight:(int)h startCharMap:(char)c -{ - - if ((self=[super initWithTileFile:charmapfile tileWidth:w tileHeight:h itemsToRender:[theString length] ]) ) { - - mapStartChar = c; - [self setString: theString]; - } - - return self; -} - --(void) dealloc -{ - [string_ release]; - - [super dealloc]; -} - -#pragma mark CCLabelAtlas - Atlas generation - --(void) updateAtlasValues -{ - int n = [string_ length]; - - ccV3F_C4B_T2F_Quad quad; - - const char *s = [string_ UTF8String]; - - CCTexture2D *texture = [textureAtlas_ texture]; - float textureWide = [texture pixelsWide]; - float textureHigh = [texture pixelsHigh]; - - for( NSUInteger i=0; i textureAtlas_.totalQuads ) - [textureAtlas_ resizeCapacity: newString.length]; - - [string_ release]; - string_ = [newString copy]; - [self updateAtlasValues]; - - CGSize s; - s.width = [string_ length] * itemWidth_; - s.height = itemHeight_; - [self setContentSizeInPixels:s]; -} - --(NSString*) string -{ - return string_; -} - -#pragma mark CCLabelAtlas - draw - -// XXX: overriding draw from AtlasNode -- (void) draw -{ - // Default GL states: GL_TEXTURE_2D, GL_VERTEX_ARRAY, GL_COLOR_ARRAY, GL_TEXTURE_COORD_ARRAY - // Needed states: GL_TEXTURE_2D, GL_VERTEX_ARRAY, GL_TEXTURE_COORD_ARRAY - // Unneeded states: GL_COLOR_ARRAY - glDisableClientState(GL_COLOR_ARRAY); - - glColor4ub( color_.r, color_.g, color_.b, opacity_); - - BOOL newBlend = blendFunc_.src != CC_BLEND_SRC || blendFunc_.dst != CC_BLEND_DST; - if( newBlend ) - glBlendFunc( blendFunc_.src, blendFunc_.dst ); - - [textureAtlas_ drawNumberOfQuads: string_.length]; - - if( newBlend ) - glBlendFunc(CC_BLEND_SRC, CC_BLEND_DST); - - // is this chepear than saving/restoring color state ? - // XXX: There is no need to restore the color to (255,255,255,255). Objects should use the color - // XXX: that they need -// glColor4ub( 255, 255, 255, 255); - - // Restore Default GL state. Enable GL_COLOR_ARRAY - glEnableClientState(GL_COLOR_ARRAY); - - -#if CC_LABELATLAS_DEBUG_DRAW - CGSize s = [self contentSize]; - CGPoint vertices[4]={ - ccp(0,0),ccp(s.width,0), - ccp(s.width,s.height),ccp(0,s.height), - }; - ccDrawPoly(vertices, 4, YES); -#endif // CC_LABELATLAS_DEBUG_DRAW - -} -@end diff --git a/Littlest/libs/cocos2d/CCLabelBMFont.h b/Littlest/libs/cocos2d/CCLabelBMFont.h deleted file mode 100644 index 38b32dc..0000000 --- a/Littlest/libs/cocos2d/CCLabelBMFont.h +++ /dev/null @@ -1,189 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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. - * - * Portions of this code are based and inspired on: - * http://www.71squared.co.uk/2009/04/iphone-game-programming-tutorial-4-bitmap-font-class - * by Michael Daley - - * Use any of these editors to generate bitmap font atlas: - * http://www.n4te.com/hiero/hiero.jnlp - * http://slick.cokeandcode.com/demos/hiero.jnlp - * http://www.angelcode.com/products/bmfont/ - * - */ - -#import "CCSpriteBatchNode.h" -#import "Support/uthash.h" - -struct _KerningHashElement; - -/** @struct ccBMFontDef - BMFont definition - */ -typedef struct _BMFontDef { - //! ID of the character - unsigned int charID; - //! origin and size of the font - CGRect rect; - //! The X amount the image should be offset when drawing the image (in pixels) - int xOffset; - //! The Y amount the image should be offset when drawing the image (in pixels) - int yOffset; - //! The amount to move the current position after drawing the character (in pixels) - int 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; - -enum { - // how many characters are supported - kCCBMFontMaxChars = 2048, //256, -}; - -/** CCBMFontConfiguration has parsed configuration of the the .fnt file - @since v0.8 - */ -@interface CCBMFontConfiguration : NSObject -{ -// XXX: Creating a public interface so that the bitmapFontArray[] is accesible -@public - // The characters building up the font - ccBMFontDef BMFontArray_[kCCBMFontMaxChars]; - - // FNTConfig: Common Height - NSUInteger commonHeight_; - - // Padding - ccBMFontPadding padding_; - - // atlas name - NSString *atlasName_; - - // values for kerning - struct _KerningHashElement *kerningDictionary_; -} - -/** allocates a CCBMFontConfiguration with a FNT file */ -+(id) configurationWithFNTFile:(NSString*)FNTfile; -/** initializes a CCBMFontConfiguration with a FNT file */ --(id) initWithFNTfile:(NSString*)FNTfile; -@end - - -/** 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 - - chage 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://www.n4te.com/hiero/hiero.jnlp - - http://slick.cokeandcode.com/demos/hiero.jnlp - - http://www.angelcode.com/products/bmfont/ - - @since v0.8 - */ - -@interface CCLabelBMFont : CCSpriteBatchNode -{ - // string to render - NSString *string_; - - CCBMFontConfiguration *configuration_; - - // texture RGBA - GLubyte opacity_; - ccColor3B color_; - BOOL opacityModifyRGB_; -} - -/** Purges the cached data. - Removes from memory the cached configurations and the atlas name dictionary. - @since v0.99.3 - */ -+(void) purgeCachedData; - -/** conforms to CCRGBAProtocol protocol */ -@property (nonatomic,readwrite) GLubyte opacity; -/** conforms to CCRGBAProtocol protocol */ -@property (nonatomic,readwrite) ccColor3B color; - - -/** creates a BMFont label with an initial string and the FNT file */ -+(id) labelWithString:(NSString*)string fntFile:(NSString*)fntFile; - -/** creates a BMFont label with an initial string and the FNT file - @deprecated Will be removed in 1.0.1. Use "labelWithString" instead. - */ -+(id) bitmapFontAtlasWithString:(NSString*)string fntFile:(NSString*)fntFile DEPRECATED_ATTRIBUTE; - -/** init a BMFont label with an initial string and the FNT file */ --(id) initWithString:(NSString*)string fntFile:(NSString*)fntFile; - -/** updates the font chars based on the string to render */ --(void) createFontChars; -@end - -/** Free function that parses a FNT file a place it on the cache -*/ -CCBMFontConfiguration * FNTConfigLoadFile( NSString *file ); -/** Purges the FNT config cache - */ -void FNTConfigRemoveCache( void ); - - - -/** CCBitmapFontAtlas - @deprecated Use CCLabelBMFont instead. Will be removed 1.0.1 - */ -DEPRECATED_ATTRIBUTE @interface CCBitmapFontAtlas : CCLabelBMFont -@end - diff --git a/Littlest/libs/cocos2d/CCLabelBMFont.m b/Littlest/libs/cocos2d/CCLabelBMFont.m deleted file mode 100644 index 04b9997..0000000 --- a/Littlest/libs/cocos2d/CCLabelBMFont.m +++ /dev/null @@ -1,672 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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. - * - * Portions of this code are based and inspired on: - * http://www.71squared.co.uk/2009/04/iphone-game-programming-tutorial-4-bitmap-font-class - * by Michael Daley - * - * - * Use any of these editors to generate bitmap font atlas: - * http://www.n4te.com/hiero/hiero.jnlp - * http://slick.cokeandcode.com/demos/hiero.jnlp - * http://www.angelcode.com/products/bmfont/ - */ - -#import "ccConfig.h" -#import "CCLabelBMFont.h" -#import "CCSprite.h" -#import "CCDrawingPrimitives.h" -#import "CCConfiguration.h" -#import "Support/CCFileUtils.h" -#import "Support/CGPointExtension.h" -#import "Support/uthash.h" - -#pragma mark - -#pragma mark FNTConfig Cache - free functions - -NSMutableDictionary *configurations = nil; -CCBMFontConfiguration* FNTConfigLoadFile( NSString *fntFile) -{ - CCBMFontConfiguration *ret = nil; - - if( configurations == nil ) - configurations = [[NSMutableDictionary dictionaryWithCapacity:3] retain]; - - ret = [configurations objectForKey:fntFile]; - if( ret == nil ) { - ret = [CCBMFontConfiguration configurationWithFNTFile:fntFile]; - [configurations setObject:ret forKey:fntFile]; - } - - return ret; -} - -void FNTConfigRemoveCache( void ) -{ - [configurations removeAllObjects]; -} - -#pragma mark - Hash Element - -// 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; -} tKerningHashElement; - -#pragma mark - -#pragma mark BitmapFontConfiguration - - -@interface CCBMFontConfiguration (Private) --(void) parseConfigFile:(NSString*)controlFile; --(void) parseCharacterDefinition:(NSString*)line charDef:(ccBMFontDef*)characterDefinition; --(void) parseInfoArguments:(NSString*)line; --(void) parseCommonArguments:(NSString*)line; --(void) parseImageFileName:(NSString*)line fntFile:(NSString*)fntFile; --(void) parseKerningCapacity:(NSString*)line; --(void) parseKerningEntry:(NSString*)line; --(void) purgeKerningDictionary; -@end - -@implementation CCBMFontConfiguration - -+(id) configurationWithFNTFile:(NSString*)FNTfile -{ - return [[[self alloc] initWithFNTfile:FNTfile] autorelease]; -} - --(id) initWithFNTfile:(NSString*)fntFile -{ - if((self=[super init])) { - - kerningDictionary_ = NULL; - - [self parseConfigFile:fntFile]; - } - return self; -} - -- (void) dealloc -{ - CCLOGINFO( @"cocos2d: deallocing %@", self); - [self purgeKerningDictionary]; - [atlasName_ release]; - [super dealloc]; -} - -- (NSString*) description -{ - return [NSString stringWithFormat:@"<%@ = %08X | Kernings:%d | Image = %@>", [self class], self, - HASH_COUNT(kerningDictionary_), - atlasName_]; -} - - --(void) purgeKerningDictionary -{ - tKerningHashElement *current; - - while(kerningDictionary_) { - current = kerningDictionary_; - HASH_DEL(kerningDictionary_,current); - free(current); - } -} - -- (void)parseConfigFile:(NSString*)fntFile -{ - NSString *fullpath = [CCFileUtils fullPathFromRelativePath:fntFile]; - NSError *error; - NSString *contents = [NSString stringWithContentsOfFile:fullpath encoding:NSUTF8StringEncoding error:&error]; - - NSAssert1( contents, @"cocos2d: Error parsing FNTfile: %@", error); - - - // Move all lines in the string, which are denoted by \n, into an array - NSArray *lines = [[NSArray alloc] initWithArray:[contents componentsSeparatedByString:@"\n"]]; - - // Create an enumerator which we can use to move through the lines read from the control file - NSEnumerator *nse = [lines objectEnumerator]; - - // Create a holder for each line we are going to work with - NSString *line; - - // Loop through all the lines in the lines array processing each one - while( (line = [nse nextObject]) ) { - // parse spacing / padding - if([line hasPrefix:@"info face"]) { - // XXX: info parsing is incomplete - // Not needed for the Hiero editors, but needed for the AngelCode editor -// [self parseInfoArguments:line]; - } - // Check to see if the start of the line is something we are interested in - else if([line hasPrefix:@"common lineHeight"]) { - [self parseCommonArguments:line]; - } - else if([line hasPrefix:@"page id"]) { - [self parseImageFileName:line fntFile:fntFile]; - } - else if([line hasPrefix:@"chars c"]) { - // Ignore this line - } - else if([line hasPrefix:@"char"]) { - // Parse the current line and create a new CharDef - ccBMFontDef characterDefinition; - [self parseCharacterDefinition:line charDef:&characterDefinition]; - - // Add the CharDef returned to the charArray - BMFontArray_[ characterDefinition.charID ] = characterDefinition; - } - else if([line hasPrefix:@"kernings count"]) { - [self parseKerningCapacity:line]; - } - else if([line hasPrefix:@"kerning first"]) { - [self parseKerningEntry:line]; - } - } - // Finished with lines so release it - [lines release]; -} - --(void) parseImageFileName:(NSString*)line fntFile:(NSString*)fntFile -{ - NSString *propertyValue = nil; - - // Break the values for this line up using = - NSArray *values = [line componentsSeparatedByString:@"="]; - - // Get the enumerator for the array of components which has been created - NSEnumerator *nse = [values objectEnumerator]; - - // We need to move past the first entry in the array before we start assigning values - [nse nextObject]; - - // page ID. Sanity check - propertyValue = [nse nextObject]; - NSAssert( [propertyValue intValue] == 0, @"XXX: BitmapFontAtlas only supports 1 page"); - - // file - propertyValue = [nse nextObject]; - NSArray *array = [propertyValue componentsSeparatedByString:@"\""]; - propertyValue = [array objectAtIndex:1]; - NSAssert(propertyValue,@"BitmapFontAtlas file could not be found"); - - // Supports subdirectories - NSString *dir = [fntFile stringByDeletingLastPathComponent]; - atlasName_ = [dir stringByAppendingPathComponent:propertyValue]; - - [atlasName_ retain]; -} - --(void) parseInfoArguments:(NSString*)line -{ - // - // possible lines to parse: - // info face="Script" size=32 bold=0 italic=0 charset="" unicode=1 stretchH=100 smooth=1 aa=1 padding=1,4,3,2 spacing=0,0 outline=0 - // info face="Cracked" size=36 bold=0 italic=0 charset="" unicode=0 stretchH=100 smooth=1 aa=1 padding=0,0,0,0 spacing=1,1 - // - NSArray *values = [line componentsSeparatedByString:@"="]; - NSEnumerator *nse = [values objectEnumerator]; - NSString *propertyValue = nil; - - // We need to move past the first entry in the array before we start assigning values - [nse nextObject]; - - // face (ignore) - [nse nextObject]; - - // size (ignore) - [nse nextObject]; - - // bold (ignore) - [nse nextObject]; - - // italic (ignore) - [nse nextObject]; - - // charset (ignore) - [nse nextObject]; - - // unicode (ignore) - [nse nextObject]; - - // strechH (ignore) - [nse nextObject]; - - // smooth (ignore) - [nse nextObject]; - - // aa (ignore) - [nse nextObject]; - - // padding (ignore) - propertyValue = [nse nextObject]; - { - - NSArray *paddingValues = [propertyValue componentsSeparatedByString:@","]; - NSEnumerator *paddingEnum = [paddingValues objectEnumerator]; - // padding top - propertyValue = [paddingEnum nextObject]; - padding_.top = [propertyValue intValue]; - - // padding right - propertyValue = [paddingEnum nextObject]; - padding_.right = [propertyValue intValue]; - - // padding bottom - propertyValue = [paddingEnum nextObject]; - padding_.bottom = [propertyValue intValue]; - - // padding left - propertyValue = [paddingEnum nextObject]; - padding_.left = [propertyValue intValue]; - - CCLOG(@"cocos2d: padding: %d,%d,%d,%d", padding_.left, padding_.top, padding_.right, padding_.bottom); - } - - // spacing (ignore) - [nse nextObject]; -} - --(void) parseCommonArguments:(NSString*)line -{ - // - // line to parse: - // common lineHeight=104 base=26 scaleW=1024 scaleH=512 pages=1 packed=0 - // - NSArray *values = [line componentsSeparatedByString:@"="]; - NSEnumerator *nse = [values objectEnumerator]; - NSString *propertyValue = nil; - - // We need to move past the first entry in the array before we start assigning values - [nse nextObject]; - - // Character ID - propertyValue = [nse nextObject]; - commonHeight_ = [propertyValue intValue]; - - // base (ignore) - [nse nextObject]; - - - // scaleW. sanity check - propertyValue = [nse nextObject]; - NSAssert( [propertyValue intValue] <= [[CCConfiguration sharedConfiguration] maxTextureSize], @"CCLabelBMFont: page can't be larger than supported"); - - // scaleH. sanity check - propertyValue = [nse nextObject]; - NSAssert( [propertyValue intValue] <= [[CCConfiguration sharedConfiguration] maxTextureSize], @"CCLabelBMFont: page can't be larger than supported"); - - // pages. sanity check - propertyValue = [nse nextObject]; - NSAssert( [propertyValue intValue] == 1, @"CCBitfontAtlas: only supports 1 page"); - - // packed (ignore) What does this mean ?? -} -- (void)parseCharacterDefinition:(NSString*)line charDef:(ccBMFontDef*)characterDefinition -{ - // Break the values for this line up using = - NSArray *values = [line componentsSeparatedByString:@"="]; - NSEnumerator *nse = [values objectEnumerator]; - NSString *propertyValue; - - // We need to move past the first entry in the array before we start assigning values - [nse nextObject]; - - // Character ID - propertyValue = [nse nextObject]; - propertyValue = [propertyValue substringToIndex: [propertyValue rangeOfString: @" "].location]; - characterDefinition->charID = [propertyValue intValue]; - NSAssert(characterDefinition->charID < kCCBMFontMaxChars, @"BitmpaFontAtlas: CharID bigger than supported"); - - // Character x - propertyValue = [nse nextObject]; - characterDefinition->rect.origin.x = [propertyValue intValue]; - // Character y - propertyValue = [nse nextObject]; - characterDefinition->rect.origin.y = [propertyValue intValue]; - // Character width - propertyValue = [nse nextObject]; - characterDefinition->rect.size.width = [propertyValue intValue]; - // Character height - propertyValue = [nse nextObject]; - characterDefinition->rect.size.height = [propertyValue intValue]; - // Character xoffset - propertyValue = [nse nextObject]; - characterDefinition->xOffset = [propertyValue intValue]; - // Character yoffset - propertyValue = [nse nextObject]; - characterDefinition->yOffset = [propertyValue intValue]; - // Character xadvance - propertyValue = [nse nextObject]; - characterDefinition->xAdvance = [propertyValue intValue]; -} - --(void) parseKerningCapacity:(NSString*) line -{ - // When using uthash there is not need to parse the capacity. - -// NSAssert(!kerningDictionary, @"dictionary already initialized"); -// -// // Break the values for this line up using = -// NSArray *values = [line componentsSeparatedByString:@"="]; -// NSEnumerator *nse = [values objectEnumerator]; -// NSString *propertyValue; -// -// // We need to move past the first entry in the array before we start assigning values -// [nse nextObject]; -// -// // count -// propertyValue = [nse nextObject]; -// int capacity = [propertyValue intValue]; -// -// if( capacity != -1 ) -// kerningDictionary = ccHashSetNew(capacity, targetSetEql); -} - --(void) parseKerningEntry:(NSString*) line -{ - NSArray *values = [line componentsSeparatedByString:@"="]; - NSEnumerator *nse = [values objectEnumerator]; - NSString *propertyValue; - - // We need to move past the first entry in the array before we start assigning values - [nse nextObject]; - - // first - propertyValue = [nse nextObject]; - int first = [propertyValue intValue]; - - // second - propertyValue = [nse nextObject]; - int second = [propertyValue intValue]; - - // second - propertyValue = [nse nextObject]; - int amount = [propertyValue intValue]; - - tKerningHashElement *element = calloc( sizeof( *element ), 1 ); - element->amount = amount; - element->key = (first<<16) | (second&0xffff); - HASH_ADD_INT(kerningDictionary_,key, element); -} - -@end - -#pragma mark - -#pragma mark CCLabelBMFont - -@interface CCLabelBMFont (Private) --(NSString*) atlasNameFromFntFile:(NSString*)fntFile; - --(int) kerningAmountForFirst:(unichar)first second:(unichar)second; - -@end - -@implementation CCLabelBMFont - -@synthesize opacity = opacity_, color = color_; - -#pragma mark BitmapFontAtlas - Purge Cache -+(void) purgeCachedData -{ - FNTConfigRemoveCache(); -} - -#pragma mark BitmapFontAtlas - Creation & Init - -+(id) labelWithString:(NSString *)string fntFile:(NSString *)fntFile -{ - return [[[self alloc] initWithString:string fntFile:fntFile] autorelease]; -} - -// XXX - deprecated - Will be removed in 1.0.1 -+(id) bitmapFontAtlasWithString:(NSString*)string fntFile:(NSString*)fntFile -{ - return [self labelWithString:string fntFile:fntFile]; -} - --(id) initWithString:(NSString*)theString fntFile:(NSString*)fntFile -{ - - [configuration_ release]; // allow re-init - - configuration_ = FNTConfigLoadFile(fntFile); - [configuration_ retain]; - - NSAssert( configuration_, @"Error creating config for BitmapFontAtlas"); - - - if ((self=[super initWithFile:configuration_->atlasName_ capacity:[theString length]])) { - - opacity_ = 255; - color_ = ccWHITE; - - contentSize_ = CGSizeZero; - - opacityModifyRGB_ = [[textureAtlas_ texture] hasPremultipliedAlpha]; - - anchorPoint_ = ccp(0.5f, 0.5f); - - [self setString:theString]; - } - - return self; -} - --(void) dealloc -{ - [string_ release]; - [configuration_ release]; - [super dealloc]; -} - -#pragma mark BitmapFontAtlas - Atlas generation - --(int) kerningAmountForFirst:(unichar)first second:(unichar)second -{ - int ret = 0; - unsigned int key = (first<<16) | (second & 0xffff); - - if( configuration_->kerningDictionary_ ) { - tKerningHashElement *element = NULL; - HASH_FIND_INT(configuration_->kerningDictionary_, &key, element); - if(element) - ret = element->amount; - } - - return ret; -} - --(void) createFontChars -{ - int nextFontPositionX = 0; - int nextFontPositionY = 0; - unichar prev = -1; - int kerningAmount = 0; - - CGSize tmpSize = CGSizeZero; - - int longestLine = 0; - int totalHeight = 0; - - int quantityOfLines = 1; - - NSUInteger stringLen = [string_ length]; - if( ! stringLen ) - return; - - // quantity of lines NEEDS to be calculated before parsing the lines, - // since the Y position needs to be calcualted before hand - for(NSUInteger i=0; i < stringLen-1;i++) { - unichar c = [string_ characterAtIndex:i]; - if( c=='\n') - quantityOfLines++; - } - - totalHeight = configuration_->commonHeight_ * quantityOfLines; - nextFontPositionY = -(configuration_->commonHeight_ - configuration_->commonHeight_*quantityOfLines); - - for(NSUInteger i=0; icommonHeight_; - continue; - } - - kerningAmount = [self kerningAmountForFirst:prev second:c]; - - ccBMFontDef fontDef = configuration_->BMFontArray_[c]; - - CGRect rect = fontDef.rect; - - CCSprite *fontChar; - - fontChar = (CCSprite*) [self getChildByTag:i]; - if( ! fontChar ) { - fontChar = [[CCSprite alloc] initWithBatchNode:self rectInPixels:rect]; - [self addChild:fontChar z:0 tag:i]; - [fontChar release]; - } - else { - // reusing fonts - [fontChar setTextureRectInPixels:rect rotated:NO untrimmedSize:rect.size]; - - // restore to default in case they were modified - fontChar.visible = YES; - fontChar.opacity = 255; - } - - float yOffset = configuration_->commonHeight_ - fontDef.yOffset; - fontChar.positionInPixels = ccp( (float)nextFontPositionX + fontDef.xOffset + fontDef.rect.size.width*0.5f + kerningAmount, - (float)nextFontPositionY + yOffset - rect.size.height*0.5f ); - - // update kerning - nextFontPositionX += configuration_->BMFontArray_[c].xAdvance + kerningAmount; - prev = c; - - // Apply label properties - [fontChar setOpacityModifyRGB:opacityModifyRGB_]; - // Color MUST be set before opacity, since opacity might change color if OpacityModifyRGB is on - [fontChar setColor:color_]; - - // only apply opacity if it is different than 255 ) - // to prevent modifying the color too (issue #610) - if( opacity_ != 255 ) - [fontChar setOpacity: opacity_]; - - if (longestLine < nextFontPositionX) - longestLine = nextFontPositionX; - } - - tmpSize.width = longestLine; - tmpSize.height = totalHeight; - - [self setContentSizeInPixels:tmpSize]; -} - -#pragma mark BitmapFontAtlas - CCLabelProtocol protocol -- (void) setString:(NSString*) newString -{ - [string_ release]; - string_ = [newString copy]; - - CCNode *child; - CCARRAY_FOREACH(children_, child) - child.visible = NO; - - [self createFontChars]; -} - --(NSString*) string -{ - return string_; -} - --(void) setCString:(char*)label -{ - [self setString:[NSString stringWithUTF8String:label]]; -} - -#pragma mark BitmapFontAtlas - CCRGBAProtocol protocol - --(void) setColor:(ccColor3B)color -{ - color_ = color; - - CCSprite *child; - CCARRAY_FOREACH(children_, child) - [child setColor:color_]; -} - --(void) setOpacity:(GLubyte)opacity -{ - opacity_ = opacity; - - id child; - CCARRAY_FOREACH(children_, child) - [child setOpacity:opacity_]; -} --(void) setOpacityModifyRGB:(BOOL)modify -{ - opacityModifyRGB_ = modify; - - id child; - CCARRAY_FOREACH(children_, child) - [child setOpacityModifyRGB:modify]; -} - --(BOOL) doesOpacityModifyRGB -{ - return opacityModifyRGB_; -} - -#pragma mark BitmapFontAtlas - AnchorPoint --(void) setAnchorPoint:(CGPoint)point -{ - if( ! CGPointEqualToPoint(point, anchorPoint_) ) { - [super setAnchorPoint:point]; - [self createFontChars]; - } -} - -#pragma mark BitmapFontAtlas - Debug draw -#if CC_LABELBMFONT_DEBUG_DRAW --(void) draw -{ - [super draw]; - CGSize s = [self contentSize]; - CGPoint vertices[4]={ - ccp(0,0),ccp(s.width,0), - ccp(s.width,s.height),ccp(0,s.height), - }; - ccDrawPoly(vertices, 4, YES); -} -#endif // CC_LABELBMFONT_DEBUG_DRAW -@end diff --git a/Littlest/libs/cocos2d/CCLabelTTF.h b/Littlest/libs/cocos2d/CCLabelTTF.h deleted file mode 100644 index 66cdda7..0000000 --- a/Littlest/libs/cocos2d/CCLabelTTF.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * cocos2d for iPhone: http://www.cocos2d-iphone.org - * - * Copyright (c) 2008-2010 Ricardo Quesada - * - * 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 followi