mirror of
https://github.com/GabsPuNs/Project-Zenith-Main.git
synced 2026-07-11 08:38:11 +00:00
Use Nearest-Neigbor. Remove Neo Legacy Stuff
Nearest-Neighbor is the default filter used in Minecraft for the UI. Hardcore mode never existed in console version. Someone just added it with fake 4J comments.
This commit is contained in:
@@ -17,10 +17,7 @@ div#help_options_menu
|
||||
height: auto;
|
||||
margin: auto;
|
||||
background: rgba(0, 0, 0, 0.65);
|
||||
border-top: 2px solid #555555;
|
||||
border-bottom: 2px solid #555555;
|
||||
border-left: 2px solid #555555;
|
||||
border-right: 2px solid #555555;
|
||||
border: 2px solid #555555;
|
||||
border-radius: 8px;
|
||||
padding: 40px 48px;
|
||||
}
|
||||
|
||||
@@ -17,10 +17,7 @@ div#pause_menu
|
||||
height: auto;
|
||||
margin: auto;
|
||||
background: rgba(0, 0, 0, 0.65);
|
||||
border-top: 2px solid #555555;
|
||||
border-bottom: 2px solid #555555;
|
||||
border-left: 2px solid #555555;
|
||||
border-right: 2px solid #555555;
|
||||
border: 2px solid #555555;
|
||||
border-radius: 8px;
|
||||
padding: 40px 48px;
|
||||
}
|
||||
|
||||
@@ -17,10 +17,7 @@ div#settings_menu
|
||||
height: auto;
|
||||
margin: auto;
|
||||
background: rgba(0, 0, 0, 0.65);
|
||||
border-top: 2px solid #555555;
|
||||
border-bottom: 2px solid #555555;
|
||||
border-left: 2px solid #555555;
|
||||
border-right: 2px solid #555555;
|
||||
border: 2px solid #555555;
|
||||
border-radius: 8px;
|
||||
padding: 40px 48px;
|
||||
}
|
||||
|
||||
@@ -875,7 +875,6 @@ private:
|
||||
|
||||
|
||||
bool m_bResetNether;
|
||||
wstring m_currentSaveFolderName; // 4J Added: for hardcore world deletion on Win64
|
||||
DWORD m_dwRequiredTexturePackID;
|
||||
#ifdef _XBOX_ONE
|
||||
vector <PBYTE> m_vTMSPPData;
|
||||
@@ -889,12 +888,6 @@ private:
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
// 4J Added - for hardcore world deletion on Win64
|
||||
public:
|
||||
void SetCurrentSaveFolderName(const wstring& name) { m_currentSaveFolderName = name; }
|
||||
const wstring& GetCurrentSaveFolderName() const { return m_currentSaveFolderName; }
|
||||
|
||||
// 4J-PB - language and locale functions
|
||||
public:
|
||||
|
||||
|
||||
@@ -240,73 +240,12 @@ int IUIScene_PauseMenu::ExitWorldThreadProc( void* lpParameter )
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
static bool Win64_DeleteSaveDirectory(const wchar_t* wPath)
|
||||
{
|
||||
wchar_t wSearch[MAX_PATH];
|
||||
swprintf_s(wSearch, MAX_PATH, L"%s\\*", wPath);
|
||||
WIN32_FIND_DATAW fd;
|
||||
HANDLE hFind = FindFirstFileW(wSearch, &fd);
|
||||
if (hFind != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
do
|
||||
{
|
||||
if (wcscmp(fd.cFileName, L".") == 0 || wcscmp(fd.cFileName, L"..") == 0) continue;
|
||||
wchar_t wChild[MAX_PATH];
|
||||
swprintf_s(wChild, MAX_PATH, L"%s\\%s", wPath, fd.cFileName);
|
||||
if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
|
||||
Win64_DeleteSaveDirectory(wChild);
|
||||
else
|
||||
DeleteFileW(wChild);
|
||||
} while (FindNextFileW(hFind, &fd));
|
||||
FindClose(hFind);
|
||||
}
|
||||
return RemoveDirectoryW(wPath) != 0;
|
||||
}
|
||||
#endif // _WINDOWS64
|
||||
|
||||
// This function performs the meat of exiting from a level. It should be called from a thread other than the main thread.
|
||||
void IUIScene_PauseMenu::_ExitWorld(LPVOID lpParameter)
|
||||
{
|
||||
#ifndef MINECRAFT_SERVER_BUILD
|
||||
Minecraft *pMinecraft=Minecraft::GetInstance();
|
||||
|
||||
// 4J Added: Capture hardcore delete info before the server is destroyed
|
||||
#ifdef _WINDOWS64
|
||||
bool shouldDeleteHardcoreWorld = false;
|
||||
wstring hardcoreSaveFolderName;
|
||||
if (MinecraftServer::getInstance() != nullptr && MinecraftServer::getInstance()->getDeleteWorldOnExit())
|
||||
{
|
||||
shouldDeleteHardcoreWorld = true;
|
||||
// Try 1: Use the save folder name stored by UIScene_LoadMenu::StartGameFromSave (works for existing saves)
|
||||
hardcoreSaveFolderName = app.GetCurrentSaveFolderName();
|
||||
if (!hardcoreSaveFolderName.empty())
|
||||
{
|
||||
app.DebugPrintf("Hardcore mode: save folder from app = '%ls'\n", hardcoreSaveFolderName.c_str());
|
||||
}
|
||||
// Try 2: StorageManager (may work for new saves after first autosave)
|
||||
if (hardcoreSaveFolderName.empty())
|
||||
{
|
||||
char szSaveFolder[MAX_SAVEFILENAME_LENGTH] = {};
|
||||
StorageManager.GetSaveUniqueFilename(szSaveFolder);
|
||||
if (szSaveFolder[0] != '\0')
|
||||
{
|
||||
wchar_t wSaveFolder[MAX_SAVEFILENAME_LENGTH] = {};
|
||||
mbstowcs(wSaveFolder, szSaveFolder, MAX_SAVEFILENAME_LENGTH - 1);
|
||||
hardcoreSaveFolderName = wSaveFolder;
|
||||
app.DebugPrintf("Hardcore mode: save folder from StorageManager = '%s'\n", szSaveFolder);
|
||||
}
|
||||
}
|
||||
// Try 3: Stored during loadLevel
|
||||
if (hardcoreSaveFolderName.empty())
|
||||
{
|
||||
hardcoreSaveFolderName = MinecraftServer::getInstance()->getSaveFolderName();
|
||||
app.DebugPrintf("Hardcore mode: save folder from server = '%ls'\n", hardcoreSaveFolderName.c_str());
|
||||
}
|
||||
MinecraftServer::getInstance()->setDeleteWorldOnExit(false);
|
||||
}
|
||||
#endif
|
||||
|
||||
int exitReasonStringId = pMinecraft->progressRenderer->getCurrentTitle();
|
||||
int exitReasonTitleId = IDS_CONNECTION_LOST;
|
||||
|
||||
@@ -517,16 +456,6 @@ void IUIScene_PauseMenu::_ExitWorld(LPVOID lpParameter)
|
||||
{
|
||||
Sleep(1);
|
||||
}
|
||||
// 4J Added: Hardcore mode — delete world save data now that the server is fully stopped
|
||||
#ifdef _WINDOWS64
|
||||
if (shouldDeleteHardcoreWorld && !hardcoreSaveFolderName.empty())
|
||||
{
|
||||
wchar_t wFolderPath[MAX_PATH] = {};
|
||||
swprintf_s(wFolderPath, MAX_PATH, L"Windows64\\GameHDD\\%s", hardcoreSaveFolderName.c_str());
|
||||
app.DebugPrintf("Hardcore mode: Deleting world save folder '%ls'\n", wFolderPath);
|
||||
Win64_DeleteSaveDirectory(wFolderPath);
|
||||
}
|
||||
#endif
|
||||
|
||||
pMinecraft->setLevel(nullptr,exitReasonStringId,nullptr,saveStats);
|
||||
|
||||
|
||||
@@ -265,8 +265,6 @@ private:
|
||||
private:
|
||||
// 4J Added
|
||||
bool m_saveOnExit;
|
||||
bool m_deleteWorldOnExit; // 4J Added - for hardcore mode world deletion
|
||||
wstring m_saveFolderName; // 4J Added - stored for hardcore world deletion
|
||||
bool m_suspending;
|
||||
|
||||
public:
|
||||
|
||||
@@ -283,9 +283,9 @@ bool RenderInterface_D3D11::CreateStateObjects()
|
||||
hr = m_device->CreateRasterizerState(&rast_desc, &m_raster_state);
|
||||
if (FAILED(hr)) return false;
|
||||
|
||||
// Sampler state: linear filtering, clamp
|
||||
// Sampler state: Nearest-Neighbor, clamp
|
||||
D3D11_SAMPLER_DESC samp_desc = {};
|
||||
samp_desc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
|
||||
samp_desc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT;
|
||||
samp_desc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP;
|
||||
samp_desc.AddressV = D3D11_TEXTURE_ADDRESS_CLAMP;
|
||||
samp_desc.AddressW = D3D11_TEXTURE_ADDRESS_CLAMP;
|
||||
|
||||
Reference in New Issue
Block a user