// // SpriteDescription::initDescription from 0x140041d60 to 0x140041fe4 (644 bytes) // // 2 xrefs: // > CCAnimateFrameCache::addDict @ 0x1400418e7 // > @ 0x1406c432c // // 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 // // Hidden C++ exception states: #wind=1 bool SpriteDescription::initDescription(SpriteDescription *a1, DS_Dictionary *a2) { struct cocos2d::CCPoint Vec2ForKey; // rax struct cocos2d::CCPoint v5; // rax struct cocos2d::CCPoint v6; // rax __int64 StringForKey; // rax float v8; // xmm1_4 __int64 v9; // rax __int64 v10; // rax __int64 v11; // rax void **v12; // rbx cocos2d::CCSpriteFrameCache *v13; // rax cocos2d::CCSpriteFrame *v14; // rax void **v15; // r14 unsigned __int64 v16; // rsi __int64 v17; // rbx char v19[8]; // [rsp+20h] [rbp-50h] BYREF __int128 v20; // [rsp+28h] [rbp-48h] BYREF unsigned __int64 v21; // [rsp+38h] [rbp-38h] __int64 v22; // [rsp+40h] [rbp-30h] void *Src[2]; // [rsp+48h] [rbp-28h] BYREF unsigned __int64 v24; // [rsp+58h] [rbp-18h] unsigned __int64 v25; // [rsp+60h] [rbp-10h] Vec2ForKey = DS_Dictionary::getVec2ForKey(a2, v19); ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&a1->m_position, Vec2ForKey); v5 = DS_Dictionary::getVec2ForKey(a2, v19); ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&a1->m_flipped, v5); v6 = DS_Dictionary::getVec2ForKey(a2, v19); ((void (__fastcall *)(_QWORD, _QWORD))cocos2d::CCPoint::operator=)(&a1->m_scale, v6); StringForKey = DS_Dictionary::getStringForKey(a2, Src, "rotation"); if ( *(_QWORD *)(StringForKey + 24) > 0xFu ) StringForKey = *(_QWORD *)StringForKey; v8 = atof((const char *)StringForKey); a1->m_rotation = v8; sub_14003A830((__int64)Src); v9 = DS_Dictionary::getStringForKey(a2, Src, "zValue"); if ( *(_QWORD *)(v9 + 24) > 0xFu ) v9 = *(_QWORD *)v9; a1->m_zValue = atoi((const char *)v9); sub_14003A830((__int64)Src); v10 = DS_Dictionary::getStringForKey(a2, Src, &dword_14052CA10); if ( *(_QWORD *)(v10 + 24) > 0xFu ) v10 = *(_QWORD *)v10; a1->m_tag = atoi((const char *)v10); sub_14003A830((__int64)Src); v11 = DS_Dictionary::getStringForKey(a2, Src, "usesCustomTag"); if ( *(_QWORD *)(v11 + 24) > 0xFu ) v11 = *(_QWORD *)v11; a1->m_usesCustomTag = atoi((const char *)v11) != 0; sub_14003A830((__int64)Src); if ( a1->m_usesCustomTag ) { DS_Dictionary::getStringForKey(a2, Src, &qword_14052CA08); v12 = Src; if ( v25 > 0xF ) v12 = (void **)Src[0]; v13 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(); v14 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v13, (const char *)v12); a1->m_texture = v14; cocos2d::CCObject::retain(v14); v20 = 0; v21 = 0; v22 = 0; v15 = Src; if ( v25 > 0xF ) v15 = (void **)Src[0]; v16 = v24; v17 = 0x7FFFFFFFFFFFFFFFLL; if ( v24 > 0x7FFFFFFFFFFFFFFFLL ) sub_140007B50(); v22 = 15; if ( v24 > 0xF ) { if ( (v24 | 0xF) <= 0x7FFFFFFFFFFFFFFFLL ) { v17 = v24 | 0xF; if ( (v24 | 0xF) < 0x16 ) v17 = 22; } *(_QWORD *)&v20 = sub_14003AA10(v17 + 1); v21 = v16; v22 = v17; memcpy((void *)v20, v15, v16 + 1); } else { v21 = v24; v20 = *(_OWORD *)v15; } cocos2d::CCSpriteFrame::setFrameName(a1->m_texture, &v20); sub_14003A830((__int64)Src); } return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source