//
// GameManager::loadDeathEffect from 0x4145fc to 0x41467c (128 bytes)
//
// 1 xrefs:
// > PlayLayer::setupHasCompleted @ 0x40a130
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:47:39 +0000
//
int *__fastcall GameManager::loadDeathEffect(int *this, int a2)
{
int *v2; // r6
int v3; // r4
int v4; // r1
cocos2d::CCString *v5; // r0
cocos2d::CCTextureCache *CString; // r5
cocos2d::CCTextureCache *v7; // r0
cocos2d::CCTextureCache *v8; // r7
cocos2d::CCString *v9; // r0
const char *v10; // r0
cocos2d::CCSpriteFrameCache *v11; // r0
cocos2d::CCSpriteFrameCache *v12; // r7
cocos2d::CCString *v13; // r0
const char *v14; // r0
v2 = this;
if ( a2 <= 0 )
{
v3 = 1;
}
else
{
if ( a2 >= 20 )
a2 = 20;
v3 = a2;
}
v4 = *(this + 196);
if ( v3 != v4 )
{
if ( v4 > 1 )
{
v5 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"PlayerExplosion_%02d.png",
(const char *)(v4 - 1));
CString = (cocos2d::CCTextureCache *)cocos2d::CCString::getCString(v5);
v7 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache(CString);
this = (int *)cocos2d::CCTextureCache::removeTextureForKey(v7, (const char *)CString);
}
if ( v3 > 1 )
{
v8 = (cocos2d::CCTextureCache *)cocos2d::CCTextureCache::sharedTextureCache((cocos2d::CCTextureCache *)this);
v9 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"PlayerExplosion_%02d.png",
(const char *)(v3 - 1));
v10 = (const char *)cocos2d::CCString::getCString(v9);
v11 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCTextureCache::addImage(v8, v10, 0);
v12 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v11);
v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"PlayerExplosion_%02d.plist",
(const char *)(v3 - 1));
v14 = (const char *)cocos2d::CCString::getCString(v13);
this = (int *)cocos2d::CCSpriteFrameCache::addSpriteFramesWithFile(v12, v14);
}
v2[196] = v3;
}
return this;
}