//
// TutorialLayer::init from 0x100252d8c to 0x10025320c (1152 bytes)
//
// 2 xrefs:
// > sub_100252CC8 @ 0x100252d40
// > ??> @ 0x10090d0a0
//
// This function is hookable on this platform (idp: arm, 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:01:32 +0000
//
__int64 __fastcall TutorialLayer::init(_QWORD *a1)
{
__int64 v2; // x20
__int64 v3; // x0
void *v4; // x0
void *v5; // x0
__int64 v6; // x21
__int64 v7; // x21
float v8; // s0
float *v9; // x0
__int64 v10; // x0
__int64 v11; // x22
__int64 v12; // x22
void *v13; // x0
__int64 v14; // x0
void *v15; // x0
__int64 v16; // x0
__int64 v17; // x21
__int64 v18; // x22
__n128 v19; // q0
__int64 v20; // x21
__int64 v21; // x0
float v23; // [xsp+10h] [xbp-70h] BYREF
_QWORD v24[2]; // [xsp+18h] [xbp-68h] BYREF
__int64 v25; // [xsp+28h] [xbp-58h] BYREF
LODWORD(v24[0]) = -1778384896;
v2 = cocos2d::CCLayerColor::initWithColor((__int64)a1, (__int64)v24);
if ( (_DWORD)v2 )
{
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 1000LL))(a1, 1);
(*(void (__fastcall **)(_QWORD *, __int64))(*a1 + 1072LL))(a1, 1);
v3 = cocos2d::CCDirector::sharedDirector();
cocos2d::CCDirector::getWinSize(v3, &v25);
v4 = cocos2d::CCLayer::create();
a1[73] = v4;
(*(void (__fastcall **)(_QWORD *, void *))(*a1 + 456LL))(a1, v4);
v5 = cocos2d::CCLayer::create();
a1[83] = v5;
(*(void (__fastcall **)(_QWORD, void *))(*(_QWORD *)a1[73] + 456LL))(a1[73], v5);
sub_1000262CC((float *)v24, 0.0, 0.0, 80.0, 80.0);
v6 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v24);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v6 + 912LL))(v6, 255);
sub_1000262C4((float *)v24, 420.0, 260.0);
(*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v6 + 320LL))(v6, v24);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)a1[73] + 464LL))(a1[73], v6, 0xFFFFFFFFLL);
sub_1000262BC((float *)v24, *(float *)&v25 * 0.5, *((float *)&v25 + 1) * 0.5);
(*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v6 + 184LL))(v6, v24);
v7 = cocos2d::CCLabelBMFont::create_1("How To Play", "bigFont.fnt");
(*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)a1[73] + 464LL))(a1[73], v7, 20);
sub_1000262BC((float *)v24, *(float *)&v25 * 0.5, (float)((float)(*((float *)&v25 + 1) * 0.5) + 130.0) + -25.0);
(*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v7 + 184LL))(v7, v24);
v8 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 328LL))(v7);
if ( v8 > 300.0 )
{
v9 = (float *)(*(__int64 (__fastcall **)(__int64, float))(*(_QWORD *)v7 + 328LL))(v7, v8);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v7 + 160LL))(v7, 300.0 / *v9);
}
*((_DWORD *)a1 + 160) = -1;
v10 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
v11 = CCMenuItemSpriteExtra::create(v10, 0, a1, sub_10025320C, 0);
CCMenuItemSpriteExtra::setSizeMult(1.6);
v12 = sub_100270434(v11);
a1[69] = v12;
sub_1000262BC(
(float *)v24,
(float)((float)(*(float *)&v25 * 0.5) + -210.0) + 10.0,
(float)((float)(*((float *)&v25 + 1) * 0.5) + 130.0) + -10.0);
(*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v12 + 184LL))(v12, v24);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(*(_QWORD *)a1[73] + 464LL))(a1[73], a1[69], 10);
v13 = ButtonSprite::create_1(
(__int64)"Next",
220,
0,
0,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_01.png",
0.6,
40.0);
v14 = CCMenuItemSpriteExtra::create(v13, 0, a1, sub_100253264, 0);
a1[85] = v14;
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)a1[69] + 456LL))(a1[69], v14);
v15 = ButtonSprite::create_1(
(__int64)"Exit",
220,
0,
0,
(__int64)"bigFont.fnt",
(__int64)"GJ_button_01.png",
0.6,
40.0);
v16 = CCMenuItemSpriteExtra::create(v15, 0, a1, sub_10025320C, 0);
a1[86] = v16;
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)a1[69] + 456LL))(a1[69], v16);
v17 = a1[85];
v18 = a1[69];
sub_1000262BC(
&v23,
(float)((float)(*(float *)&v25 * 0.5) + 210.0) + -52.0,
(float)((float)(*((float *)&v25 + 1) * 0.5) + -130.0) + 50.0);
cocos2d::CCNode::convertToNodeSpace(v24, v18, &v23, v19);
(*(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v17 + 184LL))(v17, v24);
v20 = a1[86];
v21 = (*(__int64 (__fastcall **)(_QWORD))(*(_QWORD *)a1[85] + 192LL))(a1[85]);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v20 + 184LL))(v20, v21);
(*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)a1[86] + 344LL))(a1[86], 0);
*((_DWORD *)a1 + 168) = 0;
TutorialLayer::loadPage(a1, 1);
}
return v2;
}