//
// PlayLayer::toggleDebugDraw from 0x140505e40 to 0x140505ec4 (132 bytes)
//
// 7 xrefs:
// > PauseLayer::onPracticeMode @ 0x1404dab34
// > PlayLayer::updateDebugDrawSettings @ 0x140505e31
// > PlayLayer::destroyPlayer @ 0x140512728
// > PlayLayer::resetLevel @ 0x140518eaf
// > PlayLayer::togglePracticeMode @ 0x14051a01f
// > PlayLayer::togglePracticeMode @ 0x14051a04b
// > ??> @ 0x14092a890
//
// 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 11:33:26 +0000
//
__int64 __fastcall PlayLayer::toggleDebugDraw(cocos2d::CCDrawNode **a1)
{
unsigned __int8 v2; // di
__int64 result; // rax
v2 = (*((unsigned __int8 (__fastcall **)(cocos2d::CCDrawNode **))*a1 + 145))(a1)
|| (*((unsigned __int8 (__fastcall **)(cocos2d::CCDrawNode **))*a1 + 146))(a1);
result = (*(__int64 (__fastcall **)(cocos2d::CCDrawNode *))(*(_QWORD *)a1[1806] + 344LL))(a1[1806]);
if ( v2 != (_BYTE)result )
{
cocos2d::CCDrawNode::clear(a1[1806]);
result = (*(__int64 (__fastcall **)(cocos2d::CCDrawNode *, _QWORD))(*(_QWORD *)a1[1806] + 336LL))(a1[1806], v2);
if ( v2 )
return (*((__int64 (__fastcall **)(cocos2d::CCDrawNode **))*a1 + 144))(a1);
}
return result;
}