mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Merge branch 'smartcmd:main' into main
This commit is contained in:
commit
480b28d2c6
4
.github/pull_request_template.md
vendored
4
.github/pull_request_template.md
vendored
|
|
@ -1,7 +1,9 @@
|
||||||
# Pull Request
|
# Pull Request
|
||||||
|
|
||||||
|
## Note: IF YOUR PR CHANGES THE GAME BEHAVIOR VISIBLY, REMEMBER TO ATTACH A GAMEPLAY FOOTAGE (or at least a screenshot) OF YOU *ACTUALLY* PLAYING THE GAME WITH YOUR CHANGES. Untested PRs are *NOT* welcome. Please don't forget to describe what did you do in each commit in your PR.
|
||||||
|
|
||||||
## Description
|
## Description
|
||||||
Briefly describe the changes this PR introduces.
|
Briefly describe the changes this PR introduces.
|
||||||
|
|
||||||
## Changes
|
## Changes
|
||||||
|
|
||||||
|
|
|
||||||
8
.gitignore
vendored
8
.gitignore
vendored
|
|
@ -423,4 +423,10 @@ Minecraft.World/x64_Debug/
|
||||||
Minecraft.World/Release/
|
Minecraft.World/Release/
|
||||||
Minecraft.World/x64_Release/
|
Minecraft.World/x64_Release/
|
||||||
|
|
||||||
build/*
|
build/*
|
||||||
|
|
||||||
|
# Existing build output files
|
||||||
|
!x64/**/Effects.msscmp
|
||||||
|
!x64/**/iggy_w64.dll
|
||||||
|
!x64/**/mss64.dll
|
||||||
|
!x64/**/redist64/
|
||||||
|
|
|
||||||
|
|
@ -56,7 +56,7 @@ void SoundEngine::playMusicTick() {};
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifdef _WINDOWS64
|
#ifdef _WINDOWS64
|
||||||
char SoundEngine::m_szSoundPath[]={"Windows64Media\\Sound\\"};
|
char SoundEngine::m_szSoundPath[]={"Windows64\\Sound\\"};
|
||||||
char SoundEngine::m_szMusicPath[]={"music\\"};
|
char SoundEngine::m_szMusicPath[]={"music\\"};
|
||||||
char SoundEngine::m_szRedistName[]={"redist64"};
|
char SoundEngine::m_szRedistName[]={"redist64"};
|
||||||
#elif defined _DURANGO
|
#elif defined _DURANGO
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "ConsoleGameMode.h"
|
#include "ConsoleGameMode.h"
|
||||||
#include "..\Common\Tutorial\Tutorial.h"
|
#include ".\Tutorial\Tutorial.h"
|
||||||
|
|
||||||
ConsoleGameMode::ConsoleGameMode(int iPad, Minecraft *minecraft, ClientConnection *connection)
|
ConsoleGameMode::ConsoleGameMode(int iPad, Minecraft *minecraft, ClientConnection *connection)
|
||||||
: TutorialMode(iPad, minecraft, connection)
|
: TutorialMode(iPad, minecraft, connection)
|
||||||
{
|
{
|
||||||
tutorial = new Tutorial(iPad);
|
tutorial = new Tutorial(iPad);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "..\Common\Tutorial\TutorialMode.h"
|
#include ".\Tutorial\TutorialMode.h"
|
||||||
|
|
||||||
class ConsoleGameMode : public TutorialMode
|
class ConsoleGameMode : public TutorialMode
|
||||||
{
|
{
|
||||||
|
|
@ -7,4 +7,4 @@ public:
|
||||||
ConsoleGameMode(int iPad, Minecraft *minecraft, ClientConnection *connection);
|
ConsoleGameMode(int iPad, Minecraft *minecraft, ClientConnection *connection);
|
||||||
|
|
||||||
virtual bool isImplemented() { return true; }
|
virtual bool isImplemented() { return true; }
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,12 @@
|
||||||
#include "..\MultiPlayerLevel.h"
|
#include "..\MultiPlayerLevel.h"
|
||||||
#include "..\GameRenderer.h"
|
#include "..\GameRenderer.h"
|
||||||
#include "..\ProgressRenderer.h"
|
#include "..\ProgressRenderer.h"
|
||||||
#include "..\..\Minecraft.Client\LevelRenderer.h"
|
#include "..\LevelRenderer.h"
|
||||||
#include "..\..\Minecraft.Client\MobSkinMemTextureProcessor.h"
|
#include "..\MobSkinMemTextureProcessor.h"
|
||||||
#include "..\..\Minecraft.Client\Minecraft.h"
|
#include "..\Minecraft.h"
|
||||||
#include "..\ClientConnection.h"
|
#include "..\ClientConnection.h"
|
||||||
#include "..\MultiPlayerLocalPlayer.h"
|
#include "..\MultiPlayerLocalPlayer.h"
|
||||||
#include "..\..\Minecraft.Client\LocalPlayer.h"
|
#include "..\LocalPlayer.h"
|
||||||
#include "..\..\Minecraft.World\Player.h"
|
#include "..\..\Minecraft.World\Player.h"
|
||||||
#include "..\..\Minecraft.World\Inventory.h"
|
#include "..\..\Minecraft.World\Inventory.h"
|
||||||
#include "..\..\Minecraft.World\Level.h"
|
#include "..\..\Minecraft.World\Level.h"
|
||||||
|
|
@ -22,17 +22,17 @@
|
||||||
#include "..\..\Minecraft.World\Container.h"
|
#include "..\..\Minecraft.World\Container.h"
|
||||||
#include "..\..\Minecraft.World\DispenserTileEntity.h"
|
#include "..\..\Minecraft.World\DispenserTileEntity.h"
|
||||||
#include "..\..\Minecraft.World\SignTileEntity.h"
|
#include "..\..\Minecraft.World\SignTileEntity.h"
|
||||||
#include "..\..\Minecraft.Client\StatsCounter.h"
|
#include "..\StatsCounter.h"
|
||||||
#include "..\GameMode.h"
|
#include "..\GameMode.h"
|
||||||
#include "..\Xbox\Social\SocialManager.h"
|
#include "..\Xbox\Social\SocialManager.h"
|
||||||
#include "Tutorial\TutorialMode.h"
|
#include "Tutorial\TutorialMode.h"
|
||||||
#if defined _XBOX || defined _WINDOWS64
|
#if defined _XBOX || defined _WINDOWS64
|
||||||
#include "..\..\Minecraft.Client\Xbox\XML\ATGXmlParser.h"
|
#include "..\Xbox\XML\ATGXmlParser.h"
|
||||||
#include "..\..\Minecraft.Client\Xbox\XML\xmlFilesCallback.h"
|
#include "..\Xbox\XML\xmlFilesCallback.h"
|
||||||
#endif
|
#endif
|
||||||
#include "Minecraft_Macros.h"
|
#include "Minecraft_Macros.h"
|
||||||
#include "..\..\Minecraft.Client\PlayerList.h"
|
#include "..\PlayerList.h"
|
||||||
#include "..\..\Minecraft.Client\ServerPlayer.h"
|
#include "..\ServerPlayer.h"
|
||||||
#include "GameRules\ConsoleGameRules.h"
|
#include "GameRules\ConsoleGameRules.h"
|
||||||
#include "GameRules\ConsoleSchematicFile.h"
|
#include "GameRules\ConsoleSchematicFile.h"
|
||||||
#include "..\..\Minecraft.World\InputOutputStream.h"
|
#include "..\..\Minecraft.World\InputOutputStream.h"
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
#include "..\User.h"
|
#include "..\User.h"
|
||||||
#include "..\..\Minecraft.World\LevelData.h"
|
#include "..\..\Minecraft.World\LevelData.h"
|
||||||
#include "..\..\Minecraft.World\net.minecraft.world.entity.player.h"
|
#include "..\..\Minecraft.World\net.minecraft.world.entity.player.h"
|
||||||
#include "..\..\Minecraft.Client\EntityRenderDispatcher.h"
|
#include "..\EntityRenderDispatcher.h"
|
||||||
#include "..\..\Minecraft.World\compression.h"
|
#include "..\..\Minecraft.World\compression.h"
|
||||||
#include "..\TexturePackRepository.h"
|
#include "..\TexturePackRepository.h"
|
||||||
#include "..\DLCTexturePack.h"
|
#include "..\DLCTexturePack.h"
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,11 @@ using namespace std;
|
||||||
#include "Audio/Consoles_SoundEngine.h"
|
#include "Audio/Consoles_SoundEngine.h"
|
||||||
|
|
||||||
#include <xuiapp.h>
|
#include <xuiapp.h>
|
||||||
#include "..\Common\Tutorial\TutorialEnum.h"
|
#include ".\Tutorial\TutorialEnum.h"
|
||||||
|
|
||||||
#ifdef _XBOX
|
#ifdef _XBOX
|
||||||
#include "..\Common\XUI\XUI_Helper.h"
|
#include ".\XUI\XUI_Helper.h"
|
||||||
#include "..\Common\XUI\XUI_HelpCredits.h"
|
#include ".\XUI\XUI_HelpCredits.h"
|
||||||
#endif
|
#endif
|
||||||
#include "UI\UIStructs.h"
|
#include "UI\UIStructs.h"
|
||||||
|
|
||||||
|
|
@ -17,9 +17,9 @@ using namespace std;
|
||||||
#include <xsocialpost.h>
|
#include <xsocialpost.h>
|
||||||
|
|
||||||
#include "..\StringTable.h"
|
#include "..\StringTable.h"
|
||||||
#include "..\Common\DLC\DLCManager.h"
|
#include ".\DLC\DLCManager.h"
|
||||||
#include "..\Common\GameRules\ConsoleGameRulesConstants.h"
|
#include ".\GameRules\ConsoleGameRulesConstants.h"
|
||||||
#include "..\Common\GameRules\GameRuleManager.h"
|
#include ".\GameRules\GameRuleManager.h"
|
||||||
#include "..\SkinBox.h"
|
#include "..\SkinBox.h"
|
||||||
#include "..\ArchiveFile.h"
|
#include "..\ArchiveFile.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -313,6 +313,10 @@ bool UILayer::NavigateToScene(int iPad, EUIScene scene, void *initData)
|
||||||
newScene = new UIScene_InGameInfoMenu(iPad, initData, this);
|
newScene = new UIScene_InGameInfoMenu(iPad, initData, this);
|
||||||
break;
|
break;
|
||||||
case eUIScene_InGameHostOptionsMenu:
|
case eUIScene_InGameHostOptionsMenu:
|
||||||
|
if (IsSceneInStack(eUIScene_InGameHostOptionsMenu)) {
|
||||||
|
app.DebugPrintf("Skipped eUIScene_InGameHostOptionsMenu, we have already this tab!");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
newScene = new UIScene_InGameHostOptionsMenu(iPad, initData, this);
|
newScene = new UIScene_InGameHostOptionsMenu(iPad, initData, this);
|
||||||
break;
|
break;
|
||||||
case eUIScene_InGamePlayerOptionsMenu:
|
case eUIScene_InGamePlayerOptionsMenu:
|
||||||
|
|
|
||||||
|
|
@ -335,8 +335,11 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId)
|
||||||
signInReturnedFunc = &UIScene_MainMenu::UnlockFullGame_SignInReturned;
|
signInReturnedFunc = &UIScene_MainMenu::UnlockFullGame_SignInReturned;
|
||||||
break;
|
break;
|
||||||
case eControl_Exit:
|
case eControl_Exit:
|
||||||
|
//CD - Added for audio
|
||||||
|
ui.PlayUISFX(eSFX_Press);
|
||||||
|
|
||||||
if( ProfileManager.IsFullVersion() )
|
if( ProfileManager.IsFullVersion() )
|
||||||
{
|
{
|
||||||
UINT uiIDA[2];
|
UINT uiIDA[2];
|
||||||
uiIDA[0]=IDS_CANCEL;
|
uiIDA[0]=IDS_CANCEL;
|
||||||
uiIDA[1]=IDS_OK;
|
uiIDA[1]=IDS_OK;
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ void Input::tick(LocalPlayer *player)
|
||||||
|
|
||||||
#ifdef _WINDOWS64
|
#ifdef _WINDOWS64
|
||||||
// WASD movement (combine with gamepad)
|
// WASD movement (combine with gamepad)
|
||||||
if (iPad == 0)
|
if (iPad == 0 && KMInput.IsCaptured())
|
||||||
{
|
{
|
||||||
float kbX = 0.0f, kbY = 0.0f;
|
float kbX = 0.0f, kbY = 0.0f;
|
||||||
if (KMInput.IsKeyDown('W')) { kbY += 1.0f; sprintForward += 1.0f; usingKeyboardMovement = true; }
|
if (KMInput.IsKeyDown('W')) { kbY += 1.0f; sprintForward += 1.0f; usingKeyboardMovement = true; }
|
||||||
|
|
@ -95,7 +95,7 @@ void Input::tick(LocalPlayer *player)
|
||||||
|
|
||||||
#ifdef _WINDOWS64
|
#ifdef _WINDOWS64
|
||||||
// Keyboard hold-to-sneak (overrides gamepad toggle)
|
// Keyboard hold-to-sneak (overrides gamepad toggle)
|
||||||
if (iPad == 0 && KMInput.IsKeyDown(VK_SHIFT) && !player->abilities.flying)
|
if (iPad == 0 && KMInput.IsCaptured() && KMInput.IsKeyDown(VK_SHIFT) && !player->abilities.flying)
|
||||||
sneaking = true;
|
sneaking = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -166,7 +166,7 @@ void Input::tick(LocalPlayer *player)
|
||||||
|
|
||||||
#ifdef _WINDOWS64
|
#ifdef _WINDOWS64
|
||||||
// Keyboard jump (Space)
|
// Keyboard jump (Space)
|
||||||
if (iPad == 0 && KMInput.IsKeyDown(VK_SPACE) && pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_JUMP))
|
if (iPad == 0 && KMInput.IsCaptured() && KMInput.IsKeyDown(VK_SPACE) && pMinecraft->localgameModes[iPad]->isInputAllowed(MINECRAFT_ACTION_JUMP))
|
||||||
jumping = true;
|
jumping = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1302,14 +1302,8 @@ if not exist "$(TargetDir)\savedata" mkdir "$(TargetDir)\savedata"</Command>
|
||||||
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
|
<ForceFileOutput>MultiplyDefinedSymbolOnly</ForceFileOutput>
|
||||||
</Link>
|
</Link>
|
||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Message>Copying sound assets to output directory</Message>
|
<Message>Run postbuild script</Message>
|
||||||
<Command>xcopy /q /y /i /s /e "$(ProjectDir)Durango\Sound" "$(OutDir)Durango\Sound"
|
<Command>powershell -ExecutionPolicy Bypass -File "$(ProjectDir)postbuild.ps1" -OutDir "$(OutDir)/" -ProjectDir "$(ProjectDir)/"</Command>
|
||||||
xcopy /q /y /i /s /e "$(ProjectDir)music" "$(OutDir)music"
|
|
||||||
xcopy /q /y /i /s /e "$(ProjectDir)Windows64\GameHDD" "$(OutDir)Windows64\GameHDD"
|
|
||||||
xcopy /q /y /i /s /e "$(ProjectDir)Common\Media" "$(OutDir)Common\Media"
|
|
||||||
xcopy /q /y /i /s /e "$(ProjectDir)Common\res" "$(OutDir)Common\res"
|
|
||||||
xcopy /q /y /i /s /e "$(ProjectDir)Common\Trial" "$(OutDir)Common\Trial"
|
|
||||||
xcopy /q /y /i /s /e "$(ProjectDir)Common\Tutorial" "$(OutDir)Common\Tutorial"</Command>
|
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
<ImageXex>
|
<ImageXex>
|
||||||
<ConfigurationFile>$(ProjectDir)xbox\xex-dev.xml</ConfigurationFile>
|
<ConfigurationFile>$(ProjectDir)xbox\xex-dev.xml</ConfigurationFile>
|
||||||
|
|
@ -1440,25 +1434,8 @@ xcopy /q /y /i /s /e $(ProjectDir)Durango\CU $(LayoutDir)Image\Loose\CU</Comman
|
||||||
<SuppressStartupBanner>false</SuppressStartupBanner>
|
<SuppressStartupBanner>false</SuppressStartupBanner>
|
||||||
</Link>
|
</Link>
|
||||||
<PostBuildEvent>
|
<PostBuildEvent>
|
||||||
<Message>Copying game assets to output directory</Message>
|
<Message>Run postbuild script</Message>
|
||||||
<Command>mkdir "$(OutDir)music" 2>nul
|
<Command>powershell -ExecutionPolicy Bypass -File "$(ProjectDir)postbuild.ps1" -OutDir "$(OutDir)/" -ProjectDir "$(ProjectDir)/"</Command>
|
||||||
mkdir "$(OutDir)Windows64\GameHDD" 2>nul
|
|
||||||
mkdir "$(OutDir)Common\Media" 2>nul
|
|
||||||
mkdir "$(OutDir)Common\res" 2>nul
|
|
||||||
mkdir "$(OutDir)Common\Trial" 2>nul
|
|
||||||
mkdir "$(OutDir)Common\Tutorial" 2>nul
|
|
||||||
mkdir "$(OutDir)Windows64Media" 2>nul
|
|
||||||
|
|
||||||
xcopy /q /y /i /s /e "$(ProjectDir)music" "$(OutDir)music" || exit /b 0
|
|
||||||
xcopy /q /y /i /s /e "$(ProjectDir)Windows64\GameHDD" "$(OutDir)Windows64\GameHDD" || exit /b 0
|
|
||||||
xcopy /q /y /i /s /e "$(ProjectDir)Common\Media" "$(OutDir)Common\Media" || exit /b 0
|
|
||||||
xcopy /q /y /i /s /e "$(ProjectDir)Common\res" "$(OutDir)Common\res" || exit /b 0
|
|
||||||
xcopy /q /y /i /s /e "$(ProjectDir)Common\Trial" "$(OutDir)Common\Trial" || exit /b 0
|
|
||||||
xcopy /q /y /i /s /e "$(ProjectDir)Common\Tutorial" "$(OutDir)Common\Tutorial" || exit /b 0
|
|
||||||
xcopy /q /y /i /s /e "$(ProjectDir)DurangoMedia" "$(OutDir)Windows64Media" || exit /b 0
|
|
||||||
xcopy /q /y /i /s /e "$(ProjectDir)Windows64Media" "$(OutDir)Windows64Media" || exit /b 0
|
|
||||||
|
|
||||||
exit /b 0</Command>
|
|
||||||
</PostBuildEvent>
|
</PostBuildEvent>
|
||||||
<ImageXex>
|
<ImageXex>
|
||||||
<ConfigurationFile>$(ProjectDir)xbox\xex-dev.xml</ConfigurationFile>
|
<ConfigurationFile>$(ProjectDir)xbox\xex-dev.xml</ConfigurationFile>
|
||||||
|
|
|
||||||
|
|
@ -3,4 +3,12 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<LastConfigDeployed>Debug</LastConfigDeployed>
|
<LastConfigDeployed>Debug</LastConfigDeployed>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
||||||
|
<LocalDebuggerWorkingDirectory>$(SolutionDir)$(Platform)\$(Configuration)\</LocalDebuggerWorkingDirectory>
|
||||||
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
||||||
|
<LocalDebuggerWorkingDirectory>$(SolutionDir)$(Platform)\$(Configuration)\</LocalDebuggerWorkingDirectory>
|
||||||
|
<DebuggerFlavor>WindowsLocalDebugger</DebuggerFlavor>
|
||||||
|
</PropertyGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
@ -30,7 +30,8 @@ public:
|
||||||
int compareTo(const TextureHolder *other) const;
|
int compareTo(const TextureHolder *other) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
struct TextureHolderLessThan
|
||||||
{
|
{
|
||||||
bool operator() (const TextureHolder *first, const TextureHolder *second) const { return first->compareTo(second) >= 0; }
|
inline bool operator()(const TextureHolder *first, const TextureHolder *second) const
|
||||||
} TextureHolderLessThan;
|
{ return first->compareTo(second) >= 0; }
|
||||||
|
};
|
||||||
BIN
Minecraft.Client/Windows64/Sound/Minecraft.msscmp
Normal file
BIN
Minecraft.Client/Windows64/Sound/Minecraft.msscmp
Normal file
Binary file not shown.
|
|
@ -443,7 +443,7 @@ ATOM MyRegisterClass(HINSTANCE hInstance)
|
||||||
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
|
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
|
||||||
wcex.lpszMenuName = "Minecraft";
|
wcex.lpszMenuName = "Minecraft";
|
||||||
wcex.lpszClassName = "MinecraftClass";
|
wcex.lpszClassName = "MinecraftClass";
|
||||||
wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL));
|
wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_MINECRAFTWINDOWS));
|
||||||
|
|
||||||
return RegisterClassEx(&wcex);
|
return RegisterClassEx(&wcex);
|
||||||
}
|
}
|
||||||
|
|
@ -716,6 +716,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||||
|
|
||||||
|
/*
|
||||||
// Declare DPI awareness so GetSystemMetrics returns physical pixels
|
// Declare DPI awareness so GetSystemMetrics returns physical pixels
|
||||||
SetProcessDPIAware();
|
SetProcessDPIAware();
|
||||||
g_iScreenWidth = GetSystemMetrics(SM_CXSCREEN);
|
g_iScreenWidth = GetSystemMetrics(SM_CXSCREEN);
|
||||||
|
|
@ -726,6 +727,8 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||||
sprintf(buf, "Screen resolution: %dx%d\n", g_iScreenWidth, g_iScreenHeight);
|
sprintf(buf, "Screen resolution: %dx%d\n", g_iScreenWidth, g_iScreenHeight);
|
||||||
OutputDebugStringA(buf);
|
OutputDebugStringA(buf);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
if(lpCmdLine)
|
if(lpCmdLine)
|
||||||
{
|
{
|
||||||
|
|
@ -1220,7 +1223,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||||
ToggleFullscreen();
|
ToggleFullscreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
// TAB opens host options menu. - Vvis :3
|
// TAB opens host options menu. - Vvis :3
|
||||||
if (KMInput.IsKeyPressed(VK_TAB))
|
if (KMInput.IsKeyPressed(VK_TAB))
|
||||||
{
|
{
|
||||||
if (Minecraft* pMinecraft = Minecraft::GetInstance())
|
if (Minecraft* pMinecraft = Minecraft::GetInstance())
|
||||||
|
|
@ -1231,6 +1234,33 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef _DEBUG_MENUS_ENABLED
|
||||||
|
// F3 toggles onscreen debug info
|
||||||
|
if (KMInput.IsKeyPressed(VK_F3))
|
||||||
|
{
|
||||||
|
if (Minecraft* pMinecraft = Minecraft::GetInstance())
|
||||||
|
{
|
||||||
|
if (pMinecraft->options && app.DebugSettingsOn())
|
||||||
|
{
|
||||||
|
pMinecraft->options->renderDebug = !pMinecraft->options->renderDebug;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// F4 opens debug overlay
|
||||||
|
if (KMInput.IsKeyPressed(VK_F4))
|
||||||
|
{
|
||||||
|
if (Minecraft* pMinecraft = Minecraft::GetInstance())
|
||||||
|
{
|
||||||
|
if (pMinecraft->options && app.DebugSettingsOn() &&
|
||||||
|
app.GetGameStarted() && !ui.GetMenuDisplayed(0) && pMinecraft->screen == NULL)
|
||||||
|
{
|
||||||
|
ui.NavigateToScene(0, eUIScene_DebugOverlay, NULL, eUILayer_Debug);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
// has the game defined profile data been changed (by a profile load)
|
// has the game defined profile data been changed (by a profile load)
|
||||||
if(app.uiGameDefinedDataChangedBitmask!=0)
|
if(app.uiGameDefinedDataChangedBitmask!=0)
|
||||||
|
|
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 324 KiB |
42
Minecraft.Client/postbuild.ps1
Normal file
42
Minecraft.Client/postbuild.ps1
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
param(
|
||||||
|
[string]$OutDir,
|
||||||
|
[string]$ProjectDir
|
||||||
|
)
|
||||||
|
|
||||||
|
Write-Host "Post-build script started. Output Directory: $OutDir, Project Directory: $ProjectDir"
|
||||||
|
|
||||||
|
$directories = @(
|
||||||
|
"music",
|
||||||
|
"Windows64\GameHDD",
|
||||||
|
"Common\Media",
|
||||||
|
"Common\res",
|
||||||
|
"Common\Trial",
|
||||||
|
"Common\Tutorial",
|
||||||
|
"Windows64Media"
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach ($dir in $directories) {
|
||||||
|
New-Item -ItemType Directory -Path (Join-Path $OutDir $dir) -Force | Out-Null
|
||||||
|
}
|
||||||
|
|
||||||
|
$copies = @(
|
||||||
|
@{ Source = "music"; Dest = "music" },
|
||||||
|
@{ Source = "Common\Media"; Dest = "Common\Media" },
|
||||||
|
@{ Source = "Common\res"; Dest = "Common\res" },
|
||||||
|
@{ Source = "Common\Trial"; Dest = "Common\Trial" },
|
||||||
|
@{ Source = "Common\Tutorial"; Dest = "Common\Tutorial" },
|
||||||
|
@{ Source = "Windows64\GameHDD"; Dest = "Windows64\GameHDD" },
|
||||||
|
@{ Source = "Windows64\Sound"; Dest = "Windows64\Sound" },
|
||||||
|
@{ Source = "DurangoMedia"; Dest = "Windows64Media" },
|
||||||
|
@{ Source = "Windows64Media"; Dest = "Windows64Media" }
|
||||||
|
)
|
||||||
|
|
||||||
|
foreach ($copy in $copies) {
|
||||||
|
$src = Join-Path $ProjectDir $copy.Source
|
||||||
|
$dst = Join-Path $OutDir $copy.Dest
|
||||||
|
|
||||||
|
if (Test-Path $src) {
|
||||||
|
# Copy the files using xcopy, forcing overwrite and suppressing errors, and only copying if the source is newer than the destination
|
||||||
|
xcopy /q /y /i /s /e /d "$src" "$dst" 2>$null
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -28,13 +28,14 @@ public:
|
||||||
ChunkPos & operator= (const ChunkPos & other) { x = other.x; z = other.z; return *this; }
|
ChunkPos & operator= (const ChunkPos & other) { x = other.x; z = other.z; return *this; }
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
struct ChunkPosKeyHash
|
||||||
{
|
{
|
||||||
__int64 operator() (const ChunkPos &k) const { return ChunkPos::hash_fnct(k); }
|
inline __int64 operator()(const ChunkPos &k) const
|
||||||
|
{ return ChunkPos::hash_fnct(k); }
|
||||||
|
};
|
||||||
|
|
||||||
} ChunkPosKeyHash;
|
struct ChunkPosKeyEq
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
{
|
||||||
bool operator() (const ChunkPos &x, const ChunkPos &y) const { return ChunkPos::eq_test(x, y); }
|
inline bool operator()(const ChunkPos &x, const ChunkPos &y) const
|
||||||
} ChunkPosKeyEq;
|
{ return ChunkPos::eq_test(x, y); }
|
||||||
|
};
|
||||||
|
|
@ -12,13 +12,13 @@
|
||||||
|
|
||||||
const wchar_t File::pathSeparator = L'\\';
|
const wchar_t File::pathSeparator = L'\\';
|
||||||
#ifdef _XBOX
|
#ifdef _XBOX
|
||||||
const wstring File::pathRoot = L"GAME:"; // Path root after pathSeparator has been removed
|
const std::wstring File::pathRoot = L"GAME:"; // Path root after pathSeparator has been removed
|
||||||
#else
|
#else
|
||||||
const wstring File::pathRoot = L""; // Path root after pathSeparator has been removed
|
const std::wstring File::pathRoot = L""; // Path root after pathSeparator has been removed
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
//Creates a new File instance from a parent abstract pathname and a child pathname string.
|
//Creates a new File instance from a parent abstract pathname and a child pathname string.
|
||||||
File::File( const File &parent, const wstring& child )
|
File::File( const File &parent, const std::wstring& child )
|
||||||
{
|
{
|
||||||
m_abstractPathName = parent.getPath() + pathSeparator + child;
|
m_abstractPathName = parent.getPath() + pathSeparator + child;
|
||||||
}
|
}
|
||||||
|
|
@ -67,7 +67,7 @@ File::File( const wstring& pathname ) //: parent( NULL )
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
File::File( const wstring& parent, const wstring& child ) //: m_abstractPathName( child )
|
File::File( const std::wstring& parent, const std::wstring& child ) //: m_abstractPathName( child )
|
||||||
{
|
{
|
||||||
m_abstractPathName = pathRoot + pathSeparator + parent + pathSeparator + child;
|
m_abstractPathName = pathRoot + pathSeparator + parent + pathSeparator + child;
|
||||||
//this->parent = new File( parent );
|
//this->parent = new File( parent );
|
||||||
|
|
@ -149,9 +149,9 @@ bool File::mkdir() const
|
||||||
//
|
//
|
||||||
bool File::mkdirs() const
|
bool File::mkdirs() const
|
||||||
{
|
{
|
||||||
vector<wstring> path = stringSplit( m_abstractPathName, pathSeparator );
|
std::vector<std::wstring> path = stringSplit( m_abstractPathName, pathSeparator );
|
||||||
|
|
||||||
wstring pathToHere = L"";
|
std::wstring pathToHere = L"";
|
||||||
AUTO_VAR(itEnd, path.end());
|
AUTO_VAR(itEnd, path.end());
|
||||||
for( AUTO_VAR(it, path.begin()); it != itEnd; it++ )
|
for( AUTO_VAR(it, path.begin()); it != itEnd; it++ )
|
||||||
{
|
{
|
||||||
|
|
@ -237,7 +237,7 @@ bool File::renameTo(File dest)
|
||||||
// 4J Stu - The wstringtofilename function returns a pointer to the same location in memory every time it is
|
// 4J Stu - The wstringtofilename function returns a pointer to the same location in memory every time it is
|
||||||
// called, therefore we were getting sourcePath and destPath having the same value. The solution here is to
|
// called, therefore we were getting sourcePath and destPath having the same value. The solution here is to
|
||||||
// make a copy of the sourcePath by storing it in a std::string
|
// make a copy of the sourcePath by storing it in a std::string
|
||||||
string sourcePath = wstringtofilename(getPath());
|
std::string sourcePath = wstringtofilename(getPath());
|
||||||
const char *destPath = wstringtofilename(dest.getPath());
|
const char *destPath = wstringtofilename(dest.getPath());
|
||||||
#ifdef _DURANGO
|
#ifdef _DURANGO
|
||||||
__debugbreak(); // TODO
|
__debugbreak(); // TODO
|
||||||
|
|
@ -272,9 +272,9 @@ bool File::renameTo(File dest)
|
||||||
//An array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname.
|
//An array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname.
|
||||||
//The array will be empty if the directory is empty. Returns null if this abstract pathname does not denote a directory,
|
//The array will be empty if the directory is empty. Returns null if this abstract pathname does not denote a directory,
|
||||||
//or if an I/O error occurs.
|
//or if an I/O error occurs.
|
||||||
vector<File *> *File::listFiles() const
|
std::vector<File *> *File::listFiles() const
|
||||||
{
|
{
|
||||||
vector<File *> *vOutput = new vector<File *>();
|
std::vector<File *> *vOutput = new vector<File *>();
|
||||||
|
|
||||||
// TODO 4J Stu - Also need to check for I/O errors?
|
// TODO 4J Stu - Also need to check for I/O errors?
|
||||||
if( !isDirectory() )
|
if( !isDirectory() )
|
||||||
|
|
@ -386,8 +386,8 @@ vector<File *> *File::listFiles() const
|
||||||
FindClose( hFind);
|
FindClose( hFind);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
char path[MAX_PATH];
|
char path[MAX_PATH] {};
|
||||||
sprintf( path, "%s\\*", wstringtofilename( getPath() ) );
|
snprintf( path, MAX_PATH, "%s\\*", wstringtofilename( getPath() ) );
|
||||||
HANDLE hFind = FindFirstFile( path, &wfd);
|
HANDLE hFind = FindFirstFile( path, &wfd);
|
||||||
if(hFind != INVALID_HANDLE_VALUE)
|
if(hFind != INVALID_HANDLE_VALUE)
|
||||||
{
|
{
|
||||||
|
|
@ -415,13 +415,13 @@ vector<File *> *File::listFiles() const
|
||||||
//Returns:
|
//Returns:
|
||||||
//An array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname.
|
//An array of abstract pathnames denoting the files and directories in the directory denoted by this abstract pathname.
|
||||||
//The array will be empty if the directory is empty. Returns null if this abstract pathname does not denote a directory, or if an I/O error occurs.
|
//The array will be empty if the directory is empty. Returns null if this abstract pathname does not denote a directory, or if an I/O error occurs.
|
||||||
vector<File *> *File::listFiles(FileFilter *filter) const
|
std::vector<File *> *File::listFiles(FileFilter *filter) const
|
||||||
{
|
{
|
||||||
// TODO 4J Stu - Also need to check for I/O errors?
|
// TODO 4J Stu - Also need to check for I/O errors?
|
||||||
if( !isDirectory() )
|
if( !isDirectory() )
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
vector<File *> *vOutput = new vector<File *>();
|
std::vector<File *> *vOutput = new std::vector<File *>();
|
||||||
|
|
||||||
#ifdef __PS3__
|
#ifdef __PS3__
|
||||||
const char *lpFileName=wstringtofilename(getPath());
|
const char *lpFileName=wstringtofilename(getPath());
|
||||||
|
|
@ -521,7 +521,7 @@ bool File::isDirectory() const
|
||||||
//Returns the length of the file denoted by this abstract pathname. The return value is unspecified if this pathname denotes a directory.
|
//Returns the length of the file denoted by this abstract pathname. The return value is unspecified if this pathname denotes a directory.
|
||||||
//Returns:
|
//Returns:
|
||||||
//The length, in bytes, of the file denoted by this abstract pathname, or 0L if the file does not exist
|
//The length, in bytes, of the file denoted by this abstract pathname, or 0L if the file does not exist
|
||||||
__int64 File::length()
|
int64_t File::length()
|
||||||
{
|
{
|
||||||
#ifdef __PS3__
|
#ifdef __PS3__
|
||||||
//extern const char* getPS3HomePath();
|
//extern const char* getPS3HomePath();
|
||||||
|
|
@ -624,7 +624,7 @@ __int64 File::length()
|
||||||
//Returns:
|
//Returns:
|
||||||
//A long value representing the time the file was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970),
|
//A long value representing the time the file was last modified, measured in milliseconds since the epoch (00:00:00 GMT, January 1, 1970),
|
||||||
//or 0L if the file does not exist or if an I/O error occurs
|
//or 0L if the file does not exist or if an I/O error occurs
|
||||||
__int64 File::lastModified()
|
int64_t File::lastModified()
|
||||||
{
|
{
|
||||||
WIN32_FILE_ATTRIBUTE_DATA fileInfoBuffer;
|
WIN32_FILE_ATTRIBUTE_DATA fileInfoBuffer;
|
||||||
#ifdef _UNICODE
|
#ifdef _UNICODE
|
||||||
|
|
@ -657,7 +657,7 @@ __int64 File::lastModified()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const wstring File::getPath() const
|
const std::wstring File::getPath() const
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
wstring path;
|
wstring path;
|
||||||
|
|
@ -672,7 +672,7 @@ const wstring File::getPath() const
|
||||||
return m_abstractPathName;
|
return m_abstractPathName;
|
||||||
}
|
}
|
||||||
|
|
||||||
wstring File::getName() const
|
std::wstring File::getName() const
|
||||||
{
|
{
|
||||||
unsigned int sep = (unsigned int )(m_abstractPathName.find_last_of( this->pathSeparator ));
|
unsigned int sep = (unsigned int )(m_abstractPathName.find_last_of( this->pathSeparator ));
|
||||||
return m_abstractPathName.substr( sep + 1, m_abstractPathName.length() );
|
return m_abstractPathName.substr( sep + 1, m_abstractPathName.length() );
|
||||||
|
|
@ -700,3 +700,9 @@ int File::hash_fnct(const File &k)
|
||||||
|
|
||||||
return (int) hashCode;
|
return (int) hashCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int FileKeyHash::operator() (const File &k) const
|
||||||
|
{ return File::hash_fnct(k); }
|
||||||
|
|
||||||
|
bool FileKeyEq::operator() (const File &x, const File &y) const
|
||||||
|
{ return File::eq_test(x,y); }
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
using namespace std;
|
|
||||||
|
#include <cstdint>
|
||||||
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
// 4J Stu - Represents java standard library class
|
// 4J Stu - Represents java standard library class
|
||||||
|
|
||||||
class FileFilter;
|
class FileFilter;
|
||||||
|
|
@ -24,11 +28,11 @@ public:
|
||||||
bool exists() const;
|
bool exists() const;
|
||||||
bool isFile() const;
|
bool isFile() const;
|
||||||
bool renameTo(File dest);
|
bool renameTo(File dest);
|
||||||
vector<File *> *listFiles() const; // Array
|
std::vector<File *> *listFiles() const; // Array
|
||||||
vector<File *> *listFiles(FileFilter *filter) const;
|
std::vector<File *> *listFiles(FileFilter *filter) const;
|
||||||
bool isDirectory() const;
|
bool isDirectory() const;
|
||||||
__int64 length();
|
int64_t length();
|
||||||
__int64 lastModified();
|
int64_t lastModified();
|
||||||
const wstring getPath() const; // 4J Jev: TODO
|
const wstring getPath() const; // 4J Jev: TODO
|
||||||
wstring getName() const;
|
wstring getName() const;
|
||||||
|
|
||||||
|
|
@ -43,14 +47,12 @@ private:
|
||||||
//File(vector<wstring> *path);
|
//File(vector<wstring> *path);
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
struct FileKeyHash
|
||||||
{
|
{
|
||||||
int operator() (const File &k) const { return File::hash_fnct(k); }
|
int operator() (const File &k) const;
|
||||||
|
};
|
||||||
|
|
||||||
} FileKeyHash;
|
struct FileKeyEq
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
{
|
||||||
bool operator() (const File &x, const File &y) const {return File::eq_test(x,y); }
|
bool operator() (const File &x, const File &y) const;
|
||||||
|
};
|
||||||
} FileKeyEq;
|
|
||||||
|
|
@ -1,13 +1,15 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
// Java doesn't have a default hash value for ints, however, the hashmap itself does some "supplemental" hashing, so
|
// Java doesn't have a default hash value for ints, however, the hashmap itself does some "supplemental" hashing, so
|
||||||
// our ints actually get hashed by code as implemented below. std templates *do* have a standard hash for ints, but it
|
// our ints actually get hashed by code as implemented below. std templates *do* have a standard hash for ints, but it
|
||||||
// would appear to be a bit expensive so matching the java one for now anyway. This code implements the supplemental
|
// would appear to be a bit expensive so matching the java one for now anyway. This code implements the supplemental
|
||||||
// hashing that happens in java so we can match what their maps are doing with ints.
|
// hashing that happens in java so we can match what their maps are doing with ints.
|
||||||
|
|
||||||
typedef struct
|
struct IntKeyHash
|
||||||
{
|
{
|
||||||
int operator() (const int &k) const
|
inline int operator()(const int &k) const
|
||||||
{
|
{
|
||||||
int h = k;
|
int h = k;
|
||||||
h += ~(h << 9);
|
h += ~(h << 9);
|
||||||
|
|
@ -16,62 +18,64 @@ typedef struct
|
||||||
h ^= (((unsigned int)h) >> 10);
|
h ^= (((unsigned int)h) >> 10);
|
||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
} IntKeyHash;
|
struct IntKeyEq
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
{
|
||||||
bool operator() (const int &x, const int &y) const { return x==y; }
|
inline bool operator()(const int &x, const int &y) const
|
||||||
} IntKeyEq;
|
{ return x==y; }
|
||||||
|
};
|
||||||
|
|
||||||
// This hash functor is taken from the IntHashMap java class used by the game, so that we can use a standard std hashmap with this hash rather
|
// This hash functor is taken from the IntHashMap java class used by the game, so that we can use a standard std hashmap with this hash rather
|
||||||
// than implement the class itself
|
// than implement the class itself
|
||||||
typedef struct
|
struct IntKeyHash2
|
||||||
{
|
{
|
||||||
int operator() (const int &k) const
|
inline int operator()(const int &k) const
|
||||||
{
|
{
|
||||||
unsigned int h = (unsigned int)k;
|
unsigned int h = static_cast<unsigned int>(k);
|
||||||
h ^= (h >> 20) ^ (h >> 12);
|
h ^= (h >> 20) ^ (h >> 12);
|
||||||
return (int)(h ^ (h >> 7) ^ (h >> 4));
|
return static_cast<int>(h ^ (h >> 7) ^ (h >> 4));
|
||||||
}
|
}
|
||||||
} IntKeyHash2;
|
};
|
||||||
|
|
||||||
|
|
||||||
// This hash functor is taken from the LongHashMap java class used by the game, so that we can use a standard std hashmap with this hash rather
|
// This hash functor is taken from the LongHashMap java class used by the game, so that we can use a standard std hashmap with this hash rather
|
||||||
// than implement the class itself
|
// than implement the class itself
|
||||||
typedef struct
|
struct LongKeyHash
|
||||||
{
|
{
|
||||||
int hash(const int &k) const
|
inline int hash(const int &k) const
|
||||||
{
|
{
|
||||||
unsigned int h = (unsigned int)k;
|
unsigned int h = static_cast<unsigned int>(k);
|
||||||
h ^= (h >> 20) ^ (h >> 12);
|
h ^= (h >> 20) ^ (h >> 12);
|
||||||
return (int)(h ^ (h >> 7) ^ (h >> 4));
|
return static_cast<int>(h ^ (h >> 7) ^ (h >> 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
int operator() (const __int64 &k) const
|
inline int operator()(const int64_t &k) const
|
||||||
{
|
{
|
||||||
return hash((int) ( k ^ (((__uint64)k) >> 32 )));
|
return hash(static_cast<int>(k ^ ((static_cast<uint64_t>(k)) >> 32)));
|
||||||
}
|
}
|
||||||
} LongKeyHash;
|
};
|
||||||
|
|
||||||
typedef struct
|
struct LongKeyEq
|
||||||
{
|
{
|
||||||
bool operator() (const __int64 &x, const __int64 &y) const { return x==y; }
|
inline bool operator() (const int64_t &x, const int64_t &y) const
|
||||||
} LongKeyEq;
|
{ return x == y; }
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct
|
enum eINSTANCEOF;
|
||||||
|
struct eINSTANCEOFKeyHash
|
||||||
{
|
{
|
||||||
int operator() (const eINSTANCEOF &k) const
|
int operator()(const eINSTANCEOF &k) const
|
||||||
{
|
{
|
||||||
unsigned int h = (unsigned int)k;
|
unsigned int h = static_cast<unsigned int>(k);
|
||||||
h ^= (h >> 20) ^ (h >> 12);
|
h ^= (h >> 20) ^ (h >> 12);
|
||||||
return (int)(h ^ (h >> 7) ^ (h >> 4));
|
return static_cast<int>(h ^ (h >> 7) ^ (h >> 4));
|
||||||
}
|
}
|
||||||
} eINSTANCEOFKeyHash;
|
};
|
||||||
|
|
||||||
typedef struct
|
struct eINSTANCEOFKeyEq
|
||||||
{
|
{
|
||||||
bool operator() (const eINSTANCEOF &x, const eINSTANCEOF &y) const { return x==y; }
|
inline bool operator()(const eINSTANCEOF &x, const eINSTANCEOF &y) const
|
||||||
} eINSTANCEOFKeyEq;
|
{ return x == y; }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -539,13 +539,15 @@ private:
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
struct PlayerKeyHash
|
||||||
{
|
{
|
||||||
int operator() (const shared_ptr<Player> k) const { return Player::hash_fnct (k); }
|
inline int operator() (const shared_ptr<Player> k) const
|
||||||
|
{ return Player::hash_fnct (k); }
|
||||||
|
};
|
||||||
|
|
||||||
} PlayerKeyHash;
|
struct PlayerKeyEq
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
{
|
||||||
bool operator() (const shared_ptr<Player> x, const shared_ptr<Player> y) const { return Player::eq_test (x, y); }
|
inline bool operator() (const shared_ptr<Player> x, const shared_ptr<Player> y) const
|
||||||
} PlayerKeyEq;
|
{ return Player::eq_test (x, y); }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "TickNextTickData.h"
|
#include "TickNextTickData.h"
|
||||||
|
|
||||||
__int64 TickNextTickData::C = 0;
|
int64_t TickNextTickData::C = 0;
|
||||||
|
|
||||||
TickNextTickData::TickNextTickData(int x, int y, int z, int tileId)
|
TickNextTickData::TickNextTickData(int x, int y, int z, int tileId)
|
||||||
{
|
{
|
||||||
|
|
@ -33,7 +33,7 @@ int TickNextTickData::hashCode() const
|
||||||
return (((x * 1024 * 1024) + (z * 1024) + y) * 256) + tileId;
|
return (((x * 1024 * 1024) + (z * 1024) + y) * 256) + tileId;
|
||||||
}
|
}
|
||||||
|
|
||||||
TickNextTickData *TickNextTickData::delay(__int64 l)
|
TickNextTickData *TickNextTickData::delay(int64_t l)
|
||||||
{
|
{
|
||||||
this->m_delay = l;
|
this->m_delay = l;
|
||||||
return this;
|
return this;
|
||||||
|
|
|
||||||
|
|
@ -1,26 +1,28 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
// 4J Stu - In Java TickNextTickData implements Comparable<TickNextTickData>
|
// 4J Stu - In Java TickNextTickData implements Comparable<TickNextTickData>
|
||||||
// We don't need to do that as it is only as helper for the java sdk sorting operations
|
// We don't need to do that as it is only as helper for the java sdk sorting operations
|
||||||
|
|
||||||
class TickNextTickData
|
class TickNextTickData
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
static __int64 C;
|
static int64_t C;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
int x, y, z, tileId;
|
int x, y, z, tileId;
|
||||||
__int64 m_delay;
|
int64_t m_delay;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
__int64 c;
|
int64_t c;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TickNextTickData(int x, int y, int z, int tileId);
|
TickNextTickData(int x, int y, int z, int tileId);
|
||||||
|
|
||||||
bool equals(const void *o) const;
|
bool equals(const void *o) const;
|
||||||
int hashCode() const;
|
int hashCode() const;
|
||||||
TickNextTickData *delay(__int64 l);
|
TickNextTickData *delay(int64_t l);
|
||||||
int compareTo(const TickNextTickData *tnd) const;
|
int compareTo(const TickNextTickData *tnd) const;
|
||||||
|
|
||||||
static bool compare_fnct(const TickNextTickData &x, const TickNextTickData &y);
|
static bool compare_fnct(const TickNextTickData &x, const TickNextTickData &y);
|
||||||
|
|
@ -28,19 +30,21 @@ public:
|
||||||
static bool eq_test(const TickNextTickData &x, const TickNextTickData &y);
|
static bool eq_test(const TickNextTickData &x, const TickNextTickData &y);
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
struct TickNextTickDataKeyHash
|
||||||
{
|
{
|
||||||
int operator() (const TickNextTickData &k) const { return TickNextTickData::hash_fnct (k); }
|
int operator() (const TickNextTickData &k) const
|
||||||
|
{ return TickNextTickData::hash_fnct (k); }
|
||||||
|
};
|
||||||
|
|
||||||
} TickNextTickDataKeyHash;
|
struct TickNextTickDataKeyEq
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
{
|
||||||
bool operator() (const TickNextTickData &x, const TickNextTickData &y) const { return TickNextTickData::eq_test (x, y); }
|
bool operator() (const TickNextTickData &x, const TickNextTickData &y) const
|
||||||
} TickNextTickDataKeyEq;
|
{ return TickNextTickData::eq_test (x, y); }
|
||||||
|
};
|
||||||
|
|
||||||
typedef struct
|
struct TickNextTickDataKeyCompare
|
||||||
{
|
{
|
||||||
bool operator() (const TickNextTickData &x, const TickNextTickData &y) const { return TickNextTickData::compare_fnct (x, y); }
|
bool operator() (const TickNextTickData &x, const TickNextTickData &y) const
|
||||||
|
{ return TickNextTickData::compare_fnct (x, y); }
|
||||||
|
|
||||||
} TickNextTickDataKeyCompare;
|
};
|
||||||
|
|
@ -14,14 +14,15 @@ public:
|
||||||
static bool eq_test(const TilePos &x, const TilePos &y);
|
static bool eq_test(const TilePos &x, const TilePos &y);
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
struct TilePosKeyHash
|
||||||
{
|
{
|
||||||
int operator() (const TilePos &k) const { return TilePos::hash_fnct (k); }
|
inline int operator()(const TilePos &k) const
|
||||||
|
{ return TilePos::hash_fnct (k); }
|
||||||
|
};
|
||||||
|
|
||||||
} TilePosKeyHash;
|
struct TilePosKeyEq
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
{
|
||||||
bool operator() (const TilePos &x, const TilePos &y) const { return TilePos::eq_test (x, y); }
|
inline bool operator()(const TilePos &x, const TilePos &y) const
|
||||||
} TilePosKeyEq;
|
{ return TilePos::eq_test (x, y); }
|
||||||
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
# MinecraftConsoles
|
# MinecraftConsoles
|
||||||
|
|
||||||
|
# [DOWNLOAD THE GAME](https://github.com/smartcmd/MinecraftConsoles/releases/tag/nightly)
|
||||||
|
|
||||||
[](https://discord.gg/5CSzhc9t)
|
[](https://discord.gg/5CSzhc9t)
|
||||||
|
|
||||||

|

|
||||||
|
|
@ -14,8 +16,6 @@ This project contains the source code of Minecraft Legacy Console Edition v1.3.0
|
||||||
- Added support for keyboard and mouse input
|
- Added support for keyboard and mouse input
|
||||||
- Added fullscreen mode support (toggle using F11)
|
- Added fullscreen mode support (toggle using F11)
|
||||||
- Disabled V-Sync for better performance
|
- Disabled V-Sync for better performance
|
||||||
- Auto-detect native monitor resolution with DPI awareness, resulting in sharper visuals on high-resolution displays
|
|
||||||
- Full support for keyboard and mouse input
|
|
||||||
|
|
||||||
## Controls (Keyboard & Mouse)
|
## Controls (Keyboard & Mouse)
|
||||||
|
|
||||||
|
|
@ -35,6 +35,8 @@ This project contains the source code of Minecraft Legacy Console Edition v1.3.0
|
||||||
- **Select Item**: `Mouse Wheel` or keys `1` to `9`
|
- **Select Item**: `Mouse Wheel` or keys `1` to `9`
|
||||||
- **Accept or Decline Tutorial hints**: `Enter` to accept and `B` to decline
|
- **Accept or Decline Tutorial hints**: `Enter` to accept and `B` to decline
|
||||||
- **Host Options**: `TAB`
|
- **Host Options**: `TAB`
|
||||||
|
- **Toggle Debug Info**: `F3`
|
||||||
|
- **Open Debug Overlay**: `F4`
|
||||||
|
|
||||||
## Build & Run
|
## Build & Run
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue