//
// CreatorLayer::onMultiplayer from 0x1000b5d80 to 0x1000b6040 (704 bytes)
//
// 1 xrefs:
// > CreatorLayer::init @ 0x1000b53b4
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall CreatorLayer::onMultiplayer(CreatorLayer *a1, cocos2d::CCObject *a2)
{
int m_versusDialogIndex; // w8
int v4; // w20
const std::string::value_type *v5; // x1
const std::string::value_type *v6; // x1
char *v7; // x0
DialogLayer *v8; // x20
int v9; // w8
int v10; // w8
std::string __p; // [xsp+0h] [xbp-80h] BYREF
std::string __dst; // [xsp+20h] [xbp-60h] BYREF
std::string v13; // [xsp+40h] [xbp-40h] BYREF
std::string v14; // [xsp+58h] [xbp-28h] BYREF
sub_100009900(&v14, "Versus mode has been delayed,\nbut it's in the works!");
sub_100009900(&v13, "The Keymaster");
m_versusDialogIndex = a1->m_versusDialogIndex;
v4 = 2;
if ( m_versusDialogIndex <= 5 )
{
if ( m_versusDialogIndex <= 2 )
{
if ( m_versusDialogIndex != 1 )
{
if ( m_versusDialogIndex != 2 )
goto LABEL_26;
v5 = "I blame RobTop.";
goto LABEL_17;
}
v6 = "Yea... It's still delayed.";
}
else if ( m_versusDialogIndex == 3 )
{
v6 = "Who else could we blame?\nWe're not even real.";
}
else
{
if ( m_versusDialogIndex == 4 )
{
std::string::assign(&v14, "Speak for yourself I'm real!");
std::string::assign(&v13, "Scratch");
v4 = 14;
goto LABEL_26;
}
v6 = "Yea, a real pain in the...";
}
goto LABEL_25;
}
if ( m_versusDialogIndex > 8 )
{
if ( m_versusDialogIndex != 9 )
{
if ( m_versusDialogIndex == 10 )
{
std::string::assign(&v14, "...");
std::string::assign(&v13, "Scratch");
v4 = 52;
}
else if ( m_versusDialogIndex == 11 )
{
std::string::assign(&v14, ".....");
v4 = 17;
}
goto LABEL_26;
}
v6 = "You don't have a chop...";
LABEL_25:
std::string::assign(&v14, v6);
goto LABEL_26;
}
if ( m_versusDialogIndex == 6 )
{
std::string::assign(&v14, "You're just mad because you don't have a shop.");
std::string::assign(&v13, "Scratch");
v4 = 26;
}
else
{
if ( m_versusDialogIndex != 7 )
{
v5 = "I HAVE SAID TOO MUCH!\nQUICKLY TO THE CHOPPER!";
LABEL_17:
std::string::assign(&v14, v5);
std::string::assign(&v13, "Scratch");
v4 = 10;
goto LABEL_26;
}
std::string::assign(&v14, "You have a shop?");
v4 = 4;
}
LABEL_26:
if ( SHIBYTE(v13.__r_.__value_.__r.__words[2]) < 0 )
sub_1000097D0(&__dst, v13.__r_.__value_.__l.__data_, v13.__r_.__value_.__l.__size_);
else
__dst = v13;
if ( SHIBYTE(v14.__r_.__value_.__r.__words[2]) < 0 )
sub_1000097D0(&__p, v14.__r_.__value_.__l.__data_, v14.__r_.__value_.__l.__size_);
else
__p = v14;
v7 = DialogObject::create((__int64)&__dst, (__int64)&__p, v4, 0, 0xFFFFFF, 1.0);
v8 = DialogLayer::create((DialogObject *)v7, 2);
if ( SHIBYTE(__p.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__p.__r_.__value_.__l.__data_);
if ( SHIBYTE(__dst.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__dst.__r_.__value_.__l.__data_);
((void (__fastcall *)(CreatorLayer *, DialogLayer *, __int64))a1->addChild_0)(a1, v8, 100);
DialogLayer::updateChatPlacement(v8, Center);
DialogLayer::animateInRandomSide(v8);
v9 = a1->m_versusDialogIndex;
if ( v9 <= 10 )
v10 = v9 + 1;
else
v10 = 0;
a1->m_versusDialogIndex = v10;
if ( SHIBYTE(v13.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v13.__r_.__value_.__l.__data_);
if ( SHIBYTE(v14.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v14.__r_.__value_.__l.__data_);
}