fix: delta

This commit is contained in:
Fireblade
2026-07-03 21:42:59 -04:00
parent e92a063e63
commit cf909ff9ff
22 changed files with 17 additions and 5 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 134 KiB

After

Width:  |  Height:  |  Size: 413 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

After

Width:  |  Height:  |  Size: 440 KiB

@@ -41,7 +41,7 @@ static wstring GetPanoramaTexturePath()
wstring path(buf);
path += L"\\Windows64Media\\DLC\\";
path += packName;
path += L"\\Data\\Panorama\\";
path += L"\\Data\\ControlType\\Panorama\\";
wstring sampleDay = path + L"Panorama_S.png";
wstring sampleNight = path + L"Panorama_N.png";
if(GetFileAttributesW(sampleDay.c_str()) != INVALID_FILE_ATTRIBUTES ||
@@ -56,8 +56,8 @@ static wstring GetPanoramaTexturePath()
const char *mountedPanoramaRoots[] =
{
"TPACK:Data/Panorama/",
"WPACK:Data/Panorama/",
"TPACK:Data/ControlType/Panorama/",
"WPACK:Data/ControlType/Panorama/",
};
for(const char *mountedRoot : mountedPanoramaRoots)
@@ -254,8 +254,19 @@ void UIComponent_Panorama::tick()
setPanorama(true);
}
// scroll forever
m_panoramaScroll += 0.000035f;
// fix: tick rate affected by user framerate
const DWORD nowMs = GetTickCount();
if(m_lastScrollTickMs != 0)
{
const DWORD kMaxElapsedMs = 250;
const float kScrollPerMs = 0.0001f / 16.6667f;
DWORD elapsedMs = nowMs - m_lastScrollTickMs;
if(elapsedMs > kMaxElapsedMs) elapsedMs = kMaxElapsedMs;
m_panoramaScroll += kScrollPerMs * static_cast<float>(elapsedMs);
}
m_lastScrollTickMs = nowMs;
LeaveCriticalSection(&pMinecraft->m_setLevelCS);
m_hasTickedOnce = true;
@@ -13,6 +13,7 @@ private:
bool m_bPanoramaTexturesLoaded = false;
wstring m_panoramaTextureRoot;
float m_panoramaAspect = 1.0f;
DWORD m_lastScrollTickMs = 0;
float m_panoramaScroll = 0.0f;
public:

Before

Width:  |  Height:  |  Size: 204 KiB

After

Width:  |  Height:  |  Size: 204 KiB

Before

Width:  |  Height:  |  Size: 276 KiB

After

Width:  |  Height:  |  Size: 276 KiB