//
// cocos2d::CCDirector::setDefaultValues from 0x1004771c0 to 0x100477317 (343 bytes)
//
// 2 xrefs:
// > cocos2d::CCDirector::init @ 0x100476efe
// > cocos2d::CCConfiguration::loadConfigFile @ 0x10051b747
//
// This function is hookable on this platform (idp: pc, 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 12:30:35 +0000
//
void __fastcall cocos2d::CCDirector::setDefaultValues(__int64 a1, __int64 a2, __int64 a3, __int64 a4, __int64 a5)
{
__int64 v5; // rbx
double v6; // xmm1_8
const char *CString; // rax
int v8; // ecx
int v9; // eax
const char *v10; // r14
int v11; // edi
char Bool; // al
v5 = cocos2d::CCConfiguration::sharedConfiguration(a1, a2, a3, a4, a5);
v6 = 1.0 / cocos2d::CCConfiguration::getNumber(v5, "cocos2d.x.fps", 60.0);
*(double *)(a1 + 200) = v6;
*(double *)(a1 + 208) = v6;
*(_BYTE *)(a1 + 217) = cocos2d::CCConfiguration::getBool(v5, "cocos2d.x.display_fps", 0);
CString = (const char *)cocos2d::CCConfiguration::getCString(v5, "cocos2d.x.gl.projection", "3d");
v8 = *(unsigned __int8 *)CString;
if ( v8 == 50 )
{
if ( CString[1] == 100 && !CString[2] )
{
v9 = 0;
goto LABEL_10;
}
}
else if ( v8 == 51 && CString[1] == 100 && !CString[2] )
{
v9 = 1;
goto LABEL_10;
}
if ( strcmp(CString, "custom") )
goto LABEL_11;
v9 = 2;
LABEL_10:
*(_DWORD *)(a1 + 316) = v9;
LABEL_11:
v10 = (const char *)cocos2d::CCConfiguration::getCString(v5, "cocos2d.x.texture.pixel_format_for_png", "rgba8888");
if ( !strcmp(v10, "rgba8888") )
{
v11 = 0;
goto LABEL_17;
}
if ( !strcmp(v10, "rgba4444") )
{
v11 = 6;
goto LABEL_17;
}
if ( !strcmp(v10, "rgba5551") )
{
v11 = 7;
LABEL_17:
cocos2d::CCTexture2D::setDefaultAlphaPixelFormat(v11);
}
Bool = cocos2d::CCConfiguration::getBool(v5, "cocos2d.x.texture.pvrv2_has_alpha_premultiplied", 0);
cocos2d::CCTexture2D::PVRImagesHavePremultipliedAlpha(Bool);
}