Created
July 27, 2020 21:18
-
-
Save BalintCsala/67fb10889da5d7ff041053ab24eb038b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* public: float __cdecl Biome::getTemperatureWorldGen(class BlockPos const & __ptr64)const __ptr64 | |
*/ | |
float __thiscall getTemperatureWorldGen(Biome *this,BlockPos *param_1) | |
{ | |
int *piVar1; | |
uint uVar2; | |
int iVar3; | |
Registry<struct_EntityId> *this_00; | |
PerlinSimplexNoise *this_01; | |
bool bVar4; | |
Pool<class_NoiseBasedTemperatureAttributes> *pPVar5; | |
float extraout_XMM0_Da; | |
float extraout_XMM0_Da_00; | |
float fVar6; | |
float fVar7; | |
float fVar8; | |
float fVar9; | |
undefined8 local_78; | |
undefined8 local_70; | |
undefined8 local_68; | |
if (this[0xe8] == (Biome)0x0) { | |
local_78 = 0; | |
local_70 = 0; | |
local_68 = 0; | |
bad_optional_access((bad_optional_access *)&local_78); | |
/* WARNING: Subroutine does not return */ | |
_CxxThrowException(&local_78,(ThrowInfo *)&_TI2?AVbad_optional_access@std@@); | |
} | |
this_00 = **(Registry<struct_EntityId> ***)(this + 0xd8); | |
bVar4 = has<class_NoiseBasedTemperatureAttributes>(this_00,SUB41(*(undefined4 *)(this + 0xe0),0)); | |
fVar8 = extraout_XMM0_Da; | |
if (bVar4 != false) { | |
uVar2 = *(uint *)(this + 0xe0); | |
pPVar5 = pool<class_NoiseBasedTemperatureAttributes>(this_00); | |
piVar1 = (int *)(*(longlong *)(pPVar5 + 0x38) + | |
(ulonglong) | |
(*(uint *)(*(longlong *)(pPVar5 + 8) + (ulonglong)(uVar2 & 0xfffff) * 4) & | |
0xfffff) * 4); | |
fVar8 = extraout_XMM0_Da_00; | |
if ((piVar1 != (int *)0x0) && (*piVar1 == 0)) { | |
this_01 = *(PerlinSimplexNoise **)(this + 0xf0); | |
fVar8 = *(float *)(this + 0x30); | |
fVar9 = (float)*(int *)param_1; | |
fVar6 = getValue(this_01,extraout_XMM0_Da_00,fVar9 * 0.20000000); | |
fVar7 = getValue(*(PerlinSimplexNoise **)(this + 0xd0),fVar6,fVar9 * 0.05000000); | |
fVar7 = fVar7 + fVar6; | |
if ((fVar7 < 0.30000001) && | |
(fVar7 = getValue(this_01,fVar7,fVar9 * 0.09000000), fVar7 < 0.80000001)) { | |
fVar8 = 0.20000000; | |
} | |
iVar3 = *(int *)(param_1 + 4); | |
if (iVar3 < 0x41) { | |
return fVar8; | |
} | |
fVar6 = getValue(*(PerlinSimplexNoise **)(this + 200),fVar7,fVar9 * 0.12500000); | |
return fVar8 - ((fVar6 * 4.00000000 + (float)iVar3) - 64.00000000) * 0.00166667; | |
} | |
} | |
iVar3 = *(int *)(param_1 + 4); | |
fVar6 = *(float *)(this + 0x30); | |
if (0x40 < iVar3) { | |
fVar8 = getValue(*(PerlinSimplexNoise **)(this + 200),fVar8,(float)*(int *)param_1 * 0.12500000) | |
; | |
fVar6 = fVar6 - ((fVar8 * 4.00000000 + (float)iVar3) - 64.00000000) * 0.00166667; | |
} | |
return fVar6; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment