//
// CreateGuidelinesLayer::onRecord from 0x5c0744 to 0x5c08cc (392 bytes)
//
// 3 xrefs:
// > FindBPMLayer::onRecord @ 0x5c08e0
// > ??> @ 0x958f8
// > ??> @ 0x11463c0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void CreateGuidelinesLayer::onRecord(CreateGuidelinesLayer *a1, cocos2d::CCObject *a2)
{
float v3; // s8
char *v4; // x0
cocos2d::CCSprite *m_circleSprite; // x0
void (__fastcall *setColor)(cocos2d::CCSprite *__hidden, const cocos2d::ccColor3B *); // x2
unsigned int *v7; // x2
int v8; // w1
char *v9; // [xsp+40h] [xbp+40h] BYREF
a1->m_offsetInput->onClickTrackNode(a1->m_offsetInput, 0);
CCTextInputNode::getString(a1->m_offsetInput, (__int64)&v9);
v3 = atof(v9);
v4 = v9 - 24;
if ( v9 - 24 != (char *)&qword_124B6B0 )
{
if ( &pthread_create )
{
v7 = (unsigned int *)(v9 - 8);
do
v8 = __ldaxr(v7);
while ( __stlxr(v8 - 1, v7) );
}
else
{
v8 = *((_DWORD *)v9 - 2);
*((_DWORD *)v9 - 2) = v8 - 1;
}
if ( v8 <= 0 )
operator delete(v4);
}
CreateGuidelinesLayer::toggleItems(a1, 1);
a1->m_offsetInput->setTouchEnabled(a1->m_offsetInput, 0);
a1->m_elapsed = v3;
sub_D1798C(&a1->m_guidelineString, &byte_F288A0, 0);
a1->m_guidelines = 0;
m_circleSprite = a1->m_circleSprite;
setColor = m_circleSprite->setColor;
LOBYTE(v9) = -1;
*(_WORD *)((char *)&v9 + 1) = 150;
setColor(m_circleSprite, (const cocos2d::ccColor3B *)&v9);
a1->m_circleSprite->setScale(a1->m_circleSprite, 0.8);
a1->playMusic(a1);
a1->m_recording = 1;
cocos2d::CCNode::scheduleUpdate(a1);
}