win cpp23 compat: Minecraft.Client

This commit is contained in:
VivyaCC
2026-03-06 23:25:57 +01:00
committed by void_17
parent 6dfdd90328
commit 52b1882f13
20 changed files with 96 additions and 91 deletions

View File

@@ -103,7 +103,7 @@ char SoundEngine::m_szRedistName[]={"redist"};
#endif
char *SoundEngine::m_szStreamFileA[eStream_Max]=
const char *SoundEngine::m_szStreamFileA[eStream_Max]=
{
"calm1",
"calm2",

View File

@@ -151,7 +151,7 @@ private:
static char m_szSoundPath[];
static char m_szMusicPath[];
static char m_szRedistName[];
static char *m_szStreamFileA[eStream_Max];
static const char *m_szStreamFileA[eStream_Max];
AUDIO_LISTENER m_ListenerA[MAX_LOCAL_PLAYERS];
int m_validListenerCount;

View File

@@ -4,7 +4,7 @@
unordered_map<wstring,eMinecraftColour> ColourTable::s_colourNamesMap;
wchar_t *ColourTable::ColourTableElements[eMinecraftColour_COUNT] =
const wchar_t *ColourTable::ColourTableElements[eMinecraftColour_COUNT] =
{
L"NOTSET",

View File

@@ -5,7 +5,7 @@ class ColourTable
private:
unsigned int m_colourValues[eMinecraftColour_COUNT];
static wchar_t *ColourTableElements[eMinecraftColour_COUNT];
static const wchar_t *ColourTableElements[eMinecraftColour_COUNT];
static unordered_map<wstring,eMinecraftColour> s_colourNamesMap;
public:

View File

@@ -26,7 +26,7 @@ PBYTE DLCAudioFile::getData(DWORD &dwBytes)
return m_pbData;
}
WCHAR *DLCAudioFile::wchTypeNamesA[]=
const WCHAR *DLCAudioFile::wchTypeNamesA[]=
{
L"CUENAME",
L"CREDIT",

View File

@@ -28,7 +28,7 @@ public:
e_AudioParamType_Max,
};
static WCHAR *wchTypeNamesA[e_AudioParamType_Max];
static const WCHAR *wchTypeNamesA[e_AudioParamType_Max];
DLCAudioFile(const wstring &path);

View File

@@ -7,7 +7,7 @@
#include "..\..\Minecraft.h"
#include "..\..\TexturePackRepository.h"
WCHAR *DLCManager::wchTypeNamesA[]=
const WCHAR *DLCManager::wchTypeNamesA[]=
{
L"DISPLAYNAME",
L"THEMENAME",

View File

@@ -48,7 +48,7 @@ public:
e_DLCParamType_Max,
};
static WCHAR *wchTypeNamesA[e_DLCParamType_Max];
static const WCHAR *wchTypeNamesA[e_DLCParamType_Max];
private:
vector<DLCPack *> m_packs;

View File

@@ -12,7 +12,7 @@
#include "ConsoleGameRules.h"
#include "GameRuleManager.h"
WCHAR *GameRuleManager::wchTagNameA[] =
const WCHAR *GameRuleManager::wchTagNameA[] =
{
L"", // eGameRuleType_Root
L"MapOptions", // eGameRuleType_LevelGenerationOptions
@@ -34,7 +34,7 @@ WCHAR *GameRuleManager::wchTagNameA[] =
L"UpdatePlayer", // eGameRuleType_UpdatePlayerRule
};
WCHAR *GameRuleManager::wchAttrNameA[] =
const WCHAR *GameRuleManager::wchAttrNameA[] =
{
L"descriptionName", // eGameRuleAttr_descriptionName
L"promptName", // eGameRuleAttr_promptName

View File

@@ -24,8 +24,8 @@ class WstringLookup;
class GameRuleManager
{
public:
static WCHAR *wchTagNameA[ConsoleGameRules::eGameRuleType_Count];
static WCHAR *wchAttrNameA[ConsoleGameRules::eGameRuleAttr_Count];
static const WCHAR *wchTagNameA[ConsoleGameRules::eGameRuleType_Count];
static const WCHAR *wchAttrNameA[ConsoleGameRules::eGameRuleAttr_Count];
static const short version_number = 2;

View File

@@ -1051,7 +1051,8 @@ void UIScene_LoadOrJoinMenu::GetSaveInfo()
m_pSaveDetails=StorageManager.ReturnSavesInfo();
if(m_pSaveDetails==NULL)
{
C4JStorage::ESaveGameState eSGIStatus= StorageManager.GetSavesInfo(m_iPad,NULL,this,"save");
char savename[] = "save";
C4JStorage::ESaveGameState eSGIStatus = StorageManager.GetSavesInfo(m_iPad, NULL, this, savename);
}
#if TO_BE_IMPLEMENTED

View File

@@ -13,7 +13,7 @@
//#define SKIN_SELECT_PACK_PLAYER_CUSTOM 1
#define SKIN_SELECT_MAX_DEFAULTS 2
WCHAR *UIScene_SkinSelectMenu::wchDefaultNamesA[]=
const WCHAR *UIScene_SkinSelectMenu::wchDefaultNamesA[]=
{
L"USE LOCALISED VERSION", // Server selected
L"Steve",

View File

@@ -6,7 +6,7 @@
class UIScene_SkinSelectMenu : public UIScene
{
private:
static WCHAR *wchDefaultNamesA[eDefaultSkins_Count];
static const WCHAR *wchDefaultNamesA[eDefaultSkins_Count];
// 4J Stu - How many to show on each side of the main control
static const BYTE sidePreviewControls = 4;