From ec22fd45c833745d763fabd73312cdd3b2e24705 Mon Sep 17 00:00:00 2001 From: alk <45172705+altalk23@users.noreply.github.com> Date: Sat, 18 Mar 2023 22:37:36 +0300 Subject: [PATCH 1/2] Update AddressGen.cpp --- codegen/src/AddressGen.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/codegen/src/AddressGen.cpp b/codegen/src/AddressGen.cpp index 23efa676..9fd0f4b0 100644 --- a/codegen/src/AddressGen.cpp +++ b/codegen/src/AddressGen.cpp @@ -103,7 +103,12 @@ std::string generateAddressHeader(Root& root) { ); } else if (codegen::getStatus(field) == BindStatus::NeedsBinding) { - address_str = fmt::format("base::get() + 0x{:x}", codegen::platformNumber(fn->binds)); + if (field.parent.rfind("cocos2d::", 0) == 0 && codegen::platform == Platform::Windows) { + address_str = fmt::format("base::getCocos() + 0x{:x}", codegen::platformNumber(fn->binds)); + } + else { + address_str = fmt::format("base::get() + 0x{:x}", codegen::platformNumber(fn->binds)); + } } else { continue; From 951abe5e754d01785ec79e1e8ae69ca9f3be6db5 Mon Sep 17 00:00:00 2001 From: hjfod Date: Sat, 18 Mar 2023 23:08:39 +0200 Subject: [PATCH 2/2] add bindings --- bindings/Cocos2d.bro | 2 +- bindings/GeometryDash.bro | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/bindings/Cocos2d.bro b/bindings/Cocos2d.bro index 4f4aeb58..80e6b95a 100644 --- a/bindings/Cocos2d.bro +++ b/bindings/Cocos2d.bro @@ -365,7 +365,7 @@ class cocos2d::CCLayerColor { virtual auto setContentSize(cocos2d::CCSize const&) = mac 0x2749f0, ios 0xc8f64; virtual auto setOpacity(unsigned char) = mac 0x274db0, ios 0xc9108; virtual auto updateColor() = mac 0x274ae0, ios 0xc8f80; - virtual ~CCLayerColor() = mac 0x2743d0, ios 0x2743e0; + virtual ~CCLayerColor() = mac 0x2743d0, ios 0x2743e0, win 0xa1a20; } class cocos2d::CCLayerRGBA { diff --git a/bindings/GeometryDash.bro b/bindings/GeometryDash.bro index 0ea55604..33649bf5 100644 --- a/bindings/GeometryDash.bro +++ b/bindings/GeometryDash.bro @@ -3645,6 +3645,7 @@ class LevelEditorLayer : GJBaseGameLayer, LevelSettingsDelegate { void resetObjectVector() = mac 0x9c4b0; void resetToggledGroups() = mac 0x9aa70; void resetToggledGroupsAndObjects() = mac 0x9c3c0, win 0x166b80; + void resetEffectTriggerOptim(GameObject* obj, cocos2d::CCArray* objs) = win 0x167e00; void resetUnusedColorChannels() = mac 0x9a870; void rotationForSlopeNearObject(GameObject*) = mac 0x95cd0, win 0x161130; void runColorEffect(EffectGameObject*, int, float, float, bool) = mac 0x9bd30;