//
// GJPathSprite::addShardSprite from 0x6d2964 to 0x6d2a62 (254 bytes)
//
// 2 xrefs:
// > GJPathSprite::updateState @ 0x6d2af8
// > GJPathPage::unlockAnimationStep3 @ 0x6d41ae
//
// 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:57:04 +0000
//
int __fastcall GJPathSprite::addShardSprite(GJPathSprite *this)
{
char *v2; // r1
const char *v3; // r1
cocos2d::CCSprite *v4; // r0
int v5; // r5
void (__fastcall *v6)(int, _BYTE *); // r10
_BYTE v8[8]; // [sp+0h] [bp-28h] BYREF
_BYTE v9[8]; // [sp+8h] [bp-20h] BYREF
_BYTE v10[8]; // [sp+10h] [bp-18h] BYREF
int v11[2]; // [sp+18h] [bp-10h] BYREF
cocos2d::CCSprite *v12; // [sp+20h] [bp-8h]
v11[0] = 0;
v11[1] = 0;
v12 = nullptr;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v8, 0.0, 1.0);
switch ( *((_DWORD *)this + 127) )
{
case 1:
v2 = "fireShardBig_001.png";
goto LABEL_3;
case 2:
v2 = "iceShardBig_001.png";
goto LABEL_3;
case 3:
v2 = "poisonShardBig_001.png";
goto LABEL_3;
case 4:
v2 = "shadowShardBig_001.png";
goto LABEL_3;
case 5:
v2 = "lavaShardBig_001.png";
goto LABEL_3;
case 6:
v2 = "shard0201ShardBig_001.png";
goto LABEL_3;
case 7:
v2 = "shard0202ShardBig_001.png";
goto LABEL_3;
case 8:
v2 = "shard0203ShardBig_001.png";
goto LABEL_3;
case 9:
v2 = "shard0204ShardBig_001.png";
goto LABEL_3;
case 0xA:
v2 = "shard0205ShardBig_001.png";
LABEL_3:
std::string::assign(v11, v2);
if ( (v11[0] & 1) != 0 )
v4 = v12;
else
v4 = (cocos2d::CCSprite *)((char *)v11 + 1);
v5 = cocos2d::CCSprite::createWithSpriteFrameName(v4, v3);
(*(void (__fastcall **)(GJPathSprite *, int, int))(*(_DWORD *)this + 232))(this, v5, 1);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v5 + 80))(v5, 1057803469);
v6 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v5 + 92);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v9, this);
cocos2d::CCPoint::operator+(v10, v9, v8);
v6(v5, v10);
break;
default:
return std::string::~string((int)v11);
}
return std::string::~string((int)v11);
}