//
// EditorUI::getSpriteButton from 0x1401addc0 to 0x1401adffe (574 bytes)
//
// 26 xrefs:
// > EditorUI::init @ 0x1401aa616
// > EditorUI::getSpriteButton_1 @ 0x1401adda6
// > EditorUI::createMoveMenu @ 0x1401f2476
// > EditorUI::createMoveMenu @ 0x1401f24f7
// > EditorUI::createMoveMenu @ 0x1401f2578
// > EditorUI::createMoveMenu @ 0x1401f25f9
// > EditorUI::createMoveMenu @ 0x1401f267a
// > EditorUI::createMoveMenu @ 0x1401f27b3
// > EditorUI::createMoveMenu @ 0x1401f28e4
// > EditorUI::createMoveMenu @ 0x1401f2a14
// > EditorUI::createMoveMenu @ 0x1401f2b44
// > EditorUI::createMoveMenu @ 0x1401f2c74
// > EditorUI::createMoveMenu @ 0x1401f2d60
// > EditorUI::createDpadMoveMenu @ 0x1401f3c29
// > EditorUI::setupDeleteMenu @ 0x1401f43fc
// > EditorUI::setupDeleteMenu @ 0x1401f45a8
// > EditorUI::setupDeleteMenu @ 0x1401f46d0
// > EditorUI::setupDeleteMenu @ 0x1401f47c7
// > EditorUI::setupDeleteMenu @ 0x1401f4881
// > EditorUI::setupDeleteMenu @ 0x1401f4919
// > EditorUI::setupDeleteMenu @ 0x1401f4a2c
// > EditorUI::setupDeleteMenu @ 0x1401f4fb6
// > EditorUI::setupDeleteMenu @ 0x1401f5069
// > EditorUI::createViewButton @ 0x1401f8010
// > ??> @ 0x140919d78
// > ??> @ 0x140919d84
//
// 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:27:54 +0000
//
// Hidden C++ exception states: #wind=1
cocos2d::CCObject *__fastcall EditorUI::getSpriteButton(
int a1,
__int64 a2,
__int64 a3,
__int64 a4,
int a5,
int a6,
const struct cocos2d::CCPoint *a7,
float a8)
{
const char *v12; // rdi
float v13; // xmm6_4
const struct cocos2d::CCSize *v14; // rax
__int64 v15; // r8
float v16; // xmm1_4
int v17; // xmm0_4
cocos2d::CCObject *v18; // rbx
__int64 *v19; // rax
__int64 v20; // r9
cocos2d::CCObject *v21; // rdi
int v22; // xmm6_4
__int64 v23; // rax
__int64 v25; // [rsp+30h] [rbp-68h]
_BYTE v26[16]; // [rsp+50h] [rbp-48h] BYREF
void *v27; // [rsp+B8h] [rbp+20h] BYREF
switch ( a6 )
{
case 2:
v12 = "GJ_button_02.png";
break;
case 3:
v12 = "GJ_button_03.png";
break;
case 4:
v12 = "GJ_button_04.png";
break;
case 5:
v12 = "GJ_button_05.png";
break;
case 6:
v12 = "GJ_button_06.png";
break;
default:
v12 = "GJ_button_01.png";
break;
}
v13 = a8;
if ( a8 <= 0.0 )
{
v27 = operator new(0x2C8u);
v19 = (__int64 *)ButtonSprite::ButtonSprite((__int64)v27);
v18 = (cocos2d::CCObject *)v19;
if ( v19 )
{
if ( ButtonSprite::init(v19, a2, 32, v20, 32.0, 1065353216, v25, v12, 1, 0) )
{
cocos2d::CCObject::autorelease(v18);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v18 + 8LL))(v18, 1);
v18 = nullptr;
}
}
}
else
{
v14 = (const struct cocos2d::CCSize *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 320LL))(a2);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v27, v14);
v16 = fminf(32.0 / *(float *)&v27, 32.0 / *((float *)&v27 + 1));
v17 = 1065353216;
if ( v16 <= 1.0 )
v17 = LODWORD(v16);
v18 = ButtonSprite::create(a2, (int)(float)(v13 - 8.0), v15, 32.0, v17);
}
v21 = CCMenuItemSpriteExtra::create((int)v18, 0, a1, a3);
v22 = a5;
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v21 + 160LL))(v21);
*((_DWORD *)v21 + 101) = v22;
if ( a4 )
(*(void (__fastcall **)(__int64, cocos2d::CCObject *))(*(_QWORD *)a4 + 464LL))(a4, v21);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v26, a7);
cocos2d::CCPoint::operator=((char *)v18 + 672, v23);
ButtonSprite::updateSpriteBGSize((__int64 *)v18);
return v21;
}