diff --git a/4J.Profile/4J_Profile.cpp b/4J.Profile/4J_Profile.cpp index 33b88d143..8aaf7b78c 100644 --- a/4J.Profile/4J_Profile.cpp +++ b/4J.Profile/4J_Profile.cpp @@ -22,9 +22,9 @@ void C_4JProfile::SetLockedProfile(int iProf) {} bool C_4JProfile::IsSignedIn(int iQuadrant) { return iQuadrant == 0; } bool C_4JProfile::IsSignedInLive(int iProf) { return false; } bool C_4JProfile::IsGuest(int iQuadrant) { return false; } -UINT C_4JProfile::RequestSignInUI(bool bFromInvite, bool bLocalGame, bool bNoGuestsAllowed, bool bMultiplayerSignIn, bool bAddUser, int(*Func)(LPVOID, const bool, const int iPad), LPVOID lpParam, int iQuadrant) { return 0; } -UINT C_4JProfile::DisplayOfflineProfile(int(*Func)(LPVOID, const bool, const int iPad), LPVOID lpParam, int iQuadrant) { return 0; } -UINT C_4JProfile::RequestConvertOfflineToGuestUI(int(*Func)(LPVOID, const bool, const int iPad), LPVOID lpParam, int iQuadrant) { return 0; } +UINT C_4JProfile::RequestSignInUI(bool bFromInvite, bool bLocalGame, bool bNoGuestsAllowed, bool bMultiplayerSignIn, bool bAddUser, int(*Func)(void *, const bool, const int iPad), void *lpParam, int iQuadrant) { return 0; } +UINT C_4JProfile::DisplayOfflineProfile(int(*Func)(void *, const bool, const int iPad), void *lpParam, int iQuadrant) { return 0; } +UINT C_4JProfile::RequestConvertOfflineToGuestUI(int(*Func)(void *, const bool, const int iPad), void *lpParam, int iQuadrant) { return 0; } void C_4JProfile::SetPrimaryPlayerChanged(bool bVal) {} bool C_4JProfile::QuerySigninStatus(void) { return true; } void C_4JProfile::GetXUID(int iPad, PlayerUID *pXuid, bool bOnlineXuid) { if (pXuid) *pXuid = 0; } @@ -53,15 +53,15 @@ static char s_gamertag[64] = "Player"; char* C_4JProfile::GetGamertag(int iPad) { return s_gamertag; } std::wstring C_4JProfile::GetDisplayName(int iPad) { return L"Player"; } bool C_4JProfile::IsFullVersion() { return true; } -void C_4JProfile::SetSignInChangeCallback(void(*Func)(LPVOID, bool, unsigned int), LPVOID lpParam) {} -void C_4JProfile::SetNotificationsCallback(void(*Func)(LPVOID, DWORD, unsigned int), LPVOID lpParam) {} +void C_4JProfile::SetSignInChangeCallback(void(*Func)(void *, bool, unsigned int), void *lpParam) {} +void C_4JProfile::SetNotificationsCallback(void(*Func)(void *, std::uint32_t, unsigned int), void *lpParam) {} bool C_4JProfile::RegionIsNorthAmerica(void) { return true; } bool C_4JProfile::LocaleIsUSorCanada(void) { return true; } HRESULT C_4JProfile::GetLiveConnectionStatus() { return S_OK; } bool C_4JProfile::IsSystemUIDisplayed() { return false; } -void C_4JProfile::SetProfileReadErrorCallback(void(*Func)(LPVOID), LPVOID lpParam) {} -int C_4JProfile::SetDefaultOptionsCallback(int(*Func)(LPVOID, PROFILESETTINGS *, const int iPad), LPVOID lpParam) { return 0; } -int C_4JProfile::SetOldProfileVersionCallback(int(*Func)(LPVOID, unsigned char *, const unsigned short, const int), LPVOID lpParam) { return 0; } +void C_4JProfile::SetProfileReadErrorCallback(void(*Func)(void *), void *lpParam) {} +int C_4JProfile::SetDefaultOptionsCallback(int(*Func)(void *, PROFILESETTINGS *, const int iPad), void *lpParam) { return 0; } +int C_4JProfile::SetOldProfileVersionCallback(int(*Func)(void *, unsigned char *, const unsigned short, const int), void *lpParam) { return 0; } static C_4JProfile::PROFILESETTINGS s_defaultSettings = {}; C_4JProfile::PROFILESETTINGS* C_4JProfile::GetDashboardProfileSettings(int iPad) { return &s_defaultSettings; } @@ -82,5 +82,5 @@ void C_4JProfile::RegisterRichPresenceContext(int iGameConfigContextID) {} void C_4JProfile::SetRichPresenceContextValue(int iPad, int iContextID, int iVal) {} void C_4JProfile::SetCurrentGameActivity(int iPad, int iNewPresence, bool bSetOthersToIdle) {} void C_4JProfile::DisplayFullVersionPurchase(bool bRequired, int iQuadrant, int iUpsellParam) {} -void C_4JProfile::SetUpsellCallback(void(*Func)(LPVOID lpParam, eUpsellType type, eUpsellResponse response, int iUserData), LPVOID lpParam) {} +void C_4JProfile::SetUpsellCallback(void(*Func)(void *lpParam, eUpsellType type, eUpsellResponse response, int iUserData), void *lpParam) {} void C_4JProfile::SetDebugFullOverride(bool bVal) {} diff --git a/4J.Profile/4J_Profile.h b/4J.Profile/4J_Profile.h index 4e6fc606c..bdf8ff89c 100644 --- a/4J.Profile/4J_Profile.h +++ b/4J.Profile/4J_Profile.h @@ -1,5 +1,7 @@ #pragma once +#include + enum eAwardType { eAwardType_Achievement = 0, @@ -54,9 +56,9 @@ public: bool IsSignedIn(int iQuadrant); bool IsSignedInLive(int iProf); bool IsGuest(int iQuadrant); - UINT RequestSignInUI(bool bFromInvite,bool bLocalGame,bool bNoGuestsAllowed,bool bMultiplayerSignIn,bool bAddUser, int( *Func)(LPVOID,const bool, const int iPad),LPVOID lpParam,int iQuadrant=XUSER_INDEX_ANY); - UINT DisplayOfflineProfile(int( *Func)(LPVOID,const bool, const int iPad),LPVOID lpParam,int iQuadrant=XUSER_INDEX_ANY); - UINT RequestConvertOfflineToGuestUI(int( *Func)(LPVOID,const bool, const int iPad),LPVOID lpParam,int iQuadrant=XUSER_INDEX_ANY); + UINT RequestSignInUI(bool bFromInvite,bool bLocalGame,bool bNoGuestsAllowed,bool bMultiplayerSignIn,bool bAddUser, int( *Func)(void *,const bool, const int iPad),void *lpParam,int iQuadrant=XUSER_INDEX_ANY); + UINT DisplayOfflineProfile(int( *Func)(void *,const bool, const int iPad),void *lpParam,int iQuadrant=XUSER_INDEX_ANY); + UINT RequestConvertOfflineToGuestUI(int( *Func)(void *,const bool, const int iPad),void *lpParam,int iQuadrant=XUSER_INDEX_ANY); void SetPrimaryPlayerChanged(bool bVal); bool QuerySigninStatus(void); void GetXUID(int iPad, PlayerUID *pXuid,bool bOnlineXuid); @@ -78,18 +80,18 @@ public: char* GetGamertag(int iPad); std::wstring GetDisplayName(int iPad); bool IsFullVersion(); - void SetSignInChangeCallback(void ( *Func)(LPVOID, bool, unsigned int),LPVOID lpParam); - void SetNotificationsCallback(void ( *Func)(LPVOID, DWORD, unsigned int),LPVOID lpParam); + void SetSignInChangeCallback(void ( *Func)(void *, bool, unsigned int),void *lpParam); + void SetNotificationsCallback(void ( *Func)(void *, std::uint32_t, unsigned int),void *lpParam); bool RegionIsNorthAmerica(void); bool LocaleIsUSorCanada(void); HRESULT GetLiveConnectionStatus(); bool IsSystemUIDisplayed(); - void SetProfileReadErrorCallback(void ( *Func)(LPVOID), LPVOID lpParam); + void SetProfileReadErrorCallback(void ( *Func)(void *), void *lpParam); // PROFILE DATA - int SetDefaultOptionsCallback(int( *Func)(LPVOID,PROFILESETTINGS *, const int iPad),LPVOID lpParam); - int SetOldProfileVersionCallback(int( *Func)(LPVOID,unsigned char *, const unsigned short,const int),LPVOID lpParam); + int SetDefaultOptionsCallback(int( *Func)(void *,PROFILESETTINGS *, const int iPad),void *lpParam); + int SetOldProfileVersionCallback(int( *Func)(void *,unsigned char *, const unsigned short,const int),void *lpParam); PROFILESETTINGS * GetDashboardProfileSettings(int iPad); void WriteToProfile(int iQuadrant, bool bGameDefinedDataChanged=false, bool bOverride5MinuteLimitOnProfileWrites=false); void ForceQueuedProfileWrites(int iPad=XUSER_INDEX_ANY); @@ -116,7 +118,7 @@ public: // PURCHASE void DisplayFullVersionPurchase(bool bRequired, int iQuadrant, int iUpsellParam = -1); - void SetUpsellCallback(void ( *Func)(LPVOID lpParam, eUpsellType type, eUpsellResponse response, int iUserData),LPVOID lpParam); + void SetUpsellCallback(void ( *Func)(void *lpParam, eUpsellType type, eUpsellResponse response, int iUserData),void *lpParam); // Debug void SetDebugFullOverride(bool bVal); // To override the license version (trail/full). Only in debug/release, not ContentPackage diff --git a/Minecraft.Client/Platform/Common/Consoles_App.cpp b/Minecraft.Client/Platform/Common/Consoles_App.cpp index 95bb8618d..131b54ab8 100644 --- a/Minecraft.Client/Platform/Common/Consoles_App.cpp +++ b/Minecraft.Client/Platform/Common/Consoles_App.cpp @@ -4744,7 +4744,7 @@ void CMinecraftApp::SignInChangeCallback(void *pParam,bool bPrimaryPlayerChanged } } -void CMinecraftApp::NotificationsCallback(void *pParam,DWORD dwNotification, unsigned int uiParam) +void CMinecraftApp::NotificationsCallback(void *pParam,std::uint32_t dwNotification, unsigned int uiParam) { CMinecraftApp* pClass = (CMinecraftApp*)pParam; diff --git a/Minecraft.Client/Platform/Common/Consoles_App.h b/Minecraft.Client/Platform/Common/Consoles_App.h index 5e8dd13fc..4b8807399 100644 --- a/Minecraft.Client/Platform/Common/Consoles_App.h +++ b/Minecraft.Client/Platform/Common/Consoles_App.h @@ -288,7 +288,7 @@ public: virtual void FatalLoadError(); // Notifications from the game listener to be passed to the qnet listener - static void NotificationsCallback(void *pParam,DWORD dwNotification, unsigned int uiParam); + static void NotificationsCallback(void *pParam,std::uint32_t dwNotification, unsigned int uiParam); // for the ethernet being disconnected static void LiveLinkChangeCallback(void *pParam,BOOL bConnected); diff --git a/Minecraft.Client/Platform/Extrax64Stubs.cpp b/Minecraft.Client/Platform/Extrax64Stubs.cpp index 09aaa0104..ad521919b 100644 --- a/Minecraft.Client/Platform/Extrax64Stubs.cpp +++ b/Minecraft.Client/Platform/Extrax64Stubs.cpp @@ -467,9 +467,9 @@ void C_4JProfile::SetLockedProfile(int iProf) {} bool C_4JProfile::IsSignedIn(int iQuadrant) { return ( iQuadrant == 0); } bool C_4JProfile::IsSignedInLive(int iProf) { return true; } bool C_4JProfile::IsGuest(int iQuadrant) { return false; } -UINT C_4JProfile::RequestSignInUI(bool bFromInvite,bool bLocalGame,bool bNoGuestsAllowed,bool bMultiplayerSignIn,bool bAddUser, int( *Func)(LPVOID,const bool, const int iPad),LPVOID lpParam,int iQuadrant) { return 0; } -UINT C_4JProfile::DisplayOfflineProfile(int( *Func)(LPVOID,const bool, const int iPad),LPVOID lpParam,int iQuadrant) { return 0; } -UINT C_4JProfile::RequestConvertOfflineToGuestUI(int( *Func)(LPVOID,const bool, const int iPad),LPVOID lpParam,int iQuadrant) { return 0; } +UINT C_4JProfile::RequestSignInUI(bool bFromInvite,bool bLocalGame,bool bNoGuestsAllowed,bool bMultiplayerSignIn,bool bAddUser, int( *Func)(void *,const bool, const int iPad),void *lpParam,int iQuadrant) { return 0; } +UINT C_4JProfile::DisplayOfflineProfile(int( *Func)(void *,const bool, const int iPad),void *lpParam,int iQuadrant) { return 0; } +UINT C_4JProfile::RequestConvertOfflineToGuestUI(int( *Func)(void *,const bool, const int iPad),void *lpParam,int iQuadrant) { return 0; } void C_4JProfile::SetPrimaryPlayerChanged(bool bVal) {} bool C_4JProfile::QuerySigninStatus(void) { return true; } void C_4JProfile::GetXUID(int iPad, PlayerUID *pXuid,bool bOnlineXuid) {*pXuid = 0xe000d45248242f2e; } @@ -503,22 +503,22 @@ char* C_4JProfile::GetGamertag(int iPad){ return "PlayerName"; } std::wstring C_4JProfile::GetDisplayName(int iPad){ return L"PlayerName"; } #endif bool C_4JProfile::IsFullVersion() { return s_bProfileIsFullVersion; } -void C_4JProfile::SetSignInChangeCallback(void ( *Func)(LPVOID, bool, unsigned int),LPVOID lpParam) {} -void C_4JProfile::SetNotificationsCallback(void ( *Func)(LPVOID, DWORD, unsigned int),LPVOID lpParam) {} +void C_4JProfile::SetSignInChangeCallback(void ( *Func)(void *, bool, unsigned int),void *lpParam) {} +void C_4JProfile::SetNotificationsCallback(void ( *Func)(void *, std::uint32_t, unsigned int),void *lpParam) {} bool C_4JProfile::RegionIsNorthAmerica(void) { return false; } bool C_4JProfile::LocaleIsUSorCanada(void) { return false; } HRESULT C_4JProfile::GetLiveConnectionStatus() { return S_OK; } bool C_4JProfile::IsSystemUIDisplayed() { return false; } -void C_4JProfile::SetProfileReadErrorCallback(void ( *Func)(LPVOID), LPVOID lpParam) {} -int( *defaultOptionsCallback)(LPVOID,C_4JProfile::PROFILESETTINGS *, const int iPad) = NULL; -LPVOID lpProfileParam = NULL; -int C_4JProfile::SetDefaultOptionsCallback(int( *Func)(LPVOID,PROFILESETTINGS *, const int iPad),LPVOID lpParam) +void C_4JProfile::SetProfileReadErrorCallback(void ( *Func)(void *), void *lpParam) {} +int( *defaultOptionsCallback)(void *,C_4JProfile::PROFILESETTINGS *, const int iPad) = NULL; +void *lpProfileParam = NULL; +int C_4JProfile::SetDefaultOptionsCallback(int( *Func)(void *,PROFILESETTINGS *, const int iPad),void *lpParam) { defaultOptionsCallback = Func; lpProfileParam = lpParam; return 0; } -int C_4JProfile::SetOldProfileVersionCallback(int( *Func)(LPVOID,unsigned char *, const unsigned short,const int),LPVOID lpParam) { return 0; } +int C_4JProfile::SetOldProfileVersionCallback(int( *Func)(void *,unsigned char *, const unsigned short,const int),void *lpParam) { return 0; } // To store the dashboard preferences for controller flipped, etc. C_4JProfile::PROFILESETTINGS ProfileSettingsA[XUSER_MAX_COUNT]; @@ -548,7 +548,7 @@ void C_4JProfile::RegisterRichPresenceContext(int iGameConfigContextID) {} void C_4JProfile::SetRichPresenceContextValue(int iPad,int iContextID, int iVal) {} void C_4JProfile::SetCurrentGameActivity(int iPad,int iNewPresence, bool bSetOthersToIdle) {} void C_4JProfile::DisplayFullVersionPurchase(bool bRequired, int iQuadrant, int iUpsellParam) {} -void C_4JProfile::SetUpsellCallback(void ( *Func)(LPVOID lpParam, eUpsellType type, eUpsellResponse response, int iUserData),LPVOID lpParam) {} +void C_4JProfile::SetUpsellCallback(void ( *Func)(void *lpParam, eUpsellType type, eUpsellResponse response, int iUserData),void *lpParam) {} void C_4JProfile::SetDebugFullOverride(bool bVal) {s_bProfileIsFullVersion = bVal;} void C_4JProfile::ShowProfileCard(int iPad, PlayerUID targetUid) {} diff --git a/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp b/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp index 38717792f..14729679c 100644 --- a/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp +++ b/Minecraft.Client/Platform/Linux/Linux_Minecraft.cpp @@ -700,10 +700,10 @@ ProfileManager.Initialise(TITLEID_MINECRAFT, ); // set a function to be called when there's a sign in change, so we can exit a level if the primary player signs out -ProfileManager.SetSignInChangeCallback(&CConsoleMinecraftApp::SignInChangeCallback,(LPVOID)&app); +ProfileManager.SetSignInChangeCallback(&CConsoleMinecraftApp::SignInChangeCallback, &app); // Set a callback for when there is a read error on profile data -//StorageManager.SetProfileReadErrorCallback(&CConsoleMinecraftApp::ProfileReadErrorCallback,(LPVOID)&app); +//StorageManager.SetProfileReadErrorCallback(&CConsoleMinecraftApp::ProfileReadErrorCallback, &app); // QNet needs to be setup after profile manager, as we do not want its Notify listener to handle