Skip to content

Commit 5ddb5d6

Browse files
committed
CCAnimatedSprite bindings
1 parent 053901b commit 5ddb5d6

1 file changed

Lines changed: 31 additions & 13 deletions

File tree

bindings/2.2074/GeometryDash.bro

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1437,9 +1437,9 @@ class CCAnimatedSprite : cocos2d::CCSprite {
14371437
}
14381438
~CCAnimatedSprite() = win 0x41140, m1 0x2d3784, imac 0x33d360, ios 0x2fe214;
14391439

1440-
static CCAnimatedSprite* createWithType(char const*, cocos2d::CCTexture2D*, bool) = win inline, imac 0x33c020, m1 0x2d24c0 {
1440+
static CCAnimatedSprite* createWithType(char const* definition, cocos2d::CCTexture2D* texture, bool useTexture) = win inline, imac 0x33c020, m1 0x2d24c0, ios 0x2fd4b8 {
14411441
auto ret = new CCAnimatedSprite();
1442-
if (ret->initWithType(p0, p1, p2)) {
1442+
if (ret->initWithType(definition, texture, useTexture)) {
14431443
ret->autorelease();
14441444
return ret;
14451445
}
@@ -1452,19 +1452,37 @@ class CCAnimatedSprite : cocos2d::CCSprite {
14521452
virtual void animationFinished(char const*) = win 0x41050, imac 0x33d1d0, m1 0x2d360c, ios 0x2fe13c;
14531453
virtual void animationFinishedO(cocos2d::CCObject*) = win 0x41010, m1 0x2d35d8, imac 0x33d1a0, ios 0x2fe108;
14541454

1455-
void cleanupSprite() = imac 0x33ca60, m1 0x2d2ebc;
1456-
bool initWithType(char const*, cocos2d::CCTexture2D*, bool) = win 0x3ffc0, imac 0x33c100, m1 0x2d2594;
1457-
void loadType(char const*, cocos2d::CCTexture2D*, bool) = win 0x401e0, m1 0x2d2790, imac 0x33c2f0;
1458-
void runAnimation(gd::string) = win 0x40c80, m1 0x2d3058, imac 0x33cc20, ios 0x2fdcf0;
1459-
void runAnimationForced(gd::string) = win inline, m1 0x2d30f0, imac 0x33cca0 {
1455+
void cleanupSprite() = win inline, imac 0x33ca60, m1 0x2d2ebc, ios 0x2fdb54 {
1456+
if (m_paSprite) m_paSprite->cleanup();
1457+
if (m_fbfSprite) m_fbfSprite->cleanup();
1458+
if (m_animationManager) m_animationManager->doCleanup();
1459+
if (m_fbfSprite) m_fbfSprite->removeFromParentAndCleanup(true);
1460+
if (m_paSprite) m_paSprite->removeFromParentAndCleanup(true);
1461+
m_animationManager = nullptr;
1462+
m_sprite = nullptr;
1463+
m_fbfSprite = nullptr;
1464+
m_paSprite = nullptr;
1465+
m_spriteMode = (spriteMode)0;
1466+
}
1467+
bool initWithType(char const* definition, cocos2d::CCTexture2D* texture, bool useTexture) = win 0x3ffc0, imac 0x33c100, m1 0x2d2594, ios 0x2fd57c;
1468+
void loadType(char const* definition, cocos2d::CCTexture2D* texture, bool useTexture) = win 0x401e0, m1 0x2d2790, imac 0x33c2f0, ios 0x2fd6e0;
1469+
void runAnimation(gd::string animation) = win 0x40c80, m1 0x2d3058, imac 0x33cc20, ios 0x2fdcf0;
1470+
void runAnimationForced(gd::string animation) = win inline, m1 0x2d30f0, imac 0x33cca0, ios 0x2fdd78 {
14601471
m_animationManager->overridePrio();
1461-
m_animationManager->runAnimation(p0);
1472+
m_animationManager->runAnimation(animation);
1473+
}
1474+
void stopTween() = win inline, m1 0x2d359c, imac 0x33d160, ios 0x2fe0cc {
1475+
m_paSprite->stopAllActions();
1476+
this->stopActionByTag(1);
1477+
m_activeTween = "";
1478+
}
1479+
void switchToMode(spriteMode mode) = win 0x40b10, imac 0x33cb00, m1 0x2d2f4c, ios 0x2fdbe4;
1480+
void tweenToAnimation(gd::string animation, float duration) = win 0x40cf0, imac 0x33cd60, m1 0x2d31c4, ios 0x2fde3c;
1481+
void tweenToAnimationFinished() = win 0x40fc0, m1 0x2d3480, imac 0x33d050, ios 0x2fe030;
1482+
void willPlayAnimation() = win inline, m1 0x2d3194, imac 0x33cd30, ios 0x2fde0c {
1483+
this->stopActionByTag(1);
1484+
m_activeTween = "";
14621485
}
1463-
void stopTween() = m1 0x2d359c, imac 0x33d160;
1464-
void switchToMode(spriteMode) = win 0x40b10, imac 0x33cb00, m1 0x2d2f4c;
1465-
void tweenToAnimation(gd::string, float) = win 0x40cf0, imac 0x33cd60, m1 0x2d31c4, ios 0x2fde3c;
1466-
void tweenToAnimationFinished() = win 0x40fc0;
1467-
void willPlayAnimation() = m1 0x2d3194, imac 0x33cd30;
14681486

14691487
gd::string m_unkString1;
14701488
gd::string m_activeTween;

0 commit comments

Comments
 (0)