// // ShaderLayer::visit from 0x1003d1be0 to 0x1003d1e78 (664 bytes) // // 1 xrefs: // > @ 0x10092f1e0 // // 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 ShaderLayer::visit(ShaderLayer *a1) { cocos2d::CCDirector *v2; // rax cocos2d::CCDirector *v3; // rax cocos2d::CCGridBase *m_pGrid; // rdi cocos2d::CCGLProgram *v5; // rax cocos2d::CCGLProgram *v6; // rax cocos2d::CCPoint v7; // xmm0_8 cocos2d::ccArray *data; // r14 unsigned int num; // eax unsigned __int64 v10; // r15 cocos2d::CCSprite *v11; // rdi cocos2d::CCSprite *m_sprite; // r14 cocos2d::CCGridBase *v13; // rdi GJBaseGameLayer *m_gameLayer; // rax __int64 v15; // r14 cocos2d::CCDirector *v16; // rax double v17; // [rsp-5Ch] [rbp-5Ch] BYREF unsigned __int64 v18; // [rsp-54h] [rbp-54h] BYREF unsigned __int64 v19; // [rsp-4Ch] [rbp-4Ch] BYREF double v20; // [rsp-44h] [rbp-44h] BYREF __m128 v21; // [rsp-3Ch] [rbp-3Ch] BYREF float v22; // [rsp-2Ch] [rbp-2Ch] if ( a1->m_bVisible ) { v2 = cocos2d::CCDirector::sharedDirector(); v22 = sub_1004849C0(v2); v3 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::setContentScaleFactor(v3, a1->m_scaleFactor); ShaderLayer::prepareTargetContainer((ShaderLayer *)&v19); sub_10028CBE0(v21.f32, a1->m_targetTextureSizeExtra.width * 0.5, 0.5 * a1->m_targetTextureSizeExtra.height); sub_10028CCE0(&v20, &v19, (unsigned __int64 *)&v21); sub_100207E70(); m_pGrid = a1->m_pGrid; if ( m_pGrid && m_pGrid->m_bActive ) cocos2d::CCGridBase::beforeDraw(m_pGrid); cocos2d::CCNode::transform(a1); v5 = (cocos2d::CCGLProgram *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_sprite->getShaderProgram)(a1->m_sprite); cocos2d::CCGLProgram::use(v5); v6 = (cocos2d::CCGLProgram *)((__int64 (__fastcall *)(cocos2d::CCSprite *))a1->m_sprite->getShaderProgram)(a1->m_sprite); cocos2d::CCGLProgram::setUniformsForBuiltins(v6); *(double *)&v7 = sub_10028CC60(&v21, &v20); ShaderLayer::updateEffectOffsets(a1, v7); ShaderLayer::preSplitScreenShader(a1); cocos2d::CCRenderTexture::beginWithClear_3(a1->m_renderTexture, 0.0, 0.0, 0.0, 0.0); data = a1->m_pChildren->data; num = data->num; if ( data->num ) { v10 = 0; do { v11 = (cocos2d::CCSprite *)data->arr[v10]; if ( v11 != a1->m_sprite ) { ((void (__fastcall *)(cocos2d::CCSprite *, __m128 *))v11->visit)(v11, &v21); num = data->num; } ++v10; } while ( v10 < num ); } cocos2d::CCRenderTexture::end(a1->m_renderTexture); sub_10028D180(&v21, (unsigned __int64 *)&a1->m_sprite->m_obRect); m_sprite = a1->m_sprite; sub_10028CBE0((float *)&v18, v21.f32[0] / a1->m_state.m_textureScaleX, v21.f32[1] / a1->m_state.m_textureScaleY); sub_10028CCE0(&v17, &v19, &v18); ((void (__fastcall *)(cocos2d::CCSprite *, double *))m_sprite->setPosition)(m_sprite, &v17); ((void (__fastcall *)(cocos2d::CCSprite *))a1->m_sprite->visit)(a1->m_sprite); a1->m_uOrderOfArrival = 0; v13 = a1->m_pGrid; if ( v13 && v13->m_bActive ) cocos2d::CCGridBase::afterDraw(v13, a1); sub_100207EB0((__int64)v13); m_gameLayer = a1->m_gameLayer; if ( m_gameLayer ) { v15 = *((_QWORD *)&m_gameLayer->m_objectParent + (a1->m_state.m_minBlendingLayer >= 2)); (*(void (__fastcall **)(__int64, cocos2d::CCPoint *))(*(_QWORD *)v15 + 184LL))(v15, &a1->m_savedCameraPosition); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v15 + 160LL))(v15, 1.0); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v15 + 344LL))(v15, a1->m_savedCameraRotation); ((void (__fastcall *)(ShaderLayer *, double))a1->setRotation)(a1, 0.0); } v16 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::setContentScaleFactor(v16, v22); } }
GD Web Decomp Icon

GD Web Decomp

Raw Source