//
// AnimatedShopKeeper::init from 0x4e2bf8 to 0x4e2c98 (160 bytes)
//
// 1 xrefs:
// > AnimatedShopKeeper::create @ 0x4e2d2c
//
// 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
//
bool AnimatedShopKeeper::init(AnimatedShopKeeper *a1, ShopType a2)
{
const char *v3; // r1
_BOOL4 v4; // r5
int v5; // s15
SpriteAnimationManager *m_animationManager; // r0
a1->m_type = a2;
switch ( a2 )
{
case Secret:
v3 = "GJShopKeeper2";
break;
case Community:
v3 = "GJShopKeeper3";
break;
case Mechanic:
v3 = "GJShopKeeper4";
break;
case Diamond:
v3 = "GJShopKeeper5";
break;
default:
v3 = "GJShopKeeper";
break;
}
v4 = CCAnimatedSprite::initWithType(a1, v3, nullptr, 0);
if ( v4 )
{
a1->m_idleInt2 = (int)(float)((float)((float)((float)rand() * 4.6566e-10) * 5.0) + 10.0);
v5 = rand();
m_animationManager = a1->m_animationManager;
a1->m_idleInt1 = (int)(float)((float)((float)((float)v5 * 4.6566e-10) + (float)((float)v5 * 4.6566e-10)) + 1.0);
SpriteAnimationManager::stopAnimations(m_animationManager);
}
return v4;
}