//
// GameObject::addColorSprite from 0x4537ac to 0x454a42 (4758 bytes)
//
// 7 xrefs:
// > PlayLayer::setupHasCompleted @ 0x40a736
// > GameObject::objectFromVector @ 0x45c54a
// > LevelEditorLayer::copyObjectState @ 0x466354
// > LevelEditorLayer::copyParticleState @ 0x466c9a
// > LevelEditorLayer::createObject @ 0x46eb66
// > GJBaseGameLayer::createPlayerCollisionBlock @ 0x59c3e4
// > EditorUI::getCreateBtn @ 0x6f813e
//
// 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:48:38 +0000
//
void __fastcall GameObject::addColorSprite(cocos2d::CCObject **a1, int a2)
{
int v3; // r3
int v4; // r2
bool v5; // zf
int v6; // r2
int v7; // r2
cocos2d::CCObject *v8; // r0
cocos2d::CCObject *v9; // r6
void (__fastcall *v10)(cocos2d::CCObject *, int); // r7
int v11; // r0
int v12; // r2
int v13; // r2
const char *v14; // r1
cocos2d::CCSprite *v15; // r0
cocos2d::CCObject *v16; // r6
void (__fastcall *v17)(cocos2d::CCObject *, int); // r7
int v18; // r0
char *v19; // r1
const char *v20; // r1
cocos2d::CCSprite *v21; // r0
cocos2d::CCObject *v22; // r6
void (__fastcall *v23)(cocos2d::CCObject *, int); // r7
int v24; // r0
char *v25; // r1
const char *v26; // r1
cocos2d::CCSprite *v27; // r0
char *v28; // r1
char *v29; // r1
cocos2d::CCObject *v30; // r6
void (__fastcall *v31)(cocos2d::CCObject *, int); // r7
int v32; // r0
char *v33; // r1
const char *v34; // r1
cocos2d::CCSprite *v35; // r0
cocos2d::CCObject *v36; // r6
void (__fastcall *v37)(cocos2d::CCObject *, int); // r7
int v38; // r0
cocos2d::CCObject *v39; // r0
cocos2d::CCObject *v40; // r6
void (__fastcall *v41)(cocos2d::CCObject *, int); // r7
int v42; // r0
const char *v43; // r1
cocos2d::CCSprite *v44; // r0
cocos2d::CCObject *v45; // r6
void (__fastcall *v46)(cocos2d::CCObject *, int); // r7
int v47; // r0
cocos2d::CCSprite *v48; // r0
cocos2d::CCObject *v49; // r6
void (__fastcall *v50)(cocos2d::CCObject *, int); // r7
int v51; // r0
cocos2d::CCSprite *v52; // r0
cocos2d::CCObject *v53; // r0
cocos2d::CCObject *v54; // r6
void (__fastcall *v55)(cocos2d::CCObject *, int); // r7
int v56; // r0
const char *v57; // r1
cocos2d::CCSprite *v58; // r0
cocos2d::CCObject *v59; // r6
void (__fastcall *v60)(cocos2d::CCObject *, int); // r7
int v61; // r0
int v62[3]; // [sp+4h] [bp-20h] BYREF
int v63[2]; // [sp+10h] [bp-14h] BYREF
cocos2d::CCSprite *v64; // [sp+18h] [bp-Ch]
v3 = (int)a1[223];
if ( v3 > 2392 )
{
if ( v3 == 3027 )
goto LABEL_468;
if ( v3 > 3027 )
{
if ( v3 > 3591 )
{
if ( v3 > 4076 )
{
if ( v3 > 4180 )
{
if ( v3 > 4360 )
{
if ( v3 > 4399 )
{
if ( (unsigned int)(v3 - 4401) > 0x8A )
return;
}
else if ( v3 < 4384 && (unsigned int)(v3 - 4362) > 5 )
{
return;
}
}
else if ( v3 < 4314 && (v3 < 4185 || v3 > 4200 && (unsigned int)(v3 - 4202) > 0x6E) )
{
return;
}
}
else if ( v3 < 4174 )
{
if ( v3 > 4155 )
{
if ( v3 < 4158 || v3 > 4160 && (unsigned int)(v3 - 4163) > 9 )
return;
}
else if ( v3 < 4154 && (v3 < 4085 || v3 > 4145 && (unsigned int)(v3 - 4148) > 3) )
{
return;
}
}
}
else if ( v3 < 4070 )
{
if ( v3 > 4009 )
{
if ( v3 > 4039 )
{
if ( v3 > 4066 )
{
if ( v3 != 4068 )
return;
}
else if ( v3 < 4064 && (unsigned int)(v3 - 4046) > 0x10 )
{
return;
}
}
else if ( v3 < 4034 && (v3 < 4012 || v3 > 4022 && (unsigned int)(v3 - 4024) > 5) )
{
return;
}
}
else if ( v3 < 4000 )
{
if ( v3 > 3790 )
{
if ( v3 != 3792 && (v3 < 3792 || (unsigned int)(v3 - 3794) > 5) )
return;
}
else if ( v3 < 3780 && (v3 < 3593 || v3 > 3597 && (unsigned int)(v3 - 3702) > 0x4C) )
{
return;
}
}
}
}
else if ( v3 < 3586 )
{
if ( v3 > 3166 )
{
if ( v3 > 3510 )
{
if ( v3 > 3555 )
{
if ( v3 != 3567 )
{
if ( v3 >= 3568 )
{
if ( (unsigned int)(v3 - 3571) > 0xC )
return;
}
else if ( (unsigned int)(v3 - 3559) > 3 )
{
return;
}
}
}
else if ( v3 < 3549 && (v3 < 3512 || v3 > 3541 && (unsigned int)(v3 - 3544) > 2) )
{
return;
}
}
else if ( v3 < 3501 )
{
if ( v3 > 3351 )
{
if ( v3 > 3397 )
{
if ( (unsigned int)(v3 - 3402) > 0x5B )
return;
}
else if ( v3 < 3360 && v3 != 3358 )
{
return;
}
}
else if ( v3 < 3336 && (v3 <= 3168 || v3 > 3178 && (unsigned int)(v3 - 3181) > 0x99) )
{
return;
}
}
}
else if ( v3 < 3162 && v3 != 3103 )
{
if ( v3 >= 3104 )
{
if ( v3 > 3129 )
{
if ( v3 < 3132 || v3 > 3141 && (unsigned int)(v3 - 3143) > 9 )
return;
}
else if ( v3 < 3118 && v3 != 3109 )
{
if ( v3 > 3109 )
{
if ( v3 != 3112 && v3 != 3114 )
return;
}
else if ( v3 != 3105 && v3 != 3107 )
{
return;
}
}
}
else
{
if ( v3 <= 3066 )
{
if ( v3 >= 3054 || v3 == 3050 )
goto LABEL_468;
if ( v3 <= 3050 )
{
if ( (unsigned int)(v3 - 3034) > 3 )
return;
goto LABEL_468;
}
v4 = 3052;
goto LABEL_53;
}
if ( v3 == 3088 )
goto LABEL_468;
if ( v3 <= 3088 )
{
if ( (unsigned int)(v3 - 3080) > 6 )
return;
goto LABEL_468;
}
if ( v3 == 3090 )
goto LABEL_468;
if ( v3 != 3101 )
return;
}
}
}
goto LABEL_485;
}
if ( v3 == 2644 )
{
LABEL_485:
if ( (*(_BYTE *)a2 & 1) != 0 )
v28 = *(char **)(a2 + 8);
else
v28 = (char *)(a2 + 1);
sub_45316C(v63, v28, "_001.png", "_color_001.png");
if ( (v63[0] & 1) != 0 )
v27 = v64;
else
v27 = (cocos2d::CCSprite *)((char *)v63 + 1);
goto LABEL_500;
}
if ( v3 <= 2644 )
{
if ( v3 > 2554 )
{
if ( v3 != 2578 )
{
if ( v3 > 2578 )
{
if ( v3 > 2630 )
{
if ( v3 > 2634 )
{
if ( v3 != 2640 && v3 != 2642 && v3 != 2637 )
return;
}
else if ( v3 < 2632 )
{
sub_45316C(v63, "pixelart_454_001.png", "_001.png", "_color_001.png");
if ( (v63[0] & 1) != 0 )
v27 = v64;
else
v27 = (cocos2d::CCSprite *)((char *)v63 + 1);
LABEL_500:
a1[189] = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v27, v26);
std::string::~string((int)v63);
cocos2d::CCObject::retain(a1[189]);
v30 = a1[189];
v31 = *(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v30 + 92);
v32 = (*((int (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v31(v30, v32);
GameObject::createSpriteColor((GameObject *)a1, 2);
GameObject::setDefaultSecondaryColorMode((GameObject *)a1, 2);
return;
}
}
else if ( v3 < 2626 && (v3 < 2580 || v3 > 2592 && (unsigned int)(v3 - 2598) > 8) )
{
return;
}
}
else if ( v3 != 2566 )
{
if ( v3 > 2566 )
{
if ( v3 != 2572 )
{
if ( v3 > 2572 )
{
if ( v3 != 2574 && v3 != 2576 )
return;
}
else if ( v3 != 2568 && v3 != 2570 )
{
return;
}
}
}
else if ( v3 >= 2560 )
{
if ( v3 != 2562 && v3 != 2564 )
return;
}
else if ( v3 < 2558 && v3 != 2556 )
{
return;
}
}
}
}
else if ( v3 < 2550 )
{
if ( v3 >= 2496 )
{
if ( v3 > 2538 )
{
if ( v3 != 2544 )
{
if ( v3 > 2544 )
{
if ( v3 != 2546 && v3 != 2548 )
return;
}
else if ( v3 != 2540 && v3 != 2542 )
{
return;
}
}
}
else if ( v3 < 2526 && (v3 < 2498 || v3 > 2518 && v3 != 2524) )
{
return;
}
}
else if ( v3 < 2488 )
{
if ( v3 > 2454 )
{
if ( v3 < 2456 || v3 > 2465 && (unsigned int)(v3 - 2467) > 0x10 )
return;
}
else if ( v3 < 2452 && (v3 < 2396 || v3 > 2405 && (unsigned int)(v3 - 2407) > 0x1A) )
{
return;
}
}
}
goto LABEL_485;
}
if ( v3 == 2732 )
goto LABEL_494;
if ( v3 <= 2732 )
{
if ( v3 != 2673 )
{
if ( v3 > 2673 )
{
if ( v3 > 2689 )
{
if ( v3 > 2700 )
{
if ( (unsigned int)(v3 - 2703) > 1 )
return;
}
else if ( v3 < 2696 && (unsigned int)(v3 - 2691) > 3 )
{
return;
}
}
else if ( v3 < 2687 && v3 != 2679 )
{
if ( v3 > 2679 )
{
if ( v3 != 2681 && v3 != 2684 )
return;
}
else if ( v3 != 2676 )
{
return;
}
}
}
else if ( v3 != 2660 )
{
if ( v3 > 2660 )
{
if ( v3 != 2666 )
{
if ( v3 > 2666 )
{
if ( v3 != 2668 && v3 != 2670 )
return;
}
else if ( v3 != 2662 && v3 != 2664 )
{
return;
}
}
}
else if ( v3 != 2651 )
{
if ( v3 > 2651 )
{
if ( v3 != 2654 && v3 != 2657 )
return;
}
else if ( v3 != 2647 && v3 != 2649 )
{
return;
}
}
}
}
goto LABEL_485;
}
if ( v3 == 2776 )
goto LABEL_494;
if ( v3 > 2776 )
{
if ( v3 == 2802 )
goto LABEL_494;
if ( v3 > 2802 )
{
if ( v3 > 2837 )
{
if ( v3 > 2849 )
{
v12 = 2903;
goto LABEL_356;
}
goto LABEL_494;
}
if ( v3 >= 2808 )
goto LABEL_485;
v13 = 2805;
goto LABEL_340;
}
if ( v3 == 2785 )
goto LABEL_494;
if ( v3 > 2785 )
{
if ( v3 == 2796 )
goto LABEL_494;
v13 = 2799;
}
else
{
if ( v3 == 2779 )
goto LABEL_494;
v13 = 2782;
}
}
else
{
if ( v3 == 2755 )
goto LABEL_494;
if ( v3 <= 2755 )
{
if ( v3 != 2741 )
{
if ( v3 > 2741 )
{
if ( (unsigned int)(v3 - 2744) > 8 )
return;
}
else if ( v3 != 2735 )
{
v13 = 2738;
goto LABEL_340;
}
}
LABEL_494:
if ( (*(_BYTE *)a2 & 1) != 0 )
v29 = *(char **)(a2 + 8);
else
v29 = (char *)(a2 + 1);
sub_45316C(v63, v29, "_001.png", "_2_001.png");
if ( (v63[0] & 1) != 0 )
v27 = v64;
else
v27 = (cocos2d::CCSprite *)((char *)v63 + 1);
goto LABEL_500;
}
if ( v3 > 2770 )
{
v13 = 2773;
}
else
{
if ( v3 >= 2764 || v3 == 2758 )
goto LABEL_494;
v13 = 2761;
}
}
LABEL_340:
if ( v3 != v13 )
return;
goto LABEL_494;
}
if ( v3 >= 2359 )
goto LABEL_485;
if ( v3 > 1472 )
{
if ( v3 == 1803 )
goto LABEL_468;
if ( v3 <= 1803 )
{
if ( v3 > 1624 )
{
if ( v3 >= 1704 )
{
if ( v3 <= 1784 )
{
if ( v3 < 1781 && (v3 < 1708 || v3 > 1710 && (unsigned int)(v3 - 1734) > 2) )
return;
goto LABEL_468;
}
if ( v3 == 1797 )
goto LABEL_468;
if ( v3 > 1797 )
{
if ( v3 == 1799 )
goto LABEL_468;
v4 = 1801;
}
else
{
v4 = 1793;
}
goto LABEL_53;
}
if ( v3 < 1685 )
{
if ( v3 > 1642 )
{
if ( v3 < 1645 || v3 > 1646 && (unsigned int)(v3 - 1649) > 1 )
return;
goto LABEL_468;
}
if ( v3 <= 1640 )
{
if ( v3 > 1632 )
{
if ( (unsigned int)(v3 - 1637) > 1 )
return;
goto LABEL_468;
}
if ( v3 < 1629 )
{
v4 = 1627;
goto LABEL_53;
}
}
}
LABEL_468:
std::string::basic_string(v62, a2);
GameObject::getColorFrame(v63, (int)a1, (int)v62);
if ( (v63[0] & 1) != 0 )
v15 = v64;
else
v15 = (cocos2d::CCSprite *)((char *)v63 + 1);
a1[189] = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v15, v14);
std::string::~string((int)v63);
std::string::~string((int)v62);
cocos2d::CCObject::retain(a1[189]);
v16 = a1[189];
v17 = *(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v16 + 92);
v18 = (*((int (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v17(v16, v18);
GameObject::createSpriteColor((GameObject *)a1, 2);
return;
}
if ( v3 >= 1623 || v3 == 1586 )
goto LABEL_468;
if ( v3 <= 1586 )
{
if ( v3 == 1516 )
goto LABEL_501;
if ( v3 <= 1516 )
{
if ( v3 == 1507 )
goto LABEL_501;
if ( v3 > 1507 )
{
if ( v3 < 1510 )
return;
goto LABEL_468;
}
if ( v3 != 1473 )
{
v5 = v3 == 1496;
LABEL_54:
if ( !v5 )
return;
goto LABEL_468;
}
goto LABEL_468;
}
if ( v3 > 1560 )
{
if ( (unsigned int)(v3 - 1582) > 1 )
return;
goto LABEL_501;
}
if ( v3 >= 1552 )
goto LABEL_516;
if ( v3 == 1517 )
{
v8 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"waterfallAnim_color_007.png",
(const char *)a2);
a1[189] = v8;
cocos2d::CCObject::retain(v8);
v9 = a1[189];
v10 = *(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v9 + 92);
v11 = (*((int (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v10(v9, v11);
GameObject::createSpriteColor((GameObject *)a1, 2);
GameObject::setDefaultSecondaryColorMode((GameObject *)a1, 1012);
}
return;
}
if ( v3 != 1599 )
{
if ( v3 >= 1600 )
{
if ( v3 != 1617 )
{
if ( v3 > 1617 )
{
if ( (unsigned int)(v3 - 1619) > 2 )
return;
}
else if ( v3 > 1601 )
{
return;
}
goto LABEL_468;
}
goto LABEL_501;
}
if ( v3 == 1591 )
goto LABEL_468;
if ( v3 >= 1592 )
{
if ( (unsigned int)(v3 - 1593) > 1 )
return;
goto LABEL_468;
}
if ( v3 != 1588 )
{
v7 = 1590;
LABEL_138:
if ( v3 != v7 )
return;
}
}
LABEL_520:
std::string::basic_string(v62, a2);
GameObject::getColorFrame(v63, (int)a1, (int)v62);
if ( (v63[0] & 1) != 0 )
v58 = v64;
else
v58 = (cocos2d::CCSprite *)((char *)v63 + 1);
a1[189] = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v58, v57);
std::string::~string((int)v63);
std::string::~string((int)v62);
cocos2d::CCObject::retain(a1[189]);
v59 = a1[189];
v60 = *(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v59 + 92);
v61 = (*((int (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v60(v59, v61);
GameObject::createSpriteColor((GameObject *)a1, 2);
GameObject::setDefaultSecondaryColorMode((GameObject *)a1, 1012);
return;
}
if ( v3 == 2093 )
{
LABEL_479:
if ( (*(_BYTE *)a2 & 1) != 0 )
v25 = *(char **)(a2 + 8);
else
v25 = (char *)(a2 + 1);
sub_45316C(v63, v25, "_00", "_color_00");
v26 = (const char *)(LOBYTE(v63[0]) << 31);
if ( (v63[0] & 1) != 0 )
v27 = v64;
else
v27 = (cocos2d::CCSprite *)((char *)v63 + 1);
goto LABEL_500;
}
if ( v3 <= 2093 )
{
if ( v3 <= 1921 )
{
if ( v3 >= 1919 )
goto LABEL_468;
if ( v3 <= 1857 )
{
if ( v3 <= 1848 )
{
if ( v3 == 1807 )
goto LABEL_468;
if ( v3 >= 1808 )
{
if ( v3 == 1809 )
goto LABEL_468;
v4 = 1843;
}
else
{
v4 = 1805;
}
goto LABEL_53;
}
LABEL_472:
if ( (*(_BYTE *)a2 & 1) != 0 )
v19 = *(char **)(a2 + 8);
else
v19 = (char *)(a2 + 1);
sub_45316C(v63, v19, "_00", "_color_00");
if ( (v63[0] & 1) != 0 )
v21 = v64;
else
v21 = (cocos2d::CCSprite *)((char *)v63 + 1);
a1[189] = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v21, v20);
std::string::~string((int)v63);
cocos2d::CCObject::retain(a1[189]);
v22 = a1[189];
v23 = *(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v22 + 92);
v24 = (*((int (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v23(v22, v24);
GameObject::createSpriteColor((GameObject *)a1, 2);
return;
}
if ( v3 > 1885 )
{
if ( (unsigned int)(v3 - 1910) > 1 )
return;
goto LABEL_468;
}
if ( v3 >= 1861 )
goto LABEL_468;
v12 = 1860;
LABEL_356:
if ( v3 != v12 )
return;
goto LABEL_472;
}
if ( v3 > 2054 )
{
if ( v3 > 2076 )
{
if ( (unsigned int)(v3 - 2078) > 0xA )
return;
}
else if ( v3 < 2070 )
{
v4 = 2065;
goto LABEL_53;
}
}
else if ( v3 < 2051 )
{
if ( v3 == 1928 )
goto LABEL_520;
if ( v3 <= 1928 )
{
if ( v3 > 1926 )
return;
goto LABEL_520;
}
if ( v3 != 2046 )
return;
}
goto LABEL_479;
}
if ( v3 > 2154 )
{
if ( v3 > 2313 )
{
if ( v3 > 2347 )
{
if ( (unsigned int)(v3 - 2353) > 2 )
return;
}
else if ( v3 < 2340 && (unsigned int)(v3 - 2315) > 0x14 )
{
return;
}
}
else if ( v3 < 2207 && (v3 < 2156 || v3 > 2176 && (unsigned int)(v3 - 2179) > 0x1A) )
{
return;
}
}
else if ( v3 < 2143 )
{
if ( v3 > 2131 )
{
if ( v3 < 2133 || v3 > 2136 && (unsigned int)(v3 - 2138) > 3 )
return;
}
else if ( v3 < 2125 && (v3 < 2098 || v3 > 2119 && (unsigned int)(v3 - 2122) > 1) )
{
return;
}
}
goto LABEL_485;
}
if ( v3 >= 1471 )
goto LABEL_501;
if ( v3 <= 874 )
{
if ( v3 >= 867 )
goto LABEL_468;
if ( v3 <= 482 )
{
if ( v3 <= 476 )
{
if ( v3 < 262 )
{
if ( v3 < 260 )
{
if ( v3 > 220 )
{
if ( v3 < 247 || v3 > 250 && (unsigned int)(v3 - 252) > 6 )
return;
}
else if ( v3 < 215 && (v3 < 207 || v3 > 210 && (unsigned int)(v3 - 212) > 1) )
{
return;
}
}
goto LABEL_468;
}
if ( v3 > 272 )
{
if ( v3 >= 400 )
{
if ( (unsigned int)(v3 - 453) > 5 )
return;
}
else if ( v3 <= 396 && (unsigned int)(v3 - 274) > 1 )
{
return;
}
goto LABEL_468;
}
if ( v3 <= 268 )
{
if ( v3 > 262 && v3 != 266 )
{
v39 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"lightsquare_04_05_color_001.png",
(const char *)a2);
a1[189] = v39;
cocos2d::CCObject::retain(v39);
v40 = a1[189];
v41 = *(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v40 + 92);
v42 = (*((int (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v41(v40, v42);
GameObject::createSpriteColor((GameObject *)a1, 2);
}
return;
}
}
goto LABEL_468;
}
if ( v3 <= 765 )
{
if ( v3 >= 762 )
goto LABEL_468;
if ( v3 <= 708 )
{
if ( v3 < 703 && (v3 <= 484 || v3 >= 492 && (unsigned int)(v3 - 678) > 2) )
return;
goto LABEL_468;
}
if ( v3 <= 757 )
{
if ( v3 < 756 && (unsigned int)(v3 - 752) > 2 )
return;
goto LABEL_468;
}
v4 = 759;
goto LABEL_53;
}
if ( v3 <= 848 )
{
if ( v3 > 844 || v3 == 841 )
goto LABEL_468;
if ( v3 <= 841 )
{
if ( (unsigned int)(v3 - 769) > 5 )
return;
goto LABEL_468;
}
v4 = 843;
goto LABEL_53;
}
if ( v3 > 857 )
{
v6 = 859;
LABEL_60:
if ( v3 != v6 )
return;
goto LABEL_501;
}
if ( v3 <= 852 )
{
v6 = 850;
goto LABEL_60;
}
LABEL_501:
if ( (*(_BYTE *)a2 & 1) != 0 )
v33 = *(char **)(a2 + 8);
else
v33 = (char *)(a2 + 1);
sub_45316C(v63, v33, "_00", "_color_00");
if ( (v63[0] & 1) != 0 )
v35 = v64;
else
v35 = (cocos2d::CCSprite *)((char *)v63 + 1);
a1[189] = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v35, v34);
std::string::~string((int)v63);
cocos2d::CCObject::retain(a1[189]);
v36 = a1[189];
v37 = *(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v36 + 92);
v38 = (*((int (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v37(v36, v38);
GameObject::createSpriteColor((GameObject *)a1, 2);
GameObject::setDefaultSecondaryColorMode((GameObject *)a1, 1012);
return;
}
if ( v3 < 976 )
{
if ( v3 < 974 )
{
if ( v3 <= 904 )
{
if ( v3 < 903 )
{
if ( v3 > 889 )
{
if ( v3 != 891 && (v3 < 891 || (unsigned int)(v3 - 893) > 1) )
return;
}
else if ( v3 < 888 && (v3 <= 876 || v3 > 878 && (unsigned int)(v3 - 880) > 5) )
{
return;
}
}
goto LABEL_468;
}
if ( v3 > 961 )
{
if ( v3 < 964 || v3 > 965 && (unsigned int)(v3 - 967) > 5 )
return;
goto LABEL_468;
}
if ( v3 < 959 )
{
if ( v3 > 954 )
{
if ( (unsigned int)(v3 - 956) > 1 )
return;
goto LABEL_468;
}
if ( v3 < 952 )
{
v4 = 939;
LABEL_53:
v5 = v3 == v4;
goto LABEL_54;
}
}
}
goto LABEL_468;
}
if ( v3 > 1267 )
{
if ( v3 > 1440 )
{
if ( v3 < 1442 || v3 > 1448 && (unsigned int)(v3 - 1461) > 3 )
return;
goto LABEL_468;
}
if ( v3 >= 1431 )
goto LABEL_468;
if ( v3 > 1365 )
{
if ( (unsigned int)(v3 - 1387) > 8 )
return;
goto LABEL_468;
}
if ( v3 >= 1348 )
goto LABEL_468;
v7 = 1276;
goto LABEL_138;
}
if ( v3 >= 1266 )
goto LABEL_468;
if ( v3 <= 1040 )
{
if ( v3 > 1032 )
goto LABEL_468;
if ( v3 < 980 )
return;
if ( v3 > 988 )
{
if ( (unsigned int)(v3 - 1001) <= 4 )
{
std::string::basic_string(v62, a2);
GameObject::getColorFrame(v63, (int)a1, (int)v62);
if ( (v63[0] & 1) != 0 )
v48 = v64;
else
v48 = (cocos2d::CCSprite *)((char *)v63 + 1);
a1[189] = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(
v48,
(const char *)(LOBYTE(v63[0]) << 31));
std::string::~string((int)v63);
std::string::~string((int)v62);
cocos2d::CCObject::retain(a1[189]);
v49 = a1[189];
v50 = *(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v49 + 92);
v51 = (*((int (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v50(v49, v51);
GameObject::createSpriteColor((GameObject *)a1, 2);
GameObject::setDefaultSecondaryColorMode((GameObject *)a1, 1006);
}
return;
}
LABEL_516:
if ( (*(_BYTE *)a2 & 1) != 0 )
v52 = *(cocos2d::CCSprite **)(a2 + 8);
else
v52 = (cocos2d::CCSprite *)(a2 + 1);
v53 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v52, (const char *)a2);
a1[189] = v53;
cocos2d::CCObject::retain(v53);
v54 = a1[189];
v55 = *(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v54 + 92);
v56 = (*((int (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v55(v54, v56);
GameObject::createSpriteColor((GameObject *)a1, 2);
*((_BYTE *)a1[189] + 471) = 1;
return;
}
if ( v3 == 1062 )
goto LABEL_468;
if ( v3 > 1062 )
{
if ( (unsigned int)(v3 - 1159) > 2 )
return;
goto LABEL_468;
}
if ( (unsigned int)(v3 - 1053) <= 1 )
{
std::string::basic_string(v62, a2);
GameObject::getColorFrame(v63, (int)a1, (int)v62);
if ( (v63[0] & 1) != 0 )
v44 = v64;
else
v44 = (cocos2d::CCSprite *)((char *)v63 + 1);
a1[189] = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v44, v43);
std::string::~string((int)v63);
std::string::~string((int)v62);
cocos2d::CCObject::retain(a1[189]);
v45 = a1[189];
v46 = *(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v45 + 92);
v47 = (*((int (__fastcall **)(cocos2d::CCObject **))*a1 + 24))(a1);
v46(v45, v47);
GameObject::createSpriteColor((GameObject *)a1, 2);
GameObject::setDefaultSecondaryColorMode((GameObject *)a1, 1010);
}
}