Skip to content

Commit e0e296e

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents fc2e275 + 7e7afe6 commit e0e296e

12 files changed

Lines changed: 471 additions & 350 deletions

File tree

bindings/1.920/Cocos2d.bro

Lines changed: 114 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,41 @@
11
// clang-format off
22

33
[[link(win, android)]]
4-
class cocos2d::CCApplication {
4+
class cocos2d::CCAction : cocos2d::CCObject {
5+
// CCAction(cocos2d::CCAction const&);
6+
CCAction();
7+
virtual ~CCAction();
8+
}
9+
10+
[[link(win, android)]]
11+
class cocos2d::CCActionInstant : cocos2d::CCFiniteTimeAction {
12+
// CCActionInstant(cocos2d::CCActionInstant const&);
13+
CCActionInstant();
14+
15+
virtual cocos2d::CCObject* copyWithZone(cocos2d::CCZone*);
16+
virtual void update(float);
17+
virtual bool isDone();
18+
virtual void step(float);
19+
virtual cocos2d::CCFiniteTimeAction* reverse();
20+
}
21+
22+
[[link(win, android)]]
23+
class cocos2d::CCApplication : cocos2d::CCApplicationProtocol {
524
static cocos2d::CCApplication* sharedApplication();
625

26+
virtual ~CCApplication();
27+
728
virtual int run();
829
virtual void setAnimationInterval(double);
930
virtual cocos2d::ccLanguageType getCurrentLanguage();
1031
virtual cocos2d::TargetPlatform getTargetPlatform();
1132
}
1233

1334
[[link(win, android)]]
14-
class cocos2d::CCDictionary {
35+
class cocos2d::CCDictionary : cocos2d::CCObject {
36+
CCDictionary();
37+
virtual ~CCDictionary();
38+
1539
static cocos2d::CCDictionary* create();
1640
static cocos2d::CCDictionary* createWithDictionary(cocos2d::CCDictionary*);
1741
static cocos2d::CCDictionary* createWithContentsOfFile(const char*);
@@ -39,7 +63,10 @@ class cocos2d::CCDictionary {
3963
}
4064

4165
[[link(win, android)]]
42-
class cocos2d::CCDirector {
66+
class cocos2d::CCDirector : cocos2d::CCObject, cocos2d::TypeInfo {
67+
CCDirector();
68+
virtual ~CCDirector();
69+
4370
void drawScene();
4471
void setContentScaleFactor(float);
4572
void setupScreenScale(cocos2d::CCSize, cocos2d::CCSize, cocos2d::TextureQuality);
@@ -49,6 +76,9 @@ class cocos2d::CCDirector {
4976

5077
[[link(win, android)]]
5178
class cocos2d::CCEGLView {
79+
protected CCEGLView();
80+
protected virtual ~CCEGLView();
81+
5282
static cocos2d::CCEGLView* sharedOpenGLView();
5383

5484
void toggleFullScreen(bool);
@@ -61,9 +91,17 @@ class cocos2d::CCEGLView {
6191
}
6292

6393
[[link(win, android)]]
64-
class cocos2d::CCFileUtils {
94+
class cocos2d::CCEGLViewProtocol {
95+
CCEGLViewProtocol();
96+
virtual ~CCEGLViewProtocol();
97+
}
98+
99+
[[link(win, android)]]
100+
class cocos2d::CCFileUtils : cocos2d::TypeInfo {
65101
// CCFileUtils();
66102
// CCFileUtils(cocos2d::CCFileUtils const&);
103+
virtual ~CCFileUtils();
104+
67105
static CCFileUtils* sharedFileUtils();
68106
static void purgeFileUtils();
69107
void removeAllPaths();
@@ -102,13 +140,13 @@ class cocos2d::CCFileUtils {
102140
}
103141

104142
[[link(win, android)]]
105-
class cocos2d::CCLayerColor {
143+
class cocos2d::CCLayerColor : cocos2d::CCLayerRGBA, cocos2d::CCBlendProtocol {
106144
static cocos2d::CCLayerColor* create();
107145
static cocos2d::CCLayerColor* create(const cocos2d::ccColor4B&, float, float);
108146
static cocos2d::CCLayerColor* create(const cocos2d::ccColor4B&);
109147

110148
CCLayerColor();
111-
~CCLayerColor();
149+
virtual ~CCLayerColor();
112150

113151
void changeWidth(float);
114152
void changeHeight(float);
@@ -127,11 +165,11 @@ class cocos2d::CCLayerColor {
127165
}
128166

129167
[[link(win, android)]]
130-
class cocos2d::CCLayerRGBA {
168+
class cocos2d::CCLayerRGBA : cocos2d::CCLayer, cocos2d::CCRGBAProtocol {
131169
static cocos2d::CCLayerRGBA* create();
132170

133171
CCLayerRGBA();
134-
~CCLayerRGBA();
172+
virtual ~CCLayerRGBA();
135173

136174
virtual bool init();
137175
virtual GLubyte getOpacity();
@@ -151,11 +189,11 @@ class cocos2d::CCLayerRGBA {
151189
}
152190

153191
[[link(win, android)]]
154-
class cocos2d::CCLayer {
192+
class cocos2d::CCLayer : cocos2d::CCNode, cocos2d::CCTouchDelegate, cocos2d::CCAccelerometerDelegate, cocos2d::CCKeypadDelegate, cocos2d::CCKeyboardDelegate, cocos2d::CCMouseDelegate {
155193
static CCLayer *create();
156194

157195
CCLayer();
158-
~CCLayer();
196+
virtual ~CCLayer();
159197

160198
void registerScriptAccelerateHandler(int);
161199
void unregisterScriptAccelerateHandler();
@@ -199,7 +237,9 @@ class cocos2d::CCLayer {
199237
}
200238

201239
[[link(win, android)]]
202-
class cocos2d::CCMenuItem {
240+
class cocos2d::CCMenuItem : cocos2d::CCNodeRGBA {
241+
virtual ~CCMenuItem();
242+
203243
static cocos2d::CCMenuItem* create();
204244
static cocos2d::CCMenuItem* create(cocos2d::CCObject*, cocos2d::SEL_MenuHandler);
205245

@@ -219,7 +259,7 @@ class cocos2d::CCMenuItem {
219259
}
220260

221261
[[link(win, android)]]
222-
class cocos2d::CCMenu {
262+
class cocos2d::CCMenu : cocos2d::CCLayerRGBA {
223263
static cocos2d::CCMenu* create();
224264
// static CCMenu* create(CCMenuItem* item, ...);
225265
static cocos2d::CCMenu* createWithArray(cocos2d::CCArray*);
@@ -256,11 +296,11 @@ class cocos2d::CCMenu {
256296
}
257297

258298
[[link(win, android)]]
259-
class cocos2d::CCNode {
299+
class cocos2d::CCNode : cocos2d::CCObject {
260300
static cocos2d::CCNode* create();
261301

262302
CCNode();
263-
~CCNode();
303+
virtual ~CCNode();
264304

265305
int getScriptHandler();
266306
void scheduleUpdateWithPriorityLua(int, int);
@@ -396,12 +436,47 @@ class cocos2d::CCNode {
396436
}
397437

398438
[[link(win, android)]]
399-
class cocos2d::CCScene {
439+
class cocos2d::CCNodeRGBA : cocos2d::CCNode, cocos2d::CCRGBAProtocol {
440+
CCNodeRGBA();
441+
virtual ~CCNodeRGBA();
442+
}
443+
444+
[[link(win, android)]]
445+
class cocos2d::CCObject : cocos2d::CCCopying {
446+
// CCObject(cocos2d::CCObject const&);
447+
CCObject();
448+
virtual ~CCObject();
449+
450+
void release();
451+
void retain();
452+
cocos2d::CCObject* autorelease();
453+
cocos2d::CCObject* copy();
454+
bool isSingleReference() const;
455+
unsigned int retainCount() const;
456+
457+
virtual bool isEqual(cocos2d::CCObject const*);
458+
virtual void acceptVisitor(cocos2d::CCDataVisitor&);
459+
virtual void update(float dt);
460+
virtual cocos2d::CCObjectType getObjType() const;
461+
virtual void setObjType(cocos2d::CCObjectType);
462+
virtual void encodeWithCoder(DS_Dictionary*);
463+
virtual bool canEncode();
464+
465+
static cocos2d::CCObject* createWithCoder(DS_Dictionary*);
466+
}
467+
468+
[[link(win, android)]]
469+
class cocos2d::CCScene : cocos2d::CCNode {
470+
CCScene();
471+
virtual ~CCScene();
472+
400473
int getHighestChildZ();
401474
}
402475

403476
[[link(win, android)]]
404-
class cocos2d::CCScheduler {
477+
class cocos2d::CCScheduler : cocos2d::CCObject {
478+
virtual ~CCScheduler();
479+
405480
virtual void update(float dt);
406481
void scheduleSelector(cocos2d::SEL_SCHEDULE, cocos2d::CCObject*, float, unsigned int, float, bool);
407482
void scheduleSelector(cocos2d::SEL_SCHEDULE, cocos2d::CCObject*, float, bool);
@@ -422,7 +497,10 @@ class cocos2d::CCScheduler {
422497
}
423498

424499
[[link(win, android)]]
425-
class cocos2d::CCSprite {
500+
class cocos2d::CCSprite : cocos2d::CCNodeRGBA, cocos2d::CCTextureProtocol {
501+
CCSprite();
502+
virtual ~CCSprite();
503+
426504
static cocos2d::CCSprite* create(char const*);
427505
static cocos2d::CCSprite* createWithSpriteFrameName(char const*);
428506

@@ -431,7 +509,7 @@ class cocos2d::CCSprite {
431509
}
432510

433511
[[link(win, android)]]
434-
class cocos2d::CCSpriteFrameCache {
512+
class cocos2d::CCSpriteFrameCache : cocos2d::CCObject {
435513
bool init();
436514
void addSpriteFramesWithDictionary(cocos2d::CCDictionary*, cocos2d::CCTexture2D*);
437515
void addSpriteFramesWithFile(const char*);
@@ -448,7 +526,14 @@ class cocos2d::CCSpriteFrameCache {
448526
}
449527

450528
[[link(win, android)]]
451-
class cocos2d::CCTouchDispatcher {
529+
class cocos2d::CCTexture2D : cocos2d::CCObject {
530+
// CCTexture2D(cocos2d::CCTexture2D const&);
531+
virtual ~CCTexture2D();
532+
CCTexture2D();
533+
}
534+
535+
[[link(win, android)]]
536+
class cocos2d::CCTouchDispatcher : cocos2d::CCObject, cocos2d::EGLTouchDelegate {
452537
void touches(cocos2d::CCSet*, cocos2d::CCEvent*, unsigned int);
453538

454539
virtual void touchesBegan(cocos2d::CCSet*, cocos2d::CCEvent*);
@@ -462,7 +547,7 @@ class cocos2d::CCTouchDispatcher {
462547
}
463548

464549
[[link(win, android)]]
465-
class cocos2d::extension::CCHttpClient {
550+
class cocos2d::extension::CCHttpClient : cocos2d::CCObject {
466551
void send(cocos2d::extension::CCHttpRequest*);
467552
}
468553

@@ -472,6 +557,12 @@ class cocos2d::extension::CCControlUtils {
472557
static cocos2d::extension::RGBA RGBfromHSV(cocos2d::extension::HSV);
473558
}
474559

560+
[[link(win, android)]]
561+
class cocos2d::CCImage : cocos2d::CCObject {
562+
CCImage();
563+
virtual ~CCImage();
564+
}
565+
475566
[[link(win, android)]]
476567
class cocos2d::CCIMEDispatcher {
477568
static cocos2d::CCIMEDispatcher* sharedDispatcher();
@@ -494,12 +585,12 @@ class cocos2d::CCIMEDispatcher {
494585
}
495586

496587
[[link(win, android)]]
497-
class cocos2d::CCKeyboardDispatcher {
588+
class cocos2d::CCKeyboardDispatcher : cocos2d::CCObject {
498589
bool dispatchKeyboardMSG(cocos2d::enumKeyCodes, bool);
499590
}
500591

501592
[[link(win, android)]]
502-
class cocos2d::CCMouseDispatcher {
593+
class cocos2d::CCMouseDispatcher : cocos2d::CCObject {
503594
// CCMouseDispatcher(cocos2d::CCMouseDispatcher const&);
504595
// CCMouseDispatcher();
505596
void addDelegate(cocos2d::CCMouseDelegate*);
@@ -545,7 +636,7 @@ class DS_Dictionary {
545636
}
546637

547638
[[link(win, android)]]
548-
class ObjectDecoder {
639+
class ObjectDecoder : cocos2d::CCNode {
549640
// virtual ~ObjectDecoder();
550641

551642
static ObjectDecoder* sharedDecoder();

bindings/1.920/GeometryDash.bro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2209,8 +2209,8 @@ class FileSaveManager {
22092209

22102210
[[link(android)]]
22112211
class FLAlertLayer : cocos2d::CCLayerColor {
2212-
// virtual ~FLAlertLayer();
22132212
// FLAlertLayer();
2213+
virtual ~FLAlertLayer() = win 0x152b0;
22142214

22152215
FLAlertLayer() {
22162216
m_buttonMenu = nullptr;
@@ -6259,7 +6259,7 @@ class PlayLayer : cocos2d::CCLayer, CCCircleWaveDelegate, GameplayDelegate {
62596259
TodoReturn markCheckpoint();
62606260
TodoReturn moveCameraToPos(cocos2d::CCPoint);
62616261
TodoReturn objectIntersectsCircle(GameObject*, GameObject*);
6262-
void onQuit();
6262+
void onQuit() = win 0xf3b80;
62636263
void pauseGame(bool) = win 0xf38c0;
62646264
TodoReturn pickupItem(GameObject*);
62656265
TodoReturn playEndAnimationToPos(cocos2d::CCPoint);

bindings/2.2074/Cocos2d.bro

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2123,7 +2123,9 @@ class cocos2d::CCNode : cocos2d::CCObject {
21232123
cocos2d::CCRect boundingBox() = imac 0x260cd0, m1 0x20ca74, ios 0x23b390;
21242124
void childrenAlloc();
21252125
cocos2d::CCPoint convertToNodeSpace(cocos2d::CCPoint const&) = imac 0x262c40, m1 0x20e94c, ios 0x23ccb8;
2126-
cocos2d::CCPoint convertToNodeSpaceAR(cocos2d::CCPoint const&);
2126+
cocos2d::CCPoint convertToNodeSpaceAR(cocos2d::CCPoint const& worldPoint) = m1 0x20e9dc, imac 0x262cc0, ios inline {
2127+
return convertToNodeSpace(worldPoint) - m_obAnchorPointInPoints;
2128+
}
21272129
cocos2d::CCPoint convertToWindowSpace(cocos2d::CCPoint const&);
21282130
cocos2d::CCPoint convertToWorldSpace(cocos2d::CCPoint const&) = imac 0x262c80, m1 0x20e994, ios 0x23cd00;
21292131
cocos2d::CCPoint convertToWorldSpaceAR(cocos2d::CCPoint const& point) = m1 0x20ea40, imac 0x262d20, ios inline {
@@ -2760,6 +2762,8 @@ class cocos2d::CCEGLView {
27602762
[[missing(android, mac, ios)]]
27612763
void setupWindow(cocos2d::CCRect);
27622764
[[missing(android, mac, ios)]]
2765+
bool initGlew();
2766+
[[missing(android, mac, ios)]]
27632767
void onGLFWCharCallback(GLFWwindow* window, unsigned int entered);
27642768
[[missing(android, mac, ios)]]
27652769
void onGLFWCursorEnterFunCallback(GLFWwindow* window, int entered);
@@ -4604,7 +4608,7 @@ class cocos2d {
46044608
static cocos2d::CCBMFontConfiguration* FNTConfigLoadFile(char const*) = m1 0x4f1f3c, imac 0x5bc460, ios 0x2f8b04;
46054609
static void FNTConfigRemoveCache();
46064610
static cocos2d::CCAffineTransform __CCAffineTransformMake(float, float, float, float, float, float);
4607-
static cocos2d::CCPoint __CCPointApplyAffineTransform(cocos2d::CCPoint const&, cocos2d::CCAffineTransform const&) = m1 0x1df1e8, imac 0x22e4c0;
4611+
static cocos2d::CCPoint __CCPointApplyAffineTransform(cocos2d::CCPoint const&, cocos2d::CCAffineTransform const&) = m1 0x1df1e8, imac 0x22e4c0, ios 0x40b1f8;
46084612
static cocos2d::CCSize __CCSizeApplyAffineTransform(cocos2d::CCSize const&, cocos2d::CCAffineTransform const&) = m1 0x1df244, imac 0x22e530;
46094613
static cocos2d::CCPoint ccCardinalSplineAt(cocos2d::CCPoint&, cocos2d::CCPoint&, cocos2d::CCPoint&, cocos2d::CCPoint&, float, float);
46104614
static void ccDrawCardinalSpline(cocos2d::CCPointArray*, float, unsigned int);
@@ -5080,10 +5084,10 @@ class pugi::xml_document {
50805084
~xml_document() = imac 0x62ab90, m1 0x555520, ios 0x3a5a20;
50815085
}
50825086

5083-
[[link(win, android)]]
5087+
[[link(android)]]
50845088
class pugi::xml_node {
50855089
// i'm not bothering
5086-
xml_node() = m1 inline, imac inline, ios inline {
5090+
xml_node() {
50875091
_root = nullptr;
50885092
}
50895093
}

0 commit comments

Comments
 (0)