// // cocos2d::CCRenderTexture::draw from 0x1005f6080 to 0x1005f62e0 (608 bytes) // // 1 xrefs: // > @ 0x10097bdf0 // // 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 // void __fastcall cocos2d::CCRenderTexture::draw(cocos2d::CCRenderTexture *a1) { GLbitfield m_uClearFlags; // edi GLbitfield v3; // eax cocos2d::CCArray *m_pChildren; // rax cocos2d::ccArray *data; // rax cocos2d::CCSprite **arr; // r14 unsigned __int64 v7; // r15 cocos2d::CCSprite *v8; // rdi cocos2d::CCDirector *v9; // r14 GLfloat v10; // [rsp+8h] [rbp-38h] BYREF GLint s; // [rsp+Ch] [rbp-34h] BYREF GLfloat params[4]; // [rsp+10h] [rbp-30h] BYREF if ( !a1->m_bAutoDraw ) return; cocos2d::CCRenderTexture::begin(a1); m_uClearFlags = a1->m_uClearFlags; if ( !m_uClearFlags ) goto LABEL_10; *(_OWORD *)params = 0; v10 = 0.0; s = 0; if ( (m_uClearFlags & 0x4000) != 0 ) { glGetFloatv(0xC22u, params); glClearColor(a1->m_sClearColor.r, a1->m_sClearColor.g, a1->m_sClearColor.b, a1->m_sClearColor.a); m_uClearFlags = a1->m_uClearFlags; if ( (m_uClearFlags & 0x100) == 0 ) { LABEL_5: if ( (m_uClearFlags & 0x400) == 0 ) goto LABEL_6; goto LABEL_21; } } else if ( (m_uClearFlags & 0x100) == 0 ) { goto LABEL_5; } glGetFloatv(0xB73u, &v10); glClearDepth(a1->m_fClearDepth); m_uClearFlags = a1->m_uClearFlags; if ( (m_uClearFlags & 0x400) == 0 ) { LABEL_6: glClear(m_uClearFlags); v3 = a1->m_uClearFlags; if ( (v3 & 0x4000) == 0 ) goto LABEL_7; LABEL_22: glClearColor(params[0], params[1], params[2], params[3]); v3 = a1->m_uClearFlags; if ( (v3 & 0x100) == 0 ) { LABEL_8: if ( (v3 & 0x400) == 0 ) goto LABEL_10; goto LABEL_9; } goto LABEL_23; } LABEL_21: glGetIntegerv(0xB91u, &s); glClearStencil(a1->m_nClearStencil); glClear(a1->m_uClearFlags); v3 = a1->m_uClearFlags; if ( (v3 & 0x4000) != 0 ) goto LABEL_22; LABEL_7: if ( (v3 & 0x100) == 0 ) goto LABEL_8; LABEL_23: glClearDepth(v10); if ( (a1->m_uClearFlags & 0x400) != 0 ) LABEL_9: glClearStencil(s); LABEL_10: ((void (__fastcall *)(cocos2d::CCRenderTexture *))a1->sortAllChildren)(a1); m_pChildren = a1->m_pChildren; if ( m_pChildren ) { data = m_pChildren->data; if ( data->num ) { arr = (cocos2d::CCSprite **)data->arr; v7 = (unsigned __int64)&arr[data->num - 1]; do { v8 = *arr; if ( !*arr ) break; if ( v8 != a1->m_pSprite ) ((void (__fastcall *)(cocos2d::CCSprite *))v8->visit)(v8); ++arr; } while ( (unsigned __int64)arr <= v7 ); } } v9 = cocos2d::CCDirector::sharedDirector(); glBindFramebuffer(0x8D40u, a1->m_nOldFBO); cocos2d::CCDirector::setViewport(v9); sub_100207E30(5889); sub_100207EB0(5889); sub_100207E30(5888); sub_100207EB0(5888); }
GD Web Decomp Icon

GD Web Decomp

Raw Source