aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common
diff options
context:
space:
mode:
authorOmri <omrih.e@protonmail.com>2026-03-02 00:00:08 +0200
committerGitHub <noreply@github.com>2026-03-02 00:00:08 +0200
commit0d33cfbdbc4c3a80528bd263ce6e53be85340713 (patch)
treef4640efcc7d8ba60e3f925eda1d1e2cba9b33c36 /Minecraft.Client/Common
parent34d398cf1b3aa1bfa22a2e4ba434d8b6b63b3dc3 (diff)
parent071d4f65998d617440ade95bd291e47a6a220c59 (diff)
Merge branch 'smartcmd:main' into main
Diffstat (limited to 'Minecraft.Client/Common')
-rw-r--r--Minecraft.Client/Common/Audio/SoundEngine.cpp2
-rw-r--r--Minecraft.Client/Common/Consoles_App.cpp4
-rw-r--r--Minecraft.Client/Common/DLC/DLCPack.cpp7
-rw-r--r--Minecraft.Client/Common/DLC/DLCSkinFile.cpp4
-rw-r--r--Minecraft.Client/Common/UI/UIController.cpp2
-rw-r--r--Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp2
-rw-r--r--Minecraft.Client/Common/UI/UIScene_MainMenu.cpp4
-rw-r--r--Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp21
8 files changed, 34 insertions, 12 deletions
diff --git a/Minecraft.Client/Common/Audio/SoundEngine.cpp b/Minecraft.Client/Common/Audio/SoundEngine.cpp
index 4eaf7df7..1906b1aa 100644
--- a/Minecraft.Client/Common/Audio/SoundEngine.cpp
+++ b/Minecraft.Client/Common/Audio/SoundEngine.cpp
@@ -56,7 +56,7 @@ void SoundEngine::playMusicTick() {};
#else
#ifdef _WINDOWS64
-char SoundEngine::m_szSoundPath[]={"Durango\\Sound\\"};
+char SoundEngine::m_szSoundPath[]={"Windows64Media\\Sound\\"};
char SoundEngine::m_szMusicPath[]={"music\\"};
char SoundEngine::m_szRedistName[]={"redist64"};
#elif defined _DURANGO
diff --git a/Minecraft.Client/Common/Consoles_App.cpp b/Minecraft.Client/Common/Consoles_App.cpp
index b325f3a1..c2082965 100644
--- a/Minecraft.Client/Common/Consoles_App.cpp
+++ b/Minecraft.Client/Common/Consoles_App.cpp
@@ -3217,7 +3217,7 @@ void CMinecraftApp::HandleXuiActions(void)
bool gameStarted = false;
for(int i = 0; i < pMinecraft->levels.length; i++)
{
- if (pMinecraft->levels.data[i] != nullptr)
+ if (pMinecraft->levels.data[i] != NULL)
{
gameStarted = true;
break;
@@ -9536,4 +9536,4 @@ bool CMinecraftApp::HasReachedMainMenu()
{
return m_hasReachedMainMenu;
}
-#endif \ No newline at end of file
+#endif
diff --git a/Minecraft.Client/Common/DLC/DLCPack.cpp b/Minecraft.Client/Common/DLC/DLCPack.cpp
index 23a2e44a..507e51a7 100644
--- a/Minecraft.Client/Common/DLC/DLCPack.cpp
+++ b/Minecraft.Client/Common/DLC/DLCPack.cpp
@@ -382,7 +382,10 @@ DWORD DLCPack::getFileIndexAt(DLCManager::EDLCType type, const wstring &path, bo
bool DLCPack::hasPurchasedFile(DLCManager::EDLCType type, const wstring &path)
{
- if(type == DLCManager::e_DLCType_All)
+ // Patch all DLC to be "purchased"
+ return true;
+
+ /*if(type == DLCManager::e_DLCType_All)
{
app.DebugPrintf("Unimplemented\n");
#ifndef _CONTENT_PACKAGE
@@ -406,5 +409,5 @@ bool DLCPack::hasPurchasedFile(DLCManager::EDLCType type, const wstring &path)
{
//purchased
return true;
- }
+ }*/
}
diff --git a/Minecraft.Client/Common/DLC/DLCSkinFile.cpp b/Minecraft.Client/Common/DLC/DLCSkinFile.cpp
index f3768a34..c845acd9 100644
--- a/Minecraft.Client/Common/DLC/DLCSkinFile.cpp
+++ b/Minecraft.Client/Common/DLC/DLCSkinFile.cpp
@@ -205,7 +205,9 @@ bool DLCSkinFile::getParameterAsBool(DLCManager::EDLCParameterType type)
switch(type)
{
case DLCManager::e_DLCParamType_Free:
- return m_bIsFree;
+ // Patch all DLC to be "paid"
+ return false;
+ // return m_bIsFree;
default:
return false;
}
diff --git a/Minecraft.Client/Common/UI/UIController.cpp b/Minecraft.Client/Common/UI/UIController.cpp
index 8c336088..eb33b6b3 100644
--- a/Minecraft.Client/Common/UI/UIController.cpp
+++ b/Minecraft.Client/Common/UI/UIController.cpp
@@ -935,6 +935,8 @@ void UIController::handleKeyPress(unsigned int iPad, unsigned int key)
case ACTION_MENU_CANCEL: kbDown = KMInput.IsKeyDown(VK_ESCAPE); kbPressed = KMInput.IsKeyPressed(VK_ESCAPE); kbReleased = KMInput.IsKeyReleased(VK_ESCAPE); break;
case ACTION_MENU_B: kbDown = KMInput.IsKeyDown(VK_ESCAPE); kbPressed = KMInput.IsKeyPressed(VK_ESCAPE); kbReleased = KMInput.IsKeyReleased(VK_ESCAPE); break;
case ACTION_MENU_PAUSEMENU: kbDown = KMInput.IsKeyDown(VK_ESCAPE); kbPressed = KMInput.IsKeyPressed(VK_ESCAPE); kbReleased = KMInput.IsKeyReleased(VK_ESCAPE); break;
+ case ACTION_MENU_LEFT_SCROLL: kbDown = KMInput.IsKeyDown('Q'); kbPressed = KMInput.IsKeyPressed('Q'); kbReleased = KMInput.IsKeyReleased('Q'); break;
+ case ACTION_MENU_RIGHT_SCROLL: kbDown = KMInput.IsKeyDown('E'); kbPressed = KMInput.IsKeyPressed('E'); kbReleased = KMInput.IsKeyReleased('E'); break;
}
pressed = pressed || kbPressed;
released = released || kbReleased;
diff --git a/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp b/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp
index e2cbc2aa..1c07e540 100644
--- a/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_LoadMenu.cpp
@@ -62,7 +62,7 @@ UIScene_LoadMenu::UIScene_LoadMenu(int iPad, void *initData, UILayer *parentLaye
LoadMenuInitData *params = (LoadMenuInitData *)initData;
- //m_labelGameName.init(app.GetString(IDS_WORLD_NAME));
+ m_labelGameName.init(app.GetString(IDS_WORLD_NAME));
m_labelSeed.init(L"");
m_labelCreatedMode.init(app.GetString(IDS_CREATED_IN_SURVIVAL));
diff --git a/Minecraft.Client/Common/UI/UIScene_MainMenu.cpp b/Minecraft.Client/Common/UI/UIScene_MainMenu.cpp
index 7724aaaf..c909fbc6 100644
--- a/Minecraft.Client/Common/UI/UIScene_MainMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_MainMenu.cpp
@@ -334,7 +334,6 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId)
m_eAction=eAction_RunUnlockOrDLC;
signInReturnedFunc = &UIScene_MainMenu::UnlockFullGame_SignInReturned;
break;
-#if defined _XBOX
case eControl_Exit:
if( ProfileManager.IsFullVersion() )
{
@@ -345,13 +344,14 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId)
}
else
{
+#ifdef _XBOX
#ifdef _XBOX_ONE
ui.ShowPlayerDisplayname(true);
#endif
ui.NavigateToScene(primaryPad,eUIScene_TrialExitUpsell);
+#endif
}
break;
-#endif
#ifdef _DURANGO
case eControl_XboxHelp:
diff --git a/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp b/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp
index 6910dd65..33f41994 100644
--- a/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp
+++ b/Minecraft.Client/Common/UI/UIScene_SkinSelectMenu.cpp
@@ -1242,6 +1242,15 @@ void UIScene_SkinSelectMenu::handlePackIndexChanged()
updatePackDisplay();
}
+std::wstring fakeWideToRealWide(const wchar_t* original)
+{
+ const char* name = reinterpret_cast<const char*>(original);
+ int len = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0);
+ std::wstring wName(len, 0);
+ MultiByteToWideChar(CP_UTF8, 0, name, -1, &wName[0], len);
+ return wName.c_str();
+}
+
void UIScene_SkinSelectMenu::updatePackDisplay()
{
m_currentPackCount = app.m_dlcManager.getPackCount(DLCManager::e_DLCType_Skin) + SKIN_SELECT_MAX_DEFAULTS;
@@ -1249,7 +1258,9 @@ void UIScene_SkinSelectMenu::updatePackDisplay()
if(m_packIndex >= SKIN_SELECT_MAX_DEFAULTS)
{
DLCPack *thisPack = app.m_dlcManager.getPack(m_packIndex - SKIN_SELECT_MAX_DEFAULTS, DLCManager::e_DLCType_Skin);
- setCentreLabel(thisPack->getName().c_str());
+ // Fix the incorrect string type on title to display correctly
+ setCentreLabel(fakeWideToRealWide(thisPack->getName().c_str()));
+ //setCentreLabel(thisPack->getName().c_str());
}
else
{
@@ -1268,7 +1279,9 @@ void UIScene_SkinSelectMenu::updatePackDisplay()
if(nextPackIndex >= SKIN_SELECT_MAX_DEFAULTS)
{
DLCPack *thisPack = app.m_dlcManager.getPack(nextPackIndex - SKIN_SELECT_MAX_DEFAULTS, DLCManager::e_DLCType_Skin);
- setRightLabel(thisPack->getName().c_str());
+ // Fix the incorrect string type on title to display correctly
+ setRightLabel(fakeWideToRealWide(thisPack->getName().c_str()));
+ //setRightLabel(thisPack->getName().c_str());
}
else
{
@@ -1287,7 +1300,9 @@ void UIScene_SkinSelectMenu::updatePackDisplay()
if(previousPackIndex >= SKIN_SELECT_MAX_DEFAULTS)
{
DLCPack *thisPack = app.m_dlcManager.getPack(previousPackIndex - SKIN_SELECT_MAX_DEFAULTS, DLCManager::e_DLCType_Skin);
- setLeftLabel(thisPack->getName().c_str());
+ // Fix the incorrect string type on title to display correctly
+ setLeftLabel(fakeWideToRealWide(thisPack->getName().c_str()));
+ //setLeftLabel(thisPack->getName().c_str());
}
else
{