nuke SocialManager

This commit is contained in:
Tropical 2026-03-30 21:48:54 -05:00
parent e942d0d472
commit e00c95e7ab
8 changed files with 61 additions and 275 deletions

View file

@ -45,8 +45,8 @@ enum eXuiAction {
eAppAction_TrialOver,
eAppAction_ExitTrial,
eAppAction_WaitForDimensionChangeComplete,
eAppAction_SocialPost,
eAppAction_SocialPostScreenshot,
// eAppAction_SocialPost,
// eAppAction_SocialPostScreenshot,
eAppAction_EthernetDisconnected,
eAppAction_EthernetDisconnectedReturned,
eAppAction_EthernetDisconnectedReturned_Menus,

View file

@ -26,7 +26,6 @@
#include "Minecraft.World/ConsoleHelpers/PathHelper.h"
#include "../net/minecraft/stats/StatsCounter.h"
#include "../net/minecraft/server/level/GameMode.h"
#include "../Windows64/Source Files/Social/SocialManager.h"
#include "Source Files/Tutorial/TutorialMode.h"
#if defined(_WINDOWS64)
#include "../Windows64/XML/ATGXmlParser.h"
@ -2199,48 +2198,48 @@ void CMinecraftApp::HandleXuiActions(void) {
if (eAction != eAppAction_Idle) {
switch (eAction) {
// the renderer will capture a screenshot
case eAppAction_SocialPost:
if (ProfileManager.IsFullVersion()) {
// Facebook Share
if (CSocialManager::Instance()
->IsTitleAllowedToPostImages() &&
CSocialManager::Instance()
->AreAllUsersAllowedToPostImages()) {
// disable character name tags for the shot
// m_bwasHidingGui = pMinecraft->options->hideGui;
// // 4J Stu - Removed 1.8.2 bug fix (TU6) as don't
// need this
pMinecraft->options->hideGui = true;
// // the renderer will capture a screenshot
// case eAppAction_SocialPost:
// if (ProfileManager.IsFullVersion()) {
// // Facebook Share
// if (CSocialManager::Instance()
// ->IsTitleAllowedToPostImages() &&
// CSocialManager::Instance()
// ->AreAllUsersAllowedToPostImages()) {
// // disable character name tags for the shot
// // m_bwasHidingGui = pMinecraft->options->hideGui;
// // // 4J Stu - Removed 1.8.2 bug fix (TU6) as don't
// // need this
// pMinecraft->options->hideGui = true;
SetAction(i, eAppAction_SocialPostScreenshot);
} else {
SetAction(i, eAppAction_Idle);
}
} else {
SetAction(i, eAppAction_Idle);
}
break;
case eAppAction_SocialPostScreenshot: {
SetAction(i, eAppAction_Idle);
bool bKeepHiding = false;
for (int j = 0; j < XUSER_MAX_COUNT; ++j) {
if (app.GetXuiAction(j) ==
eAppAction_SocialPostScreenshot) {
bKeepHiding = true;
break;
}
}
pMinecraft->options->hideGui = bKeepHiding;
// SetAction(i, eAppAction_SocialPostScreenshot);
// } else {
// SetAction(i, eAppAction_Idle);
// }
// } else {
// SetAction(i, eAppAction_Idle);
// }
// break;
// case eAppAction_SocialPostScreenshot: {
// SetAction(i, eAppAction_Idle);
// bool bKeepHiding = false;
// for (int j = 0; j < XUSER_MAX_COUNT; ++j) {
// if (app.GetXuiAction(j) ==
// eAppAction_SocialPostScreenshot) {
// bKeepHiding = true;
// break;
// }
// }
// pMinecraft->options->hideGui = bKeepHiding;
// Facebook Share
// // Facebook Share
if (app.GetLocalPlayerCount() > 1) {
ui.NavigateToScene(i, eUIScene_SocialPost);
} else {
ui.NavigateToScene(i, eUIScene_SocialPost);
}
} break;
// if (app.GetLocalPlayerCount() > 1) {
// ui.NavigateToScene(i, eUIScene_SocialPost);
// } else {
// ui.NavigateToScene(i, eUIScene_SocialPost);
// }
// } break;
case eAppAction_SaveGame:
SetAction(i, eAppAction_Idle);
if (!GetChangingSessionType()) {

View file

@ -92,31 +92,31 @@ std::wstring UIScene_PauseMenu::getMoviePath() {
void UIScene_PauseMenu::tick() { UIScene::tick(); }
void UIScene_PauseMenu::updateTooltips() {
bool bUserisClientSide = ProfileManager.IsSignedInLive(m_iPad);
bool bIsisPrimaryHost =
g_NetworkManager.IsHost() && (ProfileManager.GetPrimaryPad() == m_iPad);
// bool bUserisClientSide = ProfileManager.IsSignedInLive(m_iPad);
// bool bIsisPrimaryHost =
// g_NetworkManager.IsHost() && (ProfileManager.GetPrimaryPad() == m_iPad);
int iY = -1;
int iRB = -1;
int iX = -1;
if (ProfileManager.IsFullVersion()) {
if (StorageManager.GetSaveDisabled()) {
iX = bIsisPrimaryHost ? IDS_TOOLTIPS_SELECTDEVICE : -1;
if (CSocialManager::Instance()->IsTitleAllowedToPostImages() &&
CSocialManager::Instance()->AreAllUsersAllowedToPostImages() &&
bUserisClientSide) {
iY = IDS_TOOLTIPS_SHARE;
}
} else {
iX = bIsisPrimaryHost ? IDS_TOOLTIPS_CHANGEDEVICE : -1;
if (CSocialManager::Instance()->IsTitleAllowedToPostImages() &&
CSocialManager::Instance()->AreAllUsersAllowedToPostImages() &&
bUserisClientSide) {
iY = IDS_TOOLTIPS_SHARE;
}
}
}
// if (ProfileManager.IsFullVersion()) {
// if (StorageManager.GetSaveDisabled()) {
// iX = bIsisPrimaryHost ? IDS_TOOLTIPS_SELECTDEVICE : -1;
// if (CSocialManager::Instance()->IsTitleAllowedToPostImages() &&
// CSocialManager::Instance()->AreAllUsersAllowedToPostImages() &&
// bUserisClientSide) {
// iY = IDS_TOOLTIPS_SHARE;
// }
// } else {
// iX = bIsisPrimaryHost ? IDS_TOOLTIPS_CHANGEDEVICE : -1;
// if (CSocialManager::Instance()->IsTitleAllowedToPostImages() &&
// CSocialManager::Instance()->AreAllUsersAllowedToPostImages() &&
// bUserisClientSide) {
// iY = IDS_TOOLTIPS_SHARE;
// }
// }
// }
ui.SetTooltips(m_iPad, IDS_TOOLTIPS_SELECT, IDS_TOOLTIPS_BACK, iX, iY, -1,
-1, -1, iRB);
}

View file

@ -103,7 +103,6 @@ using namespace DirectX;
#include "../Windows64/Windows64_App.h"
#include "Minecraft.spa.h"
#include "../Windows64/XML/ATGXmlParser.h"
#include "../Windows64/Source Files/Social/SocialManager.h"
#include "../Common/Source Files/Audio/SoundEngine.h"
#include "../Windows64/Iggy/include/iggy.h"
#include "../Windows64/Iggy/gdraw/gdraw_d3d11.h"
@ -114,7 +113,6 @@ using namespace DirectX;
#include "Minecraft.spa.h"
#include "../Common/Source Files/Audio/SoundEngine.h"
#include "../Linux/Linux_UIController.h"
#include "../Linux/Social/SocialManager.h"
#endif
#include "../Common/Source Files/ConsoleGameMode.h"

View file

@ -58,7 +58,6 @@ static void sigsegv_handler(int sig) {
#include "Minecraft.World/ConsoleHelpers/ThreadName.h"
#include "../net/minecraft/stats/StatsCounter.h"
#include "../net/minecraft/client/multiplayer/ConnectScreen.h"
// #include "../../Windows64/Source Files/Social/SocialManager.h"
// #include "../../Common/Source Files/Leaderboards/LeaderboardManager.h"
// #include "../Common/XUI/XUI_Scene_Container.h"
// #include "NetworkManager.h"

View file

@ -1,41 +0,0 @@
// ts just stink, social manager is a stupid stub rn
#pragma once
#include "../Stubs/winapi_stubs.h"
#ifndef _SOCIAL_MANAGER_H
#define _SOCIAL_MANAGER_H
enum ESocialNetwork { eFacebook = 0, eNumSocialNetworks };
class CSocialManager {
public:
static CSocialManager* Instance() {
static CSocialManager s_instance;
return &s_instance;
}
void Initialise() {}
void Tick() {}
bool RefreshPostingCapability() { return false; }
bool IsTitleAllowedToPostAnything() { return false; }
bool IsTitleAllowedToPostImages() { return false; }
bool IsTitleAllowedToPostLinks() { return false; }
bool AreAllUsersAllowedToPostImages() { return false; }
bool PostLinkToSocialNetwork(ESocialNetwork, uint32_t, bool) {
return false;
}
bool PostImageToSocialNetwork(ESocialNetwork, uint32_t, bool) {
return false;
}
void SetSocialPostText(const wchar_t*, const wchar_t*, const wchar_t*) {}
private:
CSocialManager() {}
CSocialManager(const CSocialManager&);
CSocialManager& operator=(const CSocialManager&);
};
#endif // _SOCIAL_MANAGER_H

View file

@ -1,19 +1,6 @@
#include "Minecraft.World/Header Files/stdafx.h"
// #include <compressapi.h>
#if defined(_WINDOWS64)
#include "../net/minecraft/stats/StatsCounter.h"
#include "../Windows64/Source Files/Social/SocialManager.h"
#include "../Windows64/Source Files/Sentient/DynamicConfigurations.h"
#elif defined(__linux__)
// On Linux, stdafx.h already provides Orbis-compatible Sentient/Dynamic headers
// via #pragma once. Pull in SentientManager for CSentientManager class
// declaration and StatsCounter; CSocialManager is provided as inline stubs via
// Linux/Social/SocialManager.h.
#include "../net/minecraft/stats/StatsCounter.h"
#else
#include "../net/minecraft/stats/StatsCounter.h"
#endif
#if defined(_WINDOWS64)
// C4JStorage StorageManager;
@ -37,28 +24,6 @@ void ATG::XMLParser::RegisterSAXCallbackInterface(ISAXCallback* pISAXCallback) {
}
#endif
#if !defined(__linux__)
bool CSocialManager::IsTitleAllowedToPostAnything() { return false; }
bool CSocialManager::AreAllUsersAllowedToPostImages() { return false; }
bool CSocialManager::IsTitleAllowedToPostImages() { return false; }
bool CSocialManager::PostLinkToSocialNetwork(ESocialNetwork eSocialNetwork,
uint32_t dwUserIndex,
bool bUsingKinect) {
return false;
}
bool CSocialManager::PostImageToSocialNetwork(ESocialNetwork eSocialNetwork,
uint32_t dwUserIndex,
bool bUsingKinect) {
return false;
}
CSocialManager* CSocialManager::Instance() { return nullptr; }
void CSocialManager::SetSocialPostText(const wchar_t* Title,
const wchar_t* Caption,
const wchar_t* Desc) {};
#endif
uint32_t XShowPartyUI(uint32_t dwUserIndex) { return 0; }
uint32_t XShowFriendsUI(uint32_t dwUserIndex) { return 0; }
int32_t XPartyGetUserList(XPARTY_USER_LIST* pUserList) { return S_OK; }

View file

@ -1,134 +0,0 @@
//
// Class to handle and manage integration with social networks.
// 4J Studios Ltd, 2011.
// Andy West
//
#if !defined(_SOCIAL_MANAGER_H)
#define _SOCIAL_MANAGER_H
#if !defined(__linux__)
#include <xsocialpost.h>
#endif
#define MAX_SOCIALPOST_CAPTION 60
#define MAX_SOCIALPOST_DESC 100
// XDK only provides for facebook so far. Others may follow!?
enum ESocialNetwork { eFacebook = 0, eNumSocialNetworks };
// Class follows singleton design pattern.
class CSocialManager {
private:
// Default constructor, copy constructor and assignment operator are all
// private.
CSocialManager();
CSocialManager(const CSocialManager&);
CSocialManager& operator=(const CSocialManager&);
// Static private instance.
static CSocialManager* m_pInstance;
// Bitset of title posting capability flags ( XSOCIAL_CAPABILITY_POSTIMAGE,
// XSOCIAL_CAPABILITY_POSTLINK ).
uint32_t m_dwSocialPostingCapability;
// Index of user who made current active request.
uint32_t m_dwCurrRequestUser;
// WESTY : Not sure if we even need to get social access key!
/*
// Size of the social network access key text buffer.
uint32_t m_dwAccessKeyTextSize;
// Pointer to the social network access key text buffer.
wchar_t* m_pAccessKeyText;
*/
// The various states of the manager.
enum EState {
eStateUnitialised = 0,
eStateReady,
eStateGetPostingCapability,
eStatePostingImage,
eStatePostingLink,
};
// Current state that manager is in.
EState m_eCurrState;
// For xsocial asyncronous operations.
XOVERLAPPED m_Overlapped;
uint32_t m_dwOverlappedResultCode;
// Social post preview image struct.
XSOCIAL_PREVIEWIMAGE m_PostPreviewImage;
// Image details for posting an image to social network.
unsigned char* m_pMainImageBuffer;
uint32_t m_dwMainImageBufferSize;
void DestroyMainPostImage();
void DestroyPreviewPostImage();
// WESTY : Not sure if we even need to get social access key!
/*
bool GetSocialNetworkAccessKey( ESocialNetwork
eSocialNetwork, uint32_t dwUserIndex, bool bUsingKinect, uint32_t
dwUserTrackingIndex, bool bShowNetworkSignin );
*/
public:
// Retrieve singleton instance.
static CSocialManager* Instance();
// To be called once during game init.
void Initialise();
// Tick the social manager. Only does anything in async mode, polls for
// results of async actions.
void Tick();
// May need to be called if something changes (i.e. player signs in to live
// ).
bool RefreshPostingCapability();
// Returns true if any social newtork posting is allowed by us, false if not
// (if false, game must not display any social network UI).
bool IsTitleAllowedToPostAnything();
// Returns true if we are allowed to post images to social networks.
bool IsTitleAllowedToPostImages();
// Returns true if we are allowed to post links to social networks.
bool IsTitleAllowedToPostLinks();
// Returns false if any of the live signed in users have disabled
// XPRIVILEGE_SOCIAL_NETWORK_SHARING
bool AreAllUsersAllowedToPostImages();
// Post a test link to social network.
bool PostLinkToSocialNetwork(ESocialNetwork eSocialNetwork,
uint32_t dwUserIndex, bool bUsingKinect);
// Post a test image to social network.
bool PostImageToSocialNetwork(ESocialNetwork eSocialNetwork,
uint32_t dwUserIndex, bool bUsingKinect);
void SetSocialPostText(const wchar_t* Title, const wchar_t* Caption,
const wchar_t* Desc);
// WESTY : Not sure if we even need to get social access key!
/*
// We do not currently know what this is used for. We may not even
need it? bool ObtainSocialNetworkAccessKey( ESocialNetwork
eSocialNetwork, uint32_t dwUserIndex, bool bUsingKinect );
*/
private:
wchar_t m_wchTitleA[MAX_SOCIALPOST_CAPTION + 1];
wchar_t m_wchCaptionA[MAX_SOCIALPOST_CAPTION + 1];
wchar_t m_wchDescA[MAX_SOCIALPOST_DESC + 1];
};
#endif