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