//
// GJRotationControl::init from 0x6ef190 to 0x6ef422 (658 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:57:34 +0000
//
int __fastcall GJRotationControl::init(GJRotationControl *this)
{
int v2; // r8
const char *v3; // r1
int v4; // r0
int v5; // r3
const char *v6; // r1
int v7; // r0
cocos2d::CCMenu *v8; // r0
cocos2d::CCMenuItem *v9; // r1
cocos2d::CCMenu *v10; // r10
void (__fastcall *v11)(cocos2d::CCMenu *, _DWORD *); // r9
int *v12; // r0
int *v13; // r10
void (__fastcall *v14)(int *, _DWORD *); // r11
int v15; // r3
int v16; // r3
int v17; // r10
int v18; // r6
void (__fastcall *v19)(int, _DWORD *); // r10
const char *v20; // r1
int v21; // r5
int v22; // r0
int v23; // r5
int (__fastcall *v24)(int, const char **); // r10
cocos2d::CCMenu *v25; // r0
cocos2d::CCMenu *v26; // r5
const char *v28[4]; // [sp+8h] [bp-34h] BYREF
int v29[3]; // [sp+18h] [bp-24h] BYREF
_DWORD v30[4]; // [sp+24h] [bp-18h] BYREF
v2 = cocos2d::CCLayer::init(this);
if ( v2 )
{
(*(void (__fastcall **)(GJRotationControl *, int))(*(_DWORD *)this + 500))(this, 1);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v30, 60.0, 0.0);
cocos2d::CCPoint::operator=((char *)this + 324, v30);
(*(void (__fastcall **)(GJRotationControl *, void *))(*(_DWORD *)this + 148))(this, &unk_D2DAF0);
v4 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_rotationControlBtn01_001.png", v3);
v5 = *(_DWORD *)this;
*((_DWORD *)this + 83) = v4;
(*(void (__fastcall **)(GJRotationControl *, int, int))(v5 + 232))(this, v4, 1);
v7 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"warpLockOffBtn_001.png", v6);
v28[2] = (const char *)GJRotationControl::onToggleLockRotation;
v28[3] = nullptr;
v8 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(
v7,
0,
(int)this,
(int)GJRotationControl::onToggleLockRotation,
0);
*((_DWORD *)this + 87) = v8;
v10 = (cocos2d::CCMenu *)cocos2d::CCMenu::createWithItem(v8, v9);
v11 = *(void (__fastcall **)(cocos2d::CCMenu *, _DWORD *))(*(_DWORD *)v10 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v30, 110.0, 35.0);
v11(v10, v30);
(*(void (__fastcall **)(GJRotationControl *, cocos2d::CCMenu *, int))(*(_DWORD *)this + 232))(this, v10, 3);
ControlMenuTouch::addMenu((GJRotationControl *)((char *)this + 364), v10);
v12 = CCTextInputNode::create(
(CCTextInputNode *)0x42400000,
19.2,
" ",
"Thonburi",
(const char *)&dword_18,
"bigFont.fnt",
v28[0]);
*((_DWORD *)this + 89) = v12;
v13 = v12;
v14 = *(void (__fastcall **)(int *, _DWORD *))(*v12 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v30, 110.0, 0.0);
v14(v13, v30);
CCTextInputNode::setMaxLabelScale(*((_DWORD *)this + 89), 0.48);
CCTextInputNode::setMaxLabelWidth(*((_DWORD *)this + 89), 48.0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**(_DWORD **)(*((_DWORD *)this + 89) + 416) + 172))(
*(_DWORD *)(*((_DWORD *)this + 89) + 416),
0);
v15 = *((_DWORD *)this + 89);
v29[0] = 0;
v29[1] = 0;
*(_DWORD *)(v15 + 424) = 7;
v16 = *((_DWORD *)this + 89);
v29[2] = 0;
*(_DWORD *)(v16 + 504) = 1;
*(_DWORD *)(*((_DWORD *)this + 89) + 508) = 2;
v17 = *((_DWORD *)this + 89);
std::string::__init(v29, "0123456789.-", 0xCu);
CCTextInputNode::setAllowedChars(v17, (unsigned __int8 *)v29);
std::string::~string((int)v29);
*(_BYTE *)(*((_DWORD *)this + 89) + 324) = 1;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v30, 0.0, 0.0, 40.0, 40.0);
v18 = cocos2d::extension::CCScale9Sprite::create("square02_small.png", v30);
v19 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v18 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v30, 80.0, 32.0);
v19(v18, v30);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v18 + 80))(v18, 1059061760);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v18 + 456))(v18, 90);
(*(void (__fastcall **)(int, _DWORD, int))(*(_DWORD *)v18 + 124))(v18, 0, -1090519040);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 89) + 232))(*((_DWORD *)this + 89), v18, -1);
(*(void (__fastcall **)(GJRotationControl *, _DWORD, int))(*(_DWORD *)this + 232))(this, *((_DWORD *)this + 89), 2);
v21 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_updateBtn_001.png", v20);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v21 + 80))(v21, 1053609165);
v30[0] = GJRotationControl::onApplyAngle;
v30[1] = 0;
v22 = CCMenuItemSpriteExtra::create(v21, 0, (int)this, (int)GJRotationControl::onApplyAngle, 0);
*((_DWORD *)this + 90) = v22;
v23 = v22;
v24 = *(int (__fastcall **)(int, const char **))(*(_DWORD *)v22 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v28, 151.0, 0.0);
v25 = (cocos2d::CCMenu *)v24(v23, v28);
v26 = (cocos2d::CCMenu *)cocos2d::CCMenu::create(v25);
(*(void (__fastcall **)(cocos2d::CCMenu *, void *))(*(_DWORD *)v26 + 92))(v26, &unk_D2DAF0);
(*(void (__fastcall **)(cocos2d::CCMenu *, void *))(*(_DWORD *)v26 + 160))(v26, &unk_D2DAF8);
(*(void (__fastcall **)(cocos2d::CCMenu *, _DWORD))(*(_DWORD *)v26 + 228))(v26, *((_DWORD *)this + 90));
(*(void (__fastcall **)(GJRotationControl *, cocos2d::CCMenu *, int))(*(_DWORD *)this + 232))(this, v26, 3);
ControlMenuTouch::addMenu((GJRotationControl *)((char *)this + 364), v26);
GJRotationControl::setAngle(this, 0.0);
}
return v2;
}