Skip to content

Commit 876b5e4

Browse files
authored
Rename ccBezierConfig as BezierConfig. (#2536)
1 parent fc7861c commit 876b5e4

File tree

7 files changed

+3517
-3515
lines changed

7 files changed

+3517
-3515
lines changed

core/2d/ActionInterval.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1675,7 +1675,7 @@ static inline float bezierat(float a, float b, float c, float d, float t)
16751675
// BezierBy
16761676
//
16771677

1678-
BezierBy* BezierBy::create(float t, const ccBezierConfig& c)
1678+
BezierBy* BezierBy::create(float t, const BezierConfig& c)
16791679
{
16801680
BezierBy* bezierBy = new BezierBy();
16811681
if (bezierBy->initWithDuration(t, c))
@@ -1688,7 +1688,7 @@ BezierBy* BezierBy::create(float t, const ccBezierConfig& c)
16881688
return nullptr;
16891689
}
16901690

1691-
bool BezierBy::initWithDuration(float t, const ccBezierConfig& c)
1691+
bool BezierBy::initWithDuration(float t, const BezierConfig& c)
16921692
{
16931693
if (ActionInterval::initWithDuration(t))
16941694
{
@@ -1745,7 +1745,7 @@ void BezierBy::update(float time)
17451745

17461746
BezierBy* BezierBy::reverse() const
17471747
{
1748-
ccBezierConfig r;
1748+
BezierConfig r;
17491749

17501750
r.endPosition = -_config.endPosition;
17511751
r.controlPoint_1 = _config.controlPoint_2 + (-_config.endPosition);
@@ -1759,7 +1759,7 @@ BezierBy* BezierBy::reverse() const
17591759
// BezierTo
17601760
//
17611761

1762-
BezierTo* BezierTo::create(float t, const ccBezierConfig& c)
1762+
BezierTo* BezierTo::create(float t, const BezierConfig& c)
17631763
{
17641764
BezierTo* bezierTo = new BezierTo();
17651765
if (bezierTo->initWithDuration(t, c))
@@ -1772,7 +1772,7 @@ BezierTo* BezierTo::create(float t, const ccBezierConfig& c)
17721772
return nullptr;
17731773
}
17741774

1775-
bool BezierTo::initWithDuration(float t, const ccBezierConfig& c)
1775+
bool BezierTo::initWithDuration(float t, const BezierConfig& c)
17761776
{
17771777
if (ActionInterval::initWithDuration(t))
17781778
{
@@ -1799,7 +1799,7 @@ void BezierTo::startWithTarget(Node* target)
17991799

18001800
BezierTo* BezierTo::reverse() const
18011801
{
1802-
AXASSERT(false, "CCBezierTo doesn't support the 'reverse' method");
1802+
AXASSERT(false, "BezierTo doesn't support the 'reverse' method");
18031803
return nullptr;
18041804
}
18051805

core/2d/ActionInterval.h

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
2727
THE SOFTWARE.
2828
****************************************************************************/
2929

30-
#ifndef __ACTION_CCINTERVAL_ACTION_H__
31-
#define __ACTION_CCINTERVAL_ACTION_H__
30+
#ifndef __ACTION_INTERVAL_ACTION_H__
31+
#define __ACTION_INTERVAL_ACTION_H__
3232

3333
#include <vector>
3434

@@ -888,15 +888,17 @@ class AX_DLL JumpTo : public JumpBy
888888

889889
/** @struct Bezier configuration structure
890890
*/
891-
typedef struct _ccBezierConfig
891+
struct BezierConfig
892892
{
893893
//! end position of the bezier
894894
Vec2 endPosition;
895895
//! Bezier control point 1
896896
Vec2 controlPoint_1;
897897
//! Bezier control point 2
898898
Vec2 controlPoint_2;
899-
} ccBezierConfig;
899+
};
900+
901+
using ccBezierConfig [[deprecated("Use BezierConfig instead.")]] = BezierConfig;
900902

901903
/** @class BezierBy
902904
* @brief An action that moves the target with a cubic Bezier curve by a certain distance.
@@ -914,7 +916,7 @@ class AX_DLL BezierBy : public ActionInterval
914916
* in lua: local create(local t, local table)
915917
* @endcode
916918
*/
917-
static BezierBy* create(float t, const ccBezierConfig& c);
919+
static BezierBy* create(float t, const BezierConfig& c);
918920

919921
//
920922
// Overrides
@@ -934,10 +936,10 @@ class AX_DLL BezierBy : public ActionInterval
934936
* initializes the action with a duration and a bezier configuration
935937
* @param t in seconds
936938
*/
937-
bool initWithDuration(float t, const ccBezierConfig& c);
939+
bool initWithDuration(float t, const BezierConfig& c);
938940

939941
protected:
940-
ccBezierConfig _config;
942+
BezierConfig _config;
941943
Vec2 _startPosition;
942944
Vec2 _previousPosition;
943945

@@ -962,7 +964,7 @@ class AX_DLL BezierTo : public BezierBy
962964
* in lua: local create(local t, local table)
963965
* @endcode
964966
*/
965-
static BezierTo* create(float t, const ccBezierConfig& c);
967+
static BezierTo* create(float t, const BezierConfig& c);
966968

967969
//
968970
// Overrides
@@ -976,10 +978,10 @@ class AX_DLL BezierTo : public BezierBy
976978
/**
977979
* @param t In seconds.
978980
*/
979-
bool initWithDuration(float t, const ccBezierConfig& c);
981+
bool initWithDuration(float t, const BezierConfig& c);
980982

981983
protected:
982-
ccBezierConfig _toConfig;
984+
BezierConfig _toConfig;
983985

984986
private:
985987
AX_DISALLOW_COPY_AND_ASSIGN(BezierTo);
@@ -1614,4 +1616,4 @@ class AX_DLL ActionFloat : public ActionInterval
16141616

16151617
}
16161618

1617-
#endif //__ACTION_CCINTERVAL_ACTION_H__
1619+
#endif

0 commit comments

Comments
 (0)