Merge pull request #3185 from dumganhar/iss2404-deprecated

issue 2404: Marking CC prefix classes as deprecated.
This commit is contained in:
James Chen 2013-07-18 00:01:47 -07:00
commit 90a1dcfdf9
11 changed files with 512 additions and 77 deletions

View File

@ -32,7 +32,6 @@
#include "cocoa/CCGeometry.h" #include "cocoa/CCGeometry.h"
#include "ccTypes.h" #include "ccTypes.h"
NS_CC_BEGIN NS_CC_BEGIN
/** /**
@ -391,13 +390,13 @@ CC_DEPRECATED_ATTRIBUTE inline Rect CCRectMake(float x, float y, float width, fl
} }
CC_DEPRECATED_ATTRIBUTE const Point PointZero = Point::ZERO; CC_DEPRECATED_ATTRIBUTE const Point CCPointZero = Point::ZERO;
/* The "zero" size -- equivalent to Size(0, 0). */ /* The "zero" size -- equivalent to Size(0, 0). */
CC_DEPRECATED_ATTRIBUTE const Size SizeZero = Size::ZERO; CC_DEPRECATED_ATTRIBUTE const Size CCSizeZero = Size::ZERO;
/* The "zero" rectangle -- equivalent to Rect(0, 0, 0, 0). */ /* The "zero" rectangle -- equivalent to Rect(0, 0, 0, 0). */
CC_DEPRECATED_ATTRIBUTE const Rect RectZero = Rect::ZERO; CC_DEPRECATED_ATTRIBUTE const Rect CCRectZero = Rect::ZERO;
CC_DEPRECATED_ATTRIBUTE const Color3B ccWHITE = Color3B::WHITE; CC_DEPRECATED_ATTRIBUTE const Color3B ccWHITE = Color3B::WHITE;
@ -454,6 +453,460 @@ CC_DEPRECATED_ATTRIBUTE static inline bool ccc4FEqual(Color4F a, Color4F b)
return a.r == b.r && a.g == b.g && a.b == b.b && a.a == b.a; return a.r == b.r && a.g == b.g && a.b == b.b && a.a == b.a;
} }
CC_DEPRECATED_ATTRIBUTE static inline Vertex2F vertex2(const float x, const float y)
{
Vertex2F c(x, y);
return c;
}
CC_DEPRECATED_ATTRIBUTE static inline Vertex3F vertex3(const float x, const float y, const float z)
{
Vertex3F c(x, y, z);
return c;
}
CC_DEPRECATED_ATTRIBUTE static inline Tex2F tex2(const float u, const float v)
{
Tex2F t(u , v);
return t;
}
#define CCAffineTransformMake AffineTransformMake
#define CCPointApplyAffineTransform PointApplyAffineTransform
#define CCSizeApplyAffineTransform SizeApplyAffineTransform
CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformMakeIdentity()
{
return AffineTransformMakeIdentity();
}
CC_DEPRECATED_ATTRIBUTE static inline Rect CCRectApplyAffineTransform(const Rect& rect, const AffineTransform& anAffineTransform)
{
return RectApplyAffineTransform(rect, anAffineTransform);
}
CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformTranslate(const AffineTransform& t, float tx, float ty)
{
return AffineTransformTranslate(t, tx, ty);
}
CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformRotate(const AffineTransform& aTransform, float anAngle)
{
return AffineTransformRotate(aTransform, anAngle);
}
CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformScale(const AffineTransform& t, float sx, float sy)
{
return AffineTransformScale(t, sx, sy);
}
CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformConcat(const AffineTransform& t1, const AffineTransform& t2)
{
return AffineTransformConcat(t1, t2);
}
CC_DEPRECATED_ATTRIBUTE static inline bool CCAffineTransformEqualToTransform(const AffineTransform& t1, const AffineTransform& t2)
{
return AffineTransformEqualToTransform(t1, t2);
}
CC_DEPRECATED_ATTRIBUTE static inline AffineTransform CCAffineTransformInvert(const AffineTransform& t)
{
return AffineTransformInvert(t);
}
#define CCAffineTransformIdentity AffineTransformIdentity
// CC prefix compatibility
CC_DEPRECATED_ATTRIBUTE typedef Object CCObject;
CC_DEPRECATED_ATTRIBUTE typedef Event CCEvent;
CC_DEPRECATED_ATTRIBUTE typedef Integer CCInteger;
CC_DEPRECATED_ATTRIBUTE typedef String CCString;
CC_DEPRECATED_ATTRIBUTE typedef Bool CCBool;
CC_DEPRECATED_ATTRIBUTE typedef Float CCFloat;
CC_DEPRECATED_ATTRIBUTE typedef Double CCDouble;
CC_DEPRECATED_ATTRIBUTE typedef Data CCData;
CC_DEPRECATED_ATTRIBUTE typedef Set CCSet;
CC_DEPRECATED_ATTRIBUTE typedef Array CCArray;
CC_DEPRECATED_ATTRIBUTE typedef Dictionary CCDictionary;
CC_DEPRECATED_ATTRIBUTE typedef DataVisitor CCDataVisitor;
CC_DEPRECATED_ATTRIBUTE typedef PrettyPrinter CCPrettyPrinter;
CC_DEPRECATED_ATTRIBUTE typedef Acceleration CCAcceleration;
CC_DEPRECATED_ATTRIBUTE typedef TextureAtlas CCTextureAtlas;
CC_DEPRECATED_ATTRIBUTE typedef Configuration CCConfiguration;
CC_DEPRECATED_ATTRIBUTE typedef PointArray CCPointArray;
CC_DEPRECATED_ATTRIBUTE typedef SetIterator CCSetIterator;
CC_DEPRECATED_ATTRIBUTE typedef RemoveSelf CCRemoveSelf;
CC_DEPRECATED_ATTRIBUTE typedef IMEDelegate CCIMEDelegate;
CC_DEPRECATED_ATTRIBUTE typedef IMEKeyboardNotificationInfo CCIMEKeyboardNotificationInfo;
CC_DEPRECATED_ATTRIBUTE typedef TextFieldDelegate CCTextFieldDelegate;
CC_DEPRECATED_ATTRIBUTE typedef TextFieldTTF CCTextFieldTTF;
CC_DEPRECATED_ATTRIBUTE typedef NotificationCenter CCNotificationCenter;
CC_DEPRECATED_ATTRIBUTE typedef TargetedTouchDelegate CCTargetedTouchDelegate;
CC_DEPRECATED_ATTRIBUTE typedef StandardTouchDelegate CCStandardTouchDelegate;
CC_DEPRECATED_ATTRIBUTE typedef TouchDelegate CCTouchDelegate;
CC_DEPRECATED_ATTRIBUTE typedef Image CCImage;
CC_DEPRECATED_ATTRIBUTE typedef UserDefault CCUserDefault;
CC_DEPRECATED_ATTRIBUTE typedef Action CCAction;
CC_DEPRECATED_ATTRIBUTE typedef FiniteTimeAction CCFiniteTimeAction;
CC_DEPRECATED_ATTRIBUTE typedef Speed CCSpeed;
CC_DEPRECATED_ATTRIBUTE typedef Follow CCFollow;
CC_DEPRECATED_ATTRIBUTE typedef GLProgram CCGLProgram;
CC_DEPRECATED_ATTRIBUTE typedef Touch CCTouch;
CC_DEPRECATED_ATTRIBUTE typedef Set CCSet;
CC_DEPRECATED_ATTRIBUTE typedef Texture2D CCTexture2D;
CC_DEPRECATED_ATTRIBUTE typedef Node CCNode;
CC_DEPRECATED_ATTRIBUTE typedef NodeRGBA CCNodeRGBA;
CC_DEPRECATED_ATTRIBUTE typedef RGBAProtocol CCRGBAProtocol;
CC_DEPRECATED_ATTRIBUTE typedef SpriteFrame CCSpriteFrame;
CC_DEPRECATED_ATTRIBUTE typedef AnimationFrame CCAnimationFrame;
CC_DEPRECATED_ATTRIBUTE typedef Animation CCAnimation;
CC_DEPRECATED_ATTRIBUTE typedef ActionInterval CCActionInterval;
CC_DEPRECATED_ATTRIBUTE typedef Sequence CCSequence;
CC_DEPRECATED_ATTRIBUTE typedef Repeat CCRepeat;
CC_DEPRECATED_ATTRIBUTE typedef RepeatForever CCRepeatForever;
CC_DEPRECATED_ATTRIBUTE typedef Spawn CCSpawn;
CC_DEPRECATED_ATTRIBUTE typedef RotateTo CCRotateTo;
CC_DEPRECATED_ATTRIBUTE typedef RotateBy CCRotateBy;
CC_DEPRECATED_ATTRIBUTE typedef MoveBy CCMoveBy;
CC_DEPRECATED_ATTRIBUTE typedef MoveTo CCMoveTo;
CC_DEPRECATED_ATTRIBUTE typedef SkewTo CCSkewTo;
CC_DEPRECATED_ATTRIBUTE typedef SkewBy CCSkewBy;
CC_DEPRECATED_ATTRIBUTE typedef JumpBy CCJumpBy;
CC_DEPRECATED_ATTRIBUTE typedef JumpTo CCJumpTo;
CC_DEPRECATED_ATTRIBUTE typedef BezierBy CCBezierBy;
CC_DEPRECATED_ATTRIBUTE typedef BezierTo CCBezierTo;
CC_DEPRECATED_ATTRIBUTE typedef ScaleTo CCScaleTo;
CC_DEPRECATED_ATTRIBUTE typedef ScaleBy CCScaleBy;
CC_DEPRECATED_ATTRIBUTE typedef Blink CCBlink;
CC_DEPRECATED_ATTRIBUTE typedef FadeIn CCFadeIn;
CC_DEPRECATED_ATTRIBUTE typedef FadeOut CCFadeOut;
CC_DEPRECATED_ATTRIBUTE typedef FadeTo CCFadeTo;
CC_DEPRECATED_ATTRIBUTE typedef TintTo CCTintTo;
CC_DEPRECATED_ATTRIBUTE typedef TintBy CCTintBy;
CC_DEPRECATED_ATTRIBUTE typedef DelayTime CCDelayTime;
CC_DEPRECATED_ATTRIBUTE typedef Animate CCAnimate;
CC_DEPRECATED_ATTRIBUTE typedef TargetedAction CCTargetedAction;
CC_DEPRECATED_ATTRIBUTE typedef ActionCamera CCActionCamera;
CC_DEPRECATED_ATTRIBUTE typedef OrbitCamera CCOrbitCamera;
CC_DEPRECATED_ATTRIBUTE typedef ActionManager CCActionManager;
CC_DEPRECATED_ATTRIBUTE typedef ActionEase CCActionEase;
CC_DEPRECATED_ATTRIBUTE typedef EaseRateAction CCEaseRateAction;
CC_DEPRECATED_ATTRIBUTE typedef EaseIn CCEaseIn;
CC_DEPRECATED_ATTRIBUTE typedef EaseOut CCEaseOut;
CC_DEPRECATED_ATTRIBUTE typedef EaseInOut CCEaseInOut;
CC_DEPRECATED_ATTRIBUTE typedef EaseExponentialIn CCEaseExponentialIn;
CC_DEPRECATED_ATTRIBUTE typedef EaseExponentialOut CCEaseExponentialOut;
CC_DEPRECATED_ATTRIBUTE typedef EaseExponentialInOut CCEaseExponentialInOut;
CC_DEPRECATED_ATTRIBUTE typedef EaseSineIn CCEaseSineIn;
CC_DEPRECATED_ATTRIBUTE typedef EaseSineOut CCEaseSineOut;
CC_DEPRECATED_ATTRIBUTE typedef EaseSineInOut CCEaseSineInOut;
CC_DEPRECATED_ATTRIBUTE typedef EaseElastic CCEaseElastic;
CC_DEPRECATED_ATTRIBUTE typedef EaseElasticIn CCEaseElasticIn;
CC_DEPRECATED_ATTRIBUTE typedef EaseElasticOut CCEaseElasticOut;
CC_DEPRECATED_ATTRIBUTE typedef EaseElasticInOut CCEaseElasticInOut;
CC_DEPRECATED_ATTRIBUTE typedef EaseBounce CCEaseBounce;
CC_DEPRECATED_ATTRIBUTE typedef EaseBounceIn CCEaseBounceIn;
CC_DEPRECATED_ATTRIBUTE typedef EaseBounceOut CCEaseBounceOut;
CC_DEPRECATED_ATTRIBUTE typedef EaseBounceInOut CCEaseBounceInOut;
CC_DEPRECATED_ATTRIBUTE typedef EaseBackIn CCEaseBackIn;
CC_DEPRECATED_ATTRIBUTE typedef EaseBackOut CCEaseBackOut;
CC_DEPRECATED_ATTRIBUTE typedef EaseBackInOut CCEaseBackInOut;
CC_DEPRECATED_ATTRIBUTE typedef ActionInstant CCActionInstant;
CC_DEPRECATED_ATTRIBUTE typedef Show CCShow;
CC_DEPRECATED_ATTRIBUTE typedef Hide CCHide;
CC_DEPRECATED_ATTRIBUTE typedef ToggleVisibility CCToggleVisibility;
CC_DEPRECATED_ATTRIBUTE typedef FlipX CCFlipX;
CC_DEPRECATED_ATTRIBUTE typedef FlipY CCFlipY;
CC_DEPRECATED_ATTRIBUTE typedef Place CCPlace;
CC_DEPRECATED_ATTRIBUTE typedef CallFunc CCCallFunc;
CC_DEPRECATED_ATTRIBUTE typedef GridAction CCGridAction;
CC_DEPRECATED_ATTRIBUTE typedef Grid3DAction CCGrid3DAction;
CC_DEPRECATED_ATTRIBUTE typedef TiledGrid3DAction CCTiledGrid3DAction;
CC_DEPRECATED_ATTRIBUTE typedef StopGrid CCStopGrid;
CC_DEPRECATED_ATTRIBUTE typedef ReuseGrid CCReuseGrid;
CC_DEPRECATED_ATTRIBUTE typedef Waves3D CCWaves3D;
CC_DEPRECATED_ATTRIBUTE typedef FlipX3D CCFlipX3D;
CC_DEPRECATED_ATTRIBUTE typedef FlipY3D CCFlipY3D;
CC_DEPRECATED_ATTRIBUTE typedef Lens3D CCLens3D;
CC_DEPRECATED_ATTRIBUTE typedef Ripple3D CCRipple3D;
CC_DEPRECATED_ATTRIBUTE typedef Shaky3D CCShaky3D;
CC_DEPRECATED_ATTRIBUTE typedef Liquid CCLiquid;
CC_DEPRECATED_ATTRIBUTE typedef Waves CCWaves;
CC_DEPRECATED_ATTRIBUTE typedef Twirl CCTwirl;
CC_DEPRECATED_ATTRIBUTE typedef PageTurn3D CCPageTurn3D;
CC_DEPRECATED_ATTRIBUTE typedef ProgressTo CCProgressTo;
CC_DEPRECATED_ATTRIBUTE typedef ProgressFromTo CCProgressFromTo;
CC_DEPRECATED_ATTRIBUTE typedef ShakyTiles3D CCShakyTiles3D;
CC_DEPRECATED_ATTRIBUTE typedef ShatteredTiles3D CCShatteredTiles3D;
CC_DEPRECATED_ATTRIBUTE typedef ShuffleTiles CCShuffleTiles;
CC_DEPRECATED_ATTRIBUTE typedef FadeOutTRTiles CCFadeOutTRTiles;
CC_DEPRECATED_ATTRIBUTE typedef FadeOutBLTiles CCFadeOutBLTiles;
CC_DEPRECATED_ATTRIBUTE typedef FadeOutUpTiles CCFadeOutUpTiles;
CC_DEPRECATED_ATTRIBUTE typedef FadeOutDownTiles CCFadeOutDownTiles;
CC_DEPRECATED_ATTRIBUTE typedef TurnOffTiles CCTurnOffTiles;
CC_DEPRECATED_ATTRIBUTE typedef WavesTiles3D CCWavesTiles3D;
CC_DEPRECATED_ATTRIBUTE typedef JumpTiles3D CCJumpTiles3D;
CC_DEPRECATED_ATTRIBUTE typedef SplitRows CCSplitRows;
CC_DEPRECATED_ATTRIBUTE typedef SplitCols CCSplitCols;
CC_DEPRECATED_ATTRIBUTE typedef ActionTween CCActionTween;
CC_DEPRECATED_ATTRIBUTE typedef CardinalSplineTo CCCardinalSplineTo;
CC_DEPRECATED_ATTRIBUTE typedef CardinalSplineBy CCCardinalSplineBy;
CC_DEPRECATED_ATTRIBUTE typedef CatmullRomTo CCCatmullRomTo;
CC_DEPRECATED_ATTRIBUTE typedef CatmullRomBy CCCatmullRomBy;
CC_DEPRECATED_ATTRIBUTE typedef AtlasNode CCAtlasNode;
CC_DEPRECATED_ATTRIBUTE typedef TextureProtocol CCTextureProtocol;
CC_DEPRECATED_ATTRIBUTE typedef BlendProtocol CCBlendProtocol;
CC_DEPRECATED_ATTRIBUTE typedef DrawNode CCDrawNode;
CC_DEPRECATED_ATTRIBUTE typedef Camera CCCamera;
CC_DEPRECATED_ATTRIBUTE typedef LabelAtlas CCLabelAtlas;
CC_DEPRECATED_ATTRIBUTE typedef LabelProtocol CCLabelProtocol;
CC_DEPRECATED_ATTRIBUTE typedef Director CCDirector;
CC_DEPRECATED_ATTRIBUTE typedef GridBase CCGridBase;
CC_DEPRECATED_ATTRIBUTE typedef Grid3D CCGrid3D;
CC_DEPRECATED_ATTRIBUTE typedef TiledGrid3D CCTiledGrid3D;
CC_DEPRECATED_ATTRIBUTE typedef Sprite CCSprite;
CC_DEPRECATED_ATTRIBUTE typedef LabelTTF CCLabelTTF;
CC_DEPRECATED_ATTRIBUTE typedef SpriteBatchNode CCSpriteBatchNode;
CC_DEPRECATED_ATTRIBUTE typedef LabelBMFont CCLabelBMFont;
CC_DEPRECATED_ATTRIBUTE typedef Layer CCLayer;
CC_DEPRECATED_ATTRIBUTE typedef TouchDelegate CCTouchDelegate;
CC_DEPRECATED_ATTRIBUTE typedef KeypadDelegate CCKeypadDelegate;
CC_DEPRECATED_ATTRIBUTE typedef LayerRGBA CCLayerRGBA;
CC_DEPRECATED_ATTRIBUTE typedef LayerColor CCLayerColor;
CC_DEPRECATED_ATTRIBUTE typedef LayerGradient CCLayerGradient;
CC_DEPRECATED_ATTRIBUTE typedef LayerMultiplex CCLayerMultiplex;
CC_DEPRECATED_ATTRIBUTE typedef Scene CCScene;
CC_DEPRECATED_ATTRIBUTE typedef TransitionEaseScene CCTransitionEaseScene;
CC_DEPRECATED_ATTRIBUTE typedef TransitionScene CCTransitionScene;
CC_DEPRECATED_ATTRIBUTE typedef TransitionSceneOriented CCTransitionSceneOriented;
CC_DEPRECATED_ATTRIBUTE typedef TransitionRotoZoom CCTransitionRotoZoom;
CC_DEPRECATED_ATTRIBUTE typedef TransitionJumpZoom CCTransitionJumpZoom;
CC_DEPRECATED_ATTRIBUTE typedef TransitionMoveInL CCTransitionMoveInL;
CC_DEPRECATED_ATTRIBUTE typedef TransitionMoveInR CCTransitionMoveInR;
CC_DEPRECATED_ATTRIBUTE typedef TransitionMoveInT CCTransitionMoveInT;
CC_DEPRECATED_ATTRIBUTE typedef TransitionMoveInB CCTransitionMoveInB;
CC_DEPRECATED_ATTRIBUTE typedef TransitionSlideInL CCTransitionSlideInL;
CC_DEPRECATED_ATTRIBUTE typedef TransitionSlideInR CCTransitionSlideInR;
CC_DEPRECATED_ATTRIBUTE typedef TransitionSlideInB CCTransitionSlideInB;
CC_DEPRECATED_ATTRIBUTE typedef TransitionSlideInT CCTransitionSlideInT;
CC_DEPRECATED_ATTRIBUTE typedef TransitionShrinkGrow CCTransitionShrinkGrow;
CC_DEPRECATED_ATTRIBUTE typedef TransitionFlipX CCTransitionFlipX;
CC_DEPRECATED_ATTRIBUTE typedef TransitionFlipY CCTransitionFlipY;
CC_DEPRECATED_ATTRIBUTE typedef TransitionFlipAngular CCTransitionFlipAngular;
CC_DEPRECATED_ATTRIBUTE typedef TransitionZoomFlipX CCTransitionZoomFlipX;
CC_DEPRECATED_ATTRIBUTE typedef TransitionZoomFlipY CCTransitionZoomFlipY;
CC_DEPRECATED_ATTRIBUTE typedef TransitionZoomFlipAngular CCTransitionZoomFlipAngular;
CC_DEPRECATED_ATTRIBUTE typedef TransitionFade CCTransitionFade;
CC_DEPRECATED_ATTRIBUTE typedef TransitionCrossFade CCTransitionCrossFade;
CC_DEPRECATED_ATTRIBUTE typedef TransitionTurnOffTiles CCTransitionTurnOffTiles;
CC_DEPRECATED_ATTRIBUTE typedef TransitionSplitCols CCTransitionSplitCols;
CC_DEPRECATED_ATTRIBUTE typedef TransitionSplitRows CCTransitionSplitRows;
CC_DEPRECATED_ATTRIBUTE typedef TransitionFadeTR CCTransitionFadeTR;
CC_DEPRECATED_ATTRIBUTE typedef TransitionFadeBL CCTransitionFadeBL;
CC_DEPRECATED_ATTRIBUTE typedef TransitionFadeUp CCTransitionFadeUp;
CC_DEPRECATED_ATTRIBUTE typedef TransitionFadeDown CCTransitionFadeDown;
CC_DEPRECATED_ATTRIBUTE typedef TransitionPageTurn CCTransitionPageTurn;
CC_DEPRECATED_ATTRIBUTE typedef TransitionProgress CCTransitionProgress;
CC_DEPRECATED_ATTRIBUTE typedef TransitionProgressRadialCCW CCTransitionProgressRadialCCW;
CC_DEPRECATED_ATTRIBUTE typedef TransitionProgressRadialCW CCTransitionProgressRadialCW;
CC_DEPRECATED_ATTRIBUTE typedef TransitionProgressHorizontal CCTransitionProgressHorizontal;
CC_DEPRECATED_ATTRIBUTE typedef TransitionProgressVertical CCTransitionProgressVertical;
CC_DEPRECATED_ATTRIBUTE typedef TransitionProgressInOut CCTransitionProgressInOut;
CC_DEPRECATED_ATTRIBUTE typedef TransitionProgressOutIn CCTransitionProgressOutIn;
CC_DEPRECATED_ATTRIBUTE typedef MenuItem CCMenuItem;
CC_DEPRECATED_ATTRIBUTE typedef MenuItemLabel CCMenuItemLabel;
CC_DEPRECATED_ATTRIBUTE typedef MenuItemAtlasFont CCMenuItemAtlasFont;
CC_DEPRECATED_ATTRIBUTE typedef MenuItemFont CCMenuItemFont;
CC_DEPRECATED_ATTRIBUTE typedef MenuItemSprite CCMenuItemSprite;
CC_DEPRECATED_ATTRIBUTE typedef MenuItemImage CCMenuItemImage;
CC_DEPRECATED_ATTRIBUTE typedef MenuItemToggle CCMenuItemToggle;
CC_DEPRECATED_ATTRIBUTE typedef Menu CCMenu;
CC_DEPRECATED_ATTRIBUTE typedef ClippingNode CCClippingNode;
CC_DEPRECATED_ATTRIBUTE typedef MotionStreak CCMotionStreak;
CC_DEPRECATED_ATTRIBUTE typedef ProgressTimer CCProgressTimer;
CC_DEPRECATED_ATTRIBUTE typedef RenderTexture CCRenderTexture;
CC_DEPRECATED_ATTRIBUTE typedef ParticleBatchNode CCParticleBatchNode;
CC_DEPRECATED_ATTRIBUTE typedef ParticleSystem CCParticleSystem;
CC_DEPRECATED_ATTRIBUTE typedef ParticleSystemQuad CCParticleSystemQuad;
CC_DEPRECATED_ATTRIBUTE typedef ParticleFire CCParticleFire;
CC_DEPRECATED_ATTRIBUTE typedef ParticleFireworks CCParticleFireworks;
CC_DEPRECATED_ATTRIBUTE typedef ParticleSun CCParticleSun;
CC_DEPRECATED_ATTRIBUTE typedef ParticleGalaxy CCParticleGalaxy;
CC_DEPRECATED_ATTRIBUTE typedef ParticleFlower CCParticleFlower;
CC_DEPRECATED_ATTRIBUTE typedef ParticleMeteor CCParticleMeteor;
CC_DEPRECATED_ATTRIBUTE typedef ParticleSpiral CCParticleSpiral;
CC_DEPRECATED_ATTRIBUTE typedef ParticleExplosion CCParticleExplosion;
CC_DEPRECATED_ATTRIBUTE typedef ParticleSmoke CCParticleSmoke;
CC_DEPRECATED_ATTRIBUTE typedef ParticleSnow CCParticleSnow;
CC_DEPRECATED_ATTRIBUTE typedef ParticleRain CCParticleRain;
CC_DEPRECATED_ATTRIBUTE typedef FileUtils CCFileUtils;
CC_DEPRECATED_ATTRIBUTE typedef Application CCApplication;
CC_DEPRECATED_ATTRIBUTE typedef ShaderCache CCShaderCache;
CC_DEPRECATED_ATTRIBUTE typedef AnimationCache CCAnimationCache;
CC_DEPRECATED_ATTRIBUTE typedef SpriteFrameCache CCSpriteFrameCache;
CC_DEPRECATED_ATTRIBUTE typedef TextureCache CCTextureCache;
CC_DEPRECATED_ATTRIBUTE typedef ParallaxNode CCParallaxNode;
CC_DEPRECATED_ATTRIBUTE typedef TMXObjectGroup CCTMXObjectGroup;
CC_DEPRECATED_ATTRIBUTE typedef TMXLayerInfo CCTMXLayerInfo;
CC_DEPRECATED_ATTRIBUTE typedef TMXTilesetInfo CCTMXTilesetInfo;
CC_DEPRECATED_ATTRIBUTE typedef TMXMapInfo CCTMXMapInfo;
CC_DEPRECATED_ATTRIBUTE typedef TMXLayer CCTMXLayer;
CC_DEPRECATED_ATTRIBUTE typedef TMXTiledMap CCTMXTiledMap;
CC_DEPRECATED_ATTRIBUTE typedef TileMapAtlas CCTileMapAtlas;
CC_DEPRECATED_ATTRIBUTE typedef Timer CCTimer;
CC_DEPRECATED_ATTRIBUTE typedef Scheduler CCScheduler;
CC_DEPRECATED_ATTRIBUTE typedef EGLView CCEGLView;
CC_DEPRECATED_ATTRIBUTE typedef AffineTransform CCAffineTransform;
CC_DEPRECATED_ATTRIBUTE typedef Point CCPoint;
CC_DEPRECATED_ATTRIBUTE typedef Size CCSize;
CC_DEPRECATED_ATTRIBUTE typedef Rect CCRect;
CC_DEPRECATED_ATTRIBUTE typedef Color3B ccColor3B;
CC_DEPRECATED_ATTRIBUTE typedef Color4F ccColor4F;
CC_DEPRECATED_ATTRIBUTE typedef Color4B ccColor4B;
CC_DEPRECATED_ATTRIBUTE typedef Vertex2F ccVertex2F;
CC_DEPRECATED_ATTRIBUTE typedef Vertex3F ccVertex3F;
CC_DEPRECATED_ATTRIBUTE typedef Tex2F ccTex2F;
CC_DEPRECATED_ATTRIBUTE typedef PointSprite ccPointSprite;
CC_DEPRECATED_ATTRIBUTE typedef Quad2 ccQuad2;
CC_DEPRECATED_ATTRIBUTE typedef Quad3 ccQuad3;
CC_DEPRECATED_ATTRIBUTE typedef V2F_C4B_T2F ccV2F_C4B_T2F;
CC_DEPRECATED_ATTRIBUTE typedef V2F_C4F_T2F ccV2F_C4F_T2F;
CC_DEPRECATED_ATTRIBUTE typedef V3F_C4B_T2F ccV3F_C4B_T2F;
CC_DEPRECATED_ATTRIBUTE typedef V2F_C4B_T2F_Triangle ccV2F_C4B_T2F_Triangle;
CC_DEPRECATED_ATTRIBUTE typedef V2F_C4B_T2F_Quad ccV2F_C4B_T2F_Quad;
CC_DEPRECATED_ATTRIBUTE typedef V3F_C4B_T2F_Quad ccV3F_C4B_T2F_Quad;
CC_DEPRECATED_ATTRIBUTE typedef V2F_C4F_T2F_Quad ccV2F_C4F_T2F_Quad;
CC_DEPRECATED_ATTRIBUTE typedef BlendFunc ccBlendFunc;
CC_DEPRECATED_ATTRIBUTE typedef T2F_Quad ccT2F_Quad;
CC_DEPRECATED_ATTRIBUTE typedef AnimationFrameData ccAnimationFrameData;
CC_DEPRECATED_ATTRIBUTE typedef FontShadow ccFontShadow;
CC_DEPRECATED_ATTRIBUTE typedef FontStroke ccFontStroke;
CC_DEPRECATED_ATTRIBUTE typedef FontDefinition ccFontDefinition;
CC_DEPRECATED_ATTRIBUTE typedef VerticalTextAlignment CCVerticalTextAlignment;
CC_DEPRECATED_ATTRIBUTE typedef TextAlignment CCTextAlignment;
CC_DEPRECATED_ATTRIBUTE typedef ProgressTimerType CCProgressTimerType;
CC_DEPRECATED_ATTRIBUTE typedef void* CCZone;
#define kCCVertexAttrib_Position kVertexAttrib_Position
#define kCCVertexAttrib_Color kVertexAttrib_Color
#define kCCVertexAttrib_TexCoords kVertexAttrib_TexCoords
#define kCCVertexAttrib_MAX kVertexAttrib_MAX
#define kCCUniformPMatrix kUniformPMatrix
#define kCCUniformMVMatrix kUniformMVMatrix
#define kCCUniformMVPMatrix kUniformMVPMatrix
#define kCCUniformTime kUniformTime
#define kCCUniformSinTime kUniformSinTime
#define kCCUniformCosTime kUniformCosTime
#define kCCUniformRandom01 kUniformRandom01
#define kCCUniformSampler kUniformSampler
#define kCCUniform_MAX kUniform_MAX
#define kCCShader_PositionTextureColor kShader_PositionTextureColor
#define kCCShader_PositionTextureColorAlphaTest kShader_PositionTextureColorAlphaTest
#define kCCShader_PositionColor kShader_PositionColor
#define kCCShader_PositionTexture kShader_PositionTexture
#define kCCShader_PositionTexture_uColor kShader_PositionTexture_uColor
#define kCCShader_PositionTextureA8Color kShader_PositionTextureA8Color
#define kCCShader_Position_uColor kShader_Position_uColor
#define kCCShader_PositionLengthTexureColor kShader_PositionLengthTexureColor
// uniform names
#define kCCUniformPMatrix_s kUniformPMatrix_s
#define kCCUniformMVMatrix_s kUniformMVMatrix_s
#define kCCUniformMVPMatrix_s kUniformMVPMatrix_s
#define kCCUniformTime_s kUniformTime_s
#define kCCUniformSinTime_s kUniformSinTime_s
#define kCCUniformCosTime_s kUniformCosTime_s
#define kCCUniformRandom01_s kUniformRandom01_s
#define kCCUniformSampler_s kUniformSampler_s
#define kCCUniformAlphaTestValue kUniformAlphaTestValue
// Attribute names
#define kCCAttributeNameColor kAttributeNameColor
#define kCCAttributeNamePosition kAttributeNamePosition
#define kCCAttributeNameTexCoord kAttributeNameTexCoord
#define kCCVertexAttribFlag_None kVertexAttribFlag_None
#define kCCVertexAttribFlag_Position kVertexAttribFlag_Position
#define kCCVertexAttribFlag_Color kVertexAttribFlag_Color
#define kCCVertexAttribFlag_TexCoords kVertexAttribFlag_TexCoords
#define kCCVertexAttribFlag_PosColorTex kVertexAttribFlag_PosColorTex
#define kCCProgressTimerTypeRadial kProgressTimerTypeRadial
#define kCCProgressTimerTypeBar kProgressTimerTypeBar
#define kCCDirectorProjection2D kDirectorProjection2D
#define kCCDirectorProjection3D kDirectorProjection3D
#define kCCDirectorProjectionCustom kDirectorProjectionCustom
#define kCCDirectorProjectionDefault kDirectorProjectionDefault
#define kCCVerticalTextAlignmentTop kVerticalTextAlignmentTop
#define kCCVerticalTextAlignmentCenter kVerticalTextAlignmentCenter
#define kCCVerticalTextAlignmentBottom kVerticalTextAlignmentBottom
#define kCCTextAlignmentLeft kTextAlignmentLeft
#define kCCTextAlignmentCenter kTextAlignmentCenter
#define kCCTextAlignmentRight kTextAlignmentRight
#define kCCTexture2DPixelFormat_RGBA8888 kTexture2DPixelFormat_RGBA8888
#define kCCTexture2DPixelFormat_RGB888 kTexture2DPixelFormat_RGB888
#define kCCTexture2DPixelFormat_RGB565 kTexture2DPixelFormat_RGB565
#define kCCTexture2DPixelFormat_A8 kTexture2DPixelFormat_A8
#define kCCTexture2DPixelFormat_I8 kTexture2DPixelFormat_I8
#define kCCTexture2DPixelFormat_AI88 kTexture2DPixelFormat_AI88
#define kCCTexture2DPixelFormat_RGBA4444 kTexture2DPixelFormat_RGBA4444
#define kCCTexture2DPixelFormat_RGB5A1 kTexture2DPixelFormat_RGB5A1
#define kCCTexture2DPixelFormat_PVRTC4 kTexture2DPixelFormat_PVRTC4
#define kCCTexture2DPixelFormat_PVRTC2 kTexture2DPixelFormat_PVRTC2
#define kCCTexture2DPixelFormat_Default kTexture2DPixelFormat_Default
#define kCCLabelAutomaticWidth kLabelAutomaticWidth
#define kCCParticleDurationInfinity kParticleDurationInfinity
#define kCCParticleStartSizeEqualToEndSize kParticleStartSizeEqualToEndSize
#define kCCParticleStartRadiusEqualToEndRadius kParticleStartRadiusEqualToEndRadius
#define kCCParticleModeGravity kParticleModeGravity
#define kCCParticleModeRadius kParticleModeRadius
#define kCCPositionTypeFree kPositionTypeFree
#define kCCPositionTypeRelative kPositionTypeRelative
#define kCCPositionTypeGrouped kPositionTypeGrouped
#define kCCBlendFuncDisable kBlendFuncDisable
#define kCCMenuHandlerPriority kMenuHandlerPriority
#define kCCMenuStateWaiting kMenuStateWaiting
#define kCCMenuStateTrackingTouch kMenuStateTrackingTouch
#define kCCTouchesOneByOne kTouchesOneByOne
#define kCCTouchesAllAtOnce kTouchesAllAtOnce
#define kCCImageFormatPNG kImageFormatPNG
#define kCCImageFormatJPEG kImageFormatJPEG
#define kCCTransitionOrientationLeftOver kTransitionOrientationLeftOver
#define kCCTransitionOrientationRightOver kTransitionOrientationRightOver
#define kCCTransitionOrientationUpOver kTransitionOrientationUpOver
#define kCCTransitionOrientationDownOver kTransitionOrientationDownOver
#define kCCPrioritySystem kPrioritySystem
#define kCCPriorityNonSystemMin kPriorityNonSystemMin
#define kCCTMXTileHorizontalFlag kTMXTileHorizontalFlag
#define kCCTMXTileVerticalFlag kTMXTileVerticalFlag
#define kCCTMXTileDiagonalFlag kTMXTileDiagonalFlag
#define kCCFlipedAll kFlipedAll
#define kCCFlippedMask kFlippedMask
// end of data_structures group // end of data_structures group
/// @} /// @}

