//
// GJBaseGameLayer::tryGetMainObject from 0x14032c200 to 0x14032c2a8 (168 bytes)
//
// 41 xrefs:
// > EditorUI::findObject @ 0x1401c93b4
// > GJBaseGameLayer::playKeyframeAnimation @ 0x14031f410
// > GJBaseGameLayer::getSavedPosition @ 0x140320892
// > GJBaseGameLayer::getSavedPosition @ 0x140320960
// > GJBaseGameLayer::prepareSavePositionObjects @ 0x140321a59
// > GJBaseGameLayer::triggerMoveCommand @ 0x140326740
// > GJBaseGameLayer::triggerMoveCommand @ 0x140326772
// > GJBaseGameLayer::triggerTransformCommand @ 0x1403272d6
// > GJBaseGameLayer::updateGradientLayers @ 0x14032813f
// > GJBaseGameLayer::updateGradientLayers @ 0x140328150
// > GJBaseGameLayer::updateGradientLayers @ 0x140328161
// > GJBaseGameLayer::updateGradientLayers @ 0x140328172
// > GJBaseGameLayer::positionForShaderTarget @ 0x14032b232
// > GJBaseGameLayer::speedForShaderTarget @ 0x14032b2f2
// > GJBaseGameLayer::tryGetObject @ 0x14032c2d5
// > GJBaseGameLayer::positionUIObjects @ 0x14032ef45
// > GJBaseGameLayer::positionUIObjects @ 0x14032ef85
// > GJBaseGameLayer::processAreaEffects @ 0x140331424
// > GJBaseGameLayer::processRotationActions @ 0x1403345c9
// > GJBaseGameLayer::processTransformActions @ 0x14033544a
// > GJBaseGameLayer::processAdvancedFollowAction @ 0x140338273
// > GJBaseGameLayer::processFollowActions @ 0x1403391b7
// > GJBaseGameLayer::optimizeMoveGroups @ 0x140339d4b
// > GJBaseGameLayer::updateCamera @ 0x140345d50
// > GJBaseGameLayer::updateCamera @ 0x140345db7
// > GJBaseGameLayer::updateCamera @ 0x140345e1a
// > GJBaseGameLayer::updateCamera @ 0x140345e89
// > GJBaseGameLayer::updateCamera @ 0x140345eed
// > GJBaseGameLayer::updateCamera @ 0x140346f89
// > GJBaseGameLayer::updateStaticCameraPosToGroup @ 0x140348d7d
// > GJBaseGameLayer::spawnParticleTrigger @ 0x140349b83
// > GJBaseGameLayer::volumeForProximityEffect @ 0x14034c8bf
// > GJBaseGameLayer::visit @ 0x140351b0c
// > GJBaseGameLayer::visit @ 0x140351b1d
// > GJBaseGameLayer::visit @ 0x140351b2e
// > GJBaseGameLayer::visit @ 0x140351b3f
// > PlayLayer::activatePlatformerEndTrigger @ 0x14050ac80
// > PlayLayer::processCheckpoints @ 0x140513a36
// > ??> @ 0x1408b6058
// > ??> @ 0x1408b606c
// > ??> @ 0x14091f280
//
// 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:30:30 +0000
//
struct cocos2d::CCObject *__fastcall GJBaseGameLayer::tryGetMainObject(__int64 a1, int a2)
{
struct cocos2d::CCObject *result; // rax
cocos2d::CCArray *v5; // rax
cocos2d::CCArray *v6; // rdi
struct cocos2d::CCObject *Group; // rax
cocos2d::CCArray *v8; // rbx
if ( a2 <= 0 )
return nullptr;
v5 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(a1 + 3968), a2);
v6 = v5;
if ( !v5 || !cocos2d::CCArray::count(v5) || (result = cocos2d::CCArray::objectAtIndex(v6, 0)) == nullptr )
{
Group = GJBaseGameLayer::getGroup(a1, (unsigned int)a2);
v8 = Group;
if ( Group && cocos2d::CCArray::count(Group) == 1 )
return cocos2d::CCArray::objectAtIndex(v8, 0);
else
return nullptr;
}
return result;
}