From a00415937b7869a5c3483e0c5149c0ff3cc80bd1 Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sun, 23 Oct 2022 19:33:38 -0300 Subject: [PATCH 1/3] add some cocos2d bindings --- bindings/Cocos2d.bro | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bindings/Cocos2d.bro b/bindings/Cocos2d.bro index 01245111..58a291f2 100644 --- a/bindings/Cocos2d.bro +++ b/bindings/Cocos2d.bro @@ -126,6 +126,7 @@ class cocos2d::CCDirector { auto calculateMPF() = mac 0x19eac0; auto convertToGL(cocos2d::CCPoint const&) = mac 0x24a210; auto drawScene() = mac 0x249690; + auto willSwitchToScene(cocos2d::CCScene* scene); auto setNextScene() = mac 0x2498d0; auto showStats() = mac 0x2499e0; @@ -206,6 +207,11 @@ class cocos2d::CCFileUtils : cocos2d::TypeInfo { virtual std::string fullPathForFilename(const char* filename, bool unk); } +class cocos2d::CCGLProgram { + auto setUniformsForBuiltins() = mac 0x232c70; + auto use() = max 0x231d70; +} + class cocos2d::CCHide { static cocos2d::CCHide* create() = mac 0x4543e0; } @@ -698,6 +704,11 @@ class cocos2d::CCSet { auto anyObject() = mac 0x45b410; } +class cocos2d::CCShaderCache { + static auto sharedShaderCache() = mac 0xe6d10; + auto programForKey(const char*) = mac 0xe7d40; +} + class cocos2d::CCSprite { virtual ~CCSprite() = mac 0x133430, ios 0x15b92c; virtual auto init() = mac 0x132ef0, ios 0x15b488; @@ -1013,6 +1024,7 @@ class cocos2d::extension::CCScrollView { class cocos2d { static auto ccGLBlendFunc(GLenum, GLenum) = mac 0x1ae560; static auto ccDrawSolidRect(cocos2d::CCPoint, cocos2d::CCPoint, cocos2d::_ccColor4F) = mac 0xecf00; + static auto ccGLEnableVertexAttribs(unsigned int) = mac 0x1ae740; } // class DS_Dictionary { From 0376ad49c2f8a0ada1dfe79c15a98056cb1368eb Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sun, 23 Oct 2022 19:37:08 -0300 Subject: [PATCH 2/3] you didnt see that --- bindings/Cocos2d.bro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/Cocos2d.bro b/bindings/Cocos2d.bro index 58a291f2..3a39d0e7 100644 --- a/bindings/Cocos2d.bro +++ b/bindings/Cocos2d.bro @@ -209,7 +209,7 @@ class cocos2d::CCFileUtils : cocos2d::TypeInfo { class cocos2d::CCGLProgram { auto setUniformsForBuiltins() = mac 0x232c70; - auto use() = max 0x231d70; + auto use() = mac 0x231d70; } class cocos2d::CCHide { From 6658b7626745c7b1ee304daa2f08d945291136cf Mon Sep 17 00:00:00 2001 From: matcool <26722564+matcool@users.noreply.github.com> Date: Sun, 23 Oct 2022 20:01:42 -0300 Subject: [PATCH 3/3] ccGLBindTexture2D --- bindings/Cocos2d.bro | 1 + 1 file changed, 1 insertion(+) diff --git a/bindings/Cocos2d.bro b/bindings/Cocos2d.bro index 3a39d0e7..74d05ded 100644 --- a/bindings/Cocos2d.bro +++ b/bindings/Cocos2d.bro @@ -1025,6 +1025,7 @@ class cocos2d { static auto ccGLBlendFunc(GLenum, GLenum) = mac 0x1ae560; static auto ccDrawSolidRect(cocos2d::CCPoint, cocos2d::CCPoint, cocos2d::_ccColor4F) = mac 0xecf00; static auto ccGLEnableVertexAttribs(unsigned int) = mac 0x1ae740; + static auto ccGLBindTexture2D(GLuint) = mac 0x1ae610; } // class DS_Dictionary {