Match SetUserMaxLOD (#118)

* Match SetUserMaxLOD and implement UpdateMaxLOD

* Update realtimeview.cpp
This commit is contained in:
MishaProductions 2023-09-04 19:34:27 -04:00 committed by GitHub
parent 2b3f7cbfc1
commit c4453fe49f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 0 deletions

View file

@ -1,4 +1,11 @@
#include "realtimeview.h" #include "realtimeview.h"
#include <math.h>
// 0x10109598
float g_userMaxLodPower;
// 0x10101044
float g_userMaxBase = 4.0f;
// 0x10101048 // 0x10101048
float g_userMaxLod = 3.6f; float g_userMaxLod = 3.6f;
@ -19,10 +26,17 @@ float RealtimeView::GetPartsThreshold()
return g_partsThreshold; return g_partsThreshold;
} }
// OFFSET: LEGO1 100a5e20
void RealtimeView::UpdateMaxLOD()
{
g_userMaxLodPower = pow(g_userMaxBase, -g_userMaxLod);
}
// OFFSET: LEGO1 0x100a5de0 // OFFSET: LEGO1 0x100a5de0
void RealtimeView::SetUserMaxLOD(float p_lod) void RealtimeView::SetUserMaxLOD(float p_lod)
{ {
g_userMaxLod = p_lod; g_userMaxLod = p_lod;
UpdateMaxLOD();
} }
// OFFSET: LEGO1 0x100a5df0 // OFFSET: LEGO1 0x100a5df0

View file

@ -7,6 +7,7 @@ class RealtimeView
__declspec(dllexport) static float GetPartsThreshold(); __declspec(dllexport) static float GetPartsThreshold();
__declspec(dllexport) static float GetUserMaxLOD(); __declspec(dllexport) static float GetUserMaxLOD();
__declspec(dllexport) static void SetPartsThreshold(float); __declspec(dllexport) static void SetPartsThreshold(float);
static void UpdateMaxLOD();
__declspec(dllexport) static void SetUserMaxLOD(float); __declspec(dllexport) static void SetUserMaxLOD(float);
}; };