mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Merge branch 'main' of https://github.com/Racc-Boi/MinecraftConsoles
This commit is contained in:
commit
2cd3865cf4
116
.vscode/settings.json
vendored
Normal file
116
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
{
|
||||
"search.exclude": {
|
||||
"**/Minecraft.Client/Common/DummyTexturePack/res": true,
|
||||
"**/Minecraft.Client/Common/Media": true,
|
||||
"**/Minecraft.Client/Common/res": true,
|
||||
"**/Minecraft.Client/Common/Trial": true,
|
||||
"**/Minecraft.Client/Durango/4JLibs/libs": true,
|
||||
"**/Minecraft.Client/Durango/CU": true,
|
||||
"**/Minecraft.Client/Durango/DLCImages": true,
|
||||
"**/Minecraft.Client/Durango/DurangoExtras/xcompress.dll": true,
|
||||
"**/Minecraft.Client/Durango/DurangoExtras/xcompress.lib": true,
|
||||
"**/Minecraft.Client/Durango/Iggy/lib": true,
|
||||
"**/Minecraft.Client/Durango/Layout": true,
|
||||
"**/Minecraft.Client/Durango/Miles/lib": true,
|
||||
"**/Minecraft.Client/Durango/Network/Windows.Xbox.Networking.RealtimeSession.dll": true,
|
||||
"**/Minecraft.Client/Durango/Network/windows.xbox.networking.realtimesession.pdb": true,
|
||||
"**/Minecraft.Client/Durango/Network/windows.xbox.networking.realtimesession.winmd": true,
|
||||
"**/Minecraft.Client/Durango/ServiceConfig": true,
|
||||
"**/Minecraft.Client/Durango/Sound": true,
|
||||
"**/Minecraft.Client/Durango/DLCXbox1.cmp": true,
|
||||
"**/Minecraft.Client/Durango/*.png": true,
|
||||
"**/Minecraft.Client/DurangoMedia/DLC": true,
|
||||
"**/Minecraft.Client/DurangoMedia/Layout": true,
|
||||
"**/Minecraft.Client/DurangoMedia/loc": true,
|
||||
"**/Minecraft.Client/DurangoMedia/loc/strings.h": false,
|
||||
"**/Minecraft.Client/DurangoMedia/Media": true,
|
||||
"**/Minecraft.Client/DurangoMedia/Sound": true,
|
||||
"**/Minecraft.Client/music": true,
|
||||
"**/Minecraft.Client/Orbis/4JLibs/Libs": true,
|
||||
"**/Minecraft.Client/Orbis/DLCImages": true,
|
||||
"**/Minecraft.Client/Orbis/GameConfig": true,
|
||||
"**/Minecraft.Client/Orbis/GameConfig/Minecraft.spa.h": false,
|
||||
"**/Minecraft.Client/Orbis/Iggy/lib": true,
|
||||
"**/Minecraft.Client/Orbis/Miles/lib": true,
|
||||
"**/Minecraft.Client/Orbis/min/min.sig": true,
|
||||
"**/Minecraft.Client/Orbis/min/pronunciation.sig": true,
|
||||
"**/Minecraft.Client/Orbis/MinecraftPronunciation/MinecraftPronunciation.sig": true,
|
||||
"**/Minecraft.Client/Orbis/MinecraftPronunciation/pronunciation.sig": true,
|
||||
"**/Minecraft.Client/Orbis/PS4ProductCodes.bin": true,
|
||||
"**/Minecraft.Client/Orbis/session_image.jpg": true,
|
||||
"**/Minecraft.Client/Orbis/session_image.png": true,
|
||||
"**/Minecraft.Client/OrbisMedia/DLC": true,
|
||||
"**/Minecraft.Client/OrbisMedia/loc": true,
|
||||
"**/Minecraft.Client/OrbisMedia/loc/strings.h": false,
|
||||
"**/Minecraft.Client/OrbisMedia/Media": true,
|
||||
"**/Minecraft.Client/PS3/4JLibs/libs": true,
|
||||
"**/Minecraft.Client/PS3/DATA": true,
|
||||
"**/Minecraft.Client/PS3/Edge": true,
|
||||
"**/Minecraft.Client/PS3/GameConfig/MinecraftIcon.png": true,
|
||||
"**/Minecraft.Client/PS3/GameConfig/set.png": true,
|
||||
"**/Minecraft.Client/PS3/Iggy/lib": true,
|
||||
"**/Minecraft.Client/PS3/Media": true,
|
||||
"**/Minecraft.Client/PS3/Media/*.h": true,
|
||||
"**/Minecraft.Client/PS3/Miles/lib": true,
|
||||
"**/Minecraft.Client/PS3/Sound": true,
|
||||
"**/Minecraft.Client/PS3/SPU_Tasks/*.o": true,
|
||||
"**/Minecraft.Client/PS3/SPU_Tasks/mssspurs.elf": true,
|
||||
"**/Minecraft.Client/PS3/PS3ProductCodes.bin": true,
|
||||
"**/Minecraft.Client/PS3_GAME": true,
|
||||
"**/Minecraft.Client/PS3Media/DLC": true,
|
||||
"**/Minecraft.Client/PS3Media/loc": true,
|
||||
"**/Minecraft.Client/PS3Media/Media": true,
|
||||
"**/Minecraft.Client/PS4_GAME": true,
|
||||
"**/Minecraft.Client/PSVita/4JLibs/libs": true,
|
||||
"**/Minecraft.Client/PSVita/app": true,
|
||||
"**/Minecraft.Client/PSVita/Builds": true,
|
||||
"**/Minecraft.Client/PSVita/GameConfig": true,
|
||||
"**/Minecraft.Client/PSVita/GameConfig/Minecraft.spa.h": false,
|
||||
"**/Minecraft.Client/PSVita/Iggy/lib": true,
|
||||
"**/Minecraft.Client/PSVita/Miles/lib": true,
|
||||
"**/Minecraft.Client/PSVita/Sound": true,
|
||||
"**/Minecraft.Client/PSVita/Tutorial": true,
|
||||
"**/Minecraft.Client/PSVita/configuration.psp2path": true,
|
||||
"**/Minecraft.Client/PSVita/PSVitaProductCodes.bin": true,
|
||||
"**/Minecraft.Client/PSVita/session_image.png": true,
|
||||
"**/Minecraft.Client/PSVitaMedia/DLC": true,
|
||||
"**/Minecraft.Client/PSVitaMedia/loc": true,
|
||||
"**/Minecraft.Client/PSVitaMedia/Media": true,
|
||||
"**/Minecraft.Client/PSVitaMedia/Tutorial": true,
|
||||
"**/Minecraft.Client/PSVitaMedia/Minecraft.Client.self": true,
|
||||
"**/Minecraft.Client/redist64": true
|
||||
"**/Minecraft.Client/sce_sys": true
|
||||
"**/Minecraft.Client/TROPDIR": true
|
||||
"**/Minecraft.Client/Windows64/4JLibs/libs": true,
|
||||
"**/Minecraft.Client/Windows64/GameConfig/Minecraft.spa": true,
|
||||
"**/Minecraft.Client/Windows64/GameHDD": true,
|
||||
"**/Minecraft.Client/Windows64/Iggy/lib": true,
|
||||
"**/Minecraft.Client/Windows64Media": true,
|
||||
"**/Minecraft.Client/Windows64Media/4J_strings.h": false,
|
||||
"**/Minecraft.Client/Windows64Media/strings.h": false,
|
||||
"**/Minecraft.Client/x64": true,
|
||||
"**/Minecraft.Client/Xbox/4JLibs/libs": true,
|
||||
"**/Minecraft.Client/Xbox/4JLibs/Media": true,
|
||||
"**/Minecraft.Client/Xbox/Cheats": true,
|
||||
"**/Minecraft.Client/Xbox/ContentPackageBuild": true,
|
||||
"**/Minecraft.Client/Xbox/Docs": true,
|
||||
"**/Minecraft.Client/Xbox/GameConfig": true,
|
||||
"**/Minecraft.Client/Xbox/GameConfig/Minecraft.spa.h": false,
|
||||
"**/Minecraft.Client/Xbox/kinect": true,
|
||||
"**/Minecraft.Client/Xbox/loc": true,
|
||||
"**/Minecraft.Client/Xbox/ReleaseBuild": true,
|
||||
"**/Minecraft.Client/Xbox/SubmissionBuild": true,
|
||||
"**/Minecraft.Client/Xbox/Title Update": true,
|
||||
"**/Minecraft.Client/Xbox/TMSFiles": true,
|
||||
"**/Minecraft.Client/Xbox/MinecraftWindows.ico": true,
|
||||
"**/Minecraft.Client/Xbox/small.ico": true,
|
||||
"**/Minecraft.Client/alphaTest.png": true,
|
||||
"**/Minecraft.Client/thumbnailTest64.png": true,
|
||||
"**/Minecraft.Client/thumbnailTest128.png": true,
|
||||
"**/Minecraft.Client/thumbnailTest256.png": true,
|
||||
"**/Minecraft.Client/thumbnailTest1028.png": true,
|
||||
"**/Minecraft.World/x64_Debug": true,
|
||||
"**/Minecraft.World/x64_Release": true
|
||||
"**/x64": true
|
||||
}
|
||||
}
|
||||
|
|
@ -1,74 +0,0 @@
|
|||
#include "stdafx.h"
|
||||
#include "Filesystem.h"
|
||||
|
||||
#ifdef _WINDOWS64
|
||||
#include <windows.h>
|
||||
#endif // TODO: More os' filesystem handling for when the project moves away from only Windows
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
bool FileOrDirectoryExists(const char* path)
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
DWORD attribs = GetFileAttributesA(path);
|
||||
return (attribs != INVALID_FILE_ATTRIBUTES);
|
||||
#else
|
||||
#error "FileOrDirectoryExists not implemented for this platform"
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool FileExists(const char* path)
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
DWORD attribs = GetFileAttributesA(path);
|
||||
return (attribs != INVALID_FILE_ATTRIBUTES && !(attribs & FILE_ATTRIBUTE_DIRECTORY));
|
||||
#else
|
||||
#error "FileExists not implemented for this platform"
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool DirectoryExists(const char* path)
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
DWORD attribs = GetFileAttributesA(path);
|
||||
return (attribs != INVALID_FILE_ATTRIBUTES && (attribs & FILE_ATTRIBUTE_DIRECTORY));
|
||||
#else
|
||||
#error "DirectoryExists not implemented for this platform"
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool GetFirstFileInDirectory(const char* directory, char* outFilePath, size_t outFilePathSize)
|
||||
{
|
||||
#ifdef _WINDOWS64
|
||||
char searchPath[MAX_PATH];
|
||||
snprintf(searchPath, MAX_PATH, "%s\\*", directory);
|
||||
|
||||
WIN32_FIND_DATAA findData;
|
||||
HANDLE hFind = FindFirstFileA(searchPath, &findData);
|
||||
|
||||
if (hFind == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
do
|
||||
{
|
||||
if (!(findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
|
||||
{
|
||||
// Found a file, copy its path to the output buffer
|
||||
snprintf(outFilePath, outFilePathSize, "%s\\%s", directory, findData.cFileName);
|
||||
FindClose(hFind);
|
||||
return true;
|
||||
}
|
||||
} while (FindNextFileA(hFind, &findData) != 0);
|
||||
|
||||
FindClose(hFind);
|
||||
return false; // No files found in the directory
|
||||
#else
|
||||
#error "GetFirstFileInDirectory not implemented for this platform"
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
bool FileOrDirectoryExists(const char* path);
|
||||
bool FileExists(const char* path);
|
||||
bool DirectoryExists(const char* path);
|
||||
bool GetFirstFileInDirectory(const char* directory, char* outFilePath, size_t outFilePathSize);
|
||||
|
|
@ -5777,7 +5777,7 @@ DXDEC EXPAPI S32 AILCALL AIL_sound_asset_info(HMSOUNDBANK bank, char const* name
|
|||
$:name The name of the sound asset to find.
|
||||
$:out_name Optional - Pointer to a buffer that is filled with the sound filename to use for loading.
|
||||
$:out_info Pointer to a $MILESBANKSOUNDINFO structure that is filled with meta data about the sound asset.
|
||||
$:return Returns the uint8_t size of the buffer required for out_name.
|
||||
$:return Returns the byte size of the buffer required for out_name.
|
||||
|
||||
This function must be called in order to resolve the sound asset name to
|
||||
something that can be used by miles. To ensure safe buffer containment, call
|
||||
|
|
|
|||
|
|
@ -1660,7 +1660,7 @@ void DQRNetworkManager::SendRoomSyncInfo()
|
|||
uint32_t sizeLow = internalBytes & 0xff;
|
||||
|
||||
data[0] = 0x80 | sizeHigh; // Header - flag as internal data (0x80), sending
|
||||
data[1] = sizeLow; // Data following has the a single uint8_t to say what it is, followed by the room sync data itself
|
||||
data[1] = sizeLow; // Data following has the a single byte to say what it is, followed by the room sync data itself
|
||||
data[2] = DQR_INTERNAL_PLAYER_TABLE;
|
||||
|
||||
memcpy(data + 3, &xuidBytes, 4);
|
||||
|
|
@ -1702,7 +1702,7 @@ void DQRNetworkManager::SendAddPlayerFailed(Platform::String^ xuid)
|
|||
uint32_t sizeLow = internalBytes & 0xff;
|
||||
|
||||
data[0] = 0x80 | sizeHigh; // Header - flag as internal data (0x80), sending
|
||||
data[1] = sizeLow; // Data following has the a single uint8_t to say what it is, followed by the room sync data itself
|
||||
data[1] = sizeLow; // Data following has the a single byte to say what it is, followed by the room sync data itself
|
||||
data[2] = DQR_INTERNAL_ADD_PLAYER_FAILED;
|
||||
|
||||
memcpy(data + 3, &xuidBytes, 4);
|
||||
|
|
|
|||
|
|
@ -5777,7 +5777,7 @@ DXDEC EXPAPI S32 AILCALL AIL_sound_asset_info(HMSOUNDBANK bank, char const* name
|
|||
$:name The name of the sound asset to find.
|
||||
$:out_name Optional - Pointer to a buffer that is filled with the sound filename to use for loading.
|
||||
$:out_info Pointer to a $MILESBANKSOUNDINFO structure that is filled with meta data about the sound asset.
|
||||
$:return Returns the uint8_t size of the buffer required for out_name.
|
||||
$:return Returns the byte size of the buffer required for out_name.
|
||||
|
||||
This function must be called in order to resolve the sound asset name to
|
||||
something that can be used by miles. To ensure safe buffer containment, call
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ typedef unsigned int UINT;
|
|||
typedef unsigned int *PUINT;
|
||||
|
||||
|
||||
typedef unsigned char byte;
|
||||
typedef unsigned int DWORD;
|
||||
typedef int INT;
|
||||
typedef unsigned long ULONG_PTR, *PULONG_PTR;
|
||||
|
|
|
|||
|
|
@ -5777,7 +5777,7 @@ DXDEC EXPAPI S32 AILCALL AIL_sound_asset_info(HMSOUNDBANK bank, char const* name
|
|||
$:name The name of the sound asset to find.
|
||||
$:out_name Optional - Pointer to a buffer that is filled with the sound filename to use for loading.
|
||||
$:out_info Pointer to a $MILESBANKSOUNDINFO structure that is filled with meta data about the sound asset.
|
||||
$:return Returns the uint8_t size of the buffer required for out_name.
|
||||
$:return Returns the byte size of the buffer required for out_name.
|
||||
|
||||
This function must be called in order to resolve the sound asset name to
|
||||
something that can be used by miles. To ensure safe buffer containment, call
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ typedef unsigned int UINT;
|
|||
typedef unsigned int *PUINT;
|
||||
|
||||
|
||||
typedef unsigned char byte;
|
||||
typedef unsigned long DWORD;
|
||||
typedef int INT;
|
||||
typedef unsigned long ULONG_PTR, *PULONG_PTR;
|
||||
|
|
|
|||
|
|
@ -5777,7 +5777,7 @@ DXDEC EXPAPI S32 AILCALL AIL_sound_asset_info(HMSOUNDBANK bank, char const* name
|
|||
$:name The name of the sound asset to find.
|
||||
$:out_name Optional - Pointer to a buffer that is filled with the sound filename to use for loading.
|
||||
$:out_info Pointer to a $MILESBANKSOUNDINFO structure that is filled with meta data about the sound asset.
|
||||
$:return Returns the uint8_t size of the buffer required for out_name.
|
||||
$:return Returns the byte size of the buffer required for out_name.
|
||||
|
||||
This function must be called in order to resolve the sound asset name to
|
||||
something that can be used by miles. To ensure safe buffer containment, call
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ typedef unsigned int UINT;
|
|||
typedef unsigned int *PUINT;
|
||||
|
||||
|
||||
typedef unsigned char byte;
|
||||
typedef unsigned int DWORD;
|
||||
typedef int INT;
|
||||
typedef unsigned long ULONG_PTR, *PULONG_PTR;
|
||||
|
|
|
|||
|
|
@ -315,7 +315,7 @@ bool WinsockNetLayer::JoinGame(const char* ip, int port)
|
|||
Sleep(200);
|
||||
continue;
|
||||
}
|
||||
// rejectBuf[0] = packet id (255), rejectBuf[1..4] = 4-uint8_t big-endian reason
|
||||
// rejectBuf[0] = packet id (255), rejectBuf[1..4] = 4-byte big-endian reason
|
||||
int reason = ((rejectBuf[1] & 0xff) << 24) | ((rejectBuf[2] & 0xff) << 16) |
|
||||
((rejectBuf[3] & 0xff) << 8) | (rejectBuf[4] & 0xff);
|
||||
Minecraft::GetInstance()->connectionDisconnected(ProfileManager.GetPrimaryPad(), (DisconnectPacket::eDisconnectReason)reason);
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ namespace Win64Xuid
|
|||
if (readBytes == 0)
|
||||
return false;
|
||||
|
||||
// Compatibility: earlier experiments may have written raw 8-uint8_t uid.dat.
|
||||
// Compatibility: earlier experiments may have written raw 8-byte uid.dat.
|
||||
if (readBytes == sizeof(uint64_t))
|
||||
{
|
||||
uint64_t raw = 0;
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue