//
// UILayer::announceLevelControls from 0x100051140 to 0x1000512dc (412 bytes)
//
// 1 xrefs:
// > PlayLayer::onEnterTransitionDidFinish @ 0x10014c840
//
// 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 10:57:43 +0000
//
void __fastcall UILayer::announceLevelControls(__int64 a1)
{
std::string *v2; // x0
_QWORD *v3; // x8
std::string::size_type size; // x8
const std::string::value_type *v5; // x1
std::string::size_type v6; // x8
const std::string::value_type *v7; // x1
std::string::size_type v8; // x8
__int64 v9; // x8
const char *v10; // x20
void *__p[2]; // [xsp+0h] [xbp-40h] BYREF
char v12; // [xsp+17h] [xbp-29h]
std::string v13; // [xsp+18h] [xbp-28h] BYREF
if ( (*(_BYTE *)(a1 + 648) & 1) == 0 && (*(_BYTE *)(a1 + 626) & 1) == 0 && *(_BYTE *)(a1 + 596) == 1 )
{
if ( *(_QWORD *)(a1 + 640) )
{
v2 = (std::string *)GameManager::sharedState(a1);
if ( v2[22].__r_.__value_.__r.__words[2] )
{
*(_BYTE *)(a1 + 648) = 1;
memset(&v13, 0, sizeof(v13));
v3 = *(_QWORD **)(a1 + 640);
if ( v3[12] )
{
v2 = std::string::assign(&v13, "Keyboard");
v3 = *(_QWORD **)(a1 + 640);
}
if ( v3[19] != v3[20] )
{
size = HIBYTE(v13.__r_.__value_.__r.__words[2]);
if ( (v13.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
size = v13.__r_.__value_.__l.__size_;
if ( size )
v5 = " + Touch";
else
v5 = "Touch";
v2 = std::string::append(&v13, v5);
v3 = *(_QWORD **)(a1 + 640);
}
if ( v3[17] )
{
v6 = HIBYTE(v13.__r_.__value_.__r.__words[2]);
if ( (v13.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
v6 = v13.__r_.__value_.__l.__size_;
if ( v6 )
v7 = " + Controller";
else
v7 = "Controller";
v2 = std::string::append(&v13, v7);
}
v8 = HIBYTE(v13.__r_.__value_.__r.__words[2]);
if ( (v13.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) != 0LL )
v8 = v13.__r_.__value_.__l.__size_;
if ( v8 )
{
v9 = *(_QWORD *)(*(_QWORD *)(GameManager::sharedState(v2) + 544) + 1936LL);
v10 = "Custom Controls: ";
if ( (*(_BYTE *)(v9 + 1844) & 1) == 0 && (unsigned int)sub_100051318(v9 + 1816, v9 + 1784) )
v10 = "Creator Controls: ";
std::operator+(__p, v10, &v13);
UILayer::showTextAlert(a1, (char *)__p);
if ( v12 < 0 )
operator delete(__p[0]);
}
if ( SHIBYTE(v13.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v13.__r_.__value_.__l.__data_);
}
}
}
}