// // cocos2d::CCDirector::setDefaultValues from 0x1800bf450 to 0x1800bf5b5 (357 bytes) // // 4 xrefs: // > cocos2d::CCConfiguration::loadConfigFile @ 0x1800bdaad // > cocos2d::CCDirector::init @ 0x1800be7b2 // > @ 0x1801438a8 // > @ 0x1801b92f4 // // 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::CCDirector::setDefaultValues(cocos2d::CCDirector *this) { cocos2d::CCConfiguration *v2; // rdi __m128d v3; // xmm1 std::string *CString; // rax std::string *v5; // rdx __int64 v6; // rcx char v7; // al std::string *v8; // rbx int v9; // ecx char Bool; // al v2 = cocos2d::CCConfiguration::sharedConfiguration(); v3 = (__m128d)0x3FF0000000000000uLL; v3.m128d_f64[0] = 1.0 / cocos2d::CCConfiguration::getNumber(v2, "cocos2d.x.fps", 60.0); *(__m128d *)&this->m_dAnimationInterval = _mm_unpacklo_pd(v3, v3); this->m_bDisplayStats = cocos2d::CCConfiguration::getBool(v2, "cocos2d.x.display_fps", 0); CString = cocos2d::CCConfiguration::getCString(v2, "cocos2d.x.gl.projection", "3d"); v5 = CString; if ( *(_WORD *)CString->m_data.m_smallStorage._Elems != 25651 || CString->m_data.m_smallStorage._Elems[2] ) { if ( CString->m_data.m_smallStorage._Elems[0] == 50 && CString->m_data.m_smallStorage._Elems[1] == 100 && !CString->m_data.m_smallStorage._Elems[2] ) { this->m_eProjection = kCCDirectorProjection2D; } else { v6 = 0; while ( 1 ) { v7 = v5->m_data.m_smallStorage._Elems[v6++]; if ( v7 != aCustom[v6 - 1] ) break; if ( v6 == 7 ) { this->m_eProjection = kCCDirectorProjectionCustom; break; } } } } else { this->m_eProjection = kCCDirectorProjection3D; } v8 = cocos2d::CCConfiguration::getCString(v2, "cocos2d.x.texture.pixel_format_for_png", "rgba8888"); if ( !strcmp(v8->m_data.m_smallStorage._Elems, "rgba8888") ) { v9 = 0; LABEL_18: cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(v9); goto LABEL_19; } if ( !strcmp(v8->m_data.m_smallStorage._Elems, "rgba4444") ) { v9 = 6; goto LABEL_18; } if ( !strcmp(v8->m_data.m_smallStorage._Elems, "rgba5551") ) { v9 = 7; goto LABEL_18; } LABEL_19: Bool = cocos2d::CCConfiguration::getBool(v2, "cocos2d.x.texture.pvrv2_has_alpha_premultiplied", 0); cocos2d::CCTexture2D::PVRImagesHavePremultipliedAlpha(Bool); }