fix: delta
|
Before Width: | Height: | Size: 134 KiB After Width: | Height: | Size: 413 KiB |
|
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: 158 KiB After Width: | Height: | Size: 158 KiB |
|
Before Width: | Height: | Size: 181 KiB After Width: | Height: | Size: 181 KiB |
|
Before Width: | Height: | Size: 102 KiB After Width: | Height: | Size: 102 KiB |
|
Before Width: | Height: | Size: 176 KiB After Width: | Height: | Size: 176 KiB |
|
Before Width: | Height: | Size: 168 KiB After Width: | Height: | Size: 168 KiB |
|
Before Width: | Height: | Size: 216 KiB After Width: | Height: | Size: 216 KiB |
|
Before Width: | Height: | Size: 204 KiB After Width: | Height: | Size: 204 KiB |
|
Before Width: | Height: | Size: 276 KiB After Width: | Height: | Size: 276 KiB |
|
Before Width: | Height: | Size: 147 KiB After Width: | Height: | Size: 147 KiB |
|
Before Width: | Height: | Size: 223 KiB After Width: | Height: | Size: 223 KiB |
|
Before Width: | Height: | Size: 150 KiB After Width: | Height: | Size: 150 KiB |
|
Before Width: | Height: | Size: 194 KiB After Width: | Height: | Size: 194 KiB |