View File

@ -85,7 +85,7 @@ THE SOFTWARE.
#include "ccConfig.h" #include "ccConfig.h"
#include "ccMacros.h" #include "ccMacros.h"
#include "ccTypes.h" #include "ccTypes.h"
#include "CCDeprecated.h"
// kazmath // kazmath
#include "kazmath/include/kazmath/kazmath.h" #include "kazmath/include/kazmath/kazmath.h"
@ -276,6 +276,9 @@ THE SOFTWARE.
#include "support/component/CCComponent.h" #include "support/component/CCComponent.h"
#include "support/component/CCComponentContainer.h" #include "support/component/CCComponentContainer.h"
// Deprecated include
#include "CCDeprecated.h"
NS_CC_BEGIN NS_CC_BEGIN
CC_DLL const char* cocos2dVersion(); CC_DLL const char* cocos2dVersion();

View File

@ -33,6 +33,8 @@ THE SOFTWARE.
#include <stdio.h> #include <stdio.h>
#include <unistd.h> #include <unistd.h>
NS_CC_BEGIN
typedef struct typedef struct
{ {
unsigned int height; unsigned int height;
@ -54,28 +56,6 @@ static unsigned int nextPOT(unsigned int x)
return x + 1; return x + 1;
} }
typedef enum {
kTexture2DPixelFormat_Automatic = 0,
//! 32-bit texture: RGBA8888
kTexture2DPixelFormat_RGBA8888,
//! 24-bit texture: RGBA888
kTexture2DPixelFormat_RGB888,
//! 16-bit texture without Alpha channel
kTexture2DPixelFormat_RGB565,
//! 8-bit textures used as masks
kTexture2DPixelFormat_A8,
//! 16-bit textures: RGBA4444
kTexture2DPixelFormat_RGBA4444,
//! 16-bit textures: RGB5A1
kTexture2DPixelFormat_RGB5A1,
//! Default texture format: RGBA8888
kTexture2DPixelFormat_Default = kTexture2DPixelFormat_RGBA8888,
// backward compatibility stuff
} Texture2DPixelFormat;
static bool _initPremultipliedATextureWithImage(CGImageRef image, NSUInteger POTWide, NSUInteger POTHigh, tImageInfo *pImageInfo) static bool _initPremultipliedATextureWithImage(CGImageRef image, NSUInteger POTWide, NSUInteger POTHigh, tImageInfo *pImageInfo)
{ {
NSUInteger i; NSUInteger i;
@ -481,7 +461,6 @@ static bool _initWithString(const char * pText, cocos2d::Image::ETextAlign eAlig
return bRet; return bRet;
} }
NS_CC_BEGIN
static bool _enabledScale = true; static bool _enabledScale = true;

View File

@ -91,7 +91,7 @@ void b2ChainShape::GetChildEdge(b2EdgeShape* edge, int32 index) const
edge->m_radius = m_radius; edge->m_radius = m_radius;
edge->m_vertex1 = m_vertices[index + 0]; edge->m_vertex1 = m_vertices[index + 0];
edge->m_Vertex2F = m_vertices[index + 1]; edge->m_vertex2 = m_vertices[index + 1];
if (index > 0) if (index > 0)
{ {
@ -106,13 +106,13 @@ void b2ChainShape::GetChildEdge(b2EdgeShape* edge, int32 index) const
if (index < m_count - 2) if (index < m_count - 2)
{ {
edge->m_Vertex3F = m_vertices[index + 2]; edge->m_vertex3 = m_vertices[index + 2];
edge->m_hasVertex3F = true; edge->m_hasVertex3 = true;
} }
else else
{ {
edge->m_Vertex3F = m_nextVertex; edge->m_vertex3 = m_nextVertex;
edge->m_hasVertex3F = m_hasNextVertex; edge->m_hasVertex3 = m_hasNextVertex;
} }
} }
@ -138,7 +138,7 @@ bool b2ChainShape::RayCast(b2RayCastOutput* output, const b2RayCastInput& input,
} }
edgeShape.m_vertex1 = m_vertices[i1]; edgeShape.m_vertex1 = m_vertices[i1];
edgeShape.m_Vertex2F = m_vertices[i2]; edgeShape.m_vertex2 = m_vertices[i2];
return edgeShape.RayCast(output, input, xf, 0); return edgeShape.RayCast(output, input, xf, 0);
} }

