//
// GameObject::objectFromVector from 0x10025e050 to 0x10025f418 (5064 bytes)
//
// 2 xrefs:
// > PlayLayer::processCreateObjectsFromSetup @ 0x1001165d0
// > LevelEditorLayer::addObjectFromVector @ 0x1003596b0
//
// 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
//
GameObject *__fastcall GameObject::objectFromVector(
std::vector *a1,
std::vector *a2,
GJBaseGameLayer *a3,
bool a4)
{
std::__vector_base::pointer begin; // x22
_BOOL4 v8; // w19
std::__vector_base::pointer capacitym1; // x0
int v10; // w0
bool v11; // w25
GameObject *v12; // x19
std::__vector_base::pointer v13; // x0
int v14; // w0
int v15; // w26
int v16; // w22
ObjectToolbox *v17; // x0
char *v18; // x0
std::__vector_base::pointer v19; // x28
std::__vector_base::pointer v20; // x0
float v21; // s8
std::__vector_base::pointer v22; // x0
float v23; // s0
float v24; // s9
std::__vector_base::pointer v25; // x0
_BOOL8 v26; // x24
std::__vector_base::pointer v27; // x0
__int64 v28; // x27
std::__vector_base::pointer v29; // x0
float v30; // s10
std::__vector_base::pointer v31; // x0
std::__vector_base::pointer v32; // x0
std::__vector_base::pointer v33; // x0
int v34; // w0
std::__vector_base::pointer v35; // x0
int v36; // w0
std::__vector_base::pointer v37; // x0
__int64 v38; // x1
std::__vector_base::pointer v39; // x0
__int64 v40; // x1
std::__vector_base::pointer v41; // x23
std::__vector_base::pointer v42; // x0
int v43; // w0
void *v44; // x8
std::__vector_base::pointer v45; // x0
int v46; // w27
int v47; // w22
_BOOL8 v48; // x26
std::__vector_base::pointer v49; // x28
int v50; // w24
std::__vector_base::pointer v51; // x25
__int16 v52; // w0
std::__vector_base::pointer v53; // x0
__int16 v54; // w0
std::__vector_base::pointer v55; // x8
std::__vector_base::pointer v56; // x23
__int64 v57; // x8
std::__vector_base::pointer v58; // x0
void *v59; // x8
std::__vector_base::pointer v60; // x0
std::__vector_base::pointer v61; // x8
GJBaseGameLayer *v62; // x23
std::__vector_base::pointer v63; // x23
float v64; // s11
float v65; // s12
std::__vector_base::pointer v66; // x0
std::__vector_base::pointer v67; // x0
float v68; // s1
float v69; // s1
std::__vector_base::pointer v70; // x25
std::__vector_base::pointer v71; // x0
float v72; // s0
float v73; // s11
void *v74; // x8
std::__vector_base::pointer v75; // x0
void *v76; // x8
std::__vector_base::pointer v77; // x0
void *v78; // x8
std::__vector_base::pointer v79; // x0
void *v80; // x8
std::__vector_base::pointer v81; // x0
std::__vector_base::pointer v82; // x0
int v83; // w0
std::__vector_base::pointer v84; // x0
int v85; // w0
void *v86; // x8
std::__vector_base::pointer v87; // x0
void *v88; // x8
std::__vector_base::pointer v89; // x0
void *v90; // x8
std::__vector_base::pointer v91; // x0
void *v92; // x8
std::__vector_base::pointer v93; // x0
void *v94; // x8
std::__vector_base::pointer v95; // x0
void *v96; // x8
std::__vector_base::pointer v97; // x0
void *v98; // x8
std::__vector_base::pointer v99; // x0
void *v100; // x8
std::__vector_base::pointer v101; // x0
void *v102; // x8
std::__vector_base::pointer v103; // x0
void *v104; // x8
std::__vector_base::pointer v105; // x0
void *v106; // x8
std::__vector_base::pointer v107; // x0
std::__vector_base::pointer v108; // x0
__int16 v109; // w0
void *v110; // x8
std::__vector_base::pointer v111; // x0
__int64 v112; // x8
std::__vector_base::pointer v113; // x0
unsigned int m_objectType; // w8
unsigned __int64 v115; // t2
__n128 v116; // q0
__n128 v117; // q1
std::__vector_base::pointer v118; // x23
float v119; // s10
float v120; // s11
std::__vector_base::pointer v121; // x0
std::__vector_base::pointer v122; // x0
unsigned int v123; // w8
int v124; // w8
std::__vector_base::pointer v125; // x22
std::__vector_base::pointer v126; // x23
std::__vector_base::pointer v127; // x0
__int64 v128; // x0
float v129; // w1
bool v130; // x1^4
bool v131; // x1^5
__int16 v132; // x1^6
GJSpriteColor *m_baseColor; // x11
std::__vector_base::pointer v134; // x23
std::__vector_base::pointer v135; // x0
__int64 v136; // x0
float v137; // w1
bool v138; // x1^4
bool v139; // x1^5
__int16 v140; // x1^6
GJSpriteColor *m_detailColor; // x11
std::__vector_base::pointer v142; // x0
int v143; // w0
int v144; // w8
std::__vector_base::pointer v145; // x0
int v146; // w0
int v147; // w8
std::__vector_base::pointer v148; // x0
int v149; // w0
GJSpriteColor *v150; // x9
unsigned int v152; // [xsp+Ch] [xbp-1B4h]
__int16 v153; // [xsp+10h] [xbp-1B0h]
__int16 v154; // [xsp+14h] [xbp-1ACh]
GJBaseGameLayer *v155; // [xsp+18h] [xbp-1A8h]
void *v156[2]; // [xsp+20h] [xbp-1A0h] BYREF
char *longStorage; // [xsp+30h] [xbp-190h]
void *v158[2]; // [xsp+40h] [xbp-180h] BYREF
__int64 v159; // [xsp+50h] [xbp-170h]
void *v160[2]; // [xsp+60h] [xbp-160h] BYREF
__int64 v161; // [xsp+70h] [xbp-150h]
void *v162[2]; // [xsp+80h] [xbp-140h] BYREF
__int64 v163; // [xsp+90h] [xbp-130h]
std::string v164; // [xsp+A0h] [xbp-120h] BYREF
std::string __src; // [xsp+C0h] [xbp-100h] BYREF
std::string __p; // [xsp+E0h] [xbp-E0h] BYREF
std::string __dst; // [xsp+100h] [xbp-C0h] BYREF
__int128 v168; // [xsp+118h] [xbp-A8h] BYREF
__int64 v169; // [xsp+128h] [xbp-98h]
begin = a2->__begin_;
if ( *((_QWORD *)a2->__begin_ + 103) )
{
v8 = a4;
capacitym1 = a1->__begin_ + 103;
if ( a1->__begin_[103].m_data.m_short.shortStorage.__elems_[22] < 0 )
capacitym1 = (std::__vector_base::pointer)capacitym1->m_data.m_long.capacitym1;
v10 = atoi((const char *)capacitym1);
v11 = v10 != 0;
if ( v8 && v10 )
return nullptr;
}
else
{
v11 = 0;
}
if ( !begin[1] )
{
v14 = 0;
v15 = -1;
goto LABEL_26;
}
v13 = a1->__begin_ + 1;
if ( a1->__begin_[1].m_data.m_short.shortStorage.__elems_[22] < 0 )
v13 = (std::__vector_base::pointer)v13->m_data.m_long.capacitym1;
v14 = atoi((const char *)v13);
v15 = -1;
if ( v14 <= 716 )
{
if ( v14 > 674 )
{
if ( v14 == 675 )
{
v14 = 1734;
}
else if ( v14 == 676 )
{
v14 = 1735;
}
else
{
v15 = -1;
if ( v14 == 677 )
v14 = 1736;
}
goto LABEL_26;
}
if ( v14 == 104 )
{
v15 = 104;
v14 = 915;
goto LABEL_26;
}
if ( v14 != 221 )
goto LABEL_26;
LABEL_25:
v15 = v14;
v14 = 899;
goto LABEL_26;
}
if ( (unsigned int)(v14 - 717) < 2 )
goto LABEL_25;
if ( v14 == 1008 )
{
v14 = 1292;
goto LABEL_26;
}
if ( v14 == 743 )
goto LABEL_25;
LABEL_26:
if ( (unsigned int)(v14 - 1964) >= 0x30 )
v16 = v14;
else
v16 = 1964;
v12 = GameObject::createWithKey(v16);
if ( !v12 )
return v12;
v17 = ObjectToolbox::sharedState();
v18 = (char *)ObjectToolbox::intKeyToFrame(v17, v16);
sub_100009900(&v168, v18);
v19 = a2->__begin_;
if ( *((_QWORD *)a2->__begin_ + 2) )
{
v20 = a1->__begin_ + 2;
if ( a1->__begin_[2].m_data.m_short.shortStorage.__elems_[22] < 0 )
v20 = (std::__vector_base::pointer)v20->m_data.m_long.capacitym1;
v21 = atof((const char *)v20);
}
else
{
v21 = 0.0;
}
if ( v19[3] )
{
v22 = a1->__begin_ + 3;
if ( a1->__begin_[3].m_data.m_short.shortStorage.__elems_[22] < 0 )
v22 = (std::__vector_base::pointer)v22->m_data.m_long.capacitym1;
v23 = atof((const char *)v22) + 90.0;
}
else
{
v23 = 90.0;
}
v24 = v23;
if ( v19[4] )
{
v25 = a1->__begin_ + 4;
if ( a1->__begin_[4].m_data.m_short.shortStorage.__elems_[22] < 0 )
v25 = (std::__vector_base::pointer)v25->m_data.m_long.capacitym1;
v26 = atoi((const char *)v25) != 0;
}
else
{
v26 = 0;
}
if ( v19[5] )
{
v27 = a1->__begin_ + 5;
if ( a1->__begin_[5].m_data.m_short.shortStorage.__elems_[22] < 0 )
v27 = (std::__vector_base::pointer)v27->m_data.m_long.capacitym1;
v28 = atoi((const char *)v27) != 0;
}
else
{
v28 = 0;
}
if ( v19[6] )
{
v29 = a1->__begin_ + 6;
if ( a1->__begin_[6].m_data.m_short.shortStorage.__elems_[22] < 0 )
v29 = (std::__vector_base::pointer)v29->m_data.m_long.capacitym1;
v30 = atof((const char *)v29);
}
else
{
v30 = 0.0;
}
if ( v19[20] )
{
v31 = a1->__begin_ + 20;
if ( a1->__begin_[20].m_data.m_short.shortStorage.__elems_[22] < 0 )
v31 = (std::__vector_base::pointer)v31->m_data.m_long.capacitym1;
v154 = atoi((const char *)v31);
}
else
{
v154 = 0;
}
if ( v19[61] )
{
v32 = a1->__begin_ + 61;
if ( a1->__begin_[61].m_data.m_short.shortStorage.__elems_[22] < 0 )
v32 = (std::__vector_base::pointer)v32->m_data.m_long.capacitym1;
v153 = atoi((const char *)v32);
}
else
{
v153 = 0;
}
v12->m_objectID = v16;
if ( v16 == 1715 || v16 == 9 )
v12->m_defaultZOrder = 2;
if ( v19[24] )
{
v33 = a1->__begin_ + 24;
if ( a1->__begin_[24].m_data.m_short.shortStorage.__elems_[22] < 0 )
v33 = (std::__vector_base::pointer)v33->m_data.m_long.capacitym1;
v34 = atoi((const char *)v33);
}
else
{
v34 = 0;
}
if ( !v12->m_zFixedZLayer )
v12->m_zLayer = v34;
if ( v19[25] )
{
v35 = a1->__begin_ + 25;
if ( a1->__begin_[25].m_data.m_short.shortStorage.__elems_[22] < 0 )
v35 = (std::__vector_base::pointer)v35->m_data.m_long.capacitym1;
v36 = atoi((const char *)v35);
}
else
{
v36 = 0;
}
v12->m_zOrder = v36;
v12->m_isHighDetail = v11;
if ( v19[26] )
{
v37 = a1->__begin_ + 26;
if ( a1->__begin_[26].m_data.m_short.shortStorage.__elems_[22] < 0 )
v37 = (std::__vector_base::pointer)v37->m_data.m_long.capacitym1;
v38 = atoi((const char *)v37);
}
else
{
v38 = 0;
}
((void (__fastcall *)(GameObject *, __int64))v12->addToGroup)(v12, v38);
if ( *((_QWORD *)a2->__begin_ + 33) )
{
v39 = a1->__begin_ + 33;
if ( a1->__begin_[33].m_data.m_short.shortStorage.__elems_[22] < 0 )
v39 = (std::__vector_base::pointer)v39->m_data.m_long.capacitym1;
v40 = atoi((const char *)v39);
}
else
{
v40 = 0;
}
((void (__fastcall *)(GameObject *, __int64))v12->addToGroup)(v12, v40);
v155 = a3;
v41 = a2->__begin_;
if ( *((_QWORD *)a2->__begin_ + 108) )
{
v42 = a1->__begin_ + 108;
if ( a1->__begin_[108].m_data.m_short.shortStorage.__elems_[22] < 0 )
v42 = (std::__vector_base::pointer)v42->m_data.m_long.capacitym1;
v43 = atoi((const char *)v42);
}
else
{
v43 = 0;
}
v12->m_linkedGroup = v43;
v44 = v41[121];
if ( v44 )
{
v45 = a1->__begin_ + 121;
if ( a1->__begin_[121].m_data.m_short.shortStorage.__elems_[22] < 0 )
v45 = (std::__vector_base::pointer)v45->m_data.m_long.capacitym1;
LOBYTE(v44) = atoi((const char *)v45) != 0;
}
v12->m_isNoTouch = (char)v44;
if ( !v41[343] )
{
v52 = 0;
goto LABEL_116;
}
v152 = v28;
v46 = v16;
v47 = v15;
v48 = v26;
v49 = a1->__begin_ + 343;
v50 = a1->__begin_[343].m_data.m_short.shortStorage.__elems_[22];
if ( v50 < 0 )
{
v51 = (std::__vector_base::pointer)v49->m_data.m_long.capacitym1;
if ( atoi((const char *)v49->m_data.m_long.capacitym1) > 100 )
goto LABEL_106;
}
else
{
v51 = a1->__begin_ + 343;
if ( atoi((const char *)v51) > 100 )
goto LABEL_107;
}
if ( atoi((const char *)v51) >= 1 )
{
LABEL_106:
if ( v50 < 0 )
{
if ( atoi((const char *)v49->m_data.m_long.capacitym1) <= 100 )
goto LABEL_113;
LABEL_112:
v52 = 100;
goto LABEL_115;
}
LABEL_107:
if ( atoi((const char *)v49) <= 100 )
{
if ( (v50 & 0x80000000) == 0 )
{
LABEL_114:
v52 = atoi((const char *)v49);
goto LABEL_115;
}
LABEL_113:
v49 = (std::__vector_base::pointer)v49->m_data.m_long.capacitym1;
goto LABEL_114;
}
goto LABEL_112;
}
v52 = 0;
LABEL_115:
v26 = v48;
v15 = v47;
v16 = v46;
v28 = v152;
LABEL_116:
v12->m_enterChannel = v52;
if ( v41[446] )
{
v53 = a1->__begin_ + 446;
if ( a1->__begin_[446].m_data.m_short.shortStorage.__elems_[22] < 0 )
v53 = (std::__vector_base::pointer)v53->m_data.m_long.capacitym1;
v54 = atoi((const char *)v53);
}
else
{
v54 = 0;
}
v12->m_objectMaterial = v54;
if ( v41[57] )
{
v55 = a1->__begin_;
if ( a1->__begin_[57].m_data.m_short.shortStorage.__elems_[22] < 0 )
sub_1000097D0(&__dst, (void *)v55[57].m_data.m_long.capacitym1, v55[57].m_data.m_long.size);
else
__dst = v55[57];
}
else
{
sub_100009900(&__dst, "");
}
if ( __dst.m_data.m_short.shortStorage.__elems_[22] < 0 )
sub_1000097D0(&__p, (void *)__dst.m_data.m_long.capacitym1, __dst.m_data.m_long.size);
else
__p = __dst;
GameObject::loadGroupsFromString((__int64)v12, (std::string *)&__p);
if ( __p.m_data.m_short.shortStorage.__elems_[22] < 0 )
operator delete((void *)__p.m_data.m_long.capacitym1);
v56 = a2->__begin_;
v57 = *((_QWORD *)a2->__begin_ + 34);
if ( v57 )
{
v58 = a1->__begin_ + 34;
if ( a1->__begin_[34].m_data.m_short.shortStorage.__elems_[22] < 0 )
v58 = (std::__vector_base::pointer)v58->m_data.m_long.capacitym1;
LOBYTE(v57) = atoi((const char *)v58) != 0;
}
v12->m_hasGroupParent = v57;
v59 = v56[279];
if ( v59 )
{
v60 = a1->__begin_ + 279;
if ( a1->__begin_[279].m_data.m_short.shortStorage.__elems_[22] < 0 )
v60 = (std::__vector_base::pointer)v60->m_data.m_long.capacitym1;
LOBYTE(v59) = atoi((const char *)v60) != 0;
}
v12->m_hasAreaParent = (char)v59;
if ( v56[274] )
{
v61 = a1->__begin_;
v62 = v155;
if ( a1->__begin_[274].m_data.m_short.shortStorage.__elems_[22] < 0 )
sub_1000097D0(&__src, (void *)v61[274].m_data.m_long.capacitym1, v61[274].m_data.m_long.size);
else
__src = (std::string)v61[274];
}
else
{
sub_100009900(&__src, "");
v62 = v155;
}
if ( (SHIBYTE(__src.__r_.__value_.__r.__words[2]) & 0x80000000) == 0 )
{
if ( v62 && *((_BYTE *)&__src.__r_.__value_.__s + 23) )
{
v164 = __src;
goto LABEL_151;
}
LABEL_153:
v12->m_hasGroupParentsString = 0;
goto LABEL_154;
}
if ( !v62 || !__src.__r_.__value_.__l.__size_ )
goto LABEL_153;
sub_1000097D0(&v164, __src.__r_.__value_.__l.__data_, __src.__r_.__value_.__l.__size_);
LABEL_151:
GJBaseGameLayer::loadGroupParentsFromString(v62, v12, &v164);
if ( SHIBYTE(v164.__r_.__value_.__r.__words[2]) < 0 )
operator delete(v164.__r_.__value_.__l.__data_);
LABEL_154:
v63 = a2->__begin_;
v64 = 0.0;
v65 = 0.0;
if ( *((_QWORD *)a2->__begin_ + 128) )
{
v66 = a1->__begin_ + 128;
if ( a1->__begin_[128].m_data.m_short.shortStorage.__elems_[22] < 0 )
v66 = (std::__vector_base::pointer)v66->m_data.m_long.capacitym1;
v65 = atof((const char *)v66);
}
if ( v63[129] )
{
v67 = a1->__begin_ + 129;
if ( a1->__begin_[129].m_data.m_short.shortStorage.__elems_[22] < 0 )
v67 = (std::__vector_base::pointer)v67->m_data.m_long.capacitym1;
v64 = atof((const char *)v67);
}
if ( v65 != 0.0 )
{
v68 = (float)(int)roundf(v65 * 1000.0);
v12->m_scaleX = v68 / 1000.0;
v12->m_customScaleX = v68 / 1000.0;
v12->m_fScaleX = 0.0;
((void (__fastcall *)(GameObject *, float))v12->setRScaleX)(v12, 1.0);
v12->m_isDirty = 1;
v12->m_isObjectRectDirty = 1;
}
if ( v64 != 0.0 )
{
v69 = (float)(int)roundf(v64 * 1000.0);
v12->m_scaleY = v69 / 1000.0;
v12->m_customScaleY = v69 / 1000.0;
v12->m_fScaleY = 0.0;
((void (__fastcall *)(GameObject *, float))v12->setRScaleY)(v12, 1.0);
v12->m_isDirty = 1;
v12->m_isObjectRectDirty = 1;
}
v70 = a2->__begin_;
if ( v65 == 0.0 && v64 == 0.0 && v70[32] )
{
v71 = a1->__begin_ + 32;
if ( a1->__begin_[32].m_data.m_short.shortStorage.__elems_[22] < 0 )
v71 = (std::__vector_base::pointer)v71->m_data.m_long.capacitym1;
v72 = atof((const char *)v71);
if ( v72 != 0.0 )
{
v73 = (float)(int)roundf(v72 * 1000.0) / 1000.0;
v12->m_scaleX = v73;
v12->m_customScaleX = v73;
v12->m_fScaleX = 0.0;
((void (__fastcall *)(GameObject *, float))v12->setRScaleX)(v12, 1.0);
v12->m_isDirty = 1;
v12->m_isObjectRectDirty = 1;
v12->m_scaleY = v73;
v12->m_customScaleY = v73;
v12->m_fScaleY = 0.0;
((void (__fastcall *)(GameObject *, float))v12->setRScaleY)(v12, 1.0);
v12->m_isDirty = 1;
v12->m_isObjectRectDirty = 1;
v70 = a2->__begin_;
}
}
*(_QWORD *)&v12->m_startScaleX = *(_QWORD *)&v12->m_scaleX;
v74 = v70[64];
if ( v74 )
{
v75 = a1->__begin_ + 64;
if ( a1->__begin_[64].m_data.m_short.shortStorage.__elems_[22] < 0 )
v75 = (std::__vector_base::pointer)v75->m_data.m_long.capacitym1;
LOBYTE(v74) = atoi((const char *)v75) != 0;
}
v12->m_isDontFade = (char)v74;
v76 = v70[67];
if ( v76 )
{
v77 = a1->__begin_ + 67;
if ( a1->__begin_[67].m_data.m_short.shortStorage.__elems_[22] < 0 )
v77 = (std::__vector_base::pointer)v77->m_data.m_long.capacitym1;
LOBYTE(v76) = atoi((const char *)v77) != 0;
}
v12->m_isDontEnter = (char)v76;
v78 = v70[116];
if ( v78 )
{
v79 = a1->__begin_ + 116;
if ( a1->__begin_[116].m_data.m_short.shortStorage.__elems_[22] < 0 )
v79 = (std::__vector_base::pointer)v79->m_data.m_long.capacitym1;
LOBYTE(v78) = atoi((const char *)v79) != 0;
}
v12->m_hasNoEffects = (char)v78;
v80 = v70[507];
if ( v80 )
{
v81 = a1->__begin_ + 507;
if ( a1->__begin_[507].m_data.m_short.shortStorage.__elems_[22] < 0 )
v81 = (std::__vector_base::pointer)v81->m_data.m_long.capacitym1;
LOBYTE(v80) = atoi((const char *)v81) != 0;
}
v12->m_hasNoParticles = (char)v80;
if ( v70[155] )
{
v82 = a1->__begin_ + 155;
if ( a1->__begin_[155].m_data.m_short.shortStorage.__elems_[22] < 0 )
v82 = (std::__vector_base::pointer)v82->m_data.m_long.capacitym1;
v83 = atoi((const char *)v82);
}
else
{
v83 = 0;
}
v12->m_mainColorKeyIndex = v83;
if ( v70[156] )
{
v84 = a1->__begin_ + 156;
if ( a1->__begin_[156].m_data.m_short.shortStorage.__elems_[22] < 0 )
v84 = (std::__vector_base::pointer)v84->m_data.m_long.capacitym1;
v85 = atoi((const char *)v84);
}
else
{
v85 = 0;
}
v12->m_detailColorKeyIndex = v85;
v86 = v70[134];
if ( v86 )
{
v87 = a1->__begin_ + 134;
if ( a1->__begin_[134].m_data.m_short.shortStorage.__elems_[22] < 0 )
v87 = (std::__vector_base::pointer)v87->m_data.m_long.capacitym1;
LOBYTE(v86) = atoi((const char *)v87) != 0;
}
v12->m_isPassable = (char)v86;
v88 = v70[135];
if ( v88 )
{
v89 = a1->__begin_ + 135;
if ( a1->__begin_[135].m_data.m_short.shortStorage.__elems_[22] < 0 )
v89 = (std::__vector_base::pointer)v89->m_data.m_long.capacitym1;
LOBYTE(v88) = atoi((const char *)v89) != 0;
}
v12->m_isHide = (char)v88;
v90 = v70[136];
if ( v90 )
{
v91 = a1->__begin_ + 136;
if ( a1->__begin_[136].m_data.m_short.shortStorage.__elems_[22] < 0 )
v91 = (std::__vector_base::pointer)v91->m_data.m_long.capacitym1;
LOBYTE(v90) = atoi((const char *)v91) != 0;
}
v12->m_isNonStickX = (char)v90;
v92 = v70[289];
if ( v92 )
{
v93 = a1->__begin_ + 289;
if ( a1->__begin_[289].m_data.m_short.shortStorage.__elems_[22] < 0 )
v93 = (std::__vector_base::pointer)v93->m_data.m_long.capacitym1;
LOBYTE(v92) = atoi((const char *)v93) != 0;
}
v12->m_isNonStickY = (char)v92;
v94 = v70[495];
if ( v94 )
{
v95 = a1->__begin_ + 495;
if ( a1->__begin_[495].m_data.m_short.shortStorage.__elems_[22] < 0 )
v95 = (std::__vector_base::pointer)v95->m_data.m_long.capacitym1;
LOBYTE(v94) = atoi((const char *)v95) != 0;
}
v12->m_isExtraSticky = (char)v94;
v96 = v70[496];
if ( v96 )
{
v97 = a1->__begin_ + 496;
if ( a1->__begin_[496].m_data.m_short.shortStorage.__elems_[22] < 0 )
v97 = (std::__vector_base::pointer)v97->m_data.m_long.capacitym1;
LOBYTE(v96) = atoi((const char *)v97) != 0;
}
v12->m_isDontBoostY = (char)v96;
v98 = v70[509];
if ( v98 )
{
v99 = a1->__begin_ + 509;
if ( a1->__begin_[509].m_data.m_short.shortStorage.__elems_[22] < 0 )
v99 = (std::__vector_base::pointer)v99->m_data.m_long.capacitym1;
LOBYTE(v98) = atoi((const char *)v99) != 0;
}
v12->m_isDontBoostX = (char)v98;
v100 = v70[356];
if ( v100 )
{
v101 = a1->__begin_ + 356;
if ( a1->__begin_[356].m_data.m_short.shortStorage.__elems_[22] < 0 )
v101 = (std::__vector_base::pointer)v101->m_data.m_long.capacitym1;
LOBYTE(v100) = atoi((const char *)v101) != 0;
}
v12->m_isScaleStick = (char)v100;
v102 = v70[137];
if ( v102 )
{
v103 = a1->__begin_ + 137;
if ( a1->__begin_[137].m_data.m_short.shortStorage.__elems_[22] < 0 )
v103 = (std::__vector_base::pointer)v103->m_data.m_long.capacitym1;
LOBYTE(v102) = atoi((const char *)v103) != 0;
}
v12->m_isIceBlock = (char)v102;
v104 = v70[193];
if ( v104 )
{
v105 = a1->__begin_ + 193;
if ( a1->__begin_[193].m_data.m_short.shortStorage.__elems_[22] < 0 )
v105 = (std::__vector_base::pointer)v105->m_data.m_long.capacitym1;
LOBYTE(v104) = atoi((const char *)v105) != 0;
}
v12->m_isGripSlope = (char)v104;
v106 = v70[372];
if ( v106 )
{
v107 = a1->__begin_ + 372;
if ( a1->__begin_[372].m_data.m_short.shortStorage.__elems_[22] < 0 )
v107 = (std::__vector_base::pointer)v107->m_data.m_long.capacitym1;
LOBYTE(v106) = atoi((const char *)v107) != 0;
}
v12->m_hasNoAudioScale = (char)v106;
if ( v70[497] )
{
v108 = a1->__begin_ + 497;
if ( a1->__begin_[497].m_data.m_short.shortStorage.__elems_[22] < 0 )
v108 = (std::__vector_base::pointer)v108->m_data.m_long.capacitym1;
v109 = atoi((const char *)v108);
}
else
{
v109 = 0;
}
v12->m_customColorType = v109;
v110 = v70[511];
if ( v110 )
{
v111 = a1->__begin_ + 511;
if ( a1->__begin_[511].m_data.m_short.shortStorage.__elems_[22] < 0 )
v111 = (std::__vector_base::pointer)v111->m_data.m_long.capacitym1;
LOBYTE(v110) = atoi((const char *)v111) != 0;
}
v12->m_hasExtendedCollision = (char)v110;
((void (__fastcall *)(GameObject *))v12->customSetup)(v12);
((void (__fastcall *)(GameObject *, std::vector *, std::vector *))v12->customObjectSetup)(
v12,
a1,
a2);
if ( SHIBYTE(v169) < 0 )
{
sub_1000097D0(v162, (void *)v168, *((unsigned __int64 *)&v168 + 1));
}
else
{
*(_OWORD *)v162 = v168;
v163 = v169;
}
GameObject::addGlow((__int64)v12, (char *)v162);
if ( SHIBYTE(v163) < 0 )
operator delete(v162[0]);
if ( SHIBYTE(v169) < 0 )
{
sub_1000097D0(v160, (void *)v168, *((unsigned __int64 *)&v168 + 1));
}
else
{
*(_OWORD *)v160 = v168;
v161 = v169;
}
GameObject::addColorSprite(v12, (char *)v160);
if ( SHIBYTE(v161) < 0 )
operator delete(v160[0]);
if ( SHIBYTE(v169) < 0 )
{
sub_1000097D0(v158, (void *)v168, *((unsigned __int64 *)&v168 + 1));
}
else
{
*(_OWORD *)v158 = v168;
v159 = v169;
}
((void (__fastcall *)(GameObject *, void **))v12->setupCustomSprites)(v12, v158);
if ( SHIBYTE(v159) < 0 )
operator delete(v158[0]);
((void (__fastcall *)(GameObject *, _BOOL8))v12->setFlipX)(v12, v26);
((void (__fastcall *)(GameObject *, __int64))v12->setFlipY)(v12, v28);
v12->m_startFlipX = v26;
v12->m_startFlipY = v28;
v12->m_editorLayer = v154;
v12->m_editorLayer2 = v153;
v112 = *((_QWORD *)a2->__begin_ + 96);
if ( v112 )
{
v113 = a1->__begin_ + 96;
if ( a1->__begin_[96].m_data.m_short.shortStorage.__elems_[22] < 0 )
v113 = (std::__vector_base::pointer)v113->m_data.m_long.capacitym1;
LOBYTE(v112) = atoi((const char *)v113) != 0;
}
v12->m_hasNoGlow = v112;
m_objectType = v12->m_objectType;
if ( m_objectType <= 0x19 && ((1 << m_objectType) & 0x2200001) != 0 && !v12->m_isNoTouch )
{
HIDWORD(v115) = -1527099483 * (int)v30 + 47721858;
LODWORD(v115) = HIDWORD(v115);
if ( (unsigned int)(v115 >> 1) >= 0x2D82D83 )
v30 = 0.0;
}
((void (__fastcall *)(GameObject *, float))v12->setRotation)(v12, v30);
v12->m_startRotationX = v30;
v12->m_startRotationY = v30;
v118 = a2->__begin_;
v119 = 0.0;
v120 = 0.0;
if ( *((_QWORD *)a2->__begin_ + 131) )
{
v121 = a1->__begin_ + 131;
if ( a1->__begin_[131].m_data.m_short.shortStorage.__elems_[22] < 0 )
v121 = (std::__vector_base::pointer)v121->m_data.m_long.capacitym1;
v116.n128_f64[0] = atof((const char *)v121);
v120 = v116.n128_f64[0];
}
if ( v118[132] )
{
v122 = a1->__begin_ + 132;
if ( a1->__begin_[132].m_data.m_short.shortStorage.__elems_[22] < 0 )
v122 = (std::__vector_base::pointer)v122->m_data.m_long.capacitym1;
v116.n128_f64[0] = atof((const char *)v122);
v119 = v116.n128_f64[0];
}
if ( v120 != v119 )
{
v123 = v12->m_objectType;
if ( v123 > 0x19 || ((1 << v123) & 0x2200001) == 0 || v12->m_isNoTouch )
{
((void (__fastcall *)(GameObject *, float))v12->setRotationX)(v12, v120);
v12->m_startRotationX = ((float (__fastcall *)(GameObject *))v12->getRotationX)(v12);
((void (__fastcall *)(GameObject *, float))v12->setRotationY)(v12, v119);
v12->m_startRotationY = ((float (__fastcall *)(GameObject *))v12->getRotationY)(v12);
}
}
if ( v16 == 142 )
EnhancedGameObject::updateUserCoin((EnhancedGameObject *)v12);
v116.n128_f32[0] = v21;
v117.n128_f32[0] = v24;
sub_100022980(v116, v117, v156);
((void (__fastcall *)(GameObject *, void **))v12->setStartPos)(v12, v156);
((void (__fastcall *)(GameObject *))v12->getObjectTextureRect)(v12);
if ( v15 > 716 )
{
if ( v15 == 717 )
{
v124 = 2;
}
else if ( v15 == 718 )
{
v124 = 3;
}
else
{
v124 = 4;
}
LABEL_300:
v12->m_targetColor = v124;
goto LABEL_301;
}
if ( v15 != 104 )
{
if ( v15 != 221 )
goto LABEL_301;
v124 = 1;
goto LABEL_300;
}
HIBYTE(v12[1].m_sAdditionalTransform.tx) = 1;
LABEL_301:
v125 = a2->__begin_;
if ( *((_QWORD *)a2->__begin_ + 41) )
{
v126 = a1->__begin_;
v127 = a1->__begin_ + 41;
if ( a1->__begin_[41].m_data.m_short.shortStorage.__elems_[22] < 0 )
v127 = (std::__vector_base::pointer)v127->m_data.m_long.capacitym1;
if ( atoi((const char *)v127) )
{
if ( v125[43] )
{
if ( v126[43].m_data.m_short.shortStorage.__elems_[22] < 0 )
{
sub_1000097D0(v156, (void *)v126[43].m_data.m_long.capacitym1, v126[43].m_data.m_long.size);
}
else
{
*(_OWORD *)v156 = *(_OWORD *)&v126[43].m_data.m_short.sizex2;
longStorage = v126[43].m_data.m_long.longStorage;
}
}
else
{
sub_100009900(v156, "");
}
v128 = GameToolbox::hsvFromString((__int64)v156, "a");
if ( *(float *)&xmmword_10086D500 != *(float *)&v128
|| *((float *)&xmmword_10086D500 + 1) != *((float *)&v128 + 1)
|| *((float *)&xmmword_10086D500 + 2) != v129
|| BYTE12(xmmword_10086D500) != v130
|| BYTE13(xmmword_10086D500) != v131 )
{
m_baseColor = v12->m_baseColor;
m_baseColor->m_usesHSV = 1;
*(_QWORD *)&m_baseColor->m_hsv.h = v128;
m_baseColor->m_hsv.v = v129;
m_baseColor->m_hsv.absoluteSaturation = v130;
m_baseColor->m_hsv.absoluteBrightness = v131;
*(_WORD *)m_baseColor->m_hsv.__pad = v132;
}
if ( SHIBYTE(longStorage) < 0 )
operator delete(v156[0]);
v125 = a2->__begin_;
}
}
if ( v125[42] )
{
v134 = a1->__begin_;
v135 = a1->__begin_ + 42;
if ( a1->__begin_[42].m_data.m_short.shortStorage.__elems_[22] < 0 )
v135 = (std::__vector_base::pointer)v135->m_data.m_long.capacitym1;
if ( atoi((const char *)v135) && v12->m_detailColor )
{
if ( v125[44] )
{
if ( v134[44].m_data.m_short.shortStorage.__elems_[22] < 0 )
{
sub_1000097D0(v156, (void *)v134[44].m_data.m_long.capacitym1, v134[44].m_data.m_long.size);
}
else
{
*(_OWORD *)v156 = *(_OWORD *)&v134[44].m_data.m_short.sizex2;
longStorage = v134[44].m_data.m_long.longStorage;
}
}
else
{
sub_100009900(v156, "");
}
v136 = GameToolbox::hsvFromString((__int64)v156, "a");
if ( *(float *)&xmmword_10086D500 != *(float *)&v136
|| *((float *)&xmmword_10086D500 + 1) != *((float *)&v136 + 1)
|| *((float *)&xmmword_10086D500 + 2) != v137
|| BYTE12(xmmword_10086D500) != v138
|| BYTE13(xmmword_10086D500) != v139 )
{
m_detailColor = v12->m_detailColor;
m_detailColor->m_usesHSV = 1;
*(_QWORD *)&m_detailColor->m_hsv.h = v136;
m_detailColor->m_hsv.v = v137;
m_detailColor->m_hsv.absoluteSaturation = v138;
m_detailColor->m_hsv.absoluteBrightness = v139;
*(_WORD *)m_detailColor->m_hsv.__pad = v140;
}
if ( SHIBYTE(longStorage) < 0 )
operator delete(v156[0]);
v125 = a2->__begin_;
}
}
if ( !v125[19] )
goto LABEL_356;
v142 = a1->__begin_ + 19;
if ( a1->__begin_[19].m_data.m_short.shortStorage.__elems_[22] < 0 )
v142 = (std::__vector_base::pointer)v142->m_data.m_long.capacitym1;
v143 = atoi((const char *)v142);
if ( v143 <= 3 )
{
if ( v143 > 1 )
{
if ( v143 == 2 )
v144 = 1006;
else
v144 = 1;
goto LABEL_380;
}
if ( v143 )
{
if ( v143 != 1 )
goto LABEL_383;
v144 = 1005;
LABEL_380:
v150 = v12->m_detailColor;
if ( !v150 )
v150 = v12->m_baseColor;
LABEL_382:
v150->m_colorID = v144;
goto LABEL_383;
}
LABEL_356:
if ( v125[21] )
{
v145 = a1->__begin_ + 21;
if ( a1->__begin_[21].m_data.m_short.shortStorage.__elems_[22] < 0 )
v145 = (std::__vector_base::pointer)v145->m_data.m_long.capacitym1;
v146 = atoi((const char *)v145);
if ( v146 >= 1 )
{
if ( (unsigned int)v146 >= 0x44D )
v147 = 1101;
else
v147 = v146;
v12->m_baseColor->m_colorID = v147;
}
}
if ( !v125[22] )
goto LABEL_383;
v148 = a1->__begin_ + 22;
if ( a1->__begin_[22].m_data.m_short.shortStorage.__elems_[22] < 0 )
v148 = (std::__vector_base::pointer)v148->m_data.m_long.capacitym1;
v149 = atoi((const char *)v148);
v144 = v149 & ~(v149 >> 31);
if ( v144 >= 1101 )
v144 = 1101;
if ( v149 < 1 )
goto LABEL_383;
v150 = v12->m_detailColor;
if ( !v150 )
goto LABEL_383;
goto LABEL_382;
}
if ( v143 <= 5 )
{
if ( v143 == 4 )
v144 = 2;
else
v144 = 1007;
goto LABEL_380;
}
switch ( v143 )
{
case 6:
v144 = 3;
goto LABEL_380;
case 7:
v144 = 4;
goto LABEL_380;
case 8:
v144 = 1003;
goto LABEL_380;
}
LABEL_383:
((void (__fastcall *)(GameObject *))v12->saveActiveColors)(v12);
*(_QWORD *)&v12->m_fScaleX = 0;
((void (__fastcall *)(GameObject *, float))v12->setRScaleX)(v12, 1.0);
((void (__fastcall *)(GameObject *, float))v12->setRScaleY)(v12, 1.0);
if ( SHIBYTE(__src.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__src.__r_.__value_.__l.__data_);
if ( __dst.m_data.m_short.shortStorage.__elems_[22] < 0 )
operator delete((void *)__dst.m_data.m_long.capacitym1);
if ( SHIBYTE(v169) < 0 )
operator delete((void *)v168);
return v12;
}