//
// EditorUI::getSpriteButton from 0x10000d800 to 0x10000d96c (364 bytes)
//
// 5 xrefs:
// > EditorUI::getSpriteButton_1 @ 0x100007f39
// > EditorUI::createDpadMoveMenu @ 0x10063abcc
// > EditorUI::setupDeleteMenu @ 0x10063b5a9
// > EditorUI::setupDeleteMenu @ 0x10063b6b7
// > EditorUI::setupDeleteMenu @ 0x10063b987
//
// 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 12:18:50 +0000
//
float *__fastcall EditorUI::getSpriteButton(
__int64 a1,
_QWORD *a2,
__int64 a3,
__int64 a4,
__int64 a5,
int a6,
float a7,
float a8,
__int64 a9)
{
unsigned int v13; // r9d
const char *v14; // r13
float v15; // xmm1_4
_QWORD *v16; // rdi
__int64 v17; // rsi
const char *v18; // r8
__int64 v19; // r9
__int64 v20; // rax
__int64 v21; // rax
__m128 v22; // xmm2
__int64 v23; // r14
float *v24; // r15
unsigned __int64 v27; // [rsp+8h] [rbp-38h] BYREF
float v28; // [rsp+10h] [rbp-30h]
float v29; // [rsp+14h] [rbp-2Ch]
v29 = a7;
v13 = a6 - 2;
if ( v13 > 4 )
{
v14 = "GJ_button_01.png";
if ( a8 <= 0.0 )
goto LABEL_3;
}
else
{
v14 = off_100AB5540[v13];
if ( a8 <= 0.0 )
{
LABEL_3:
v15 = 1.0;
v16 = a2;
v17 = 32;
v18 = v14;
v19 = 1;
goto LABEL_6;
}
}
v20 = *a2;
v28 = a8;
v21 = (*(__int64 (__fastcall **)(_QWORD *))(v20 + 328))(a2);
sub_100278630(&v27, v21);
v22 = _mm_div_ps((__m128)xmmword_100A03860, (__m128)v27);
v15 = fminf(fminf(_mm_movehdup_ps(v22).f32[0], v22.f32[0]), 1.0);
v17 = (unsigned int)(int)(float)(v28 + -8.0);
v16 = a2;
v18 = v14;
v19 = 0;
LABEL_6:
v23 = ButtonSprite::create(v16, v17, 0, 1, v18, v19, 32.0, v15, 0.0);
v24 = (float *)CCMenuItemSpriteExtra::create(v23, 0, a1, a3, a4);
(*(void (__fastcall **)(float *, float))(*(_QWORD *)v24 + 160LL))(v24, v29);
v24[101] = v29;
if ( a5 )
(*(void (__fastcall **)(__int64, float *))(*(_QWORD *)a5 + 456LL))(a5, v24);
sub_1002782D0(&v27, a9);
ButtonSprite::updateSpriteOffset(v23, &v27);
return v24;
}