Skip to content

Commit 38eae36

Browse files
committed
Some overload bindings
1 parent e4fdd60 commit 38eae36

2 files changed

Lines changed: 40 additions & 26 deletions

File tree

bindings/2.2074/Cocos2d.bro

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2572,8 +2572,30 @@ class cocos2d::CCTexture2D : cocos2d::CCObject {
25722572
// CCTexture2D(cocos2d::CCTexture2D const&);
25732573
virtual ~CCTexture2D() = m1 0x3d5378, ios 0x130660, imac 0x4653b0; //imac 0x465400
25742574
CCTexture2D() = m1 0x3d52b0, imac 0x4652f0, ios 0x1305f8;
2575-
unsigned int bitsPerPixelForFormat(cocos2d::CCTexture2DPixelFormat) = imac 0x465950;
2576-
unsigned int bitsPerPixelForFormat() = imac 0x4669e0;
2575+
unsigned int bitsPerPixelForFormat(cocos2d::CCTexture2DPixelFormat) = m1 0x3d582c, imac 0x465950, ios inline {
2576+
switch (p0) {
2577+
case kCCTexture2DPixelFormat_RGBA8888:
2578+
case kCCTexture2DPixelFormat_RGB888:
2579+
return 32;
2580+
case kCCTexture2DPixelFormat_RGB565:
2581+
case kCCTexture2DPixelFormat_RGBA4444:
2582+
case kCCTexture2DPixelFormat_RGB5A1:
2583+
case kCCTexture2DPixelFormat_AI88:
2584+
return 16;
2585+
case kCCTexture2DPixelFormat_A8:
2586+
case kCCTexture2DPixelFormat_I8:
2587+
return 8;
2588+
case kCCTexture2DPixelFormat_PVRTC4:
2589+
return 4;
2590+
case kCCTexture2DPixelFormat_PVRTC2:
2591+
return 2;
2592+
default:
2593+
return -1;
2594+
}
2595+
}
2596+
unsigned int bitsPerPixelForFormat() = m1 0x3d6854, imac 0x4669e0, ios inline {
2597+
return this->bitsPerPixelForFormat(m_ePixelFormat);
2598+
}
25772599
char const* description() = imac 0x465970, m1 0x3d584c;
25782600
void drawAtPoint(cocos2d::CCPoint const&) = m1 0x3d62d0;
25792601
void drawInRect(cocos2d::CCRect const&) = m1 0x3d63e8;
@@ -3801,7 +3823,7 @@ class cocos2d::CCTransitionMoveInT : cocos2d::CCTransitionMoveInL {
38013823
[[link(win, android)]]
38023824
class cocos2d::CCTransitionFade : cocos2d::CCTransitionScene {
38033825
static cocos2d::CCTransitionFade* create(float, cocos2d::CCScene*) = m1 0xc122c, imac 0xd9090, ios 0x1cee8c;
3804-
static cocos2d::CCTransitionFade* create(float, cocos2d::CCScene*, cocos2d::_ccColor3B const&) = imac 0xd8ff0;
3826+
static cocos2d::CCTransitionFade* create(float, cocos2d::CCScene*, cocos2d::_ccColor3B const&) = m1 0xc1190, imac 0xd8ff0, ios 0x1cedf0;
38053827

38063828
// CCTransitionFade(cocos2d::CCTransitionFade const&);
38073829
// CCTransitionFade();
@@ -5208,7 +5230,7 @@ class cocos2d::CCLightning : cocos2d::CCNode, cocos2d::CCRGBAProtocol {
52085230
}
52095231

52105232
bool initWithStrikePoint(cocos2d::CCPoint, cocos2d::CCPoint, float) = win 0x439e0, imac 0x5c5a90, m1 0x4fa950, ios 0x3471b0;
5211-
bool initWithStrikePoint(cocos2d::CCPoint p1) = win inline, ios inline, m1 0x4fa7dc {
5233+
bool initWithStrikePoint(cocos2d::CCPoint p1) = win inline, ios inline, m1 0x4fa7dc, imac 0x5c58e0 {
52125234
return this->initWithStrikePoint(p1, CCPointZero, .5f);
52135235
}
52145236

bindings/2.2074/GeometryDash.bro

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4958,7 +4958,7 @@ class EditorUI : cocos2d::CCLayer, FLAlertLayerProtocol, ColorSelectDelegate, GJ
49584958
cocos2d::CCPoint moveForCommand(EditCommand command) = ios 0x3ee010, win 0x11de20, imac 0x4a7d0, m1 0x435fc;
49594959
void moveGamelayer(cocos2d::CCPoint) = ios 0x3dfa64, win 0xe16b0, imac 0x2f800, m1 0x2f18c;
49604960
void moveObject(GameObject*, cocos2d::CCPoint) = ios 0x3e7270, win 0x11e290, m1 0x399d4, imac 0x3ef90;
4961-
void moveObjectCall(cocos2d::CCObject*) = win 0x11dfd0, imac 0x49970;
4961+
void moveObjectCall(cocos2d::CCObject*) = win 0x11dfd0, m1 0x42a38, imac 0x49970, ios 0x3ed6f4;
49624962
void moveObjectCall(EditCommand) = ios 0x3ee190, win 0x11e000, imac 0x4a9d0, m1 0x437a8;
49634963
cocos2d::CCPoint offsetForKey(int) = win 0x124bf0;
49644964
TodoReturn onAssignNewGroupID();
@@ -10389,9 +10389,7 @@ class GJDifficultySprite : cocos2d::CCSprite {
1038910389
[[link(android)]]
1039010390
class GJDropDownLayer : cocos2d::CCLayerColor {
1039110391
// virtual ~GJDropDownLayer();
10392-
inline GJDropDownLayer() {
10393-
m_endPosition = cocos2d::CCPointMake(0.f, 0.f);
10394-
m_startPosition = cocos2d::CCPointMake(0.f, 0.f);
10392+
GJDropDownLayer() {
1039510393
m_buttonMenu = nullptr;
1039610394
m_listLayer = nullptr;
1039710395
m_mainLayer = nullptr;
@@ -10400,23 +10398,17 @@ class GJDropDownLayer : cocos2d::CCLayerColor {
1040010398
m_fastMenu = false;
1040110399
}
1040210400

10403-
static GJDropDownLayer* create(const char* title, float height, bool p2) = win inline, imac 0x5cfc90, m1 0x503e08 {
10404-
GJDropDownLayer* pRet = new GJDropDownLayer();
10405-
if (pRet && pRet->init(title, height, p2)) {
10406-
pRet->autorelease();
10407-
return pRet;
10401+
static GJDropDownLayer* create(const char* title, float height, bool) = win inline, imac 0x5cfc90, m1 0x503e08, ios inline {
10402+
auto ret = new GJDropDownLayer();
10403+
if (ret->init(title, height, p2)) {
10404+
ret->autorelease();
10405+
return ret;
1040810406
}
10409-
CC_SAFE_DELETE(pRet);
10407+
delete ret;
1041010408
return nullptr;
1041110409
}
10412-
static GJDropDownLayer* create(const char* title) = win inline, imac 0x5d01d0 {
10413-
GJDropDownLayer* pRet = new GJDropDownLayer();
10414-
if (pRet && pRet->init(title)) {
10415-
pRet->autorelease();
10416-
return pRet;
10417-
}
10418-
CC_SAFE_DELETE(pRet);
10419-
return nullptr;
10410+
static GJDropDownLayer* create(const char* title) = win inline, m1 0x50432c, imac 0x5d01d0, ios inline {
10411+
return create(title, 220.0f, false);
1042010412
}
1042110413

1042210414
virtual void draw() = win 0x426f0, m1 0x5046c0, imac 0x5d05d0, ios 0x3ab0a0;
@@ -11514,7 +11506,7 @@ class GJMapPack : cocos2d::CCNode {
1151411506
CC_SAFE_RELEASE(m_levels);
1151511507
}
1151611508

11517-
static GJMapPack* create(cocos2d::CCDictionary*) = win 0x16d210, m1 0x478e24;
11509+
static GJMapPack* create(cocos2d::CCDictionary*) = win 0x16d210, m1 0x478e24, imac 0x51c560, ios 0x99770;
1151811510

1151911511
static GJMapPack* create() = win inline, m1 0x4a1910, imac 0x5490c0, ios 0xb2d50 {
1152011512
auto ret = new GJMapPack();
@@ -13226,7 +13218,7 @@ class GJUserMessage : cocos2d::CCNode {
1322613218
// virtual ~GJUserMessage();
1322713219

1322813220
static GJUserMessage* create() = win 0x170ec0, imac 0x549f70, m1 0x4a264c, ios 0xb3540;
13229-
static GJUserMessage* create(cocos2d::CCDictionary*) = win 0x170380, m1 0x490df0, ios 0xa8330;
13221+
static GJUserMessage* create(cocos2d::CCDictionary*) = win 0x170380, m1 0x490df0, imac 0x537410, ios 0xa8330;
1323013222

1323113223
virtual bool init() = win 0x77db0, m1 0x4a26e8, imac 0x54a010, ios 0xb35d0;
1323213224

@@ -23163,8 +23155,8 @@ class SongSelectNode : cocos2d::CCNode, FLAlertLayerProtocol, CustomSongLayerDel
2316323155
void audioPrevious(cocos2d::CCObject* sender) = ios 0x14aec0, win 0xc6af0, imac 0x207990, m1 0x1bc9a0;
2316423156
bool init(int, bool, LevelSettingsObject*, SongSelectType, cocos2d::CCPoint, cocos2d::CCNode*, cocos2d::CCMenu*, bool) = ios 0x14a5b8, win 0xc60b0, imac 0x207080, m1 0x1bc070;
2316523157
void onOpenCustomSong(cocos2d::CCObject* sender);
23166-
void onSongMode(cocos2d::CCObject* sender) = imac 0x207a10;
23167-
void onSongMode(int) = win 0xc6b50, imac 0x207ae0, m1 0x1bcabc;
23158+
void onSongMode(cocos2d::CCObject* sender) = win 0xc6b20, m1 0x1bca0c, imac 0x207a10, ios 0x14af2c;
23159+
void onSongMode(int) = win 0xc6b50, imac 0x207ae0, m1 0x1bcabc, ios 0x14afbc;
2316823160
void selectSong(int id) = win inline, imac 0x207ab0 {
2316923161
auto songID = id;
2317023162
if (songID > 21) songID = 21;

0 commit comments

Comments
 (0)