//
// cocos2d::CCDirector::setDefaultValues from 0xd488e8 to 0xd48a3c (340 bytes)
//
// 3 xrefs:
// > cocos2d::CCConfiguration::loadConfigFile @ 0xd21c88
// > cocos2d::CCDirector::init @ 0xd48a78
// > ??> @ 0x72610
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:07:36 +0000
//
__int64 __fastcall cocos2d::CCDirector::setDefaultValues(cocos2d::CCDirector *this)
{
cocos2d::CCConfiguration *v2; // x19
double v3; // d0
double v4; // d0
const char *CString; // x22
const char *v6; // x21
__int64 v7; // x0
cocos2d::CCTexture2D *Bool; // x0
bool v9; // w1
v2 = (cocos2d::CCConfiguration *)cocos2d::CCConfiguration::sharedConfiguration(this);
cocos2d::CCConfiguration::getNumber(v2, "cocos2d.x.fps", 60.0);
v4 = 1.0 / v3;
*((double *)this + 25) = v4;
*((double *)this + 26) = v4;
*((_BYTE *)this + 217) = cocos2d::CCConfiguration::getBool(v2, "cocos2d.x.display_fps", 0);
CString = cocos2d::CCConfiguration::getCString(v2, "cocos2d.x.gl.projection", "3d");
if ( !strcmp(CString, "3d") )
{
*((_DWORD *)this + 79) = 1;
}
else if ( !strcmp(CString, "2d") )
{
*((_DWORD *)this + 79) = 0;
}
else if ( !strcmp(CString, "custom") )
{
*((_DWORD *)this + 79) = 2;
}
v6 = cocos2d::CCConfiguration::getCString(v2, "cocos2d.x.texture.pixel_format_for_png", "rgba8888");
v7 = strcmp(v6, "rgba8888");
if ( !(_DWORD)v7 )
goto LABEL_12;
if ( !strcmp(v6, "rgba4444") )
{
cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(6);
goto LABEL_6;
}
if ( !strcmp(v6, "rgba5551") )
{
v7 = 7;
LABEL_12:
cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(v7);
}
LABEL_6:
Bool = (cocos2d::CCTexture2D *)cocos2d::CCConfiguration::getBool(
v2,
"cocos2d.x.texture.pvrv2_has_alpha_premultiplied",
0);
return cocos2d::CCTexture2D::PVRImagesHavePremultipliedAlpha(Bool, v9);
}