chore: cleanup names

This commit is contained in:
str1k3r committed 2026-09-06 19:08:30 -04:00
1 parent 7b4821d329
commit afbd3fef00
36 files changed
+202 -251

No files matched your search

+15 -15
View File
@@ -31,7 +31,7 @@ enum eFont
eFont_None, // to fallback to nothing
};
enum eXuiAction
enum eUIAction
{
eAppAction_Idle=0,
eAppAction_SaveGame,
@@ -112,21 +112,21 @@ enum eTMSAction
// The server runs on its own thread, so we need to call its actions there rather than where all other Xui actions are performed
// In general these are debugging options
enum eXuiServerAction
enum eUIServerAction
{
eXuiServerAction_Idle=0,
eXuiServerAction_DropItem, // Debug
eXuiServerAction_SaveGame,
eXuiServerAction_AutoSaveGame,
eXuiServerAction_SpawnMob, // Debug
eXuiServerAction_PauseServer,
eXuiServerAction_ToggleRain, // Debug
eXuiServerAction_ToggleThunder, // Debug
eXuiServerAction_ServerSettingChanged_Gamertags,
eXuiServerAction_ServerSettingChanged_Difficulty,
eXuiServerAction_ExportSchematic, //Debug
eXuiServerAction_ServerSettingChanged_BedrockFog,
eXuiServerAction_SetCameraLocation, //Debug
eUIServerAction_Idle=0,
eUIServerAction_DropItem, // Debug
eUIServerAction_SaveGame,
eUIServerAction_AutoSaveGame,
eUIServerAction_SpawnMob, // Debug
eUIServerAction_PauseServer,
eUIServerAction_ToggleRain, // Debug
eUIServerAction_ToggleThunder, // Debug
eUIServerAction_ServerSettingChanged_Gamertags,
eUIServerAction_ServerSettingChanged_Difficulty,
eUIServerAction_ExportSchematic, //Debug
eUIServerAction_ServerSettingChanged_BedrockFog,
eUIServerAction_SetCameraLocation, //Debug
};
enum eGameSetting
+2 -2
View File
@@ -138,9 +138,9 @@ typedef std::vector <PBANNEDLISTDATA> VBANNEDLIST;
typedef struct
{
int iPad;
eXuiAction action;
eUIAction action;
}
XuiActionParam;
UIActionParam;
// tips
typedef struct
+9 -37
View File
@@ -1100,7 +1100,7 @@ int SoundEngine::OpenStreamThreadProc( void* lpParameter )
{
#ifdef __DISABLE_MILES__
return 0;
#endif
#else
SoundEngine *soundEngine = (SoundEngine *)lpParameter;
soundEngine->m_hStream = AIL_open_stream(soundEngine->m_hDriver,soundEngine->m_szStreamName,0);
@@ -1111,6 +1111,7 @@ int SoundEngine::OpenStreamThreadProc( void* lpParameter )
}
#endif
return 0;
#endif
}
/////////////////////////////////////////////
@@ -1118,13 +1119,12 @@ int SoundEngine::OpenStreamThreadProc( void* lpParameter )
// playMusicTick
//
/////////////////////////////////////////////
#ifndef __PSVITA__ // AP - vita will update the music during the mixer callback
void SoundEngine::playMusicTick()
{
// AP - vita will update the music during the mixer callback
#ifndef __PSVITA__
playMusicUpdate();
#endif
}
#endif
// AP - moved to a separate function so it can be called from the mixer callback on Vita
void SoundEngine::playMusicUpdate()
@@ -1156,10 +1156,6 @@ void SoundEngine::playMusicUpdate()
if(m_musicID!=-1)
{
// start playing it
#if ( defined __PS3__ || defined __PSVITA__ || defined __ORBIS__ )
#ifdef __PS3__
// 4J-PB - Need to check if we are a patched BD build
if(app.GetBootedFromDiscPatch())
@@ -1171,13 +1167,12 @@ void SoundEngine::playMusicUpdate()
{
sprintf(m_szStreamName,"%s/%s",getUsrDirPath(), m_szMusicPath );
}
#else
#elif (defined __PSVITA__ || __ORBIS__)
sprintf(m_szStreamName,"%s/%s",getUsrDirPath(), m_szMusicPath );
#endif
#else
strcpy((char *)m_szStreamName,m_szMusicPath);
#endif
// are we using a mash-up pack?
//if(pMinecraft && !pMinecraft->skins->isUsingDefaultSkin() && pMinecraft->skins->getSelected()->hasAudio())
if(Minecraft::GetInstance()->skins->getSelected()->hasAudio())
@@ -1249,32 +1244,11 @@ void SoundEngine::playMusicUpdate()
SetIsPlayingStreamingCDMusic(false);
m_MusicType=eMusicType_Game;
m_StreamingAudioInfo.bIs3D=false;
}
}
else if(m_musicID<m_iStream_CD_1)
{
SetIsPlayingStreamingGameMusic(true);
SetIsPlayingStreamingCDMusic(false);
m_MusicType=eMusicType_Game;
m_StreamingAudioInfo.bIs3D=false;
// build the name
strcat((char *)m_szStreamName,"music/");
strcat((char *)m_szStreamName,m_szStreamFileA[m_musicID]);
strcat((char *)m_szStreamName,".binka");
}
else
{
SetIsPlayingStreamingGameMusic(false);
SetIsPlayingStreamingCDMusic(true);
m_MusicType=eMusicType_CD;
m_StreamingAudioInfo.bIs3D=true;
// build the name
strcat((char *)m_szStreamName,"cds/");
strcat((char *)m_szStreamName,m_szStreamFileA[m_musicID]);
strcat((char *)m_szStreamName,".binka");
}
#else
#else
if(m_musicID<m_iStream_CD_1)
#endif
{
SetIsPlayingStreamingGameMusic(true);
SetIsPlayingStreamingCDMusic(false);
@@ -1294,8 +1268,6 @@ void SoundEngine::playMusicUpdate()
}
strcat((char *)m_szStreamName,m_szStreamFileA[m_musicID]);
strcat((char *)m_szStreamName,".binka");
#endif
}
// wstring name = m_szStreamFileA[m_musicID];
@@ -98,7 +98,9 @@ public:
virtual void play(int iSound, float x, float y, float z, float volume, float pitch);
virtual void playStreaming(const wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay=true);
virtual void playUI(int iSound, float volume, float pitch);
#ifndef __PSVITA__
virtual void playMusicTick();
#endif
virtual void updateMusicVolume(float fVal);
virtual void updateSystemMusicPlaying(bool isPlaying);
virtual void updateSoundEffectVolume(float fVal);
+39 -68
View File
@@ -89,8 +89,8 @@ CMinecraftApp::CMinecraftApp()
for(int i=0;i<XUSER_MAX_COUNT;i++)
{
m_eTMSAction[i]=eTMSAction_Idle;
m_eXuiAction[i]=eAppAction_Idle;
m_eXuiActionParam[i] = NULL;
m_eUIAction[i]=eAppAction_Idle;
m_eUIActionParam[i] = NULL;
//m_dwAdditionalModelParts[i] = 0;
if(FAILED(XUserGetSigninInfo(i,XUSER_GET_SIGNIN_INFO_OFFLINE_XUID_ONLY ,&m_currentSigninInfo[i])))
@@ -106,8 +106,8 @@ CMinecraftApp::CMinecraftApp()
m_uiOpacityCountDown[i]=0;
}
m_eGlobalXuiAction=eAppAction_Idle;
m_eGlobalXuiServerAction=eXuiServerAction_Idle;
m_eGlobalUIAction=eAppAction_Idle;
m_eGlobalUIServerAction=eUIServerAction_Idle;
m_bResourcesLoaded=false;
m_bGameStarted=false;
@@ -199,13 +199,13 @@ CMinecraftApp::CMinecraftApp()
// m_uiTransferSlotC=5;
#endif
#if (defined _CONTENT_PACAKGE) || (defined _XBOX)
#if (defined _CONTENT_PACAKGE || _XBOX)
m_bUseDPadForDebug = false;
#else
m_bUseDPadForDebug = true;
#endif
#if ( defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
#if !(defined _WINDOWS64)
for(int i=0;i<XUSER_MAX_COUNT;i++)
{
m_eOptionsStatusA[i]=C4JStorage::eOptions_Callback_Idle;
@@ -301,25 +301,25 @@ LPCWSTR CMinecraftApp::GetString(int iID)
return app.m_stringTable->getString(iID);
}
void CMinecraftApp::SetAction(int iPad, eXuiAction action, LPVOID param)
void CMinecraftApp::SetAction(int iPad, eUIAction action, LPVOID param)
{
if( ( m_eXuiAction[iPad] == eAppAction_ReloadTexturePack ) && ( action == eAppAction_EthernetDisconnected ) )
if( ( m_eUIAction[iPad] == eAppAction_ReloadTexturePack ) && ( action == eAppAction_EthernetDisconnected ) )
{
app.DebugPrintf("Invalid change of App action for pad %d from %d to %d, ignoring\n", iPad, m_eXuiAction[iPad], action);
app.DebugPrintf("Invalid change of App action for pad %d from %d to %d, ignoring\n", iPad, m_eUIAction[iPad], action);
}
else if( ( m_eXuiAction[iPad] == eAppAction_ReloadTexturePack ) && ( action == eAppAction_ExitWorld ) )
else if( ( m_eUIAction[iPad] == eAppAction_ReloadTexturePack ) && ( action == eAppAction_ExitWorld ) )
{
app.DebugPrintf("Invalid change of App action for pad %d from %d to %d, ignoring\n", iPad, m_eXuiAction[iPad], action);
app.DebugPrintf("Invalid change of App action for pad %d from %d to %d, ignoring\n", iPad, m_eUIAction[iPad], action);
}
else if(m_eXuiAction[iPad] == eAppAction_ExitWorldCapturedThumbnail && action != eAppAction_Idle)
else if(m_eUIAction[iPad] == eAppAction_ExitWorldCapturedThumbnail && action != eAppAction_Idle)
{
app.DebugPrintf("Invalid change of App action for pad %d from %d to %d, ignoring\n", iPad, m_eXuiAction[iPad], action);
app.DebugPrintf("Invalid change of App action for pad %d from %d to %d, ignoring\n", iPad, m_eUIAction[iPad], action);
}
else
{
app.DebugPrintf("Changing App action for pad %d from %d to %d\n", iPad, m_eXuiAction[iPad], action);
m_eXuiAction[iPad]=action;
m_eXuiActionParam[iPad] = param;
app.DebugPrintf("Changing App action for pad %d from %d to %d\n", iPad, m_eUIAction[iPad], action);
m_eUIAction[iPad]=action;
m_eUIActionParam[iPad] = param;
}
}
@@ -344,30 +344,6 @@ void CMinecraftApp::SetAppPaused(bool val)
m_bIsAppPaused = val;
}
void CMinecraftApp::HandleButtonPresses()
{
for(int i=0;i<4;i++)
{
HandleButtonPresses(i);
}
}
void CMinecraftApp::HandleButtonPresses(int iPad)
{
// // test an update of the profile data
// void *pData=ProfileManager.GetGameDefinedProfileData(iPad);
//
// unsigned char *pchData= (unsigned char *)pData;
// int iCount=0;
// for(int i=0;i<GAME_DEFINED_PROFILE_DATA_BYTES;i++)
// {
// pchData[i]=0xBC;
// //if(iCount==255) iCount = 0;
// }
// ProfileManager.WriteToProfile(iPad,true);
}
bool CMinecraftApp::LoadInventoryMenu(int iPad,shared_ptr<LocalPlayer> player,bool bNavigateBack)
{
bool success = true;
@@ -753,7 +729,7 @@ void CMinecraftApp::InitGameSettings()
{
for(int i=0;i<XUSER_MAX_COUNT;i++)
{
#if (defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
#if !(defined _WINDOWS64)
GameSettingsA[i]=(GAME_SETTINGS *)StorageManager.GetGameDefinedProfileData(i);
#else
GameSettingsA[i]=(GAME_SETTINGS *)ProfileManager.GetGameDefinedProfileData(i);
@@ -764,21 +740,20 @@ void CMinecraftApp::InitGameSettings()
//SetDefaultGameSettings(i); - done on a callback from the profile manager
// 4J-PB - adding in for Windows & PS3 to set the defaults for the joypad
#if defined _WINDOWS64
#ifdef _WINDOWS64
C_4JProfile::PROFILESETTINGS *pProfileSettings=ProfileManager.GetDashboardProfileSettings(i);
SetDefaultOptions(pProfileSettings,i);
ProfileManager.LoadSettings(GameSettingsA[i], sizeof(GAME_SETTINGS));
ApplyGameSettingsChanged(i);
#elif defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__
#else
C4JStorage::PROFILESETTINGS *pProfileSettings=StorageManager.GetDashboardProfileSettings(i);
// 4J-PB - don't cause an options write to happen here
SetDefaultOptions(pProfileSettings,i,false);
#endif
}
}
#if (defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
#if !(defined _WINDOWS64)
int CMinecraftApp::SetDefaultOptions(C4JStorage::PROFILESETTINGS *pSettings,const int iPad,bool bWriteProfile)
#else
int CMinecraftApp::SetDefaultOptions(C_4JProfile::PROFILESETTINGS *pSettings,const int iPad)
@@ -871,7 +846,7 @@ int CMinecraftApp::SetDefaultOptions(C_4JProfile::PROFILESETTINGS *pSettings,con
//#endif
#if (defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
#if !(defined _WINDOWS64)
GameSettingsA[iPad]->bSettingsChanged=bWriteProfile;
#endif
@@ -899,8 +874,7 @@ int CMinecraftApp::DefaultOptionsCallback(LPVOID pParam,C_4JProfile::PROFILESETT
return 0;
}
#if ( defined __PS3__ || defined __ORBIS__ || defined _DURANGO || defined __PSVITA__)
#if !(defined _WINDOWS64)
wstring CMinecraftApp::toStringOptionsStatus(const C4JStorage::eOptionsCallback &eStatus)
{
#ifndef _CONTENT_PACKAGE
@@ -1227,9 +1201,6 @@ int CMinecraftApp::OldProfileVersionCallback(LPVOID pParam,unsigned char *pucDat
{
// This might be from a version during testing of new profile updates
app.DebugPrintf("Don't know what to do with this profile version!\n");
#ifndef _CONTENT_PACKAGE
// __debugbreak();
#endif
GAME_SETTINGS *pGameSettings=(GAME_SETTINGS *)pucData;
pGameSettings->ucMenuSensitivity=100; //eGameSetting_Sensitivity_InMenu
@@ -1352,7 +1323,7 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
// Game Host only (and for now we can't change the diff while in game, so this shouldn't happen)
if(bInGame && g_NetworkManager.IsHost() && (iPad==ProfileManager.GetPrimaryPad()))
{
app.SetXuiServerAction(iPad,eXuiServerAction_ServerSettingChanged_Difficulty);
app.SetUIServerAction(iPad,eUIServerAction_ServerSettingChanged_Difficulty);
}
}
else
@@ -1418,7 +1389,7 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
{
// Update the Game Host setting if you are the host and you are in-game
app.SetGameHostOption(eGameHostOption_Gamertags,((GameSettingsA[iPad]->usBitmaskValues&0x0008)!=0)?1:0);
app.SetXuiServerAction(iPad,eXuiServerAction_ServerSettingChanged_Gamertags);
app.SetUIServerAction(iPad,eUIServerAction_ServerSettingChanged_Gamertags);
PlayerList *players = MinecraftServer::getInstance()->getPlayerList();
for(AUTO_VAR(it3, players->players.begin()); it3 != players->players.end(); ++it3)
@@ -1494,7 +1465,7 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal)
{
// Update the Game Host setting if you are the host and you are in-game
app.SetGameHostOption(eGameHostOption_BedrockFog,GetGameSettings(iPad,eGameSetting_BedrockFog)?1:0);
app.SetXuiServerAction(iPad,eXuiServerAction_ServerSettingChanged_BedrockFog);
app.SetUIServerAction(iPad,eUIServerAction_ServerSettingChanged_BedrockFog);
}
}
break;
@@ -2588,21 +2559,21 @@ int CMinecraftApp::DisplaySavingMessage(void *pParam, C4JStorage::ESavingMessage
void CMinecraftApp::SetActionConfirmed(LPVOID param)
{
XuiActionParam *actionInfo = (XuiActionParam *)param;
UIActionParam *actionInfo = (UIActionParam *)param;
app.SetAction(actionInfo->iPad, actionInfo->action);
}
void CMinecraftApp::HandleXuiActions(void)
void CMinecraftApp::HandleUIActions(void)
{
eXuiAction eAction;
eUIAction eAction;
eTMSAction eTMS;
LPVOID param;
Minecraft *pMinecraft=Minecraft::GetInstance();
shared_ptr<MultiplayerLocalPlayer> player;
// are there any global actions to deal with?
eAction = app.GetGlobalXuiAction();
eAction = app.GetGlobalUIAction();
if(eAction!=eAppAction_Idle)
{
switch(eAction)
@@ -2613,7 +2584,7 @@ void CMinecraftApp::HandleXuiActions(void)
UINT uiIDA[1];
uiIDA[0]=IDS_CONFIRM_OK;
C4JStorage::EMessageResult result = ui.RequestErrorMessage( IDS_CANT_PLACE_NEAR_SPAWN_TITLE, IDS_CANT_PLACE_NEAR_SPAWN_TEXT, uiIDA,1,XUSER_INDEX_ANY);
if(result != C4JStorage::EMessage_Busy) SetGlobalXuiAction(eAppAction_Idle);
if(result != C4JStorage::EMessage_Busy) SetGlobalUIAction(eAppAction_Idle);
}
break;
@@ -2625,8 +2596,8 @@ void CMinecraftApp::HandleXuiActions(void)
// are there any app actions to deal with?
for(int i=0;i<XUSER_MAX_COUNT;i++)
{
eAction = app.GetXuiAction(i);
param = m_eXuiActionParam[i];
eAction = app.GetUIAction(i);
param = m_eUIActionParam[i];
if(eAction!=eAppAction_Idle)
{
@@ -2661,7 +2632,7 @@ void CMinecraftApp::HandleXuiActions(void)
bool bKeepHiding = false;
for(int j=0; j < XUSER_MAX_COUNT;++j)
{
if(app.GetXuiAction(j) == eAppAction_SocialPostScreenshot)
if(app.GetUIAction(j) == eAppAction_SocialPostScreenshot)
{
bKeepHiding = true;
break;
@@ -2783,7 +2754,7 @@ void CMinecraftApp::HandleXuiActions(void)
SetAction(i,eAppAction_Idle);
#if defined(_XBOX_ONE) || defined(__ORBIS__)
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_AutoSaveGame);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_AutoSaveGame);
if(app.GetGameHostOption(eGameHostOption_DisableSaving)) StorageManager.SetSaveDisabled(true);
#else
@@ -3265,7 +3236,7 @@ void CMinecraftApp::HandleXuiActions(void)
pMinecraft->localplayers[i]->respawn();
// If the respawn requires a dimension change then the action will have changed
//if(app.GetXuiAction(i) == eAppAction_Respawn)
//if(app.GetUIAction(i) == eAppAction_Respawn)
//{
// SetAction(i,eAppAction_Idle);
// CloseXuiScenes(i);
@@ -7365,7 +7336,7 @@ void CMinecraftApp::EnterSaveNotificationSection()
if( g_NetworkManager.IsLocalGame() && g_NetworkManager.GetPlayerCount() == 1 )
{
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)TRUE);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_PauseServer,(void *)TRUE);
}
}
}
@@ -7383,7 +7354,7 @@ void CMinecraftApp::LeaveSaveNotificationSection()
if( g_NetworkManager.IsLocalGame() && g_NetworkManager.GetPlayerCount() == 1 )
{
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)FALSE);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_PauseServer,(void *)FALSE);
}
}
}
@@ -7412,14 +7383,14 @@ int CMinecraftApp::RemoteSaveThreadProc( void* lpParameter )
pMinecraft->progressRenderer->progressStage( -1 );
pMinecraft->progressRenderer->progressStagePercentage(0);
while( !app.GetGameStarted() && app.GetXuiAction( ProfileManager.GetPrimaryPad() ) == eAppAction_WaitRemoteServerSaveComplete )
while( !app.GetGameStarted() && app.GetUIAction( ProfileManager.GetPrimaryPad() ) == eAppAction_WaitRemoteServerSaveComplete )
{
// Tick all the games connections
pMinecraft->tickAllConnections();
Sleep( 100 );
}
if( app.GetXuiAction( ProfileManager.GetPrimaryPad() ) != eAppAction_WaitRemoteServerSaveComplete )
if( app.GetUIAction( ProfileManager.GetPrimaryPad() ) != eAppAction_WaitRemoteServerSaveComplete )
{
// Something cancelled us?
return ERROR_CANCELLED;
+16 -19
View File
@@ -114,7 +114,6 @@ public:
static const int USER_SR = 6;
static const int USER_UI = 7; // 4J Stu - This also makes it appear on the UI console
void HandleButtonPresses();
bool IntroRunning() { return m_bIntroRunning;}
void SetIntroRunning(bool bSet) {m_bIntroRunning=bSet;}
#ifdef _CONTENT_PACKAGE
@@ -160,17 +159,17 @@ public:
eGameMode GetGameMode() { return m_eGameMode;}
void SetGameMode(eGameMode eMode) { m_eGameMode=eMode;}
eXuiAction GetGlobalXuiAction() {return m_eGlobalXuiAction;}
void SetGlobalXuiAction(eXuiAction action) {m_eGlobalXuiAction=action;}
eXuiAction GetXuiAction(int iPad) {return m_eXuiAction[iPad];}
void SetAction(int iPad, eXuiAction action, LPVOID param = NULL);
eUIAction GetGlobalUIAction() {return m_eGlobalUIAction;}
void SetGlobalUIAction(eUIAction action) {m_eGlobalUIAction=action;}
eUIAction GetUIAction(int iPad) {return m_eUIAction[iPad];}
void SetAction(int iPad, eUIAction action, LPVOID param = NULL);
void SetTMSAction(int iPad, eTMSAction action) {m_eTMSAction[iPad]=action; }
eTMSAction GetTMSAction(int iPad) {return m_eTMSAction[iPad];}
eXuiServerAction GetXuiServerAction(int iPad) {return m_eXuiServerAction[iPad];}
LPVOID GetXuiServerActionParam(int iPad) {return m_eXuiServerActionParam[iPad];}
void SetXuiServerAction(int iPad, eXuiServerAction action, LPVOID param = NULL) {m_eXuiServerAction[iPad]=action; m_eXuiServerActionParam[iPad] = param;}
eXuiServerAction GetGlobalXuiServerAction() {return m_eGlobalXuiServerAction;}
void SetGlobalXuiServerAction(eXuiServerAction action) {m_eGlobalXuiServerAction=action;}
eUIServerAction GetUIServerAction(int iPad) {return m_eUIServerAction[iPad];}
LPVOID GetUIServerActionParam(int iPad) {return m_eUIServerActionParam[iPad];}
void SetUIServerAction(int iPad, eUIServerAction action, LPVOID param = NULL) {m_eUIServerAction[iPad]=action; m_eUIServerActionParam[iPad] = param;}
eUIServerAction GetGlobalUIServerAction() {return m_eGlobalUIServerAction;}
void SetGlobalUIServerAction(eUIServerAction action) {m_eGlobalUIServerAction=action;}
DisconnectPacket::eDisconnectReason GetDisconnectReason() { return m_disconnectReason; }
void SetDisconnectReason(DisconnectPacket::eDisconnectReason bVal) { m_disconnectReason = bVal; }
@@ -184,7 +183,7 @@ public:
// 4J Stu - Added so that we can call this when a confirmation box is selected
static void SetActionConfirmed(LPVOID param);
void HandleXuiActions(void);
void HandleUIActions(void);
// 4J Stu - Functions used for Minecon and other promo work
bool GetLoadSavesFromFolderEnabled() { return m_bLoadSavesFromFolderEnabled; }
@@ -446,8 +445,6 @@ private:
VBANNEDLIST *m_vBannedListA[XUSER_MAX_COUNT];
void HandleButtonPresses(int iPad);
bool m_bResourcesLoaded;
// Global string table for this application.
@@ -514,13 +511,13 @@ private:
// To avoid problems with threads being kicked off from xuis that alter things that may be in progress within the run_middle,
// we'll action these at the end of the game loop
eXuiAction m_eXuiAction[XUSER_MAX_COUNT];
eUIAction m_eUIAction[XUSER_MAX_COUNT];
eTMSAction m_eTMSAction[XUSER_MAX_COUNT];
LPVOID m_eXuiActionParam[XUSER_MAX_COUNT];
eXuiAction m_eGlobalXuiAction;
eXuiServerAction m_eXuiServerAction[XUSER_MAX_COUNT];
LPVOID m_eXuiServerActionParam[XUSER_MAX_COUNT];
eXuiServerAction m_eGlobalXuiServerAction;
LPVOID m_eUIActionParam[XUSER_MAX_COUNT];
eUIAction m_eGlobalUIAction;
eUIServerAction m_eUIServerAction[XUSER_MAX_COUNT];
LPVOID m_eUIServerActionParam[XUSER_MAX_COUNT];
eUIServerAction m_eGlobalUIServerAction;
bool m_bLiveLinkRequired;
@@ -1173,11 +1173,11 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc( void* lpParam )
pMinecraft->progressRenderer->progressStage( IDS_PROGRESS_CONVERTING_TO_OFFLINE_GAME );
#endif
while( app.GetXuiServerAction(ProfileManager.GetPrimaryPad() ) != eXuiServerAction_Idle && !MinecraftServer::serverHalted() )
while( app.GetUIServerAction(ProfileManager.GetPrimaryPad() ) != eUIServerAction_Idle && !MinecraftServer::serverHalted() )
{
Sleep(10);
}
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)TRUE);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_PauseServer,(void *)TRUE);
// wait for the server to be in a non-ticking state
pServer->m_serverPausedEvent->WaitForSignal(INFINITE);
@@ -1333,7 +1333,7 @@ int CGameNetworkManager::ChangeSessionTypeThreadProc( void* lpParam )
// Start the game again
app.SetGameStarted(true);
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)FALSE);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_PauseServer,(void *)FALSE);
app.SetChangingSessionType(false);
app.SetReallyChangingSessionType(false);
+1 -1
View File
@@ -170,7 +170,7 @@ void IUIScene_HUD::updateFrameTick()
}
SetOpacity(fVal);
bool bDisplayGui=app.GetGameStarted() && !ui.GetMenuDisplayed(iPad) && !(app.GetXuiAction(iPad)==eAppAction_AutosaveSaveGameCapturedThumbnail) && app.GetGameSettings(iPad,eGameSetting_DisplayHUD)!=0;
bool bDisplayGui=app.GetGameStarted() && !ui.GetMenuDisplayed(iPad) && !(app.GetUIAction(iPad)==eAppAction_AutosaveSaveGameCapturedThumbnail) && app.GetGameSettings(iPad,eGameSetting_DisplayHUD)!=0;
if(bDisplayGui && pMinecraft->localplayers[iPad] != NULL)
{
SetVisible(true);
@@ -354,11 +354,11 @@ int IUIScene_PauseMenu::SaveWorldThreadProc( LPVOID lpParameter )
bool bAutosave=(bool)lpParameter;
if(bAutosave)
{
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_AutoSaveGame);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_AutoSaveGame);
}
else
{
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_SaveGame);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_SaveGame);
}
// Share AABB & Vec3 pools with default (main thread) - should be ok as long as we don't tick the main thread whilst this thread is running
@@ -374,7 +374,7 @@ int IUIScene_PauseMenu::SaveWorldThreadProc( LPVOID lpParameter )
{
app.SetGameStarted(false);
while( app.GetXuiServerAction(ProfileManager.GetPrimaryPad() ) != eXuiServerAction_Idle && !MinecraftServer::serverHalted() )
while( app.GetUIServerAction(ProfileManager.GetPrimaryPad() ) != eUIServerAction_Idle && !MinecraftServer::serverHalted() )
{
Sleep(10);
}
+11 -18
View File
@@ -184,17 +184,6 @@ UIController::UIController()
InitializeCriticalSection(&m_Allocatorlock);
#endif
// 4J Stu - This is a bit of a hack until we change the Minecraft initialisation to store the proper screen size for other platforms
#if defined _DURANGO || defined __ORBIS__
m_fScreenWidth = 1920.0f;
m_fScreenHeight = 1080.0f;
m_bScreenWidthSetup = true;
#else
m_fScreenWidth = 1280.0f;
m_fScreenHeight = 720.0f;
m_bScreenWidthSetup = false;
#endif
for(unsigned int i = 0; i < eLibrary_Count; ++i)
{
m_iggyLibraries[i] = IGGY_INVALID_LIBRARY;
@@ -257,6 +246,7 @@ void UIController::SetSystemUIShowing(LPVOID lpParam,bool bVal)
// SETUP
void UIController::preInit(S32 width, S32 height)
{
//str1k3r - 4J previously hardcoded this in UIController(), this is already set per platform so just use this :3
m_fScreenWidth = width;
m_fScreenHeight = height;
m_bScreenWidthSetup = true;
@@ -500,14 +490,14 @@ void UIController::tick()
}
#ifdef _WINDOWS64
GetControllerType();
GetControllerSwf();
#endif
}
//str1k3r - PS3 & PS4 icons are broken in some spots, therefore they wont be included yet
#ifdef _WINDOWS64
//str1k3r - this is what actually does all the autoswitching
void UIController::GetControllerType()
void UIController::GetControllerSwf()
{
EControllerType ControllerType = InputManager.GetControllerType(0);
wstring controlTooltipsPath = L"";
@@ -521,7 +511,6 @@ void UIController::GetControllerType()
case EControllerType_Xbox360:
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\XboxHDControls.swf" : L"ControlTooltips\\XboxControls.swf";
break;
case EControllerType_Default:
case EControllerType_XboxOne:
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\DurangoHDControls.swf" : L"ControlTooltips\\DurangoControls.swf";
break;
@@ -539,6 +528,9 @@ void UIController::GetControllerType()
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\SwitchHDControls.swf" : L"ControlTooltips\\SwitchControls.swf";
break;
*/
case EControllerType_Default: //str1k3r - this is going to get a custom swf soon
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\DurangoHDControls.swf" : L"ControlTooltips\\DurangoControls.swf";
break;
default:
controlTooltipsPath = (ui.getScreenWidth() >= 1920) ? L"ControlTooltips\\HD\\Windows64HDControls.swf" : L"ControlTooltips\\Windows64Controls.swf";
break;
@@ -569,7 +561,6 @@ wstring UIController::GetTooltipSkinPath()
{
case EControllerType_Xbox360:
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\XboxHDControls.swf" : L"ControlTooltips\\XboxControls.swf";
case EControllerType_Default:
case EControllerType_XboxOne:
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\DurangoHDControls.swf" : L"ControlTooltips\\DurangoControls.swf";
/*
@@ -582,6 +573,8 @@ wstring UIController::GetTooltipSkinPath()
case EControllerType_Switch:
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\SwitchHDControls.swf" : L"ControlTooltips\\SwitchControls.swf";
*/
case EControllerType_Default:
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\DurangoHDControls.swf" : L"ControlTooltips\\DurangoControls.swf";
default:
return ui.getScreenWidth() >= 1920 ? L"ControlTooltips\\HD\\Windows64HDControls.swf" : L"ControlTooltips\\Windows64Controls.swf";
break;
@@ -601,12 +594,12 @@ void UIController::loadSkins()
#elif defined __PSVITA__
platformSkinPath = L"skinVita.swf";
#elif defined _WINDOWS64
if(m_fScreenWidth >= 1920.0f)
if(ui.getScreenWidth() >= 1920.0f)
{
tooltipsSkinPath = GetTooltipSkinPath();
platformSkinPath = L"skinHDWin.swf";
}
else if (m_fScreenWidth >= 960.0f && m_fScreenWidth < 1280.0f) //str1k3r - we need to check this to make sure we dont load the vita skin on 720p
else if (ui.getScreenWidth() >= 960.0f && ui.getScreenWidth() < 1280.0f) //str1k3r - we need to check this to make sure we dont load the vita skin on 720p
{
tooltipsSkinPath = GetTooltipSkinPath();
platformSkinPath = L"skinWinVita.swf";
@@ -639,7 +632,7 @@ void UIController::loadSkins()
// str1k3r - Fixes 720p/480p Crashes on Windows64, also allows this to be used on 1080p consoles instead of just Windows64
// This also cleans up some 4J code and turns 3 if statements into 1.
if (m_fScreenWidth >= 1920.0f)
if (ui.getScreenWidth() >= 1920.0f)
{
m_iggyLibraries[eLibrary_Platform] = loadSkin(platformSkinPath, L"platformskinHD.swf");
m_iggyLibraries[eLibrary_GraphicsDefault] = loadSkin(L"skinHDGraphics.swf", L"skinHDGraphics.swf");
+3 -1
View File
@@ -204,7 +204,7 @@ public:
virtual void tick();
private:
void GetControllerType();
void GetControllerSwf();
wstring GetTooltipSkinPath();
void loadSkins();
IggyLibrary loadSkin(const wstring &skinPath, const wstring &skinName);
@@ -236,6 +236,8 @@ public:
// RENDERING
float getScreenWidth() { return m_fScreenWidth; }
float getScreenHeight() { return m_fScreenHeight; }
void setScreenWidth(float w) { m_fScreenWidth = w; }
void setScreenHeight(float h) { m_fScreenHeight = h; }
virtual void render() = 0;
void getRenderDimensions(C4JRender::eViewportType viewport, S32 &width, S32 &height);
@@ -100,7 +100,7 @@ void UIScene_DebugCreateSchematic::handlePress(F64 controlId, F64 childId)
else if(m_data->endZ < 0 && m_data->endZ%2 ==0)
m_data->endZ+=1;
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(), eXuiServerAction_ExportSchematic, (void *)m_data);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(), eUIServerAction_ExportSchematic, (void *)m_data);
navigateBack();
}
@@ -167,7 +167,7 @@ void UIScene_DebugOverlay::handlePress(F64 controlId, F64 childId)
{
app.DebugPrintf("UIScene_DebugOverlay::handlePress for itemsList: %f\n", childId);
int id = childId;
//app.SetXuiServerAction(m_iPad, eXuiServerAction_DropItem, (void *)m_itemIds[id]);
//app.SetUIServerAction(m_iPad, eUIServerAction_DropItem, (void *)m_itemIds[id]);
ClientConnection *conn = Minecraft::GetInstance()->getConnection(ProfileManager.GetPrimaryPad());
conn->send( GiveItemCommand::preparePacket(dynamic_pointer_cast<Player>(Minecraft::GetInstance()->localplayers[ProfileManager.GetPrimaryPad()]), m_itemIds[id]) );
}
@@ -177,7 +177,7 @@ void UIScene_DebugOverlay::handlePress(F64 controlId, F64 childId)
int id = childId;
if(id<m_mobFactories.size())
{
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_SpawnMob,(void *)m_mobFactories[id]);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_SpawnMob,(void *)m_mobFactories[id]);
}
}
break;
@@ -204,13 +204,13 @@ void UIScene_DebugOverlay::handlePress(F64 controlId, F64 childId)
break;
case eControl_Rain:
{
//app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_ToggleRain);
//app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_ToggleRain);
ClientConnection *conn = Minecraft::GetInstance()->getConnection(ProfileManager.GetPrimaryPad());
conn->send( ToggleDownfallCommand::preparePacket() );
}
break;
case eControl_Thunder:
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_ToggleThunder);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_ToggleThunder);
break;
case eControl_ResetTutorial:
Tutorial::debugResetPlayerSavedProgress( ProfileManager.GetPrimaryPad() );
@@ -91,8 +91,8 @@ void UIScene_DebugSetCamera::handlePress(F64 controlId, F64 childId)
switch((int)controlId)
{
case eControl_Teleport:
app.SetXuiServerAction( ProfileManager.GetPrimaryPad(),
eXuiServerAction_SetCameraLocation,
app.SetUIServerAction( ProfileManager.GetPrimaryPad(),
eUIServerAction_SetCameraLocation,
(void *)currentPosition);
break;
case eControl_CamX:
@@ -161,7 +161,7 @@ UIScene_LoadOrJoinMenu::UIScene_LoadOrJoinMenu(int iPad, void *initData, UILayer
}
#endif
#if defined(__PS3__) || defined(__ORBIS__) || defined(__PSVITA__) || defined(_DURANGO)
#if (defined __PS3__ || __ORBIS__ || __PSVITA__ || _DURANGO || _WINDOWS64)
// Always clear the saves when we enter this menu
StorageManager.ClearSavesInfo();
#endif
@@ -94,7 +94,7 @@ UIScene_PauseMenu::UIScene_PauseMenu(int iPad, void *initData, UILayer *parentLa
if( g_NetworkManager.IsLocalGame() && g_NetworkManager.GetPlayerCount() == 1 )
{
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)TRUE);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_PauseServer,(void *)TRUE);
}
TelemetryManager->RecordMenuShown(m_iPad, eUIScene_PauseMenu, 0);
@@ -367,7 +367,7 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, bool pressed
if( iPad == ProfileManager.GetPrimaryPad() && g_NetworkManager.IsLocalGame() )
{
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)FALSE);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_PauseServer,(void *)FALSE);
}
ui.PlayUISFX(eSFX_Back);
@@ -473,7 +473,7 @@ void UIScene_PauseMenu::handleInput(int iPad, int key, bool repeat, bool pressed
bool bCanScreenshot = true;
for(int j=0; j < XUSER_MAX_COUNT;++j)
{
if(app.GetXuiAction(j) == eAppAction_SocialPostScreenshot)
if(app.GetUIAction(j) == eAppAction_SocialPostScreenshot)
{
bCanScreenshot = false;
break;
@@ -511,7 +511,7 @@ void UIScene_PauseMenu::handlePress(F64 controlId, F64 childId)
case BUTTON_PAUSE_RESUMEGAME:
if( m_iPad == ProfileManager.GetPrimaryPad() && g_NetworkManager.IsLocalGame() )
{
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)FALSE);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_PauseServer,(void *)FALSE);
}
navigateBack();
break;
@@ -126,7 +126,7 @@ HRESULT CScene_DebugOverlay::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress
if(nIndex<m_itemIds.size())
{
int id = m_itemIds[nIndex];
//app.SetXuiServerAction(pNotifyPressData->UserIndex, eXuiServerAction_DropItem, (void *)id);
//app.SetUIServerAction(pNotifyPressData->UserIndex, eUIServerAction_DropItem, (void *)id);
ClientConnection *conn = Minecraft::GetInstance()->getConnection(ProfileManager.GetPrimaryPad());
conn->send( GiveItemCommand::preparePacket(dynamic_pointer_cast<Player>(Minecraft::GetInstance()->localplayers[ProfileManager.GetPrimaryPad()]), id) );
}
@@ -136,7 +136,7 @@ HRESULT CScene_DebugOverlay::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress
nIndex = m_mobs.GetCurSel();
if(nIndex<m_mobFactories.size())
{
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_SpawnMob,(void *)m_mobFactories[nIndex]);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_SpawnMob,(void *)m_mobFactories[nIndex]);
}
}
else if ( hObjPressed == m_enchantments )
@@ -200,13 +200,13 @@ HRESULT CScene_DebugOverlay::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress
}
else if( hObjPressed == m_toggleRain )
{
//app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_ToggleRain);
//app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_ToggleRain);
ClientConnection *conn = Minecraft::GetInstance()->getConnection(ProfileManager.GetPrimaryPad());
conn->send( ToggleDownfallCommand::preparePacket() );
}
else if( hObjPressed == m_toggleThunder )
{
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_ToggleThunder);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_ToggleThunder);
}
else if( hObjPressed == m_resetTutorial )
{
@@ -76,7 +76,7 @@ HRESULT CScene_DebugSchematicCreator::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINo
#endif
m_data->compressionType = Compression::eCompressionType_RLE;
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(), eXuiServerAction_ExportSchematic, (void *)m_data);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(), eUIServerAction_ExportSchematic, (void *)m_data);
NavigateBack();
rfHandled = TRUE;
@@ -68,8 +68,8 @@ HRESULT CScene_DebugSetCamera::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPre
if (hObjPressed == m_teleport)
{
app.SetXuiServerAction( ProfileManager.GetPrimaryPad(),
eXuiServerAction_SetCameraLocation,
app.SetUIServerAction( ProfileManager.GetPrimaryPad(),
eUIServerAction_SetCameraLocation,
(void *)currentPosition);
rfHandled = TRUE;
}
+10 -10
View File
@@ -152,7 +152,7 @@ HRESULT UIScene_PauseMenu::OnInit( XUIMessageInit* pInitData, BOOL& bHandled )
if( g_NetworkManager.IsLocalGame() && g_NetworkManager.GetPlayerCount() == 1 )
{
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)TRUE);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_PauseServer,(void *)TRUE);
}
TelemetryManager->RecordMenuShown(m_iPad, eUIScene_PauseMenu, 0);
@@ -190,7 +190,7 @@ HRESULT UIScene_PauseMenu::OnNotifyPressEx(HXUIOBJ hObjPressed, XUINotifyPress*
case BUTTON_PAUSE_RESUMEGAME:
if( m_iPad == ProfileManager.GetPrimaryPad() && g_NetworkManager.IsLocalGame() )
{
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)FALSE);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_PauseServer,(void *)FALSE);
}
app.CloseXuiScenes(pNotifyPressData->UserIndex);
break;
@@ -441,7 +441,7 @@ HRESULT UIScene_PauseMenu::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandle
if( m_iPad == ProfileManager.GetPrimaryPad() && g_NetworkManager.IsLocalGame() )
{
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)FALSE);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_PauseServer,(void *)FALSE);
}
CXuiSceneBase::PlayUISFX(eSFX_Back);
@@ -477,7 +477,7 @@ HRESULT UIScene_PauseMenu::OnKeyDown(XUIMessageInput* pInputData, BOOL& rfHandle
bool bCanScreenshot = true;
for(int j=0; j < XUSER_MAX_COUNT;++j)
{
if(app.GetXuiAction(j) == eAppAction_SocialPostScreenshot)
if(app.GetUIAction(j) == eAppAction_SocialPostScreenshot)
{
bCanScreenshot = false;
break;
@@ -579,7 +579,7 @@ HRESULT UIScene_PauseMenu::OnNavReturn(HXUIOBJ hObj,BOOL& rfHandled)
{
if( m_iPad == ProfileManager.GetPrimaryPad() && g_NetworkManager.IsLocalGame() )
{
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)FALSE);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_PauseServer,(void *)FALSE);
}
app.CloseXuiScenes(m_iPad);
@@ -610,7 +610,7 @@ int UIScene_PauseMenu::BanGameDialogReturned(void *pParam,int iPad,C4JStorage::E
if(result==C4JStorage::EMessage_ResultDecline)
{
// 4J Stu - Only do this if we are currently idle, don't want the (relatively) low priority ban task overriding something else
if(app.GetXuiAction(iPad) == eAppAction_Idle) app.SetAction(iPad,eAppAction_BanLevel);
if(app.GetUIAction(iPad) == eAppAction_Idle) app.SetAction(iPad,eAppAction_BanLevel);
}
return 0;
}
@@ -702,7 +702,7 @@ HRESULT UIScene_PauseMenu::OnDestroy()
if( m_iPad == ProfileManager.GetPrimaryPad() && g_NetworkManager.IsLocalGame() )
{
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_PauseServer,(void *)FALSE);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_PauseServer,(void *)FALSE);
}
return S_OK;
@@ -974,11 +974,11 @@ int UIScene_PauseMenu::SaveWorldThreadProc( LPVOID lpParameter )
bool bAutosave=(bool)lpParameter;
if(bAutosave)
{
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_AutoSaveGame);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_AutoSaveGame);
}
else
{
app.SetXuiServerAction(ProfileManager.GetPrimaryPad(),eXuiServerAction_SaveGame);
app.SetUIServerAction(ProfileManager.GetPrimaryPad(),eUIServerAction_SaveGame);
}
// Share AABB & Vec3 pools with default (main thread) - should be ok as long as we don't tick the main thread whilst this thread is running
@@ -994,7 +994,7 @@ int UIScene_PauseMenu::SaveWorldThreadProc( LPVOID lpParameter )
{
app.SetGameStarted(false);
while( app.GetXuiServerAction(ProfileManager.GetPrimaryPad() ) != eXuiServerAction_Idle && !MinecraftServer::serverHalted() )
while( app.GetUIServerAction(ProfileManager.GetPrimaryPad() ) != eUIServerAction_Idle && !MinecraftServer::serverHalted() )
{
Sleep(10);
}
@@ -164,7 +164,7 @@ void CXuiSceneBase::_TickAllBaseScenes()
for(int i=0;i<XUSER_MAX_COUNT;i++)
{
bCheckTexturePack= app.GetGameStarted() && (ui.GetMenuDisplayed(0)==false) && (app.GetXuiAction(i)==eAppAction_Idle);
bCheckTexturePack= app.GetGameStarted() && (ui.GetMenuDisplayed(0)==false) && (app.GetUIAction(i)==eAppAction_Idle);
}
// make sure there's not a mount going on before using the textures
@@ -469,7 +469,7 @@ void CXuiSceneBase::_TickAllBaseScenes()
CustomMessage_TickScene( &xuiMsg );
XuiSendMessage( app.GetCurrentHUDScene(i), &xuiMsg );
bool bDisplayGui=app.GetGameStarted() && !ui.GetMenuDisplayed(i) && !(app.GetXuiAction(i)==eAppAction_AutosaveSaveGameCapturedThumbnail) && app.GetGameSettings(i,eGameSetting_DisplayHUD)!=0;
bool bDisplayGui=app.GetGameStarted() && !ui.GetMenuDisplayed(i) && !(app.GetUIAction(i)==eAppAction_AutosaveSaveGameCapturedThumbnail) && app.GetGameSettings(i,eGameSetting_DisplayHUD)!=0;
if(bDisplayGui && pMinecraft->localplayers[i] != NULL)
{
XuiElementSetShow(app.GetCurrentHUDScene(i),TRUE);