// // cocos2d::CCDrawNode::init from 0x1800152c0 to 0x180015427 (359 bytes) // // 3 xrefs: // > @ 0x1800e6758 // > @ 0x1801438a8 // > @ 0x1801ae4a0 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // char __fastcall cocos2d::CCDrawNode::init(cocos2d::CCDrawNode *this) { cocos2d::CCDrawNode_vtbl *v1; // rbx cocos2d::CCShaderCache *v3; // rax struct cocos2d::CCGLProgram *v4; // rax unsigned int v5; // ecx unsigned int m_uBufferCapacity; // edx __int64 v7; // rax cocos2d::ccV2F_C4B_T2F *m_pBuffer; // rcx v1 = this->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; this->m_sBlendFunc.src = 1; this->m_sBlendFunc.dst = 771; v3 = cocos2d::CCShaderCache::sharedShaderCache(); v4 = cocos2d::CCShaderCache::programForKey(v3, "ShaderPositionColor"); ((void (__fastcall *)(cocos2d::CCDrawNode *, struct cocos2d::CCGLProgram *))v1->setShaderProgram)(this, v4); v5 = 512; m_uBufferCapacity = this->m_uBufferCapacity; if ( this->m_nBufferCount + 512 > m_uBufferCapacity ) { if ( m_uBufferCapacity > 0x200 ) v5 = this->m_uBufferCapacity; v7 = m_uBufferCapacity + v5; m_pBuffer = this->m_pBuffer; this->m_uBufferCapacity = v7; this->m_pBuffer = (cocos2d::ccV2F_C4B_T2F *)realloc(m_pBuffer, 20 * v7); } _glewGenBuffers(1, &this->m_uVbo); _glewBindBuffer(34962, this->m_uVbo); _glewBufferData(34962, 20LL * this->m_uBufferCapacity, this->m_pBuffer); _glewEnableVertexAttribArray(0); _glewVertexAttribPointer(0, 2, 5126); _glewEnableVertexAttribArray(1); _glewVertexAttribPointer(1, 4, 5121); _glewBindBuffer(34962, 0); this->m_bDirty = 1; return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source