//
// cocos2d::CCDirector::setDefaultValues from 0x7c9de0 to 0x7c9eac (204 bytes)
//
// 2 xrefs:
// > cocos2d::CCConfiguration::loadConfigFile @ 0x7b42b4
// > cocos2d::CCDirector::init @ 0x7c9eee
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:00:29 +0000
//
int __fastcall cocos2d::CCDirector::setDefaultValues(cocos2d::CCDirector *this)
{
cocos2d::CCConfiguration *v2; // r5
double v3; // r0
const char *CString; // r7
int v5; // r3
const char *v6; // r6
int v7; // r0
cocos2d::CCTexture2D *Bool; // r0
bool v9; // r1
v2 = (cocos2d::CCConfiguration *)cocos2d::CCConfiguration::sharedConfiguration(this);
v3 = COERCE_DOUBLE(cocos2d::CCConfiguration::getNumber(v2, "cocos2d.x.fps", 60.0));
*((double *)this + 20) = 1.0 / v3;
*((double *)this + 21) = 1.0 / v3;
*((_BYTE *)this + 177) = cocos2d::CCConfiguration::getBool(v2, "cocos2d.x.display_fps", 0);
CString = cocos2d::CCConfiguration::getCString(v2, "cocos2d.x.gl.projection", "3d");
if ( !strcmp(CString, "3d") )
{
v5 = 1;
LABEL_7:
*((_DWORD *)this + 61) = v5;
goto LABEL_8;
}
if ( !strcmp(CString, "2d") )
{
*((_DWORD *)this + 61) = 0;
goto LABEL_8;
}
if ( !strcmp(CString, "custom") )
{
v5 = 2;
goto LABEL_7;
}
LABEL_8:
v6 = cocos2d::CCConfiguration::getCString(v2, "cocos2d.x.texture.pixel_format_for_png", "rgba8888");
v7 = strcmp(v6, "rgba8888");
if ( !v7 )
{
LABEL_13:
cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(v7);
goto LABEL_14;
}
if ( !strcmp(v6, "rgba4444") )
{
v7 = 6;
goto LABEL_13;
}
if ( !strcmp(v6, "rgba5551") )
{
v7 = 7;
goto LABEL_13;
}
LABEL_14:
Bool = (cocos2d::CCTexture2D *)cocos2d::CCConfiguration::getBool(
v2,
"cocos2d.x.texture.pvrv2_has_alpha_premultiplied",
0);
return cocos2d::CCTexture2D::PVRImagesHavePremultipliedAlpha(Bool, v9);
}