Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __int64 __fastcall BiomeInitLayer::BiomeInitLayer(Layer *a1, unsigned int a2, __int64 a3, int a4)
- {
- __int64 v4; // ST18_8
- int v5; // ST14_4
- __int64 result; // rax
- v4 = a3;
- v5 = a4;
- Layer::Layer(a1, a2);
- *(_QWORD *)a1 = &'vtable for'BiomeInitLayer + 2;
- std::vector<Biome *,std::allocator<Biome *>>::vector((char *)a1 + 112);
- std::shared_ptr<Layer>::operator=((char *)a1 + 48, v4);
- *((_QWORD *)a1 + 8) = VanillaBiomes::mDesert;
- *((_QWORD *)a1 + 9) = VanillaBiomes::mDesert;
- *((_QWORD *)a1 + 10) = VanillaBiomes::mDesert;
- *((_QWORD *)a1 + 11) = VanillaBiomes::mSavanna;
- *((_QWORD *)a1 + 12) = VanillaBiomes::mSavanna;
- *((_QWORD *)a1 + 13) = VanillaBiomes::mPlains;
- std::vector<Biome *,std::allocator<Biome *>>::push_back((char *)a1 + 112, &VanillaBiomes::mForest);
- if ( v5 == 1 )
- std::vector<Biome *,std::allocator<Biome *>>::push_back((char *)a1 + 112, &VanillaBiomes::mRoofedForest);
- std::vector<Biome *,std::allocator<Biome *>>::push_back((char *)a1 + 112, &VanillaBiomes::mExtremeHills);
- std::vector<Biome *,std::allocator<Biome *>>::push_back((char *)a1 + 112, &VanillaBiomes::mPlains);
- std::vector<Biome *,std::allocator<Biome *>>::push_back((char *)a1 + 112, &VanillaBiomes::mPlains);
- std::vector<Biome *,std::allocator<Biome *>>::push_back((char *)a1 + 112, &VanillaBiomes::mPlains);
- std::vector<Biome *,std::allocator<Biome *>>::push_back((char *)a1 + 112, &VanillaBiomes::mBirchForest);
- std::vector<Biome *,std::allocator<Biome *>>::push_back((char *)a1 + 112, &VanillaBiomes::mSwampland);
- *((_QWORD *)a1 + 17) = VanillaBiomes::mForest;
- *((_QWORD *)a1 + 18) = VanillaBiomes::mExtremeHills;
- *((_QWORD *)a1 + 19) = VanillaBiomes::mTaiga;
- *((_QWORD *)a1 + 20) = VanillaBiomes::mPlains;
- *((_QWORD *)a1 + 21) = VanillaBiomes::mIceFlats;
- *((_QWORD *)a1 + 22) = VanillaBiomes::mIceFlats;
- *((_QWORD *)a1 + 23) = VanillaBiomes::mIceFlats;
- result = VanillaBiomes::mTaigaCold;
- *((_QWORD *)a1 + 24) = VanillaBiomes::mTaigaCold;
- return result;
- }
- __int64 __fastcall BiomeInitLayer::fillArea(BiomeInitLayer *this, LayerData *a2, unsigned int a3, unsigned int a4, unsigned int a5, unsigned int a6)
- {
- __int64 v6; // rax
- int v7; // ecx
- int v8; // eax
- int v9; // eax
- int v10; // eax
- __int64 v11; // rax
- int v12; // eax
- int v13; // eax
- int v15; // [rsp+2Ch] [rbp-74h]
- unsigned int v16; // [rsp+30h] [rbp-70h]
- int v17; // [rsp+34h] [rbp-6Ch]
- int v18; // [rsp+38h] [rbp-68h]
- int v19; // [rsp+40h] [rbp-60h]
- __int64 v20; // [rsp+48h] [rbp-58h]
- __int64 *v21; // [rsp+50h] [rbp-50h]
- int v22; // [rsp+5Ch] [rbp-44h]
- int v23; // [rsp+60h] [rbp-40h]
- int v24; // [rsp+68h] [rbp-38h]
- __int64 v25; // [rsp+70h] [rbp-30h]
- __int64 *v26; // [rsp+78h] [rbp-28h]
- unsigned int v27; // [rsp+80h] [rbp-20h]
- unsigned int v28; // [rsp+84h] [rbp-1Ch]
- unsigned int v29; // [rsp+88h] [rbp-18h]
- unsigned int v30; // [rsp+8Ch] [rbp-14h]
- LayerData *v31; // [rsp+90h] [rbp-10h]
- BiomeInitLayer *v32; // [rsp+98h] [rbp-8h]
- v32 = this;
- v31 = a2;
- v30 = a3;
- v29 = a4;
- v28 = a5;
- v27 = a6;
- v6 = std::__shared_ptr<Layer,(__gnu_cxx::_Lock_policy)2>::operator->((char *)this + 48);
- (*(void (__fastcall **)(__int64, LayerData *, _QWORD, _QWORD, _QWORD, _QWORD))(*(_QWORD *)v6 + 24LL))(
- v6,
- a2,
- v30,
- v29,
- v28,
- v27);
- v25 = range<int,1>(v27);
- v26 = &v25;
- v24 = Range<int,1>::begin(&v25);
- v23 = Range<int,1>::end(v26);
- while ( Range<int,1>::iterator::operator!=(&v24, &v23) & 1 )
- {
- v22 = Range<int,1>::iterator::operator*(&v24);
- v20 = range<int,1>(v28);
- v21 = &v20;
- v19 = Range<int,1>::begin(&v20);
- v18 = Range<int,1>::end(v21);
- while ( Range<int,1>::iterator::operator!=(&v19, &v18) & 1 )
- {
- v17 = Range<int,1>::iterator::operator*(&v19);
- Layer::initRandom(this, (signed int)(v30 + v17), (signed int)(v29 + v22));
- v15 = (*(_DWORD *)(*(_QWORD *)v31 + 4LL * (signed int)(v28 * v22 + v17)) & 0xF00) >> 8;
- v16 = *(_DWORD *)(*(_QWORD *)v31 + 4LL * (signed int)(v28 * v22 + v17)) & 0xFFFFF0FF;
- if ( Layer::_isOcean((Layer *)v16, *(_QWORD *)v31) & 1 )
- {
- *(_DWORD *)(*((_QWORD *)v31 + 1) + 4LL * (signed int)(v28 * v22 + v17)) = v16;
- }
- else if ( v16 == *(_DWORD *)(VanillaBiomes::mMushroomIsland + 136LL) )
- {
- *(_DWORD *)(*((_QWORD *)v31 + 1) + 4LL * (signed int)(v28 * v22 + v17)) = v16;
- }
- else
- {
- switch ( v16 )
- {
- case 1u:
- if ( v15 <= 0 )
- {
- v8 = Layer::nextRandom(this, 6);
- *(_DWORD *)(*((_QWORD *)v31 + 1) + 4LL * (signed int)(v28 * v22 + v17)) = *(_DWORD *)(*((_QWORD *)this + v8 + 8)
- + 136LL);
- }
- else
- {
- if ( (unsigned int)Layer::nextRandom(this, 3) )
- v7 = *(_DWORD *)(VanillaBiomes::mMesaRock + 136LL);
- else
- v7 = *(_DWORD *)(VanillaBiomes::mMesaClearRock + 136LL);
- *(_DWORD *)(*((_QWORD *)v31 + 1) + 4LL * (signed int)(v28 * v22 + v17)) = v7;
- }
- break;
- case 2u:
- if ( v15 <= 0 )
- {
- v9 = std::vector<Biome *,std::allocator<Biome *>>::size((char *)this + 112);
- v10 = Layer::nextRandom(this, v9);
- v11 = std::vector<Biome *,std::allocator<Biome *>>::operator[]((char *)this + 112, v10);
- *(_DWORD *)(*((_QWORD *)v31 + 1) + 4LL * (signed int)(v28 * v22 + v17)) = *(_DWORD *)(*(_QWORD *)v11
- + 136LL);
- }
- else
- {
- *(_DWORD *)(*((_QWORD *)v31 + 1) + 4LL * (signed int)(v28 * v22 + v17)) = *(_DWORD *)(VanillaBiomes::mJungle
- + 136LL);
- }
- break;
- case 3u:
- if ( v15 <= 0 )
- {
- v12 = Layer::nextRandom(this, 4);
- *(_DWORD *)(*((_QWORD *)v31 + 1) + 4LL * (signed int)(v28 * v22 + v17)) = *(_DWORD *)(*((_QWORD *)this + v12 + 17)
- + 136LL);
- }
- else
- {
- *(_DWORD *)(*((_QWORD *)v31 + 1) + 4LL * (signed int)(v28 * v22 + v17)) = *(_DWORD *)(VanillaBiomes::mRedwoodTaiga
- + 136LL);
- }
- break;
- case 4u:
- v13 = Layer::nextRandom(this, 4);
- *(_DWORD *)(*((_QWORD *)v31 + 1) + 4LL * (signed int)(v28 * v22 + v17)) = *(_DWORD *)(*((_QWORD *)this
- + v13
- + 21)
- + 136LL);
- break;
- default:
- *(_DWORD *)(*((_QWORD *)v31 + 1) + 4LL * (signed int)(v28 * v22 + v17)) = *(_DWORD *)(VanillaBiomes::mMushroomIsland
- + 136LL);
- break;
- }
- }
- Range<int,1>::iterator::operator++(&v19);
- }
- Range<int,1>::iterator::operator++(&v24);
- }
- return LayerData::swap(v31);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement