Merge branch 'upstream-dev' into cleanup/nullptr-replacement

# Conflicts:
#	Minecraft.Client/Network/PlayerChunkMap.cpp
#	Minecraft.Client/Network/PlayerList.cpp
#	Minecraft.Client/Network/ServerChunkCache.cpp
#	Minecraft.Client/Platform/Common/Consoles_App.cpp
#	Minecraft.Client/Platform/Common/DLC/DLCManager.cpp
#	Minecraft.Client/Platform/Common/GameRules/LevelGenerationOptions.cpp
#	Minecraft.Client/Platform/Common/GameRules/LevelRuleset.cpp
#	Minecraft.Client/Platform/Common/Tutorial/Tutorial.cpp
#	Minecraft.Client/Platform/Common/Tutorial/TutorialTask.cpp
#	Minecraft.Client/Platform/Common/UI/IUIScene_CreativeMenu.cpp
#	Minecraft.Client/Platform/Common/UI/UIComponent_Panorama.cpp
#	Minecraft.Client/Platform/Common/UI/UIController.cpp
#	Minecraft.Client/Platform/Common/UI/UIController.h
#	Minecraft.Client/Platform/Extrax64Stubs.cpp
#	Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Input.h
#	Minecraft.Client/Platform/Windows64/4JLibs/inc/4J_Storage.h
#	Minecraft.Client/Player/EntityTracker.cpp
#	Minecraft.Client/Player/ServerPlayer.cpp
#	Minecraft.Client/Rendering/EntityRenderers/PlayerRenderer.cpp
#	Minecraft.Client/Textures/Packs/DLCTexturePack.cpp
#	Minecraft.Client/Textures/Stitching/StitchedTexture.cpp
#	Minecraft.Client/Textures/Stitching/TextureMap.cpp
#	Minecraft.Client/Textures/Textures.cpp
#	Minecraft.World/Blocks/NotGateTile.cpp
#	Minecraft.World/Blocks/PressurePlateTile.cpp
#	Minecraft.World/Blocks/TileEntities/PotionBrewing.cpp
#	Minecraft.World/Enchantments/EnchantmentHelper.cpp
#	Minecraft.World/Entities/HangingEntity.cpp
#	Minecraft.World/Entities/LeashFenceKnotEntity.cpp
#	Minecraft.World/Entities/LivingEntity.cpp
#	Minecraft.World/Entities/Mobs/Boat.cpp
#	Minecraft.World/Entities/Mobs/Minecart.cpp
#	Minecraft.World/Entities/Mobs/Witch.cpp
#	Minecraft.World/Entities/SyncedEntityData.cpp
#	Minecraft.World/Items/LeashItem.cpp
#	Minecraft.World/Items/PotionItem.cpp
#	Minecraft.World/Level/BaseMobSpawner.cpp
#	Minecraft.World/Level/CustomLevelSource.cpp
#	Minecraft.World/Level/Level.cpp
#	Minecraft.World/Level/Storage/DirectoryLevelStorage.cpp
#	Minecraft.World/Level/Storage/McRegionLevelStorage.cpp
#	Minecraft.World/Level/Storage/RegionFileCache.cpp
#	Minecraft.World/Player/Player.cpp
#	Minecraft.World/WorldGen/Biomes/BiomeCache.cpp
#	Minecraft.World/WorldGen/Features/RandomScatteredLargeFeature.cpp
#	Minecraft.World/WorldGen/Layers/BiomeOverrideLayer.cpp
This commit is contained in:
MatthewBeshay
2026-03-30 16:28:40 +11:00
265 changed files with 1408 additions and 1426 deletions

View File

@@ -66,7 +66,7 @@ DWORD dwProfileSettingsA[NUM_PROFILE_VALUES] = {
// running for a long time.
//-------------------------------------------------------------------------------------
BOOL g_bWidescreen = TRUE;
bool g_bWidescreen = TRUE;
int g_iScreenWidth = 1920;
int g_iScreenHeight = 1080;
@@ -476,7 +476,7 @@ ATOM MyRegisterClass(HINSTANCE hInstance) {
// In this function, we save the instance handle in a global variable and
// create and display the main program window.
//
BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) {
bool InitInstance(HINSTANCE hInstance, int nCmdShow) {
g_hInst = hInstance; // Store instance handle in our global variable
RECT wr = {0, 0, g_iScreenWidth,
@@ -601,7 +601,7 @@ HRESULT InitDevice() {
// Create a render target view
ID3D11Texture2D* pBackBuffer = nullptr;
hr = g_pSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D),
(LPVOID*)&pBackBuffer);
(void**)&pBackBuffer);
if (FAILED(hr)) return hr;
// Create a depth stencil buffer
@@ -756,7 +756,7 @@ int APIENTRY _tWinMain(_In_ HINSTANCE hInstance,
// Set a callback for the default player options to be set - when there is
// no profile data for the player
ProfileManager.SetDefaultOptionsCallback(
&CConsoleMinecraftApp::DefaultOptionsCallback, (LPVOID)&app);
&CConsoleMinecraftApp::DefaultOptionsCallback, (void*)&app);
// QNet needs to be setup after profile manager, as we do not want its
// Notify listener to handle XN_SYS_SIGNINCHANGED notifications. This does
// mean that we need to have a callback in the ProfileManager for
@@ -935,7 +935,7 @@ volatile int sectCheck = 48;
CRITICAL_SECTION memCS;
DWORD tlsIdx;
LPVOID XMemAlloc(SIZE_T dwSize, DWORD dwAllocAttributes) {
void* XMemAlloc(SIZE_T dwSize, DWORD dwAllocAttributes) {
if (!trackStarted) {
void* p = XMemAllocDefault(dwSize, dwAllocAttributes);
size_t realSize = XMemSizeDefault(p, dwAllocAttributes);
@@ -1028,7 +1028,7 @@ SIZE_T WINAPI XMemSize(PVOID pAddress, DWORD dwAllocAttributes) {
void DumpMem() {
int totalLeak = 0;
for (AUTO_VAR(it, allocCounts.begin()); it != allocCounts.end(); it++) {
for (auto it = allocCounts.begin(); it != allocCounts.end(); it++) {
if (it->second > 0) {
app.DebugPrintf("%d %d %d %d\n", (it->first >> 26) & 0x3f,
it->first & 0x03ffffff, it->second,
@@ -1062,7 +1062,7 @@ void MemSect(int section) {
} else {
value = (value << 6) | section;
}
TlsSetValue(tlsIdx, (LPVOID)value);
TlsSetValue(tlsIdx, (void*)value);
}
void MemPixStuff() {
@@ -1070,7 +1070,7 @@ void MemPixStuff() {
int totals[MAX_SECT] = {0};
for (AUTO_VAR(it, allocCounts.begin()); it != allocCounts.end(); it++) {
for (auto it = allocCounts.begin(); it != allocCounts.end(); it++) {
if (it->second > 0) {
int sect = (it->first >> 26) & 0x3f;
int bytes = it->first & 0x03ffffff;