View File

@ -23,9 +23,9 @@ using namespace std;
void b2EdgeShape::Set(const b2Vec2& v1, const b2Vec2& v2) void b2EdgeShape::Set(const b2Vec2& v1, const b2Vec2& v2)
{ {
m_vertex1 = v1; m_vertex1 = v1;
m_Vertex2F = v2; m_vertex2 = v2;
m_hasVertex0 = false; m_hasVertex0 = false;
m_hasVertex3F = false; m_hasVertex3 = false;
} }
b2Shape* b2EdgeShape::Clone(b2BlockAllocator* allocator) const b2Shape* b2EdgeShape::Clone(b2BlockAllocator* allocator) const
@ -63,7 +63,7 @@ bool b2EdgeShape::RayCast(b2RayCastOutput* output, const b2RayCastInput& input,
b2Vec2 d = p2 - p1; b2Vec2 d = p2 - p1;
b2Vec2 v1 = m_vertex1; b2Vec2 v1 = m_vertex1;
b2Vec2 v2 = m_Vertex2F; b2Vec2 v2 = m_vertex2;
b2Vec2 e = v2 - v1; b2Vec2 e = v2 - v1;
b2Vec2 normal(e.y, -e.x); b2Vec2 normal(e.y, -e.x);
normal.Normalize(); normal.Normalize();
@ -119,7 +119,7 @@ void b2EdgeShape::ComputeAABB(b2AABB* aabb, const b2Transform& xf, int32 childIn
B2_NOT_USED(childIndex); B2_NOT_USED(childIndex);
b2Vec2 v1 = b2Mul(xf, m_vertex1); b2Vec2 v1 = b2Mul(xf, m_vertex1);
b2Vec2 v2 = b2Mul(xf, m_Vertex2F); b2Vec2 v2 = b2Mul(xf, m_vertex2);
b2Vec2 lower = b2Min(v1, v2); b2Vec2 lower = b2Min(v1, v2);
b2Vec2 upper = b2Max(v1, v2); b2Vec2 upper = b2Max(v1, v2);
@ -134,6 +134,6 @@ void b2EdgeShape::ComputeMass(b2MassData* massData, float32 density) const
B2_NOT_USED(density); B2_NOT_USED(density);
massData->mass = 0.0f; massData->mass = 0.0f;
massData->center = 0.5f * (m_vertex1 + m_Vertex2F); massData->center = 0.5f * (m_vertex1 + m_vertex2);
massData->I = 0.0f; massData->I = 0.0f;
} }

View File

@ -52,11 +52,11 @@ public:
void ComputeMass(b2MassData* massData, float32 density) const; void ComputeMass(b2MassData* massData, float32 density) const;
/// These are the edge vertices /// These are the edge vertices
b2Vec2 m_vertex1, m_Vertex2F; b2Vec2 m_vertex1, m_vertex2;
/// Optional adjacent vertices. These are used for smooth collision. /// Optional adjacent vertices. These are used for smooth collision.
b2Vec2 m_vertex0, m_Vertex3F; b2Vec2 m_vertex0, m_vertex3;
bool m_hasVertex0, m_hasVertex3F; bool m_hasVertex0, m_hasVertex3;
}; };
inline b2EdgeShape::b2EdgeShape() inline b2EdgeShape::b2EdgeShape()
@ -65,10 +65,10 @@ inline b2EdgeShape::b2EdgeShape()
m_radius = b2_polygonRadius; m_radius = b2_polygonRadius;
m_vertex0.x = 0.0f; m_vertex0.x = 0.0f;
m_vertex0.y = 0.0f; m_vertex0.y = 0.0f;
m_Vertex3F.x = 0.0f; m_vertex3.x = 0.0f;
m_Vertex3F.y = 0.0f; m_vertex3.y = 0.0f;
m_hasVertex0 = false; m_hasVertex0 = false;
m_hasVertex3F = false; m_hasVertex3 = false;
} }
#endif #endif

