From 11299df20cd4ed82dd0c8b460afff51c0561375d Mon Sep 17 00:00:00 2001 From: HJfod <60038575+HJfod@users.noreply.github.com> Date: Wed, 22 Mar 2023 21:49:29 +0200 Subject: [PATCH] remove uses of RT_ADD + more bindings --- bindings/GeometryDash.bro | 1 + loader/include/Geode/cocos/cocoa/CCArray.h | 20 ++++++++------------ loader/include/Geode/utils/cocos.hpp | 2 +- 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/bindings/GeometryDash.bro b/bindings/GeometryDash.bro index dee0eff2..693923cf 100644 --- a/bindings/GeometryDash.bro +++ b/bindings/GeometryDash.bro @@ -1327,6 +1327,7 @@ class EditorUI : cocos2d::CCLayer, FLAlertLayerProtocol, ColorSelectDelegate, GJ virtual void scrollWheel(float vertical, float horizontal) = win 0x921d0, mac 0x31370, ios 0x2c4884; void createMoveMenu() = mac 0x275e0, win 0x8c0d0; void sliderChanged(cocos2d::CCObject* slider) = win 0x78cc0; + void repositionObjectsToCenter(cocos2d::CCArray* objs, cocos2d::CCPoint center, bool ignoreGroupParent) = win 0x88410; virtual void draw() = win 0x8fbe0; bool m_isPlayingMusic; diff --git a/loader/include/Geode/cocos/cocoa/CCArray.h b/loader/include/Geode/cocos/cocoa/CCArray.h index f6d53a8b..282d804c 100644 --- a/loader/include/Geode/cocos/cocoa/CCArray.h +++ b/loader/include/Geode/cocos/cocoa/CCArray.h @@ -177,12 +177,10 @@ public: unsigned int indexOfObject(CCObject* object) const; /** Returns an element with a certain index */ CCObject* objectAtIndex(unsigned int index); - RT_ADD( - /** - * Rob modification - * Returns an element with a certain index casted to CCString */ - CCString* stringAtIndex(unsigned int index); - ); + /** + * Rob modification + * Returns an element with a certain index casted to CCString */ + CCString* stringAtIndex(unsigned int index); /** * Returns first element, or null if empty @@ -202,12 +200,10 @@ public: /** Add a certain object */ void addObject(CCObject* object); - RT_ADD( - /** - * Rob modification - * Add a certain object */ - void addObjectNew(CCObject* object); - ); + /** + * Rob modification + * Add a certain object */ + void addObjectNew(CCObject* object); /** Add all elements of an existing array */ void addObjectsFromArray(CCArray* otherArray); /** Insert a certain object at a certain index */ diff --git a/loader/include/Geode/utils/cocos.hpp b/loader/include/Geode/utils/cocos.hpp index 2090cc7b..ba469853 100644 --- a/loader/include/Geode/utils/cocos.hpp +++ b/loader/include/Geode/utils/cocos.hpp @@ -25,7 +25,7 @@ struct json::Serialize<cocos2d::ccColor4B> { }; // operators for CC geometry -namespace geode { +namespace cocos2d { static cocos2d::CCPoint& operator*=(cocos2d::CCPoint& pos, float mul) { pos.x *= mul; pos.y *= mul;