View File

@ -33,7 +33,7 @@ void b2CollideEdgeAndCircle(b2Manifold* manifold,
// Compute circle in frame of edge // Compute circle in frame of edge
b2Vec2 Q = b2MulT(xfA, b2Mul(xfB, circleB->m_p)); b2Vec2 Q = b2MulT(xfA, b2Mul(xfB, circleB->m_p));
b2Vec2 A = edgeA->m_vertex1, B = edgeA->m_Vertex2F; b2Vec2 A = edgeA->m_vertex1, B = edgeA->m_vertex2;
b2Vec2 e = B - A; b2Vec2 e = B - A;
// Barycentric coordinates // Barycentric coordinates
@ -96,9 +96,9 @@ void b2CollideEdgeAndCircle(b2Manifold* manifold,
} }
// Is there an edge connected to B? // Is there an edge connected to B?
if (edgeA->m_hasVertex3F) if (edgeA->m_hasVertex3)
{ {
b2Vec2 B2 = edgeA->m_Vertex3F; b2Vec2 B2 = edgeA->m_vertex3;
b2Vec2 A2 = B; b2Vec2 A2 = B;
b2Vec2 e2 = B2 - A2; b2Vec2 e2 = B2 - A2;
float32 v2 = b2Dot(e2, Q - A2); float32 v2 = b2Dot(e2, Q - A2);
@ -236,11 +236,11 @@ void b2EPCollider::Collide(b2Manifold* manifold, const b2EdgeShape* edgeA, const
m_v0 = edgeA->m_vertex0; m_v0 = edgeA->m_vertex0;
m_v1 = edgeA->m_vertex1; m_v1 = edgeA->m_vertex1;
m_v2 = edgeA->m_Vertex2F; m_v2 = edgeA->m_vertex2;
m_v3 = edgeA->m_Vertex3F; m_v3 = edgeA->m_vertex3;
bool hasVertex0 = edgeA->m_hasVertex0; bool hasVertex0 = edgeA->m_hasVertex0;
bool hasVertex3F = edgeA->m_hasVertex3F; bool hasVertex3F = edgeA->m_hasVertex3;
b2Vec2 edge1 = m_v2 - m_v1; b2Vec2 edge1 = m_v2 - m_v1;
edge1.Normalize(); edge1.Normalize();

View File

@ -255,10 +255,10 @@ void b2Fixture::Dump(int32 bodyIndex)
b2Log(" shape.m_radius = %.15lef;\n", s->m_radius); b2Log(" shape.m_radius = %.15lef;\n", s->m_radius);
b2Log(" shape.m_vertex0.Set(%.15lef, %.15lef);\n", s->m_vertex0.x, s->m_vertex0.y); b2Log(" shape.m_vertex0.Set(%.15lef, %.15lef);\n", s->m_vertex0.x, s->m_vertex0.y);
b2Log(" shape.m_vertex1.Set(%.15lef, %.15lef);\n", s->m_vertex1.x, s->m_vertex1.y); b2Log(" shape.m_vertex1.Set(%.15lef, %.15lef);\n", s->m_vertex1.x, s->m_vertex1.y);
b2Log(" shape.m_Vertex2F.Set(%.15lef, %.15lef);\n", s->m_Vertex2F.x, s->m_Vertex2F.y); b2Log(" shape.m_vertex2.Set(%.15lef, %.15lef);\n", s->m_vertex2.x, s->m_vertex2.y);
b2Log(" shape.m_Vertex3F.Set(%.15lef, %.15lef);\n", s->m_Vertex3F.x, s->m_Vertex3F.y); b2Log(" shape.m_vertex3.Set(%.15lef, %.15lef);\n", s->m_vertex3.x, s->m_vertex3.y);
b2Log(" shape.m_hasVertex0 = bool(%d);\n", s->m_hasVertex0); b2Log(" shape.m_hasVertex0 = bool(%d);\n", s->m_hasVertex0);
b2Log(" shape.m_hasVertex3F = bool(%d);\n", s->m_hasVertex3F); b2Log(" shape.m_hasVertex3 = bool(%d);\n", s->m_hasVertex3);
} }
break; break;

View File

@ -1048,7 +1048,7 @@ void b2World::DrawShape(b2Fixture* fixture, const b2Transform& xf, const b2Color
{ {
b2EdgeShape* edge = (b2EdgeShape*)fixture->GetShape(); b2EdgeShape* edge = (b2EdgeShape*)fixture->GetShape();
b2Vec2 v1 = b2Mul(xf, edge->m_vertex1); b2Vec2 v1 = b2Mul(xf, edge->m_vertex1);
b2Vec2 v2 = b2Mul(xf, edge->m_Vertex2F); b2Vec2 v2 = b2Mul(xf, edge->m_vertex2);
m_debugDraw->DrawSegment(v1, v2, color); m_debugDraw->DrawSegment(v1, v2, color);
} }
break; break;

View File

@ -140,10 +140,10 @@ b2Joint** joints = (b2Joint**)b2Alloc(2 * sizeof(b2Joint*));
shape.m_radius = 9.999999776482582e-03f; shape.m_radius = 9.999999776482582e-03f;
shape.m_vertex0.Set(0.000000000000000e+00f, 0.000000000000000e+00f); shape.m_vertex0.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
shape.m_vertex1.Set(4.452173995971680e+01f, 1.669565200805664e+01f); shape.m_vertex1.Set(4.452173995971680e+01f, 1.669565200805664e+01f);
shape.m_Vertex2F.Set(4.452173995971680e+01f, 0.000000000000000e+00f); shape.m_vertex2.Set(4.452173995971680e+01f, 0.000000000000000e+00f);
shape.m_Vertex3F.Set(0.000000000000000e+00f, 0.000000000000000e+00f); shape.m_vertex3.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
shape.m_hasVertex0 = bool(0); shape.m_hasVertex0 = bool(0);
shape.m_hasVertex3F = bool(0); shape.m_hasVertex3 = bool(0);
fd.shape = &shape; fd.shape = &shape;
@ -162,10 +162,10 @@ b2Joint** joints = (b2Joint**)b2Alloc(2 * sizeof(b2Joint*));
shape.m_radius = 9.999999776482582e-03f; shape.m_radius = 9.999999776482582e-03f;
shape.m_vertex0.Set(0.000000000000000e+00f, 0.000000000000000e+00f); shape.m_vertex0.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
shape.m_vertex1.Set(0.000000000000000e+00f, 1.669565200805664e+01f); shape.m_vertex1.Set(0.000000000000000e+00f, 1.669565200805664e+01f);
shape.m_Vertex2F.Set(0.000000000000000e+00f, 0.000000000000000e+00f); shape.m_vertex2.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
shape.m_Vertex3F.Set(0.000000000000000e+00f, 0.000000000000000e+00f); shape.m_vertex3.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
shape.m_hasVertex0 = bool(0); shape.m_hasVertex0 = bool(0);
shape.m_hasVertex3F = bool(0); shape.m_hasVertex3 = bool(0);
fd.shape = &shape; fd.shape = &shape;
@ -184,10 +184,10 @@ b2Joint** joints = (b2Joint**)b2Alloc(2 * sizeof(b2Joint*));
shape.m_radius = 9.999999776482582e-03f; shape.m_radius = 9.999999776482582e-03f;
shape.m_vertex0.Set(0.000000000000000e+00f, 0.000000000000000e+00f); shape.m_vertex0.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
shape.m_vertex1.Set(0.000000000000000e+00f, 1.669565200805664e+01f); shape.m_vertex1.Set(0.000000000000000e+00f, 1.669565200805664e+01f);
shape.m_Vertex2F.Set(4.452173995971680e+01f, 1.669565200805664e+01f); shape.m_vertex2.Set(4.452173995971680e+01f, 1.669565200805664e+01f);
shape.m_Vertex3F.Set(0.000000000000000e+00f, 0.000000000000000e+00f); shape.m_vertex3.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
shape.m_hasVertex0 = bool(0); shape.m_hasVertex0 = bool(0);
shape.m_hasVertex3F = bool(0); shape.m_hasVertex3 = bool(0);
fd.shape = &shape; fd.shape = &shape;
@ -206,10 +206,10 @@ b2Joint** joints = (b2Joint**)b2Alloc(2 * sizeof(b2Joint*));
shape.m_radius = 9.999999776482582e-03f; shape.m_radius = 9.999999776482582e-03f;
shape.m_vertex0.Set(0.000000000000000e+00f, 0.000000000000000e+00f); shape.m_vertex0.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
shape.m_vertex1.Set(0.000000000000000e+00f, 0.000000000000000e+00f); shape.m_vertex1.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
shape.m_Vertex2F.Set(4.452173995971680e+01f, 0.000000000000000e+00f); shape.m_vertex2.Set(4.452173995971680e+01f, 0.000000000000000e+00f);
shape.m_Vertex3F.Set(0.000000000000000e+00f, 0.000000000000000e+00f); shape.m_vertex3.Set(0.000000000000000e+00f, 0.000000000000000e+00f);
shape.m_hasVertex0 = bool(0); shape.m_hasVertex0 = bool(0);
shape.m_hasVertex3F = bool(0); shape.m_hasVertex3 = bool(0);
fd.shape = &shape; fd.shape = &shape;

View File

@ -35,36 +35,36 @@ public:
b2EdgeShape shape; b2EdgeShape shape;
shape.Set(v1, v2); shape.Set(v1, v2);
shape.m_hasVertex3F = true; shape.m_hasVertex3 = true;
shape.m_Vertex3F = v3; shape.m_vertex3 = v3;
ground->CreateFixture(&shape, 0.0f); ground->CreateFixture(&shape, 0.0f);
shape.Set(v2, v3); shape.Set(v2, v3);
shape.m_hasVertex0 = true; shape.m_hasVertex0 = true;
shape.m_hasVertex3F = true; shape.m_hasVertex3 = true;
shape.m_vertex0 = v1; shape.m_vertex0 = v1;
shape.m_Vertex3F = v4; shape.m_vertex3 = v4;
ground->CreateFixture(&shape, 0.0f); ground->CreateFixture(&shape, 0.0f);
shape.Set(v3, v4); shape.Set(v3, v4);
shape.m_hasVertex0 = true; shape.m_hasVertex0 = true;
shape.m_hasVertex3F = true; shape.m_hasVertex3 = true;
shape.m_vertex0 = v2; shape.m_vertex0 = v2;
shape.m_Vertex3F = v5; shape.m_vertex3 = v5;
ground->CreateFixture(&shape, 0.0f); ground->CreateFixture(&shape, 0.0f);
shape.Set(v4, v5); shape.Set(v4, v5);
shape.m_hasVertex0 = true; shape.m_hasVertex0 = true;
shape.m_hasVertex3F = true; shape.m_hasVertex3 = true;
shape.m_vertex0 = v3; shape.m_vertex0 = v3;
shape.m_Vertex3F = v6; shape.m_vertex3 = v6;
ground->CreateFixture(&shape, 0.0f); ground->CreateFixture(&shape, 0.0f);
shape.Set(v5, v6); shape.Set(v5, v6);
shape.m_hasVertex0 = true; shape.m_hasVertex0 = true;
shape.m_hasVertex3F = true; shape.m_hasVertex3 = true;
shape.m_vertex0 = v4; shape.m_vertex0 = v4;
shape.m_Vertex3F = v7; shape.m_vertex3 = v7;
ground->CreateFixture(&shape, 0.0f); ground->CreateFixture(&shape, 0.0f);
shape.Set(v6, v7); shape.Set(v6, v7);